vivebamba / bamba-sdk-php
SDK for Bamba API
1.3.3
2021-11-03 22:44 UTC
Requires
- php: >=7.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
README
SDK for Bamba API
Installation & Usage
Requirements
PHP 7.2 and later.
Composer
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
Manual Installation
Download the files and include autoload.php
:
<?php require_once('/path/to/bamba-sdk-php/vendor/autoload.php');
Getting Started
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; }
API Endpoints
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 |
Models
- AdvisorMessageRequest
- AdvisorUser
- CancellationResponse
- Customer
- ErrorResponse
- InlineResponse200
- InlineResponse2001
- InlineResponse422
- InlineResponse4221
- InlineResponse422Errors
- Message
- Order
- OrderProducts
- PaymentParams
- Product
- ProductDescription
Authorization
ApiKeyAuth
- Type: API key
- API key parameter name: x-api-key
- Location: HTTP header
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
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