ventureleap/leap-one-order-sdk

dev-master 2021-07-27 15:19 UTC

This package is auto-updated.

Last update: 2024-05-07 12:22:22 UTC


README

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.0.0
  • 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/ventureleap/leap-one-order-sdk.git"
    }
  ],
  "require": {
    "ventureleap/leap-one-order-sdk": "*@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 = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VentureLeap\OrderService\Api\BillingAddressApi(
    // 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
);
$page = 1; // int | The collection page number

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

// Configure API key authorization: apiKey
$config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VentureLeap\OrderService\Api\BillingAddressApi(
    // 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 = "id_example"; // string | 

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

// Configure API key authorization: apiKey
$config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VentureLeap\OrderService\Api\BillingAddressApi(
    // 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
);
$body = new \VentureLeap\OrderService\Model\BillingAddressJsonldBillingAddressWrite(); // \VentureLeap\OrderService\Model\BillingAddressJsonldBillingAddressWrite | The new BillingAddress resource

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

// Configure API key authorization: apiKey
$config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VentureLeap\OrderService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VentureLeap\OrderService\Api\BillingAddressApi(
    // 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 = "id_example"; // string | 
$body = new \VentureLeap\OrderService\Model\BillingAddressJsonldBillingAddressWrite(); // \VentureLeap\OrderService\Model\BillingAddressJsonldBillingAddressWrite | The updated BillingAddress resource

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

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
BillingAddressApi getBillingAddressCollection GET /order/billing_addresses Retrieves the collection of BillingAddress resources.
BillingAddressApi getBillingAddressItem GET /order/billing_addresses/{id} Retrieves a BillingAddress resource.
BillingAddressApi postBillingAddressCollection POST /order/billing_addresses Creates a BillingAddress resource.
BillingAddressApi putBillingAddressItem PUT /order/billing_addresses/{id} Replaces the BillingAddress resource.
ConfigurationEntryApi deleteConfigurationEntryItem DELETE /order/configuration_entries/{id} Removes the ConfigurationEntry resource.
ConfigurationEntryApi getConfigurationEntryCollection GET /order/configuration_entries Retrieves the collection of ConfigurationEntry resources.
ConfigurationEntryApi getConfigurationEntryItem GET /order/configuration_entries/{id} Retrieves a ConfigurationEntry resource.
ConfigurationEntryApi postConfigurationEntryCollection POST /order/configuration_entries Creates a ConfigurationEntry resource.
ConfigurationEntryApi putConfigurationEntryItem PUT /order/configuration_entries/{id} Replaces the ConfigurationEntry resource.
OrderApi deleteOrderItem DELETE /order/orders/{id} Removes the Order resource.
OrderApi getOrderCollection GET /order/orders Retrieves the collection of Order resources.
OrderApi getOrderItem GET /order/orders/{id} Retrieves a Order resource.
OrderApi postOrderCollection POST /order/orders Creates a Order resource.
OrderApi putOrderItem PUT /order/orders/{id} Replaces the Order resource.
OrderProductApi deleteOrderProductItem DELETE /order/order_products/{id} Removes the OrderProduct resource.
OrderProductApi getOrderProductCollection GET /order/order_products Retrieves the collection of OrderProduct resources.
OrderProductApi getOrderProductItem GET /order/order_products/{id} Retrieves a OrderProduct resource.
OrderProductApi postOrderProductCollection POST /order/order_products Creates a OrderProduct resource.
OrderProductApi putOrderProductItem PUT /order/order_products/{id} Replaces the OrderProduct resource.
OrderVoucherApi deleteOrderVoucherItem DELETE /order/order_vouchers/{id} Removes the OrderVoucher resource.
OrderVoucherApi getOrderVoucherCollection GET /order/order_vouchers Retrieves the collection of OrderVoucher resources.
OrderVoucherApi getOrderVoucherItem GET /order/order_vouchers/{id} Retrieves a OrderVoucher resource.
OrderVoucherApi postOrderVoucherCollection POST /order/order_vouchers Creates a OrderVoucher resource.
OrderVoucherApi putOrderVoucherItem PUT /order/order_vouchers/{id} Replaces the OrderVoucher resource.
VoucherApi deleteVoucherItem DELETE /order/vouchers/{id} Removes the Voucher resource.
VoucherApi getVoucherCollection GET /order/vouchers Retrieves the collection of Voucher resources.
VoucherApi getVoucherItem GET /order/vouchers/{id} Retrieves a Voucher resource.
VoucherApi postVoucherCollection POST /order/vouchers Creates a Voucher resource.
VoucherApi putVoucherItem PUT /order/vouchers/{id} Replaces the Voucher resource.

Documentation For Models

Documentation For Authorization

0

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

apiKey

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

Author