billabear
v1.0.0
Published
The_REST_API_provided_by_BillaBear
Readme
billa_bear
BillaBear - JavaScript client for billa_bear The REST API provided by BillaBear This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen For more information, please visit http://www.billabear.com/support
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install billa_bear --savegit
If the library is hosted at a git repository, e.g. https://github.com/billabear/go-sdk then install it via:
npm install billabear/go-sdk --saveFor browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.jsThen include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}Getting Started
Please follow the installation instruction and execute the following JS code:
var BillaBear = require('billa_bear');
var defaultClient = BillaBear.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-API-Key'] = "Token"
var api = new BillaBear.CheckoutApi()
var body = new BillaBear.CheckoutBody(); // {CheckoutBody}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createCheckout(body, callback);Documentation for API Endpoints
All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- BillaBear.CheckoutApi | createCheckout | POST /checkout | Create Checkout BillaBear.CustomersApi | addSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/add | Add Seats BillaBear.CustomersApi | applyVoucherToCustomer | POST /customer/{customerId}/voucher | Apply voucher BillaBear.CustomersApi | createCustomer | POST /customer | Create BillaBear.CustomersApi | disableCustomer | POST /customer/{customerId}/disable | Disable Customer BillaBear.CustomersApi | enableCustomer | POST /customer/{customerId}/enable | Enable Customer BillaBear.CustomersApi | getActiveForCustomer | GET /customer/{customerId}/subscription/active | List Customer Active Subscriptions BillaBear.CustomersApi | getAllCustomers | GET /customer | List BillaBear.CustomersApi | getCustomerById | GET /customer/{customerId} | Detail BillaBear.CustomersApi | getCustomerLimitsById | GET /customer/{customerId}/limits | Fetch Customer Limits BillaBear.CustomersApi | getForCustomer | GET /customer/{customerId}/subscription | List Customer Subscriptions BillaBear.CustomersApi | getInvoicesForCustomer | GET /customer/{customerId}/invoices | List Customer Invoices BillaBear.CustomersApi | getPaymentsForCustomer | GET /customer/{customerId}/payment | List Customer Payments BillaBear.CustomersApi | getRefundsForCustomer | GET /customer/{customerId}/refund | List Customer Refunds BillaBear.CustomersApi | listPaymentDetails | GET /customer/{customerId}/payment-methods | List Customer's Payment Details BillaBear.CustomersApi | removeSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/remove | Remove Seats BillaBear.CustomersApi | updateCustomer | PUT /customer/{customerId} | Update BillaBear.InvoicesApi | chargeInvoice | POST /invoice/{invoiceId}/charge | Charge Invoice BillaBear.InvoicesApi | downloadInvoice | GET /invoice/{invoiceId}/download | Download Invoice BillaBear.InvoicesApi | getInvoicesForCustomer | GET /customer/{customerId}/invoices | List Customer Invoices BillaBear.PaymentDetailsApi | completeFrontendPaymentDetails | POST /customer/{customerId}/payment-methods/frontend-payment-token | Complete Frontend Detail Collection BillaBear.PaymentDetailsApi | deletePaymentDetails | DELETE /payment-methods/{paymentDetailsId} | Delete BillaBear.PaymentDetailsApi | deletePaymentDetailsCustomer | DELETE /customer/{customerId}/payment-methods/{paymentDetailsId} | Delete With Customer BillaBear.PaymentDetailsApi | getPaymentDetails | GET /payment-methods/{paymentDetailsId} | Fetch BillaBear.PaymentDetailsApi | listPaymentDetails | GET /customer/{customerId}/payment-methods | List Customer's Payment Details BillaBear.PaymentDetailsApi | makeDefaultPaymentDetails | POST /payment-methods/{paymentDetailsId}/default | Make Default BillaBear.PaymentDetailsApi | makeDefaultPaymentDetailsCustomer | POST /customer/{customerId}/payment-methods/{paymentDetailsId}/default | Make Default With Customer BillaBear.PaymentDetailsApi | startFrontendPaymentDetails | GET /customer/{customerId}/payment-methods/frontend-payment-token | Start Frontend Detail Collection BillaBear.PaymentsApi | chargeInvoice | POST /invoice/{invoiceId}/charge | Charge Invoice BillaBear.PaymentsApi | downloadInvoice | GET /invoice/{invoiceId}/download | Download Invoice BillaBear.PaymentsApi | downloadReceipt | GET /receipt/{receiptId}/download | Download Receipt BillaBear.PaymentsApi | getInvoicesForCustomer | GET /customer/{customerId}/invoices | List Customer Invoices BillaBear.PaymentsApi | getPaymentsForCustomer | GET /customer/{customerId}/payment | List Customer Payments BillaBear.PaymentsApi | listPayment | GET /payment | List BillaBear.PaymentsApi | refundPayment | POST /payment/{paymentId}/refund | Refund Payment BillaBear.PricesApi | createPrice | POST /product/{productId}/price | Create BillaBear.PricesApi | listPrice | GET /product/{productId}/price | List BillaBear.ProductsApi | createProduct | POST /product | Create BillaBear.ProductsApi | listProduct | GET /product | List BillaBear.ProductsApi | showProductById | GET /product/{productId} | Detail BillaBear.ProductsApi | updateProduct | PUT /product/{productId} | Update BillaBear.ReceiptApi | downloadReceipt | GET /receipt/{receiptId}/download | Download Receipt BillaBear.RefundsApi | getRefundsForCustomer | GET /customer/{customerId}/refund | List Customer Refunds BillaBear.RefundsApi | listRefund | GET /refund | List BillaBear.RefundsApi | showRefundById | GET /refund/{refundId} | Detail BillaBear.SubscriptionsApi | addSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/add | Add Seats BillaBear.SubscriptionsApi | cancelSubscription | POST /subscription/{subscriptionId}/cancel | Cancel Subscription BillaBear.SubscriptionsApi | changeSubscriptionPrice | POST /subscription/{subscriptionId}/price | Change Price BillaBear.SubscriptionsApi | createSubscription | POST /customer/{customerId}/subscription/start | Create Subscription BillaBear.SubscriptionsApi | customerChangeSubscriptionPlan | POST /subscription/{subscriptionId}/plan | Change Subscription Plan BillaBear.SubscriptionsApi | extendTrial | POST /subscription/{subscriptionId}/extend | Extend Trial Subscription BillaBear.SubscriptionsApi | getActiveForCustomer | GET /customer/{customerId}/subscription/active | List Customer Active Subscriptions BillaBear.SubscriptionsApi | getForCustomer | GET /customer/{customerId}/subscription | List Customer Subscriptions BillaBear.SubscriptionsApi | listSubscriptionPlans | GET /subscription/plans | List Subscription Plans BillaBear.SubscriptionsApi | listSubscriptions | GET /subscription | List BillaBear.SubscriptionsApi | removeSeatsSubscriptions | POST /subscription/{subscriptionId}/seats/remove | Remove Seats BillaBear.SubscriptionsApi | showSubscriptionById | GET /subscription/{subscriptionId} | Detail BillaBear.SubscriptionsApi | startTrial | POST /customer/{customerId}/subscription/trial | Start Trial Subscription For Customer
Documentation for Models
- BillaBear.Address
- BillaBear.BillingAdmin
- BillaBear.CheckoutBody
- BillaBear.CheckoutItems
- BillaBear.CheckoutSubscriptions
- BillaBear.Customer
- BillaBear.Error
- BillaBear.Feature
- BillaBear.FrontendToken
- BillaBear.InlineResponse200
- BillaBear.InlineResponse2001
- BillaBear.InlineResponse20010
- BillaBear.InlineResponse20011
- BillaBear.InlineResponse20012
- BillaBear.InlineResponse2002
- BillaBear.InlineResponse2003
- BillaBear.InlineResponse2004
- BillaBear.InlineResponse2005
- BillaBear.InlineResponse2006
- BillaBear.InlineResponse2007
- BillaBear.InlineResponse2007Data
- BillaBear.InlineResponse2007Receipts
- BillaBear.InlineResponse2008
- BillaBear.InlineResponse2009
- BillaBear.InlineResponse201
- BillaBear.InlineResponse201Lines
- BillaBear.InlineResponse400
- BillaBear.Invoice
- BillaBear.InvoiceLines
- BillaBear.IssueRefundPayment
- BillaBear.Limit
- BillaBear.PaymentDetails
- BillaBear.Price
- BillaBear.Product
- BillaBear.ProductTaxType
- BillaBear.Refund
- BillaBear.SeatsAddBody
- BillaBear.SeatsRemoveBody
- BillaBear.Subscription
- BillaBear.SubscriptionIdCancelBody
- BillaBear.SubscriptionIdExtendBody
- BillaBear.SubscriptionIdPlanBody
- BillaBear.SubscriptionIdPriceBody
- BillaBear.SubscriptionPlan
- BillaBear.SubscriptionStartBody
- BillaBear.SubscriptionTrialBody
- BillaBear.VoucherCode
Documentation for Authorization
ApiKeyAuth
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
