All URIs are relative to https://api-sandbox.rebilly.com/organizations/{organizationId}
Method | HTTP request | Description |
---|---|---|
delete_plan | DELETE /plans/{id} | Delete a Plan |
get_plan | GET /plans/{id} | Retrieve a plan |
get_plan_collection | GET /plans | Retrieve a list of plans |
post_plan | POST /plans | Create a plan |
put_plan | PUT /plans/{id} | Create or update a Plan with predefined ID |
delete_plan(id, opts)
Delete a Plan
Delete a Plan with predefined identifier string.
# 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::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
Name | Type | Description | Notes |
---|---|---|---|
id | String | The resource identifier string. | |
organization_id | 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. | [optional] |
nil (empty response body)
- Content-Type: Not defined
- Accept: application/json
Plan get_plan(id, opts)
Retrieve a plan
Retrieve a plan with specified identifier string.
# 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::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
Name | Type | Description | Notes |
---|---|---|---|
id | String | The resource identifier string. | |
organization_id | 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. | [optional] |
ApplicationJWT, JWT, SecretApiKey
- Content-Type: Not defined
- Accept: application/json
Array<Plan> get_plan_collection(opts)
Retrieve a list of plans
Retrieve a list of plans.
# 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::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
Name | Type | Description | Notes |
---|---|---|---|
organization_id | 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. | [optional] |
filter | String | The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format. | [optional] |
sort | Array<String> | The collection items sort field and order (prefix with "-" for descending sort). | [optional] |
limit | Integer | The collection items limit. | [optional] |
offset | Integer | The collection items offset. | [optional] |
q | String | The partial search of the text fields. | [optional] |
ApplicationJWT, JWT, SecretApiKey
- Content-Type: Not defined
- Accept: application/json
Plan post_plan(body, opts)
Create a plan
Create a plan.
# 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::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
Name | Type | Description | Notes |
---|---|---|---|
body | Plan | Plan resource. | |
organization_id | 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. | [optional] |
- Content-Type: application/json
- Accept: application/json
Plan put_plan(bodyid, opts)
Create or update a Plan with predefined ID
Create or update a Plan with predefined identifier string.
# 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::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(bodyid, opts)
p result
rescue RebillySdk::ApiError => e
puts "Exception when calling PlansApi->put_plan: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Plan | Plan resource. | |
id | String | The resource identifier string. | |
organization_id | 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. | [optional] |
- Content-Type: application/json
- Accept: application/json