Skip to content

billabear/php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwaggerClient-php

The REST API provided by BillaBear

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

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/billabear/php-sdk.git"
    }
  ],
  "require": {
    "billabear/php-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: ApiKeyAuth
$config = BillaBear\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BillaBear\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$apiInstance = new BillaBear\Api\CheckoutApi(
    // 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 \BillaBear\Model\CheckoutBody(); // \BillaBear\Model\CheckoutBody | 

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

Documentation for API Endpoints

All URIs are relative to https://{customerId}.billabear.cloud/api/v1

Class Method HTTP request Description
CheckoutApi createCheckout POST /checkout Create Checkout
CustomersApi addSeatsSubscriptions POST /subscription/{subscriptionId}/seats/add Add Seats
CustomersApi applyVoucherToCustomer POST /customer/{customerId}/voucher Apply voucher
CustomersApi createCustomer POST /customer Create
CustomersApi disableCustomer POST /customer/{customerId}/disable Disable Customer
CustomersApi enableCustomer POST /customer/{customerId}/enable Enable Customer
CustomersApi fetchCustomerById GET /customer/{customerId} Detail
CustomersApi listCustomerInvoices GET /customer/{customerId}/invoices List Customer Invoices
CustomersApi listCustomerPayment GET /customer/{customerId}/payment List Customer Payments
CustomersApi listCustomerRefund GET /customer/{customerId}/refund List Customer Refunds
CustomersApi listCustomers GET /customer List
CustomersApi listCustomnerSubscriptions GET /customer/{customerId}/subscription List Customer Subscriptions
CustomersApi listPaymentDetails GET /customer/{customerId}/payment-methods List Customer's Payment Details
CustomersApi removeSeatsSubscriptions POST /subscription/{subscriptionId}/seats/remove Remove Seats
CustomersApi showCustomerLimitsById GET /customer/{customerId}/limits Fetch Customer Limits
CustomersApi updateCustomer PUT /customer/{customerId} Update
InvoicesApi chargeInvoice POST /invoice/{invoiceId}/charge Charge Invoice
InvoicesApi downloadInvoice POST /invoice/{invoiceId}/download Download Invoice
InvoicesApi listCustomerInvoices GET /customer/{customerId}/invoices List Customer Invoices
PaymentDetailsApi completeFrontendPaymentDetails POST /customer/{customerId}/payment-methods/frontend-payment-token Complete Frontend Detail Collection
PaymentDetailsApi deletePaymentDetails DELETE /customer/{customerId}/payment-methods/{paymentDetailsId} Delete
PaymentDetailsApi listPaymentDetails GET /customer/{customerId}/payment-methods List Customer's Payment Details
PaymentDetailsApi makeDefaultPaymentDetails POST /customer/{customerId}/payment-methods/{paymentDetailsId}/default Make Default
PaymentDetailsApi startFrontendPaymentDetails GET /customer/{customerId}/payment-methods/frontend-payment-token Start Frontend Detail Collection
PaymentsApi chargeInvoice POST /invoice/{invoiceId}/charge Charge Invoice
PaymentsApi downloadInvoice POST /invoice/{invoiceId}/download Download Invoice
PaymentsApi downloadReceipt POST /receipt/{receiptId}/download Download Receipt
PaymentsApi listCustomerInvoices GET /customer/{customerId}/invoices List Customer Invoices
PaymentsApi listCustomerPayment GET /customer/{customerId}/payment List Customer Payments
PaymentsApi listPayment GET /payment List
PaymentsApi refundPayment POST /payment/{paymentId}/refund Refund Payment
PricesApi createPrice POST /product/{productId}/price Create
PricesApi listPrice GET /product/{productId}/price List
ProductsApi createProduct POST /product Create
ProductsApi listProduct GET /product List
ProductsApi showProductById GET /product/{productId} Detail
ProductsApi updateProduct PUT /product/{productId} Update
ReceiptApi downloadReceipt POST /receipt/{receiptId}/download Download Receipt
RefundsApi listCustomerRefund GET /customer/{customerId}/refund List Customer Refunds
RefundsApi listRefund GET /refund List
RefundsApi showRefundById GET /refund/{refundId} Detail
SubscriptionsApi addSeatsSubscriptions POST /subscription/{subscriptionId}/seats/add Add Seats
SubscriptionsApi cancelSubscription POST /subscription/{subscriptionId}/cancel Cancel Subscription
SubscriptionsApi customerChangeSubscriptionPlan POST /subscription/{subscriptionId}/plan Change Subscription Plan
SubscriptionsApi customerStartSubscription POST /customer/{customerId}/subscription/start Start Subscription For Customer
SubscriptionsApi listCustomnerSubscriptions GET /customer/{customerId}/subscription List Customer Subscriptions
SubscriptionsApi listSubscriptions GET /subscription List
SubscriptionsApi removeSeatsSubscriptions POST /subscription/{subscriptionId}/seats/remove Remove Seats
SubscriptionsApi showSubscriptionById GET /subscription/{subscriptionId} Detail

Documentation For Models

Documentation For Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-API-Key
  • Location: HTTP header

Author

[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published