Skip to content

iQXCorp/AmplifyPhpClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwaggerClient-php

Welcome to the iQX Amplify API reference. This is a live example of how you can use iQX Amplify to integrate your own e-commerce store or ticketing engine. The iQX Amplify API is organized around the REST mothodology, and it uses resource-oriented URLs, and common HTTP response codes to indicate API errors. All requests are authenticated using an api-key which can be obtained from your developer dashboard within iQX Amplify.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/iQXCorp/AmplifyPhpClient.git"
    }
  ],
  "require": {
    "iQXCorp/AmplifyPhpClient": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('authorization', 'YOUR_API_KEY');
Swagger\Client\Configuration::getDefaultConfiguration()->setSandboxMode(true);
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\CustomersApi();
$customer = new \Swagger\Client\Model\Customer(); // \Swagger\Client\Model\Customer | Add or update customer details

try {
    $result = $api_instance->createOrUpdateCustomer($customer);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->createOrUpdateCustomer: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://public-api.iqxamplify.com/V1

Class Method HTTP request Description
CustomersApi createOrUpdateCustomer POST /customers/ Create or Update a customer
CustomersApi findCustomers GET /customers/ Retrieve all customers
CustomersApi findCustomersById GET /customers/{id} Retrieve a single customer by id
OrdersApi createOrUpdateOrder POST /orders/ Create or Update a order
OrdersApi findOrders GET /orders/ Retrieve all orders
OrdersApi findOrdersById GET /orders/{id} Retrieve a single order by id
ProductsApi createOrUpdateProduct POST /products/ Create or Update a product
ProductsApi findProducts GET /products/ Retrieve all products
ProductsApi findProductsById GET /products/{id} Retrieve a single product by id

Documentation For Models

Documentation For Authorization

api_key

  • Type: API key
  • API key parameter name: authorization
  • Location: HTTP header

Author

[email protected]