SDK for Bamba API
PHP 7.2 and later.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/vivebamba/bamba-sdk-php.git"
}
],
"require": {
"vivebamba/bamba-sdk-php": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/bamba-sdk-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = Bamba\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Bamba\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new Bamba\Api\BambaAdvisorApi(
// 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
);
$advisorMessageRequest = new \Bamba\Model\AdvisorMessageRequest(); // \Bamba\Model\AdvisorMessageRequest
try {
$result = $apiInstance->advisorMessagePost($advisorMessageRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BambaAdvisorApi->advisorMessagePost: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://sandbox.vivebamba.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
BambaAdvisorApi | advisorMessagePost | POST /advisor/message | Send messages to the Bamba Advisor |
CustomerApi | customerCustomerIdServicesGet | GET /customer/{customerId}/services | Get customer services |
CustomerApi | customerCustomerIdServicesServiceIdCancelPut | PUT /customer/{customerId}/services/{serviceId}/cancel | Cancel customer services |
StoreApi | storeOrdersPost | POST /store/orders | Place an order |
StoreApi | storeProductsGet | GET /store/products | Get products |
- AdvisorMessageRequest
- AdvisorUser
- CancellationResponse
- Customer
- ErrorResponse
- InlineResponse200
- InlineResponse2001
- InlineResponse422
- InlineResponse4221
- InlineResponse422Errors
- Message
- Order
- OrderProducts
- PaymentParams
- Product
- ProductDescription
- Type: API key
- API key parameter name: x-api-key
- Location: HTTP header
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.3.3
- Package version:
1.3.3
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen