Skip to content

Sology/rebilly-sdk-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rebilly_sdk

RebillySdk - the Ruby gem for the Rebilly REST API

Introduction

The Rebilly API is built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use Rebilly's API, or you can use one of our SDKs (currently available in PHP and Javascript). We have other APIs that are also available. Every action from our app is supported by an API which is documented and available for use so that you may automate any workflows necessary. This document contains the most commonly integrated resources. # Authentication When you sign up for an account, you are given your first secret API key. You can generate additional API keys, and delete API keys (as you may need to rotate your keys in the future). You authenticate to the Rebilly API by providing your secret key in the request header. Rebilly offers three forms of authentication: secret key, publishable key, JSON Web Tokens, and public signature key. - Secret API key: used for requests made from the server side. Never share these keys. Keep them guarded and secure. - Publishable API key: used for requests from the client side. For now can only be used to create a Payment Token and a File token. - JWT: short lifetime tokens that can be assigned a specific expiration time. Never share your secret keys. Keep them guarded and secure. # Errors Rebilly follow's the error response format proposed in RFC 7807 also known as Problem Details for HTTP APIs. As with our normal API responses, your client must be prepared to gracefully handle additional members of the response. ## Forbidden <RedocResponse pointer={"#/components/responses/Forbidden"} /> ## Conflict <RedocResponse pointer={"#/components/responses/Conflict"} /> ## NotFound <RedocResponse pointer={"#/components/responses/NotFound"} /> ## Unauthorized <RedocResponse pointer={"#/components/responses/Unauthorized"} /> ## ValidationError <RedocResponse pointer={"#/components/responses/ValidationError"} /> # SDKs Rebilly offers a Javascript SDK and a PHP SDK to help interact with the API. However, no SDK is required to use the API. Rebilly also offers FramePay, a client-side iFrame-based solution to help create payment tokens while minimizing PCI DSS compliance burdens and maximizing the customization ability. FramePay is interacting with the payment tokens creation operation. ## Javascript SDK Installation and usage instructions can be found here. SDK code examples are included in these docs. ## PHP SDK For all PHP SDK examples provided in these docs you will need to configure the $client. You may do it like this: php $client = new Rebilly\\Client([ 'apiKey' => 'YourApiKeyHere', 'baseUrl' => 'https://api.rebilly.com', ]); # Using filter with collections Rebilly provides collections filtering. You can use ?filter param on collections to define which records should be shown in the response. Here is filter format description: - Fields and values in filter are separated with :: ?filter=firstName:John. - Sub-fields are separated with .: ?filter=billingAddress.country:US. - Multiple filters are separated with ;: ?filter=firstName:John;lastName:Doe. They will be joined with AND logic. In this example: firstName:John AND lastName:Doe. - You can use multiple values using , as values separator: ?filter=firstName:John,Bob. Multiple values specified for a field will be joined with OR logic. In this example: firstName:John OR firstName:Bob. - To negate the filter use !: ?filter=firstName:!John. Note that you can negate multiple values like this: ?filter=firstName:!John,!Bob. This filter rule will exclude all Johns and Bobs from the response. - You can use range filters like this: ?filter=amount:1..10. - You can use gte (greater than or equals) filter like this: ?filter=amount:1.., or lte (less than or equals) than filter like this: ?filter=amount:..10. This also works for datetime-based fields. - You can create some predefined values lists and use them in filter: ?filter=firstName:@yourListName. You can also exclude list values: ?filter=firstName:!@yourListName. - Datetime-based fields accept values formatted using RFC 3339 like this: ?filter=createdTime:2021-02-14T13:30:00Z. # Expand to include embedded objects Rebilly provides the ability to pre-load additional objects with a request. You can use ?expand param on most requests to expand and include embedded objects within the _embedded property of the response. The _embedded property contains an array of objects keyed by the expand parameter value(s). You may expand multiple objects by passing them as comma-separated to the expand value like so: ?expand=recentInvoice,customer And in the response, you would see: \"_embedded\": [ \"recentInvoice\": {...}, \"customer\": {...} ] Expand may be utilitized not only on GET requests but also on PATCH, POST, PUT requests too. # Getting started guide Rebilly's API has over 500 operations. That's more than you'll need to implement your use cases. If you have a use case you would like to implement, please consult us for feedback on the best API operations for the task. Our getting started guides will demonstrate a payment form use cases. It will allow us to highlight core resources in Rebilly that will be helpful for many other use cases too.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.1
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen For more information, please visit https://www.rebilly.com/contact/

Installation

Build a gem

To build the Ruby code into a gem:

gem build rebilly_sdk.gemspec

Then either install the gem locally:

gem install ./rebilly_sdk-1.0.0.gem

(for development, run gem install --dev ./rebilly_sdk-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'rebilly_sdk', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'rebilly_sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'rebilly_sdk'
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::AMLApi.new
 = RebillySdk::null.new #  | First name of individual to search.
 = RebillySdk::null.new #  | Last name of individual to search.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  : RebillySdk::null.new, #  | Date of birth in format YYYY-MM-DD.
  : RebillySdk::null.new #  | Country of individual as an ISO Alpha-2 code.
}

