Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
that-guy-iain committed Jul 21, 2024
0 parents commit dbf2a53
Show file tree
Hide file tree
Showing 178 changed files with 17,531 additions and 0 deletions.
217 changes: 217 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
# billa_bear

BillaBear - JavaScript client for billa_bear
The REST API provided by BillaBear
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/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](http://www.billabear.com/support)

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/),
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install billa_bear --save
```

#### git
#
If the library is hosted at a git repository, e.g.
https://github.com/billabear/go-sdk
then install it via:

```shell
npm install billabear/go-sdk --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). 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):

```shell
browserify main.js > bundle.js
```

Then 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:

```javascript
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
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**](docs/CheckoutApi.md#createCheckout) | **POST** /checkout | Create Checkout
*BillaBear.CustomersApi* | [**addSeatsSubscriptions**](docs/CustomersApi.md#addSeatsSubscriptions) | **POST** /subscription/{subscriptionId}/seats/add | Add Seats
*BillaBear.CustomersApi* | [**applyVoucherToCustomer**](docs/CustomersApi.md#applyVoucherToCustomer) | **POST** /customer/{customerId}/voucher | Apply voucher
*BillaBear.CustomersApi* | [**createCustomer**](docs/CustomersApi.md#createCustomer) | **POST** /customer | Create
*BillaBear.CustomersApi* | [**disableCustomer**](docs/CustomersApi.md#disableCustomer) | **POST** /customer/{customerId}/disable | Disable Customer
*BillaBear.CustomersApi* | [**enableCustomer**](docs/CustomersApi.md#enableCustomer) | **POST** /customer/{customerId}/enable | Enable Customer
*BillaBear.CustomersApi* | [**getActiveForCustomer**](docs/CustomersApi.md#getActiveForCustomer) | **GET** /customer/{customerId}/subscription/active | List Customer Active Subscriptions
*BillaBear.CustomersApi* | [**getAllCustomers**](docs/CustomersApi.md#getAllCustomers) | **GET** /customer | List
*BillaBear.CustomersApi* | [**getCustomerById**](docs/CustomersApi.md#getCustomerById) | **GET** /customer/{customerId} | Detail
*BillaBear.CustomersApi* | [**getCustomerLimitsById**](docs/CustomersApi.md#getCustomerLimitsById) | **GET** /customer/{customerId}/limits | Fetch Customer Limits
*BillaBear.CustomersApi* | [**getForCustomer**](docs/CustomersApi.md#getForCustomer) | **GET** /customer/{customerId}/subscription | List Customer Subscriptions
*BillaBear.CustomersApi* | [**getInvoicesForCustomer**](docs/CustomersApi.md#getInvoicesForCustomer) | **GET** /customer/{customerId}/invoices | List Customer Invoices
*BillaBear.CustomersApi* | [**getPaymentsForCustomer**](docs/CustomersApi.md#getPaymentsForCustomer) | **GET** /customer/{customerId}/payment | List Customer Payments
*BillaBear.CustomersApi* | [**getRefundsForCustomer**](docs/CustomersApi.md#getRefundsForCustomer) | **GET** /customer/{customerId}/refund | List Customer Refunds
*BillaBear.CustomersApi* | [**listPaymentDetails**](docs/CustomersApi.md#listPaymentDetails) | **GET** /customer/{customerId}/payment-methods | List Customer's Payment Details
*BillaBear.CustomersApi* | [**removeSeatsSubscriptions**](docs/CustomersApi.md#removeSeatsSubscriptions) | **POST** /subscription/{subscriptionId}/seats/remove | Remove Seats
*BillaBear.CustomersApi* | [**updateCustomer**](docs/CustomersApi.md#updateCustomer) | **PUT** /customer/{customerId} | Update
*BillaBear.InvoicesApi* | [**chargeInvoice**](docs/InvoicesApi.md#chargeInvoice) | **POST** /invoice/{invoiceId}/charge | Charge Invoice
*BillaBear.InvoicesApi* | [**downloadInvoice**](docs/InvoicesApi.md#downloadInvoice) | **GET** /invoice/{invoiceId}/download | Download Invoice
*BillaBear.InvoicesApi* | [**getInvoicesForCustomer**](docs/InvoicesApi.md#getInvoicesForCustomer) | **GET** /customer/{customerId}/invoices | List Customer Invoices
*BillaBear.PaymentDetailsApi* | [**completeFrontendPaymentDetails**](docs/PaymentDetailsApi.md#completeFrontendPaymentDetails) | **POST** /customer/{customerId}/payment-methods/frontend-payment-token | Complete Frontend Detail Collection
*BillaBear.PaymentDetailsApi* | [**deletePaymentDetails**](docs/PaymentDetailsApi.md#deletePaymentDetails) | **DELETE** /payment-methods/{paymentDetailsId} | Delete
*BillaBear.PaymentDetailsApi* | [**deletePaymentDetailsCustomer**](docs/PaymentDetailsApi.md#deletePaymentDetailsCustomer) | **DELETE** /customer/{customerId}/payment-methods/{paymentDetailsId} | Delete With Customer
*BillaBear.PaymentDetailsApi* | [**getPaymentDetails**](docs/PaymentDetailsApi.md#getPaymentDetails) | **GET** /payment-methods/{paymentDetailsId} | Fetch
*BillaBear.PaymentDetailsApi* | [**listPaymentDetails**](docs/PaymentDetailsApi.md#listPaymentDetails) | **GET** /customer/{customerId}/payment-methods | List Customer's Payment Details
*BillaBear.PaymentDetailsApi* | [**makeDefaultPaymentDetails**](docs/PaymentDetailsApi.md#makeDefaultPaymentDetails) | **POST** /payment-methods/{paymentDetailsId}/default | Make Default
*BillaBear.PaymentDetailsApi* | [**makeDefaultPaymentDetailsCustomer**](docs/PaymentDetailsApi.md#makeDefaultPaymentDetailsCustomer) | **POST** /customer/{customerId}/payment-methods/{paymentDetailsId}/default | Make Default With Customer
*BillaBear.PaymentDetailsApi* | [**startFrontendPaymentDetails**](docs/PaymentDetailsApi.md#startFrontendPaymentDetails) | **GET** /customer/{customerId}/payment-methods/frontend-payment-token | Start Frontend Detail Collection
*BillaBear.PaymentsApi* | [**chargeInvoice**](docs/PaymentsApi.md#chargeInvoice) | **POST** /invoice/{invoiceId}/charge | Charge Invoice
*BillaBear.PaymentsApi* | [**downloadInvoice**](docs/PaymentsApi.md#downloadInvoice) | **GET** /invoice/{invoiceId}/download | Download Invoice
*BillaBear.PaymentsApi* | [**downloadReceipt**](docs/PaymentsApi.md#downloadReceipt) | **GET** /receipt/{receiptId}/download | Download Receipt
*BillaBear.PaymentsApi* | [**getInvoicesForCustomer**](docs/PaymentsApi.md#getInvoicesForCustomer) | **GET** /customer/{customerId}/invoices | List Customer Invoices
*BillaBear.PaymentsApi* | [**getPaymentsForCustomer**](docs/PaymentsApi.md#getPaymentsForCustomer) | **GET** /customer/{customerId}/payment | List Customer Payments
*BillaBear.PaymentsApi* | [**listPayment**](docs/PaymentsApi.md#listPayment) | **GET** /payment | List
*BillaBear.PaymentsApi* | [**refundPayment**](docs/PaymentsApi.md#refundPayment) | **POST** /payment/{paymentId}/refund | Refund Payment
*BillaBear.PricesApi* | [**createPrice**](docs/PricesApi.md#createPrice) | **POST** /product/{productId}/price | Create
*BillaBear.PricesApi* | [**listPrice**](docs/PricesApi.md#listPrice) | **GET** /product/{productId}/price | List
*BillaBear.ProductsApi* | [**createProduct**](docs/ProductsApi.md#createProduct) | **POST** /product | Create
*BillaBear.ProductsApi* | [**listProduct**](docs/ProductsApi.md#listProduct) | **GET** /product | List
*BillaBear.ProductsApi* | [**showProductById**](docs/ProductsApi.md#showProductById) | **GET** /product/{productId} | Detail
*BillaBear.ProductsApi* | [**updateProduct**](docs/ProductsApi.md#updateProduct) | **PUT** /product/{productId} | Update
*BillaBear.ReceiptApi* | [**downloadReceipt**](docs/ReceiptApi.md#downloadReceipt) | **GET** /receipt/{receiptId}/download | Download Receipt
*BillaBear.RefundsApi* | [**getRefundsForCustomer**](docs/RefundsApi.md#getRefundsForCustomer) | **GET** /customer/{customerId}/refund | List Customer Refunds
*BillaBear.RefundsApi* | [**listRefund**](docs/RefundsApi.md#listRefund) | **GET** /refund | List
*BillaBear.RefundsApi* | [**showRefundById**](docs/RefundsApi.md#showRefundById) | **GET** /refund/{refundId} | Detail
*BillaBear.SubscriptionsApi* | [**addSeatsSubscriptions**](docs/SubscriptionsApi.md#addSeatsSubscriptions) | **POST** /subscription/{subscriptionId}/seats/add | Add Seats
*BillaBear.SubscriptionsApi* | [**cancelSubscription**](docs/SubscriptionsApi.md#cancelSubscription) | **POST** /subscription/{subscriptionId}/cancel | Cancel Subscription
*BillaBear.SubscriptionsApi* | [**changeSubscriptionPrice**](docs/SubscriptionsApi.md#changeSubscriptionPrice) | **POST** /subscription/{subscriptionId}/price | Change Price
*BillaBear.SubscriptionsApi* | [**createSubscription**](docs/SubscriptionsApi.md#createSubscription) | **POST** /customer/{customerId}/subscription/start | Create Subscription
*BillaBear.SubscriptionsApi* | [**customerChangeSubscriptionPlan**](docs/SubscriptionsApi.md#customerChangeSubscriptionPlan) | **POST** /subscription/{subscriptionId}/plan | Change Subscription Plan
*BillaBear.SubscriptionsApi* | [**extendTrial**](docs/SubscriptionsApi.md#extendTrial) | **POST** /subscription/{subscriptionId}/extend | Extend Trial Subscription
*BillaBear.SubscriptionsApi* | [**getActiveForCustomer**](docs/SubscriptionsApi.md#getActiveForCustomer) | **GET** /customer/{customerId}/subscription/active | List Customer Active Subscriptions
*BillaBear.SubscriptionsApi* | [**getForCustomer**](docs/SubscriptionsApi.md#getForCustomer) | **GET** /customer/{customerId}/subscription | List Customer Subscriptions
*BillaBear.SubscriptionsApi* | [**listSubscriptionPlans**](docs/SubscriptionsApi.md#listSubscriptionPlans) | **GET** /subscription/plans | List Subscription Plans
*BillaBear.SubscriptionsApi* | [**listSubscriptions**](docs/SubscriptionsApi.md#listSubscriptions) | **GET** /subscription | List
*BillaBear.SubscriptionsApi* | [**removeSeatsSubscriptions**](docs/SubscriptionsApi.md#removeSeatsSubscriptions) | **POST** /subscription/{subscriptionId}/seats/remove | Remove Seats
*BillaBear.SubscriptionsApi* | [**showSubscriptionById**](docs/SubscriptionsApi.md#showSubscriptionById) | **GET** /subscription/{subscriptionId} | Detail
*BillaBear.SubscriptionsApi* | [**startTrial**](docs/SubscriptionsApi.md#startTrial) | **POST** /customer/{customerId}/subscription/trial | Start Trial Subscription For Customer

## Documentation for Models

- [BillaBear.Address](docs/Address.md)
- [BillaBear.BillingAdmin](docs/BillingAdmin.md)
- [BillaBear.CheckoutBody](docs/CheckoutBody.md)
- [BillaBear.CheckoutItems](docs/CheckoutItems.md)
- [BillaBear.CheckoutSubscriptions](docs/CheckoutSubscriptions.md)
- [BillaBear.Customer](docs/Customer.md)
- [BillaBear.Error](docs/Error.md)
- [BillaBear.Feature](docs/Feature.md)
- [BillaBear.FrontendToken](docs/FrontendToken.md)
- [BillaBear.InlineResponse200](docs/InlineResponse200.md)
- [BillaBear.InlineResponse2001](docs/InlineResponse2001.md)
- [BillaBear.InlineResponse20010](docs/InlineResponse20010.md)
- [BillaBear.InlineResponse20011](docs/InlineResponse20011.md)
- [BillaBear.InlineResponse20012](docs/InlineResponse20012.md)
- [BillaBear.InlineResponse2002](docs/InlineResponse2002.md)
- [BillaBear.InlineResponse2003](docs/InlineResponse2003.md)
- [BillaBear.InlineResponse2004](docs/InlineResponse2004.md)
- [BillaBear.InlineResponse2005](docs/InlineResponse2005.md)
- [BillaBear.InlineResponse2006](docs/InlineResponse2006.md)
- [BillaBear.InlineResponse2007](docs/InlineResponse2007.md)
- [BillaBear.InlineResponse2007Data](docs/InlineResponse2007Data.md)
- [BillaBear.InlineResponse2007Receipts](docs/InlineResponse2007Receipts.md)
- [BillaBear.InlineResponse2008](docs/InlineResponse2008.md)
- [BillaBear.InlineResponse2009](docs/InlineResponse2009.md)
- [BillaBear.InlineResponse201](docs/InlineResponse201.md)
- [BillaBear.InlineResponse201Lines](docs/InlineResponse201Lines.md)
- [BillaBear.InlineResponse400](docs/InlineResponse400.md)
- [BillaBear.Invoice](docs/Invoice.md)
- [BillaBear.InvoiceLines](docs/InvoiceLines.md)
- [BillaBear.IssueRefundPayment](docs/IssueRefundPayment.md)
- [BillaBear.Limit](docs/Limit.md)
- [BillaBear.PaymentDetails](docs/PaymentDetails.md)
- [BillaBear.Price](docs/Price.md)
- [BillaBear.Product](docs/Product.md)
- [BillaBear.ProductTaxType](docs/ProductTaxType.md)
- [BillaBear.Refund](docs/Refund.md)
- [BillaBear.SeatsAddBody](docs/SeatsAddBody.md)
- [BillaBear.SeatsRemoveBody](docs/SeatsRemoveBody.md)
- [BillaBear.Subscription](docs/Subscription.md)
- [BillaBear.SubscriptionIdCancelBody](docs/SubscriptionIdCancelBody.md)
- [BillaBear.SubscriptionIdExtendBody](docs/SubscriptionIdExtendBody.md)
- [BillaBear.SubscriptionIdPlanBody](docs/SubscriptionIdPlanBody.md)
- [BillaBear.SubscriptionIdPriceBody](docs/SubscriptionIdPriceBody.md)
- [BillaBear.SubscriptionPlan](docs/SubscriptionPlan.md)
- [BillaBear.SubscriptionStartBody](docs/SubscriptionStartBody.md)
- [BillaBear.SubscriptionTrialBody](docs/SubscriptionTrialBody.md)
- [BillaBear.VoucherCode](docs/VoucherCode.md)

## Documentation for Authorization


### ApiKeyAuth

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

12 changes: 12 additions & 0 deletions docs/Address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# BillaBear.Address

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**companyName** | **String** | | [optional]
**streetLineOne** | **String** | | [optional]
**streetLineTwo** | **String** | | [optional]
**city** | **String** | | [optional]
**region** | **String** | | [optional]
**country** | **String** | |
**postcode** | **String** | | [optional]
7 changes: 7 additions & 0 deletions docs/BillingAdmin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# BillaBear.BillingAdmin

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**displayName** | **String** | | [optional]
58 changes: 58 additions & 0 deletions docs/CheckoutApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# BillaBear.CheckoutApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**createCheckout**](CheckoutApi.md#createCheckout) | **POST** /checkout | Create Checkout

<a name="createCheckout"></a>
# **createCheckout**
> InlineResponse201 createCheckout(body)
Create Checkout

Create checkout&lt;br&gt;&lt;br&gt;&lt;strong&gt;Since 2024.01&lt;/strong&gt;

### Example
```javascript
import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
let 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 = 'Token';

