All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
charge_invoice | POST /invoice/{invoiceId}/charge | Charge Invoice |
download_invoice | GET /invoice/{invoiceId}/download | Download Invoice |
download_receipt | GET /receipt/{receiptId}/download | Download Receipt |
get_invoices_for_customer | GET /customer/{customerId}/invoices | List Customer Invoices |
get_payments_for_customer | GET /customer/{customerId}/payment | List Customer Payments |
list_payment | GET /payment | List |
refund_payment | POST /payment/{paymentId}/refund | Refund Payment |
InlineResponse20014 charge_invoice(invoice_id)
Charge Invoice
Attempts to charge a card that is on file for the invoice amount
# load the gem
require 'billabear'
# setup authorization
Billabear.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = Billabear::PaymentsApi.new
invoice_id = 'invoice_id_example' # String | The id of the invoice
begin
#Charge Invoice
result = api_instance.charge_invoice(invoice_id)
p result
rescue Billabear::ApiError => e
puts "Exception when calling PaymentsApi->charge_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | String | The id of the invoice |
- Content-Type: Not defined
- Accept: application/json
String download_invoice(invoice_id)
Download Invoice
Returns the pdf blob for the invoice
# load the gem
require 'billabear'
# setup authorization
Billabear.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = Billabear::PaymentsApi.new
invoice_id = 'invoice_id_example' # String | The id of the invoice
begin
#Download Invoice
result = api_instance.download_invoice(invoice_id)
p result
rescue Billabear::ApiError => e
puts "Exception when calling PaymentsApi->download_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | String | The id of the invoice |
String
- Content-Type: Not defined
- Accept: application/pdf
String download_receipt(receipt)
Download Receipt
Returns the pdf blob for the Receipt
# load the gem
require 'billabear'
# setup authorization
Billabear.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = Billabear::PaymentsApi.new
receipt = 'receipt_example' # String | The id of the receipt
begin
#Download Receipt
result = api_instance.download_receipt(receipt)
p result
rescue Billabear::ApiError => e
puts "Exception when calling PaymentsApi->download_receipt: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
receipt | String | The id of the receipt |
String
- Content-Type: Not defined
- Accept: application/pdf
InlineResponse2006 get_invoices_for_customer(customer_id)
List Customer Invoices
List Customer Invoices
# load the gem
require 'billabear'
# setup authorization
Billabear.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = Billabear::PaymentsApi.new
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
begin
#List Customer Invoices
result = api_instance.get_invoices_for_customer(customer_id)
p result
rescue Billabear::ApiError => e
puts "Exception when calling PaymentsApi->get_invoices_for_customer: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
customer_id | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2004 get_payments_for_customer(customer_id, opts)
List Customer Payments
List Customer Payment
# load the gem
require 'billabear'
# setup authorization
Billabear.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = Billabear::PaymentsApi.new
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
opts = {
limit: 56, # Integer | How many items to return at one time (max 100)
last_key: 'last_key_example', # String | The key to be used in pagination to say what the last key of the previous page was
name: 'name_example' # String | The name to search for
}
begin
#List Customer Payments
result = api_instance.get_payments_for_customer(customer_id, opts)
p result
rescue Billabear::ApiError => e
puts "Exception when calling PaymentsApi->get_payments_for_customer: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
customer_id | String | The id of the customer to retrieve | |
limit | Integer | How many items to return at one time (max 100) | [optional] |
last_key | String | The key to be used in pagination to say what the last key of the previous page was | [optional] |
name | String | The name to search for | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2009 list_payment(opts)
List
List all payment
# load the gem
require 'billabear'
# setup authorization
Billabear.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = Billabear::PaymentsApi.new
opts = {
limit: 56, # Integer | How many items to return at one time (max 100)
last_key: 'last_key_example', # String | The key to be used in pagination to say what the last key of the previous page was
name: 'name_example' # String | The name to search for
}
begin
#List
result = api_instance.list_payment(opts)
p result
rescue Billabear::ApiError => e
puts "Exception when calling PaymentsApi->list_payment: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | How many items to return at one time (max 100) | [optional] |
last_key | String | The key to be used in pagination to say what the last key of the previous page was | [optional] |
name | String | The name to search for | [optional] |
- Content-Type: Not defined
- Accept: application/json
refund_payment(bodypayment_id)
Refund Payment
Issue a refund for payment
# load the gem
require 'billabear'
# setup authorization
Billabear.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = Billabear::PaymentsApi.new
body = Billabear::IssueRefundPayment.new # IssueRefundPayment |
payment_id = 'payment_id_example' # String | The id of the payment
begin
#Refund Payment
api_instance.refund_payment(bodypayment_id)
rescue Billabear::ApiError => e
puts "Exception when calling PaymentsApi->refund_payment: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | IssueRefundPayment | ||
payment_id | String | The id of the payment |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json