begin
  #Search PEP/Sanctions/Adverse Media lists
  result = api_instance.get_aml_entry(, , opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling AMLApi->get_aml_entry: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a blocklist
  api_instance.delete_blocklist(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->delete_blocklist: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a blocklist
  result = api_instance.get_blocklist(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->get_blocklist: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  q: 'q_example' # String | The partial search of the text fields.
}

begin
  #Retrieve a list of blocklists
  result = api_instance.get_blocklist_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->get_blocklist_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
body = RebillySdk::Blocklist.new # Blocklist | Blocklist resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a blocklist
  result = api_instance.post_blocklist(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->post_blocklist: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
body = RebillySdk::Blocklist.new # Blocklist | Blocklist resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a blocklist with predefined ID
  result = api_instance.put_blocklist(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->put_blocklist: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CouponsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a coupon
  result = api_instance.get_coupon(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CouponsApi->get_coupon: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CouponsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  q: 'q_example', # String | The partial search of the text fields.
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of coupons
  result = api_instance.get_coupon_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CouponsApi->get_coupon_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CouponsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a coupon redemption with specified identifier string
  result = api_instance.get_coupon_redemption(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CouponsApi->get_coupon_redemption: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CouponsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  q: 'q_example', # String | The partial search of the text fields.
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of coupon redemptions
  result = api_instance.get_coupon_redemption_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CouponsApi->get_coupon_redemption_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CouponsApi.new
body = RebillySdk::Coupon.new # Coupon | Coupon resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a coupon
  result = api_instance.post_coupon(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CouponsApi->post_coupon: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CouponsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  body: RebillySdk::CouponExpiration.new, # CouponExpiration | Coupon resource.
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Set a coupon's expiration time
  result = api_instance.post_coupon_expiration(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CouponsApi->post_coupon_expiration: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CouponsApi.new
body = RebillySdk::CouponRedemption.new # CouponRedemption | Redeem a coupon.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Redeem a coupon
  result = api_instance.post_coupon_redemption(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CouponsApi->post_coupon_redemption: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CouponsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Cancel a coupon redemption
  api_instance.post_coupon_redemption_cancellation(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling CouponsApi->post_coupon_redemption_cancellation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CouponsApi.new
body = RebillySdk::Coupon.new # Coupon | Coupon resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create or update a coupon with predefined coupon ID
  result = api_instance.put_coupon(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CouponsApi->put_coupon: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomFieldsApi.new
resource = 'resource_example' # String | The resource type string.
name = 'name_example' # String | The custom field's identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a Custom Field
  result = api_instance.get_custom_field(resource, name, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomFieldsApi->get_custom_field: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomFieldsApi.new
resource = 'resource_example' # String | The resource type string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56 # Integer | The collection items offset.
}

begin
  #Retrieve Custom Fields
  result = api_instance.get_custom_field_collection(resource, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomFieldsApi->get_custom_field_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomFieldsApi.new
body = RebillySdk::CustomField.new # CustomField | Custom Fields schema of the given resource type.
resource = 'resource_example' # String | The resource type string.
name = 'name_example' # String | The custom field's identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create or alter a Custom Field
  result = api_instance.put_custom_field(body, resource, name, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomFieldsApi->put_custom_field: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: PublishableApiKey
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
token = 'token_example' # String | The token identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Logout a customer
  api_instance.delete_authentication_token(token, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->delete_authentication_token: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a credential
  api_instance.delete_credential(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->delete_credential: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a Reset Password Token
  api_instance.delete_password_token(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->delete_password_token: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Read current authentication options
  result = api_instance.get_authentication_option(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->get_authentication_option: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56 # Integer | The collection items offset.
}

begin
  #Retrieve a list of auth tokens
  result = api_instance.get_authentication_token_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->get_authentication_token_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: PublishableApiKey
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
token = 'token_example' # String | The token identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Verify
  result = api_instance.get_authentication_token_verification(token, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->get_authentication_token_verification: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a credential
  result = api_instance.get_credential(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->get_credential: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56 # Integer | The collection items offset.
}

begin
  #Retrieve a list of credentials
  result = api_instance.get_credential_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->get_credential_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a Reset Password Token
  result = api_instance.get_password_token(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->get_password_token: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56 # Integer | The collection items offset.
}

begin
  #Retrieve a list of tokens
  result = api_instance.get_password_token_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->get_password_token_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: PublishableApiKey
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
body = RebillySdk::AuthenticationToken.new # AuthenticationToken | AuthenticationToken resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Login
  result = api_instance.post_authentication_token(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->post_authentication_token: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: PublishableApiKey
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
body = RebillySdk::CustomerJWT.new # CustomerJWT | 
token = 'token_example' # String | The token identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Exchange
  result = api_instance.post_authentication_token_exchange(body, token, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->post_authentication_token_exchange: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
body = RebillySdk::Credential.new # Credential | Credential resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a credential
  result = api_instance.post_credential(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->post_credential: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
body = RebillySdk::ResetPasswordToken.new # ResetPasswordToken | ResetPasswordToken resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a Reset Password Token
  result = api_instance.post_password_token(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->post_password_token: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
body = RebillySdk::AuthenticationOptions.new # AuthenticationOptions | Authentication Options resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Change authentication options
  result = api_instance.put_authentication_option(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->put_authentication_option: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomerAuthenticationApi.new
body = RebillySdk::Credential.new # Credential | Credential resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create or update a credential with predefined ID
  result = api_instance.put_credential(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomerAuthenticationApi->put_credential: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersApi.new
id = 'id_example' # String | The resource identifier string.
target_customer_id = 'target_customer_id_example' # String | The customer identifier to get the data of the deleted duplicate customer.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Merge and delete a customer
  api_instance.delete_customer(id, target_customer_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersApi->delete_customer: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a Lead Source for a customer
  api_instance.delete_customer_lead_source(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersApi->delete_customer_lead_source: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  expand: 'expand_example', # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
  fields: 'fields_example' # String | Limit the returned fields to the list specified, separated by comma. Note that id is always returned.
}

begin
  #Retrieve a customer
  result = api_instance.get_customer(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersApi->get_customer: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  q: 'q_example', # String | The partial search of the text fields.
  expand: 'expand_example', # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
  fields: 'fields_example', # String | Limit the returned fields to the list specified, separated by comma. Note that id is always returned.
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of customers
  result = api_instance.get_customer_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersApi->get_customer_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a customer's Lead Source
  result = api_instance.get_customer_lead_source(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersApi->get_customer_lead_source: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersApi.new
body = RebillySdk::Customer.new # Customer | Customer resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a customer (without an ID)
  result = api_instance.post_customer(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersApi->post_customer: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersApi.new
body = RebillySdk::Customer.new # Customer | Customer resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Upsert a customer with predefined ID
  result = api_instance.put_customer(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersApi->put_customer: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersApi.new
body = RebillySdk::LeadSource.new # LeadSource | Lead Source resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a Lead Source for a customer
  result = api_instance.put_customer_lead_source(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersApi->put_customer_lead_source: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersTimelineApi.new
id = 'id_example' # String | The resource identifier string.
message_id = 'message_id_example' # String | The Customer Timeline message ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a Customer Timeline message
  api_instance.delete_customer_timeline(id, message_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersTimelineApi->delete_customer_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersTimelineApi.new
id = 'id_example' # String | The resource identifier string.
message_id = 'message_id_example' # String | The Customer Timeline message ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a customer Timeline message
  result = api_instance.get_customer_timeline(id, message_id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersTimelineApi->get_customer_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersTimelineApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  q: 'q_example' # String | The partial search of the text fields.
}

begin
  #Retrieve a list of customer timeline messages
  result = api_instance.get_customer_timeline_collection(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersTimelineApi->get_customer_timeline_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersTimelineApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve customer timeline custom event type with specified identifier string
  result = api_instance.get_customer_timeline_custom_event_type(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersTimelineApi->get_customer_timeline_custom_event_type: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersTimelineApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example' # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
}

begin
  #Retrieve a list of customer timeline custom event types
  result = api_instance.get_customer_timeline_custom_event_type_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersTimelineApi->get_customer_timeline_custom_event_type_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersTimelineApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example' # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
}

begin
  #Retrieve a list of customer timeline messages for all customers
  result = api_instance.get_customer_timeline_event_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersTimelineApi->get_customer_timeline_event_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersTimelineApi.new
body = RebillySdk::CustomerTimeline.new # CustomerTimeline | Customer Timeline resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a customer Timeline comment or custom defined event
  result = api_instance.post_customer_timeline(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersTimelineApi->post_customer_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::CustomersTimelineApi.new
body = RebillySdk::CustomerTimelineCustomEvent.new # CustomerTimelineCustomEvent | Customer Timeline Custom Event Type resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create Customer Timeline custom event type
  result = api_instance.post_customer_timeline_custom_event_type(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling CustomersTimelineApi->post_customer_timeline_custom_event_type: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::DisputesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a dispute
  result = api_instance.get_dispute(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling DisputesApi->get_dispute: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::DisputesApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  q: 'q_example', # String | The partial search of the text fields.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve a list of disputes
  result = api_instance.get_dispute_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling DisputesApi->get_dispute_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::DisputesApi.new
body = RebillySdk::Dispute.new # Dispute | Dispute resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a dispute
  result = api_instance.post_dispute(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling DisputesApi->post_dispute: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::DisputesApi.new
body = RebillySdk::Dispute.new # Dispute | Dispute resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create or update a Dispute with predefined ID
  result = api_instance.put_dispute(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling DisputesApi->put_dispute: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FeesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a fee entry
  result = api_instance.get_fee(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FeesApi->get_fee: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FeesApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56 # Integer | The collection items offset.
}

begin
  #Retrieve a list of Fees entries
  result = api_instance.get_fee_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FeesApi->get_fee_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FeesApi.new
body = RebillySdk::FeePatch.new # FeePatch | 
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Patch a fee entry
  result = api_instance.patch_fee(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FeesApi->patch_fee: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FeesApi.new
body = RebillySdk::Fee.new # Fee | 
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a fee entry
  result = api_instance.post_fee(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FeesApi->post_fee: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FeesApi.new
body = RebillySdk::Fee.new # Fee | 
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Upsert a fee entry
  result = api_instance.put_fee(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FeesApi->put_fee: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete an Attachment
  api_instance.delete_attachment(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->delete_attachment: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a File
  api_instance.delete_file(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->delete_file: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve an Attachment
  result = api_instance.get_attachment(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->get_attachment: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  q: 'q_example', # String | The partial search of the text fields.
  expand: 'expand_example', # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
  fields: 'fields_example', # String | Limit the returned fields to the list specified, separated by comma. Note that id is always returned.
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of Attachments
  result = api_instance.get_attachment_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->get_attachment_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a File Record
  result = api_instance.get_file(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->get_file: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  q: 'q_example', # String | The partial search of the text fields.
  expand: 'expand_example', # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
  fields: 'fields_example', # String | Limit the returned fields to the list specified, separated by comma. Note that id is always returned.
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of files
  result = api_instance.get_file_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->get_file_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  image_size: 'image_size_example' # String | Resize image to specified size. Supports any sizes from 10x10 to 2000x2000 (format `{width}x{height}`). The image will be returned in the original size if the value is invalid. This parameter will be ignored for non-image files.
}

begin
  #Download a file
  result = api_instance.get_file_download(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->get_file_download: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
id = 'id_example' # String | The resource identifier string.
extension = 'extension_example' # String | File extension which also indicates the desired file format.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Download image in specific format
  result = api_instance.get_file_download_extension(id, extension, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->get_file_download_extension: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
body = RebillySdk::Attachment.new # Attachment | Attachment resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create an Attachment
  result = api_instance.post_attachment(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->post_attachment: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: PublishableApiKey
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
body = RebillySdk::FilesBody.new # FilesBody | 
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a file
  result = api_instance.post_file(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->post_file: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
body = RebillySdk::Attachment.new # Attachment | Attachment resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Update the Attachment with predefined ID
  result = api_instance.put_attachment(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->put_attachment: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::FilesApi.new
body = File.new('/path/to/file') # File | File resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Update the File with predefined ID
  result = api_instance.put_file(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling FilesApi->put_file: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
id = 'id_example' # String | The resource identifier string.
item_id = 'item_id_example' # String | The invoice item ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete an invoice item
  api_instance.delete_invoice_item(id, item_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->delete_invoice_item: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve customer's upcoming invoices
  result = api_instance.get_customer_upcoming_invoice_collection(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->get_customer_upcoming_invoice_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  accept: 'application/json', # String | The response media type.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve an invoice
  result = api_instance.get_invoice(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->get_invoice: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  q: 'q_example', # String | The partial search of the text fields.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve a list of invoices
  result = api_instance.get_invoice_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->get_invoice_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
id = 'id_example' # String | The resource identifier string.
item_id = 'item_id_example' # String | The invoice item ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Get an invoice item
  result = api_instance.get_invoice_item(id, item_id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->get_invoice_item: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve invoice items
  result = api_instance.get_invoice_item_collection(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->get_invoice_item_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56 # Integer | The collection items offset.
}

begin
  #Get transaction amounts allocated to an invoice
  result = api_instance.get_invoice_transaction_allocation_collection(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->get_invoice_transaction_allocation_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
body = RebillySdk::Invoice.new # Invoice | Invoice resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create an invoice
  result = api_instance.post_invoice(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->post_invoice: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Abandon an invoice
  result = api_instance.post_invoice_abandonment(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->post_invoice_abandonment: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
body = RebillySdk::InvoiceIssue.new # InvoiceIssue | InvoiceIssue resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Issue an invoice
  result = api_instance.post_invoice_issuance(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->post_invoice_issuance: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
body = RebillySdk::InvoiceItem.new # InvoiceItem | InvoiceItem resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create an invoice item
  result = api_instance.post_invoice_item(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->post_invoice_item: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Recalculate an invoice
  result = api_instance.post_invoice_recalculation(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->post_invoice_recalculation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
body = RebillySdk::InvoiceReissue.new # InvoiceReissue | InvoiceReissue resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Reissue an invoice
  result = api_instance.post_invoice_reissuance(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->post_invoice_reissuance: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
body = RebillySdk::InvoiceTransaction.new # InvoiceTransaction | InvoiceTransaction resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Apply a transaction to an invoice
  result = api_instance.post_invoice_transaction(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->post_invoice_transaction: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Void an invoice
  result = api_instance.post_invoice_void(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->post_invoice_void: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
body = RebillySdk::Invoice.new # Invoice | Invoice resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create or update an invoice with predefined ID
  result = api_instance.put_invoice(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->put_invoice: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesApi.new
body = RebillySdk::InvoiceItem.new # InvoiceItem | InvoiceItem resource.
id = 'id_example' # String | The resource identifier string.
item_id = 'item_id_example' # String | The invoice item ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Update an invoice item
  result = api_instance.put_invoice_item(body, id, item_id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesApi->put_invoice_item: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesTimelineApi.new
id = 'id_example' # String | The resource identifier string.
message_id = 'message_id_example' # String | The Invoice Timeline message ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete an Invoice Timeline message
  api_instance.delete_invoice_timeline(id, message_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesTimelineApi->delete_invoice_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesTimelineApi.new
id = 'id_example' # String | The resource identifier string.
message_id = 'message_id_example' # String | The Invoice Timeline message ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve an Invoice Timeline message
  result = api_instance.get_invoice_timeline(id, message_id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesTimelineApi->get_invoice_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesTimelineApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  q: 'q_example' # String | The partial search of the text fields.
}

begin
  #Retrieve a list of invoice timeline messages
  result = api_instance.get_invoice_timeline_collection(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesTimelineApi->get_invoice_timeline_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::InvoicesTimelineApi.new
body = RebillySdk::InvoiceTimeline.new # InvoiceTimeline | Invoice Timeline resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create an invoice Timeline comment
  result = api_instance.post_invoice_timeline(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling InvoicesTimelineApi->post_invoice_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete the KYC request
  api_instance.delete_kyc_request(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->delete_kyc_request: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a KYC Document
  result = api_instance.get_kyc_document(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->get_kyc_document: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of KYC documents
  result = api_instance.get_kyc_document_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->get_kyc_document_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a KYC request
  result = api_instance.get_kyc_request(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->get_kyc_request: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of KYC requests
  result = api_instance.get_kyc_request_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->get_kyc_request_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  body: RebillySdk::null.new, #  | 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Update a KYC request
  result = api_instance.patch_kyc_request(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->patch_kyc_request: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
body = RebillySdk::KycDocument2.new # KycDocument2 | Kyc document resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a KYC Document
  result = api_instance.post_kyc_document(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->post_kyc_document: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Accept a KYC document
  result = api_instance.post_kyc_document_acceptance(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->post_kyc_document_acceptance: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
body = RebillySdk::IdMatchesBody.new # IdMatchesBody | Kyc document resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Update a KYC document's documentMatches
  api_instance.post_kyc_document_matches(body, id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->post_kyc_document_matches: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
body = RebillySdk::KycDocumentRejection.new # KycDocumentRejection | KYC document resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Reject a KYC document
  result = api_instance.post_kyc_document_rejection(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->post_kyc_document_rejection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Review a KYC document
  result = api_instance.post_kyc_document_review(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->post_kyc_document_review: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Start review for a KYC document
  result = api_instance.post_kyc_document_start_review(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->post_kyc_document_start_review: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Stop review for a KYC document
  result = api_instance.post_kyc_document_stop_review(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->post_kyc_document_stop_review: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
body = RebillySdk::KycRequest.new # KycRequest | Kyc request resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a KYC Request
  result = api_instance.post_kyc_request(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->post_kyc_request: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::KYCDocumentsApi.new
body = RebillySdk::KycDocument2.new # KycDocument2 | KYC document resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create or update a KYC document with predefined ID
  result = api_instance.put_kyc_document(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling KYCDocumentsApi->put_kyc_document: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a pending order
  api_instance.delete_subscription(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->delete_subscription: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a cancellation
  api_instance.delete_subscription_cancellation(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->delete_subscription_cancellation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. To expand multiple objects, it accepts a comma-separated list of objects (example: `expand=recentInvoice,initialInvoice`). Available arguments are:   - recentInvoice   - initialInvoice   - customer   - website  See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve an order
  result = api_instance.get_subscription(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->get_subscription: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve an order cancellation
  result = api_instance.get_subscription_cancellation(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->get_subscription_cancellation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of cancellations
  result = api_instance.get_subscription_cancellation_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->get_subscription_cancellation_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  q: 'q_example', # String | The partial search of the text fields.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. To expand multiple objects, it accepts a comma-separated list of objects (example: `expand=recentInvoice,initialInvoice`). Available arguments are:   - recentInvoice   - initialInvoice   - customer   - website  See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve a list of orders
  result = api_instance.get_subscription_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->get_subscription_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve an order reactivation
  result = api_instance.get_subscription_reactivation(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->get_subscription_reactivation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of reactivations
  result = api_instance.get_subscription_reactivation_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->get_subscription_reactivation_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve subscription order's upcoming invoice
  result = api_instance.get_subscription_upcoming_invoice_collection(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->get_subscription_upcoming_invoice_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
opts = { 
  body: RebillySdk::OrderPreview.new, # OrderPreview | 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Preview an order
  result = api_instance.post_preview_order(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->post_preview_order: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
body = RebillySdk::Subscription.new # Subscription | Order resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. To expand multiple objects, it accepts a comma-separated list of objects (example: `expand=recentInvoice,initialInvoice`). Available arguments are:   - recentInvoice   - initialInvoice   - customer   - website  See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Create an order
  result = api_instance.post_subscription(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->post_subscription: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
body = RebillySdk::SubscriptionCancellation.new # SubscriptionCancellation | Cancellation resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Cancel an order
  result = api_instance.post_subscription_cancellation(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->post_subscription_cancellation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
body = RebillySdk::SubscriptionInvoice.new # SubscriptionInvoice | Issue an interim invoice.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Issue an interim invoice for a subscription order
  result = api_instance.post_subscription_interim_invoice(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->post_subscription_interim_invoice: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
body = RebillySdk::SubscriptionChange.new # SubscriptionChange | Change items request.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Change an order's items
  result = api_instance.post_subscription_items_change(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->post_subscription_items_change: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
body = RebillySdk::SubscriptionReactivation.new # SubscriptionReactivation | Reactivation resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Reactivate an order
  result = api_instance.post_subscription_reactivation(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->post_subscription_reactivation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Void an order
  result = api_instance.post_subscription_void(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->post_subscription_void: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
body = RebillySdk::InvoiceIssue.new # InvoiceIssue | InvoiceIssue resource.
id = 'id_example' # String | The resource identifier string.
invoice_id = 'invoice_id_example' # String | The Upcoming Invoice ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Issue an upcoming invoice for early pay
  result = api_instance.post_upcoming_invoice_issuance(body, id, invoice_id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->post_upcoming_invoice_issuance: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
body = RebillySdk::Subscription.new # Subscription | Order resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. To expand multiple objects, it accepts a comma-separated list of objects (example: `expand=recentInvoice,initialInvoice`). Available arguments are:   - recentInvoice   - initialInvoice   - customer   - website  See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Upsert an order with predefined ID
  result = api_instance.put_subscription(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->put_subscription: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersApi.new
body = RebillySdk::SubscriptionCancellation.new # SubscriptionCancellation | Cancellation resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Cancel an order
  result = api_instance.put_subscription_cancellation(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersApi->put_subscription_cancellation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersTimelineApi.new
id = 'id_example' # String | The resource identifier string.
message_id = 'message_id_example' # String | The Order Timeline message ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete an Order Timeline message
  api_instance.delete_subscription_timeline(id, message_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersTimelineApi->delete_subscription_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersTimelineApi.new
id = 'id_example' # String | The resource identifier string.
message_id = 'message_id_example' # String | The Order Timeline message ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve an Order Timeline message
  result = api_instance.get_subscription_timeline(id, message_id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersTimelineApi->get_subscription_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersTimelineApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  q: 'q_example' # String | The partial search of the text fields.
}

begin
  #Retrieve a list of order timeline messages
  result = api_instance.get_subscription_timeline_collection(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersTimelineApi->get_subscription_timeline_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::OrdersTimelineApi.new
body = RebillySdk::OrderTimeline.new # OrderTimeline | Order Timeline resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create an order Timeline comment
  result = api_instance.post_subscription_timeline(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling OrdersTimelineApi->post_subscription_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PaymentInstrumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a Payment Instrument
  result = api_instance.get_payment_instrument(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PaymentInstrumentsApi->get_payment_instrument: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PaymentInstrumentsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  q: 'q_example', # String | The partial search of the text fields.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve a list of payment instruments
  result = api_instance.get_payment_instrument_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PaymentInstrumentsApi->get_payment_instrument_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PaymentInstrumentsApi.new
body = RebillySdk::null.new #  | PaymentInstrument resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Update a Payment Instrument's values
  result = api_instance.patch_payment_instrument(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PaymentInstrumentsApi->patch_payment_instrument: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PaymentInstrumentsApi.new
body = RebillySdk::null.new #  | PaymentInstrument resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a Payment Instrument
  result = api_instance.post_payment_instrument(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PaymentInstrumentsApi->post_payment_instrument: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PaymentInstrumentsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Deactivate a payment instrument
  result = api_instance.post_payment_instrument_deactivation(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PaymentInstrumentsApi->post_payment_instrument_deactivation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|
  # Configure API key authorization: PublishableApiKey
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = RebillySdk::PaymentTokensApi.new
token = 'token_example' # String | The token identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a token
  result = api_instance.get_token(token, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PaymentTokensApi->get_token: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PaymentTokensApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56 # Integer | The collection items offset.
}

begin
  #Retrieve a list of tokens
  result = api_instance.get_token_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PaymentTokensApi->get_token_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: PublishableApiKey
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PaymentTokensApi.new
body = RebillySdk::DigitalWalletValidation.new # DigitalWalletValidation | Digital wallet validation request.


begin
  #Validate a digital wallet session
  result = api_instance.post_digital_wallet_validation(body)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PaymentTokensApi->post_digital_wallet_validation: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: PublishableApiKey
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PaymentTokensApi.new
body = RebillySdk::CompositeToken.new # CompositeToken | PaymentToken resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a payment token
  result = api_instance.post_token(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PaymentTokensApi->post_token: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PlansApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a Plan
  api_instance.delete_plan(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling PlansApi->delete_plan: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PlansApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a plan
  result = api_instance.get_plan(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PlansApi->get_plan: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PlansApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  q: 'q_example' # String | The partial search of the text fields.
}

begin
  #Retrieve a list of plans
  result = api_instance.get_plan_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PlansApi->get_plan_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PlansApi.new
body = RebillySdk::Plan.new # Plan | Plan resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a plan
  result = api_instance.post_plan(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PlansApi->post_plan: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::PlansApi.new
body = RebillySdk::Plan.new # Plan | Plan resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create or update a Plan with predefined ID
  result = api_instance.put_plan(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling PlansApi->put_plan: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ProductsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a product
  api_instance.delete_product(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling ProductsApi->delete_product: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ProductsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a product
  result = api_instance.get_product(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ProductsApi->get_product: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ProductsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  q: 'q_example' # String | The partial search of the text fields.
}

begin
  #Retrieve a list of products
  result = api_instance.get_product_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ProductsApi->get_product_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ProductsApi.new
body = RebillySdk::Product.new # Product | Product resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a Product
  result = api_instance.post_product(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ProductsApi->post_product: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ProductsApi.new
body = RebillySdk::Product.new # Product | Product resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Upsert a product with predefined ID
  result = api_instance.put_product(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ProductsApi->put_product: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::SearchApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  q: 'q_example' # String | The default search. It will search across resources and many fields.
}

begin
  #Search merchant data
  result = api_instance.get_search(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling SearchApi->get_search: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingRatesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a shipping rate
  api_instance.delete_shipping_rate(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingRatesApi->delete_shipping_rate: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingRatesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a shipping rate
  result = api_instance.get_shipping_rate(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingRatesApi->get_shipping_rate: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingRatesApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  q: 'q_example' # String | The partial search of the text fields.
}

begin
  #Retrieve a list of shipping rates
  result = api_instance.get_shipping_rate_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingRatesApi->get_shipping_rate_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingRatesApi.new
body = RebillySdk::ShippingRate.new # ShippingRate | Shipping rate resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a shipping rate
  result = api_instance.post_shipping_rate(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingRatesApi->post_shipping_rate: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingRatesApi.new
body = RebillySdk::ShippingRate.new # ShippingRate | Shipping rate resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a shipping rate with predefined ID
  result = api_instance.put_shipping_rate(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingRatesApi->put_shipping_rate: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingZonesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a shipping zone
  api_instance.delete_shipping_zone(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingZonesApi->delete_shipping_zone: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingZonesApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a shipping zone
  result = api_instance.get_shipping_zone(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingZonesApi->get_shipping_zone: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingZonesApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  q: 'q_example' # String | The partial search of the text fields.
}

begin
  #Retrieve a list of shipping zones
  result = api_instance.get_shipping_zone_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingZonesApi->get_shipping_zone_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingZonesApi.new
body = RebillySdk::ShippingZone.new # ShippingZone | Shipping Zone resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a Shipping Zone
  result = api_instance.post_shipping_zone(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingZonesApi->post_shipping_zone: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::ShippingZonesApi.new
body = RebillySdk::ShippingZone.new # ShippingZone | Shipping zone resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a shipping zone with predefined ID
  result = api_instance.put_shipping_zone(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling ShippingZonesApi->put_shipping_zone: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
tag = 'tag_example' # String | The tag name.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a tag
  api_instance.delete_tag(tag, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->delete_tag: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
tag = 'tag_example' # String | The tag name.
customer_id = 'customer_id_example' # String | The customer identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Untag a customer
  api_instance.delete_tag_customer(tag, customer_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->delete_tag_customer: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
body = RebillySdk::TagCustomersBody1.new # TagCustomersBody1 | 
tag = 'tag_example' # String | The tag name.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Untag a list of customers
  api_instance.delete_tag_customer_collection(body, tag, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->delete_tag_customer_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
tag = 'tag_example' # String | The tag name.
kyc_document_id = 'kyc_document_id_example' # String | The kyc document identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Untag a kyc document
  api_instance.delete_tag_kyc_document(tag, kyc_document_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->delete_tag_kyc_document: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
body = RebillySdk::TagKycdocumentsBody1.new # TagKycdocumentsBody1 | 
tag = 'tag_example' # String | The tag name.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Untag a list of kyc documents
  api_instance.delete_tag_kyc_document_collection(body, tag, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->delete_tag_kyc_document_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
tag = 'tag_example' # String | The tag name.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a tag
  result = api_instance.get_tag(tag, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->get_tag: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  q: 'q_example', # String | The partial search of the text fields.
  sort: ['sort_example'] # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
}

begin
  #Retrieve a list of tags
  result = api_instance.get_tag_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->get_tag_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
body = RebillySdk::null.new #  | Tag resource.
tag = 'tag_example' # String | The tag name.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Update a tag
  result = api_instance.patch_tag(body, tag, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->patch_tag: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
body = RebillySdk::Tag.new # Tag | Tag resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a tag
  result = api_instance.post_tag(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->post_tag: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
tag = 'tag_example' # String | The tag name.
customer_id = 'customer_id_example' # String | The customer identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Tag a customer
  api_instance.post_tag_customer(tag, customer_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->post_tag_customer: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
body = RebillySdk::TagCustomersBody.new # TagCustomersBody | 
tag = 'tag_example' # String | The tag name.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Tag a list of customers
  api_instance.post_tag_customer_collection(body, tag, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->post_tag_customer_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
tag = 'tag_example' # String | The tag name.
kyc_document_id = 'kyc_document_id_example' # String | The kyc document identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Tag a kyc document
  api_instance.post_tag_kyc_document(tag, kyc_document_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->post_tag_kyc_document: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TagsApi.new
body = RebillySdk::TagKycdocumentsBody.new # TagKycdocumentsBody | 
tag = 'tag_example' # String | The tag name.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Tag a list of kyc documents
  api_instance.post_tag_kyc_document_collection(body, tag, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TagsApi->post_tag_kyc_document_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve a Transaction
  result = api_instance.get_transaction(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsApi->get_transaction: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  q: 'q_example', # String | The partial search of the text fields.
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Retrieve a list of transactions
  result = api_instance.get_transaction_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsApi->get_transaction_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsApi.new
body = nil # Object | Use the patch transaction request to modify custom fields.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Update a transaction
  result = api_instance.patch_transaction(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsApi->patch_transaction: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsApi.new
body = RebillySdk::PayoutRequest.new # PayoutRequest | Transaction resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a credit transaction
  result = api_instance.post_payout(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsApi->post_payout: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsApi.new
opts = { 
  body: RebillySdk::CoreReadyToPay.new, # CoreReadyToPay | 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Ready to Pay
  result = api_instance.post_ready_to_pay(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsApi->post_ready_to_pay: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|


  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsApi.new
body = RebillySdk::TransactionRequest.new # TransactionRequest | Transaction resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  expand: 'expand_example' # String | Expand a response to get a full related object included inside of the `_embedded` path in the response. It accepts a comma-separated list of objects to expand. See the [expand guide](https://api-reference.rebilly.com/#section/Expand-to-include-embedded-objects) for more info. 
}

begin
  #Create a transaction
  result = api_instance.post_transaction(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsApi->post_transaction: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Query a Transaction
  result = api_instance.post_transaction_query(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsApi->post_transaction_query: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsApi.new
body = RebillySdk::TransactionRefund.new # TransactionRefund | Transaction resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Refund a Transaction
  result = api_instance.post_transaction_refund(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsApi->post_transaction_refund: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsApi.new
body = RebillySdk::TransactionUpdate.new # TransactionUpdate | 
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Update a Transaction status
  result = api_instance.post_transaction_update(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsApi->post_transaction_update: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsTimelineApi.new
id = 'id_example' # String | The resource identifier string.
message_id = 'message_id_example' # String | The Transaction Timeline message ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a Transaction Timeline message
  api_instance.delete_transaction_timeline(id, message_id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsTimelineApi->delete_transaction_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsTimelineApi.new
id = 'id_example' # String | The resource identifier string.
message_id = 'message_id_example' # String | The Transaction Timeline message ID.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a transaction Timeline message
  result = api_instance.get_transaction_timeline(id, message_id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsTimelineApi->get_transaction_timeline: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsTimelineApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  filter: 'filter_example' # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
}

begin
  #Retrieve a list of transaction timeline messages
  result = api_instance.get_transaction_timeline_collection(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsTimelineApi->get_transaction_timeline_collection: #{e}"
end
# Setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = '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['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::TransactionsTimelineApi.new
body = RebillySdk::TransactionTimeline.new # TransactionTimeline | Transaction Timeline resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a transaction Timeline comment
  result = api_instance.post_transaction_timeline(body, id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling TransactionsTimelineApi->post_transaction_timeline: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api-sandbox.rebilly.com/organizations/{organizationId}

Class Method HTTP request Description
RebillySdk::AMLApi get_aml_entry GET /aml Search PEP/Sanctions/Adverse Media lists
RebillySdk::BlocklistsApi delete_blocklist DELETE /blocklists/{id} Delete a blocklist
RebillySdk::BlocklistsApi get_blocklist GET /blocklists/{id} Retrieve a blocklist
RebillySdk::BlocklistsApi get_blocklist_collection GET /blocklists Retrieve a list of blocklists
RebillySdk::BlocklistsApi post_blocklist POST /blocklists Create a blocklist
RebillySdk::BlocklistsApi put_blocklist PUT /blocklists/{id} Create a blocklist with predefined ID
RebillySdk::CouponsApi get_coupon GET /coupons/{id} Retrieve a coupon
RebillySdk::CouponsApi get_coupon_collection GET /coupons Retrieve a list of coupons
RebillySdk::CouponsApi get_coupon_redemption GET /coupons-redemptions/{id} Retrieve a coupon redemption with specified identifier string
RebillySdk::CouponsApi get_coupon_redemption_collection GET /coupons-redemptions Retrieve a list of coupon redemptions
RebillySdk::CouponsApi post_coupon POST /coupons Create a coupon
RebillySdk::CouponsApi post_coupon_expiration POST /coupons/{id}/expiration Set a coupon's expiration time
RebillySdk::CouponsApi post_coupon_redemption POST /coupons-redemptions Redeem a coupon
RebillySdk::CouponsApi post_coupon_redemption_cancellation POST /coupons-redemptions/{id}/cancel Cancel a coupon redemption
RebillySdk::CouponsApi put_coupon PUT /coupons/{id} Create or update a coupon with predefined coupon ID
RebillySdk::CustomFieldsApi get_custom_field GET /custom-fields/{resource}/{name} Retrieve a Custom Field
RebillySdk::CustomFieldsApi get_custom_field_collection GET /custom-fields/{resource} Retrieve Custom Fields
RebillySdk::CustomFieldsApi put_custom_field PUT /custom-fields/{resource}/{name} Create or alter a Custom Field
RebillySdk::CustomerAuthenticationApi delete_authentication_token DELETE /authentication-tokens/{token} Logout a customer
RebillySdk::CustomerAuthenticationApi delete_credential DELETE /credentials/{id} Delete a credential
RebillySdk::CustomerAuthenticationApi delete_password_token DELETE /password-tokens/{id} Delete a Reset Password Token
RebillySdk::CustomerAuthenticationApi get_authentication_option GET /authentication-options Read current authentication options
RebillySdk::CustomerAuthenticationApi get_authentication_token_collection GET /authentication-tokens Retrieve a list of auth tokens
RebillySdk::CustomerAuthenticationApi get_authentication_token_verification GET /authentication-tokens/{token} Verify
RebillySdk::CustomerAuthenticationApi get_credential GET /credentials/{id} Retrieve a credential
RebillySdk::CustomerAuthenticationApi get_credential_collection GET /credentials Retrieve a list of credentials
RebillySdk::CustomerAuthenticationApi get_password_token GET /password-tokens/{id} Retrieve a Reset Password Token
RebillySdk::CustomerAuthenticationApi get_password_token_collection GET /password-tokens Retrieve a list of tokens
RebillySdk::CustomerAuthenticationApi post_authentication_token POST /authentication-tokens Login
RebillySdk::CustomerAuthenticationApi post_authentication_token_exchange POST /authentication-tokens/{token}/exchange Exchange
RebillySdk::CustomerAuthenticationApi post_credential POST /credentials Create a credential
RebillySdk::CustomerAuthenticationApi post_password_token POST /password-tokens Create a Reset Password Token
RebillySdk::CustomerAuthenticationApi put_authentication_option PUT /authentication-options Change authentication options
RebillySdk::CustomerAuthenticationApi put_credential PUT /credentials/{id} Create or update a credential with predefined ID
RebillySdk::CustomersApi delete_customer DELETE /customers/{id} Merge and delete a customer
RebillySdk::CustomersApi delete_customer_lead_source DELETE /customers/{id}/lead-source Delete a Lead Source for a customer
RebillySdk::CustomersApi get_customer GET /customers/{id} Retrieve a customer
RebillySdk::CustomersApi get_customer_collection GET /customers Retrieve a list of customers
RebillySdk::CustomersApi get_customer_lead_source GET /customers/{id}/lead-source Retrieve a customer's Lead Source
RebillySdk::CustomersApi post_customer POST /customers Create a customer (without an ID)
RebillySdk::CustomersApi put_customer PUT /customers/{id} Upsert a customer with predefined ID
RebillySdk::CustomersApi put_customer_lead_source PUT /customers/{id}/lead-source Create a Lead Source for a customer
RebillySdk::CustomersTimelineApi delete_customer_timeline DELETE /customers/{id}/timeline/{messageId} Delete a Customer Timeline message
RebillySdk::CustomersTimelineApi get_customer_timeline GET /customers/{id}/timeline/{messageId} Retrieve a customer Timeline message
RebillySdk::CustomersTimelineApi get_customer_timeline_collection GET /customers/{id}/timeline Retrieve a list of customer timeline messages
RebillySdk::CustomersTimelineApi get_customer_timeline_custom_event_type GET /customer-timeline-custom-events/{id} Retrieve customer timeline custom event type with specified identifier string
RebillySdk::CustomersTimelineApi get_customer_timeline_custom_event_type_collection GET /customer-timeline-custom-events Retrieve a list of customer timeline custom event types
RebillySdk::CustomersTimelineApi get_customer_timeline_event_collection GET /customer-timeline-events Retrieve a list of customer timeline messages for all customers
RebillySdk::CustomersTimelineApi post_customer_timeline POST /customers/{id}/timeline Create a customer Timeline comment or custom defined event
RebillySdk::CustomersTimelineApi post_customer_timeline_custom_event_type POST /customer-timeline-custom-events Create Customer Timeline custom event type
RebillySdk::DisputesApi get_dispute GET /disputes/{id} Retrieve a dispute
RebillySdk::DisputesApi get_dispute_collection GET /disputes Retrieve a list of disputes
RebillySdk::DisputesApi post_dispute POST /disputes Create a dispute
RebillySdk::DisputesApi put_dispute PUT /disputes/{id} Create or update a Dispute with predefined ID
RebillySdk::FeesApi get_fee GET /fees/{id} Retrieve a fee entry
RebillySdk::FeesApi get_fee_collection GET /fees Retrieve a list of Fees entries
RebillySdk::FeesApi patch_fee PATCH /fees/{id} Patch a fee entry
RebillySdk::FeesApi post_fee POST /fees Create a fee entry
RebillySdk::FeesApi put_fee PUT /fees/{id} Upsert a fee entry
RebillySdk::FilesApi delete_attachment DELETE /attachments/{id} Delete an Attachment
RebillySdk::FilesApi delete_file DELETE /files/{id} Delete a File
RebillySdk::FilesApi get_attachment GET /attachments/{id} Retrieve an Attachment
RebillySdk::FilesApi get_attachment_collection GET /attachments Retrieve a list of Attachments
RebillySdk::FilesApi get_file GET /files/{id} Retrieve a File Record
RebillySdk::FilesApi get_file_collection GET /files Retrieve a list of files
RebillySdk::FilesApi get_file_download GET /files/{id}/download Download a file
RebillySdk::FilesApi get_file_download_extension GET /files/{id}/download{extension} Download image in specific format
RebillySdk::FilesApi post_attachment POST /attachments Create an Attachment
RebillySdk::FilesApi post_file POST /files Create a file
RebillySdk::FilesApi put_attachment PUT /attachments/{id} Update the Attachment with predefined ID
RebillySdk::FilesApi put_file PUT /files/{id} Update the File with predefined ID
RebillySdk::InvoicesApi delete_invoice_item DELETE /invoices/{id}/items/{itemId} Delete an invoice item
RebillySdk::InvoicesApi get_customer_upcoming_invoice_collection GET /customers/{id}/upcoming-invoices Retrieve customer's upcoming invoices
RebillySdk::InvoicesApi get_invoice GET /invoices/{id} Retrieve an invoice
RebillySdk::InvoicesApi get_invoice_collection GET /invoices Retrieve a list of invoices
RebillySdk::InvoicesApi get_invoice_item GET /invoices/{id}/items/{itemId} Get an invoice item
RebillySdk::InvoicesApi get_invoice_item_collection GET /invoices/{id}/items Retrieve invoice items
RebillySdk::InvoicesApi get_invoice_transaction_allocation_collection GET /invoices/{id}/transaction-allocations Get transaction amounts allocated to an invoice
RebillySdk::InvoicesApi post_invoice POST /invoices Create an invoice
RebillySdk::InvoicesApi post_invoice_abandonment POST /invoices/{id}/abandon Abandon an invoice
RebillySdk::InvoicesApi post_invoice_issuance POST /invoices/{id}/issue Issue an invoice
RebillySdk::InvoicesApi post_invoice_item POST /invoices/{id}/items Create an invoice item
RebillySdk::InvoicesApi post_invoice_recalculation POST /invoices/{id}/recalculate Recalculate an invoice
RebillySdk::InvoicesApi post_invoice_reissuance POST /invoices/{id}/reissue Reissue an invoice
RebillySdk::InvoicesApi post_invoice_transaction POST /invoices/{id}/transaction Apply a transaction to an invoice
RebillySdk::InvoicesApi post_invoice_void POST /invoices/{id}/void Void an invoice
RebillySdk::InvoicesApi put_invoice PUT /invoices/{id} Create or update an invoice with predefined ID
RebillySdk::InvoicesApi put_invoice_item PUT /invoices/{id}/items/{itemId} Update an invoice item
RebillySdk::InvoicesTimelineApi delete_invoice_timeline DELETE /invoices/{id}/timeline/{messageId} Delete an Invoice Timeline message
RebillySdk::InvoicesTimelineApi get_invoice_timeline GET /invoices/{id}/timeline/{messageId} Retrieve an Invoice Timeline message
RebillySdk::InvoicesTimelineApi get_invoice_timeline_collection GET /invoices/{id}/timeline Retrieve a list of invoice timeline messages
RebillySdk::InvoicesTimelineApi post_invoice_timeline POST /invoices/{id}/timeline Create an invoice Timeline comment
RebillySdk::KYCDocumentsApi delete_kyc_request DELETE /kyc-requests/{id} Delete the KYC request
RebillySdk::KYCDocumentsApi get_kyc_document GET /kyc-documents/{id} Retrieve a KYC Document
RebillySdk::KYCDocumentsApi get_kyc_document_collection GET /kyc-documents Retrieve a list of KYC documents
RebillySdk::KYCDocumentsApi get_kyc_request GET /kyc-requests/{id} Retrieve a KYC request
RebillySdk::KYCDocumentsApi get_kyc_request_collection GET /kyc-requests Retrieve a list of KYC requests
RebillySdk::KYCDocumentsApi patch_kyc_request PATCH /kyc-requests/{id} Update a KYC request
RebillySdk::KYCDocumentsApi post_kyc_document POST /kyc-documents Create a KYC Document
RebillySdk::KYCDocumentsApi post_kyc_document_acceptance POST /kyc-documents/{id}/acceptance Accept a KYC document
RebillySdk::KYCDocumentsApi post_kyc_document_matches POST /kyc-documents/{id}/matches Update a KYC document's documentMatches
RebillySdk::KYCDocumentsApi post_kyc_document_rejection POST /kyc-documents/{id}/rejection Reject a KYC document
RebillySdk::KYCDocumentsApi post_kyc_document_review POST /kyc-documents/{id}/review Review a KYC document
RebillySdk::KYCDocumentsApi post_kyc_document_start_review POST /kyc-documents/{id}/start-review Start review for a KYC document
RebillySdk::KYCDocumentsApi post_kyc_document_stop_review POST /kyc-documents/{id}/stop-review Stop review for a KYC document
RebillySdk::KYCDocumentsApi post_kyc_request POST /kyc-requests Create a KYC Request
RebillySdk::KYCDocumentsApi put_kyc_document PUT /kyc-documents/{id} Create or update a KYC document with predefined ID
RebillySdk::OrdersApi delete_subscription DELETE /subscriptions/{id} Delete a pending order
RebillySdk::OrdersApi delete_subscription_cancellation DELETE /subscription-cancellations/{id} Delete a cancellation
RebillySdk::OrdersApi get_subscription GET /subscriptions/{id} Retrieve an order
RebillySdk::OrdersApi get_subscription_cancellation GET /subscription-cancellations/{id} Retrieve an order cancellation
RebillySdk::OrdersApi get_subscription_cancellation_collection GET /subscription-cancellations Retrieve a list of cancellations
RebillySdk::OrdersApi get_subscription_collection GET /subscriptions Retrieve a list of orders
RebillySdk::OrdersApi get_subscription_reactivation GET /subscription-reactivations/{id} Retrieve an order reactivation
RebillySdk::OrdersApi get_subscription_reactivation_collection GET /subscription-reactivations Retrieve a list of reactivations
RebillySdk::OrdersApi get_subscription_upcoming_invoice_collection GET /subscriptions/{id}/upcoming-invoices Retrieve subscription order's upcoming invoice
RebillySdk::OrdersApi post_preview_order POST /previews/orders Preview an order
RebillySdk::OrdersApi post_subscription POST /subscriptions Create an order
RebillySdk::OrdersApi post_subscription_cancellation POST /subscription-cancellations Cancel an order
RebillySdk::OrdersApi post_subscription_interim_invoice POST /subscriptions/{id}/interim-invoice Issue an interim invoice for a subscription order
RebillySdk::OrdersApi post_subscription_items_change POST /subscriptions/{id}/change-items Change an order's items
RebillySdk::OrdersApi post_subscription_reactivation POST /subscription-reactivations Reactivate an order
RebillySdk::OrdersApi post_subscription_void POST /subscriptions/{id}/void Void an order
RebillySdk::OrdersApi post_upcoming_invoice_issuance POST /subscriptions/{id}/upcoming-invoices/{invoiceId}/issue Issue an upcoming invoice for early pay
RebillySdk::OrdersApi put_subscription PUT /subscriptions/{id} Upsert an order with predefined ID
RebillySdk::OrdersApi put_subscription_cancellation PUT /subscription-cancellations/{id} Cancel an order
RebillySdk::OrdersTimelineApi delete_subscription_timeline DELETE /subscriptions/{id}/timeline/{messageId} Delete an Order Timeline message
RebillySdk::OrdersTimelineApi get_subscription_timeline GET /subscriptions/{id}/timeline/{messageId} Retrieve an Order Timeline message
RebillySdk::OrdersTimelineApi get_subscription_timeline_collection GET /subscriptions/{id}/timeline Retrieve a list of order timeline messages
RebillySdk::OrdersTimelineApi post_subscription_timeline POST /subscriptions/{id}/timeline Create an order Timeline comment
RebillySdk::PaymentInstrumentsApi get_payment_instrument GET /payment-instruments/{id} Retrieve a Payment Instrument
RebillySdk::PaymentInstrumentsApi get_payment_instrument_collection GET /payment-instruments Retrieve a list of payment instruments
RebillySdk::PaymentInstrumentsApi patch_payment_instrument PATCH /payment-instruments/{id} Update a Payment Instrument's values
RebillySdk::PaymentInstrumentsApi post_payment_instrument POST /payment-instruments Create a Payment Instrument
RebillySdk::PaymentInstrumentsApi post_payment_instrument_deactivation POST /payment-instruments/{id}/deactivation Deactivate a payment instrument
RebillySdk::PaymentTokensApi get_token GET /tokens/{token} Retrieve a token
RebillySdk::PaymentTokensApi get_token_collection GET /tokens Retrieve a list of tokens
RebillySdk::PaymentTokensApi post_digital_wallet_validation POST /digital-wallets/validation Validate a digital wallet session
RebillySdk::PaymentTokensApi post_token POST /tokens Create a payment token
RebillySdk::PlansApi delete_plan DELETE /plans/{id} Delete a Plan
RebillySdk::PlansApi get_plan GET /plans/{id} Retrieve a plan
RebillySdk::PlansApi get_plan_collection GET /plans Retrieve a list of plans
RebillySdk::PlansApi post_plan POST /plans Create a plan
RebillySdk::PlansApi put_plan PUT /plans/{id} Create or update a Plan with predefined ID
RebillySdk::ProductsApi delete_product DELETE /products/{id} Delete a product
RebillySdk::ProductsApi get_product GET /products/{id} Retrieve a product
RebillySdk::ProductsApi get_product_collection GET /products Retrieve a list of products
RebillySdk::ProductsApi post_product POST /products Create a Product
RebillySdk::ProductsApi put_product PUT /products/{id} Upsert a product with predefined ID
RebillySdk::SearchApi get_search GET /search Search merchant data
RebillySdk::ShippingRatesApi delete_shipping_rate DELETE /shipping-rates/{id} Delete a shipping rate
RebillySdk::ShippingRatesApi get_shipping_rate GET /shipping-rates/{id} Retrieve a shipping rate
RebillySdk::ShippingRatesApi get_shipping_rate_collection GET /shipping-rates Retrieve a list of shipping rates
RebillySdk::ShippingRatesApi post_shipping_rate POST /shipping-rates Create a shipping rate
RebillySdk::ShippingRatesApi put_shipping_rate PUT /shipping-rates/{id} Create a shipping rate with predefined ID
RebillySdk::ShippingZonesApi delete_shipping_zone DELETE /shipping-zones/{id} Delete a shipping zone
RebillySdk::ShippingZonesApi get_shipping_zone GET /shipping-zones/{id} Retrieve a shipping zone
RebillySdk::ShippingZonesApi get_shipping_zone_collection GET /shipping-zones Retrieve a list of shipping zones
RebillySdk::ShippingZonesApi post_shipping_zone POST /shipping-zones Create a Shipping Zone
RebillySdk::ShippingZonesApi put_shipping_zone PUT /shipping-zones/{id} Create a shipping zone with predefined ID
RebillySdk::TagsApi delete_tag DELETE /tags/{tag} Delete a tag
RebillySdk::TagsApi delete_tag_customer DELETE /tags/{tag}/customers/{customerId} Untag a customer
RebillySdk::TagsApi delete_tag_customer_collection DELETE /tags/{tag}/customers Untag a list of customers
RebillySdk::TagsApi delete_tag_kyc_document DELETE /tags/{tag}/kyc-documents/{kycDocumentId} Untag a kyc document
RebillySdk::TagsApi delete_tag_kyc_document_collection DELETE /tags/{tag}/kyc-documents Untag a list of kyc documents
RebillySdk::TagsApi get_tag GET /tags/{tag} Retrieve a tag
RebillySdk::TagsApi get_tag_collection GET /tags Retrieve a list of tags
RebillySdk::TagsApi patch_tag PATCH /tags/{tag} Update a tag
RebillySdk::TagsApi post_tag POST /tags Create a tag
RebillySdk::TagsApi post_tag_customer POST /tags/{tag}/customers/{customerId} Tag a customer
RebillySdk::TagsApi post_tag_customer_collection POST /tags/{tag}/customers Tag a list of customers
RebillySdk::TagsApi post_tag_kyc_document POST /tags/{tag}/kyc-documents/{kycDocumentId} Tag a kyc document
RebillySdk::TagsApi post_tag_kyc_document_collection POST /tags/{tag}/kyc-documents Tag a list of kyc documents
RebillySdk::TransactionsApi get_transaction GET /transactions/{id} Retrieve a Transaction
RebillySdk::TransactionsApi get_transaction_collection GET /transactions Retrieve a list of transactions
RebillySdk::TransactionsApi patch_transaction PATCH /transactions/{id} Update a transaction
RebillySdk::TransactionsApi post_payout POST /payouts Create a credit transaction
RebillySdk::TransactionsApi post_ready_to_pay POST /ready-to-pay Ready to Pay
RebillySdk::TransactionsApi post_transaction POST /transactions Create a transaction
RebillySdk::TransactionsApi post_transaction_query POST /transactions/{id}/query Query a Transaction
RebillySdk::TransactionsApi post_transaction_refund POST /transactions/{id}/refund Refund a Transaction
RebillySdk::TransactionsApi post_transaction_update POST /transactions/{id}/update Update a Transaction status
RebillySdk::TransactionsTimelineApi delete_transaction_timeline DELETE /transactions/{id}/timeline/{messageId} Delete a Transaction Timeline message
RebillySdk::TransactionsTimelineApi get_transaction_timeline GET /transactions/{id}/timeline/{messageId} Retrieve a transaction Timeline message
RebillySdk::TransactionsTimelineApi get_transaction_timeline_collection GET /transactions/{id}/timeline Retrieve a list of transaction timeline messages
RebillySdk::TransactionsTimelineApi post_transaction_timeline POST /transactions/{id}/timeline Create a transaction Timeline comment

Documentation for Models

Documentation for Authorization

ApplicationJWT

JWT

PublishableApiKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

SecretApiKey

  • Type: API key
  • API key parameter name: REB-APIKEY
  • Location: HTTP header

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages