Skip to content

billabear/java-sdk

Repository files navigation

BillaBear Java SDK

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>io.swagger</groupId>
  <artifactId>swagger-java-client</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.swagger:swagger-java-client:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/swagger-java-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import BillaBear.*;
import BillaBear.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CheckoutApi;

import java.io.File;
import java.util.*;

public class CheckoutApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath('YOUR_API_URL');
        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        CheckoutApi apiInstance = new CheckoutApi();
        CheckoutBody body = new CheckoutBody(); // CheckoutBody | 
        try {
            InlineResponse201 result = apiInstance.createCheckout(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CheckoutApi#createCheckout");
            e.printStackTrace();
        }
    }
}

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 getActiveForCustomer GET /customer/{customerId}/subscription/active List Customer Active Subscriptions
CustomersApi getAllCustomers GET /customer List
CustomersApi getCustomerById GET /customer/{customerId} Detail
CustomersApi getCustomerLimitsById GET /customer/{customerId}/limits Fetch Customer 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

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKeyAuth

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

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

support@billabear.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages