The REST API provided by BillaBear
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 For more information, please visit http://www.billabear.com/support
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
composer require billabear/php-sdk
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
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()
->setHost('YOUR_API_URL')
->setApiKey('X-API-Key', 'YOUR_API_KEY');
$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;
}
?>
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 | createCustomerUsageLimit | POST /customer/{customerId}/uasge-limit | Create Usage Limit |
CustomersApi | customerCustomerIdUasgeLimitLimitIdDelete | DELETE /customer/{customerId}/uasge-limit/{limitId} | Delete Usage Limit |
CustomersApi | disableCustomer | POST /customer/{customerId}/disable | Disable Customer |
CustomersApi | enableCustomer | POST /customer/{customerId}/enable | Enable Customer |
CustomersApi | getActiveForCustomer | GET /customer/{customerId}/subscription/active | List Customer Active Subscriptions |
CustomersApi | getAllCustomers | GET /customer | List |
CustomersApi | getCustomerById | GET /customer/{customerId} | Detail |
CustomersApi | getCustomerCosts | GET /customer/{customerId}/costs | Usage Cost Estimate |
CustomersApi | getCustomerLimitsById | GET /customer/{customerId}/limits | Fetch Customer Limits |
CustomersApi | getCustomerUsageLimitsById | GET /customer/{customerId}/uasge-limit | Fetch Customer Usage Limits |
CustomersApi | getForCustomer | GET /customer/{customerId}/subscription | List Customer Subscriptions |
CustomersApi | getInvoicesForCustomer | GET /customer/{customerId}/invoices | List Customer Invoices |
CustomersApi | getPaymentsForCustomer | GET /customer/{customerId}/payment | List Customer Payments |
CustomersApi | getRefundsForCustomer | GET /customer/{customerId}/refund | List Customer Refunds |
CustomersApi | listPaymentDetails | GET /customer/{customerId}/payment-methods | List Customer's Payment Details |
CustomersApi | removeSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/remove | Remove Seats |
CustomersApi | updateCustomer | PUT /customer/{customerId} | Update |
InvoicesApi | chargeInvoice | POST /invoice/{invoiceId}/charge | Charge Invoice |
InvoicesApi | downloadInvoice | GET /invoice/{invoiceId}/download | Download Invoice |
InvoicesApi | getInvoicesForCustomer | GET /customer/{customerId}/invoices | List Customer Invoices |
PaymentDetailsApi | completeFrontendPaymentDetails | POST /customer/{customerId}/payment-methods/frontend-payment-token | Complete Frontend Detail Collection |
PaymentDetailsApi | deletePaymentDetails | DELETE /payment-methods/{paymentDetailsId} | Delete |
PaymentDetailsApi | deletePaymentDetailsCustomer | DELETE /customer/{customerId}/payment-methods/{paymentDetailsId} | Delete With Customer |
PaymentDetailsApi | getPaymentDetails | GET /payment-methods/{paymentDetailsId} | Fetch |
PaymentDetailsApi | listPaymentDetails | GET /customer/{customerId}/payment-methods | List Customer's Payment Details |
PaymentDetailsApi | makeDefaultPaymentDetails | POST /payment-methods/{paymentDetailsId}/default | Make Default |
PaymentDetailsApi | makeDefaultPaymentDetailsCustomer | POST /customer/{customerId}/payment-methods/{paymentDetailsId}/default | Make Default With Customer |
PaymentDetailsApi | startFrontendPaymentDetails | GET /customer/{customerId}/payment-methods/frontend-payment-token | Start Frontend Detail Collection |
PaymentsApi | chargeInvoice | POST /invoice/{invoiceId}/charge | Charge Invoice |
PaymentsApi | downloadInvoice | GET /invoice/{invoiceId}/download | Download Invoice |
PaymentsApi | downloadReceipt | GET /receipt/{receiptId}/download | Download Receipt |
PaymentsApi | getInvoicesForCustomer | GET /customer/{customerId}/invoices | List Customer Invoices |
PaymentsApi | getPaymentsForCustomer | 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 | GET /receipt/{receiptId}/download | Download Receipt |
RefundsApi | getRefundsForCustomer | 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 | changeSubscriptionPrice | POST /subscription/{subscriptionId}/price | Change Price |
SubscriptionsApi | createSubscription | POST /customer/{customerId}/subscription/start | Create Subscription |
SubscriptionsApi | customerChangeSubscriptionPlan | POST /subscription/{subscriptionId}/plan | Change Subscription Plan |
SubscriptionsApi | extendTrial | POST /subscription/{subscriptionId}/extend | Extend Trial Subscription |
SubscriptionsApi | getActiveForCustomer | GET /customer/{customerId}/subscription/active | List Customer Active Subscriptions |
SubscriptionsApi | getForCustomer | GET /customer/{customerId}/subscription | List Customer Subscriptions |
SubscriptionsApi | listSubscriptionPlans | GET /subscription/plans | List Subscription Plans |
SubscriptionsApi | listSubscriptions | GET /subscription | List |
SubscriptionsApi | removeSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/remove | Remove Seats |
SubscriptionsApi | showSubscriptionById | GET /subscription/{subscriptionId} | Detail |
SubscriptionsApi | startTrial | POST /customer/{customerId}/subscription/trial | Start Trial Subscription For Customer |
UsageApi | createCustomerUsageLimit | POST /customer/{customerId}/uasge-limit | Create Usage Limit |
UsageApi | createEvent | POST /events | Create Event |
UsageApi | customerCustomerIdUasgeLimitLimitIdDelete | DELETE /customer/{customerId}/uasge-limit/{limitId} | Delete Usage Limit |
UsageApi | getCustomerCosts | GET /customer/{customerId}/costs | Usage Cost Estimate |
UsageApi | getCustomerUsageLimitsById | GET /customer/{customerId}/uasge-limit | Fetch Customer Usage Limits |
- Address
- BillingAdmin
- CheckoutBody
- CheckoutItems
- CheckoutSubscriptions
- Cost
- Customer
- CustomerIdUasgelimitBody
- Error
- Event
- Feature
- FrontendToken
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse20012
- InlineResponse20013
- InlineResponse20014
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- InlineResponse2009Data
- InlineResponse2009Receipts
- InlineResponse201
- InlineResponse201Lines
- InlineResponse400
- Invoice
- InvoiceLines
- IssueRefundPayment
- Limit
- Metric
- MetricCost
- MetricFilter
- PaymentDetails
- Price
- Product
- ProductTaxType
- Refund
- SeatsAddBody
- SeatsRemoveBody
- Subscription
- SubscriptionIdCancelBody
- SubscriptionIdExtendBody
- SubscriptionIdPlanBody
- SubscriptionIdPriceBody
- SubscriptionPlan
- SubscriptionStartBody
- SubscriptionTrialBody
- UsageLimit
- VoucherCode
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header