let apiInstance = new BillaBear.CheckoutApi();
let body = new BillaBear.CheckoutBody(); // CheckoutBody |

apiInstance.createCheckout(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**CheckoutBody**](CheckoutBody.md)| |

### Return type

[**InlineResponse201**](InlineResponse201.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

11 changes: 11 additions & 0 deletions docs/CheckoutBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# BillaBear.CheckoutBody

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]
**brand** | **String** | |
**slug** | **String** | | [optional]
**customer** | **String** | |
**items** | [**[CheckoutItems]**](CheckoutItems.md) | | [optional]
**subscriptions** | [**[CheckoutSubscriptions]**](CheckoutSubscriptions.md) | | [optional]
10 changes: 10 additions & 0 deletions docs/CheckoutItems.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# BillaBear.CheckoutItems

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **String** | | [optional]
**amount** | **Number** | | [optional]
**currency** | **String** | | [optional]
**includeTax** | **Boolean** | | [optional]
**taxType** | **String** | | [optional]
8 changes: 8 additions & 0 deletions docs/CheckoutSubscriptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# BillaBear.CheckoutSubscriptions

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**plan** | **String** | | [optional]
**price** | **String** | | [optional]
**seatNumber** | **Number** | | [optional]
31 changes: 31 additions & 0 deletions docs/Customer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# BillaBear.Customer

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**email** | **String** | |
**taxNumber** | **String** | The tax number for the customer &lt;strong&gt;Since 1.1&lt;/strong&gt; | [optional]
**standardTaxRate** | **Number** | The tax rate for the customer on for standard services a &lt;strong&gt;Since 1.1&lt;/strong&gt; | [optional]
**digitalTaxRate** | **Number** | The tax rate for the customer on digital services &lt;strong&gt;Since 1.1&lt;/strong&gt; | [optional]
**billingType** | **String** | Choice between card and invoice | [optional]
**type** | **String** | Choice between &#x27;individual&#x27; and &#x27;business&#x27;. When not provided &#x27;individual&#x27; is used. &lt;strong&gt;Since 1.1&lt;/strong&gt; | [optional]
**reference** | **String** | | [optional]
**externalReference** | **String** | | [optional]
**address** | [**Address**](Address.md) | | [optional]
**locale** | **String** | Defaults to &#x27;en&#x27; if not sent. | [optional]
**brand** | **String** | Defaults to &#x27;default&#x27; if not sent. | [optional]

<a name="BillingTypeEnum"></a>
## Enum: BillingTypeEnum

* `card` (value: `"card"`)
* `invoice` (value: `"invoice"`)


<a name="TypeEnum"></a>
## Enum: TypeEnum

* `individual` (value: `"individual"`)
* `business` (value: `"business"`)

Loading

0 comments on commit dbf2a53

Please sign in to comment.