Skip to content

Latest commit

 

History

History
423 lines (300 loc) · 12.3 KB

File metadata and controls

423 lines (300 loc) · 12.3 KB

BillaBear.PaymentDetailsApi

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

Method HTTP request Description
completeFrontendPaymentDetails POST /customer/{customerId}/payment-methods/frontend-payment-token Complete Frontend Detail Collection
deletePaymentDetails DELETE /payment-methods/{paymentDetailsId} Delete
deletePaymentDetailsCustomer DELETE /customer/{customerId}/payment-methods/{paymentDetailsId} Delete With Customer
getPaymentDetails GET /payment-methods/{paymentDetailsId} Fetch
listPaymentDetails GET /customer/{customerId}/payment-methods List Customer's Payment Details
makeDefaultPaymentDetails POST /payment-methods/{paymentDetailsId}/default Make Default
makeDefaultPaymentDetailsCustomer POST /customer/{customerId}/payment-methods/{paymentDetailsId}/default Make Default With Customer
startFrontendPaymentDetails GET /customer/{customerId}/payment-methods/frontend-payment-token Start Frontend Detail Collection

completeFrontendPaymentDetails

PaymentDetails completeFrontendPaymentDetails(body, customerId)

Complete Frontend Detail Collection

Complete frontend payment details

Example

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.PaymentDetailsApi();
let body = new BillaBear.FrontendToken(); // FrontendToken | 
let customerId = "customerId_example"; // String | The id of the customer to retrieve

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

Parameters

Name Type Description Notes
body FrontendToken
customerId String The id of the customer to retrieve

Return type

PaymentDetails

Authorization

ApiKeyAuth

HTTP request headers

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

deletePaymentDetails

deletePaymentDetails(paymentDetailsId)

Delete

Delete Payment Details

Example

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.PaymentDetailsApi();
let paymentDetailsId = "paymentDetailsId_example"; // String | The id of the payment details

apiInstance.deletePaymentDetails(paymentDetailsId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
paymentDetailsId String The id of the payment details

Return type

null (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

deletePaymentDetailsCustomer

deletePaymentDetailsCustomer(customerId, paymentDetailsId)

Delete With Customer

Delete Payment Details

Example

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.PaymentDetailsApi();
let customerId = "customerId_example"; // String | The id of the customer to retrieve
let paymentDetailsId = "paymentDetailsId_example"; // String | The id of the payment details

apiInstance.deletePaymentDetailsCustomer(customerId, paymentDetailsId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
customerId String The id of the customer to retrieve
paymentDetailsId String The id of the payment details

Return type

null (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getPaymentDetails

PaymentDetails getPaymentDetails(paymentDetailsId)

Fetch

Fetch the payment cards

Example

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.PaymentDetailsApi();
let paymentDetailsId = "paymentDetailsId_example"; // String | The id of the payment details

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

Parameters

Name Type Description Notes
paymentDetailsId String The id of the payment details

Return type

PaymentDetails

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listPaymentDetails

InlineResponse2007 listPaymentDetails(customerId)

List Customer's Payment Details

List all customers <br><br>Added in version 1.1

Example

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.PaymentDetailsApi();
let customerId = "customerId_example"; // String | The id of the customer to retrieve

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

Parameters

Name Type Description Notes
customerId String The id of the customer to retrieve

Return type

InlineResponse2007

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

makeDefaultPaymentDetails

makeDefaultPaymentDetails(customerId, paymentDetailsId)

Make Default

Delete Payment Details

Example

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.PaymentDetailsApi();
let customerId = "customerId_example"; // String | The id of the customer to retrieve
let paymentDetailsId = "paymentDetailsId_example"; // String | The id of the payment details

apiInstance.makeDefaultPaymentDetails(customerId, paymentDetailsId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
customerId String The id of the customer to retrieve
paymentDetailsId String The id of the payment details

Return type

null (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

makeDefaultPaymentDetailsCustomer

makeDefaultPaymentDetailsCustomer(customerId, paymentDetailsId)

Make Default With Customer

Delete Payment Details

Example

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.PaymentDetailsApi();
let customerId = "customerId_example"; // String | The id of the customer to retrieve
let paymentDetailsId = "paymentDetailsId_example"; // String | The id of the payment details

apiInstance.makeDefaultPaymentDetailsCustomer(customerId, paymentDetailsId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
customerId String The id of the customer to retrieve
paymentDetailsId String The id of the payment details

Return type

null (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

startFrontendPaymentDetails

FrontendToken startFrontendPaymentDetails(customerId)

Start Frontend Detail Collection

Start frontend payment details

Example

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.PaymentDetailsApi();
let customerId = "customerId_example"; // String | The id of the customer to retrieve

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

Parameters

Name Type Description Notes
customerId String The id of the customer to retrieve

Return type

FrontendToken

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json