SwaggerClient-php

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

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

  • API version: 1
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

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

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/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: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('sw-access-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('sw-access-key', 'Bearer');

$apiInstance = new Swagger\Client\Api\CategoryApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Identifier for the category

try {
    $result = $apiInstance->getCategory($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CategoryApi->getCategory: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('sw-access-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('sw-access-key', 'Bearer');

$apiInstance = new Swagger\Client\Api\CategoryApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$limit = 56; // int | Max amount of resources to be returned in a page
$page = 56; // int | The page to be returned
$query = "query_example"; // string | Encoded SwagQL in JSON

try {
    $result = $apiInstance->getCategoryList($limit, $page, $query);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CategoryApi->getCategoryList: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to http://0.0.0.0/sales-channel-api/v1

Class Method HTTP request Description
CategoryApi getCategory GET /category/{id} Detailed information about a Category resource
CategoryApi getCategoryList GET /category List with basic information of Category resources
CountryApi getCountry GET /country/{id} Detailed information about a Country resource
CountryApi getCountryList GET /country List with basic information of Country resources
CountryStateApi getCountryState GET /country-state/{id} Detailed information about a Country State resource
CountryStateApi getCountryStateList GET /country-state List with basic information of Country State resources
CurrencyApi getCurrency GET /currency/{id} Detailed information about a Currency resource
CurrencyApi getCurrencyList GET /currency List with basic information of Currency resources
LanguageApi getLanguage GET /language/{id} Detailed information about a Language resource
LanguageApi getLanguageList GET /language List with basic information of Language resources
MainCategoryApi getMainCategory GET /main-category/{id} Detailed information about a Main Category resource
MainCategoryApi getMainCategoryList GET /main-category List with basic information of Main Category resources
PaymentMethodApi getPaymentMethod GET /payment-method/{id} Detailed information about a Payment Method resource
PaymentMethodApi getPaymentMethodList GET /payment-method List with basic information of Payment Method resources
ProductApi getProduct GET /product/{id} Detailed information about a Product resource
ProductApi getProductList GET /product List with basic information of Product resources
SalesChannelApiApi createCart POST /checkout/cart
SalesChannelApiApi getCrossSelling GET /product/{id}/cross-selling
SalutationApi getSalutation GET /salutation/{id} Detailed information about a Salutation resource
SalutationApi getSalutationList GET /salutation List with basic information of Salutation resources
SeoUrlApi getSeoUrl GET /seo-url/{id} Detailed information about a Seo Url resource
SeoUrlApi getSeoUrlList GET /seo-url List with basic information of Seo Url resources
ShippingMethodApi getShippingMethod GET /shipping-method/{id} Detailed information about a Shipping Method resource
ShippingMethodApi getShippingMethodList GET /shipping-method List with basic information of Shipping Method resources

Documentation For Models

Documentation For Authorization

ApiKey

  • Type: API key
  • API key parameter name: sw-access-key
  • Location: HTTP header

Author