vivebamba/bamba-sdk-php

1.3.3 2021-11-03 22:44 UTC

This package is auto-updated.

Last update: 2024-03-29 04:26:38 UTC


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

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

desarrollo@vivebamba.com

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.3.3
    • Package version: 1.3.3
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen