All URIs are relative to https://api.beezup.com/v2
Method | HTTP request | Description |
---|---|---|
create_contract | POST /user/customer/contracts | Create a new contract |
delete_next_contract | DELETE /user/customer/contracts/next | Delete your next contract |
get_billing_periods | GET /user/customer/billingPeriods | Get billing periods conditions |
get_contracts | GET /user/customer/contracts | Get contract list |
get_offer | POST /user/customer/offers | Get offer pricing |
get_standard_offers | GET /user/customer/offers | Get all standard offers |
reactivate_current_contract | POST /user/customer/contracts/current/reenableAutoRenewal | Reactivate your terminated contract. |
terminate_current_contract | POST /user/customer/contracts/current/disableAutoRenewal | Schedule termination of your current contract at the end of the commitment. |
CreateContractResponse create_contract(request)
Create a new contract
Now you are ready to create your contract. Before that, please ensure that you check the offer with the same request parameterts. /offers
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
end
api_instance = SwaggerClient::CustomerContractsApi.new
request = SwaggerClient::CreateContract.new # CreateContract |
begin
#Create a new contract
result = api_instance.create_contract(request)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CustomerContractsApi->create_contract: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
request | CreateContract |
- Content-Type: application/json
- Accept: application/json
delete_next_contract
Delete your next contract
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
end
api_instance = SwaggerClient::CustomerContractsApi.new
begin
#Delete your next contract
api_instance.delete_next_contract
rescue SwaggerClient::ApiError => e
puts "Exception when calling CustomerContractsApi->delete_next_contract: #{e}"
end
This endpoint does not need any parameter.
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
BillingPeriodList get_billing_periods(opts)
Get billing periods conditions
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
end
api_instance = SwaggerClient::CustomerContractsApi.new
opts = {
if_none_match: "if_none_match_example" # String | ETag value to identify the last known version of requested resource.\\ To avoid useless exchange, we recommend you to indicate the ETag you previously got from this operation.\\ If the ETag value does not match the response will be 200 to give you a new content, otherwise the response will be: 304 Not Modified, without any content.\\ For more details go to this link: http://tools.ietf.org/html/rfc7232#section-2.3
}
begin
#Get billing periods conditions
result = api_instance.get_billing_periods(opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CustomerContractsApi->get_billing_periods: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
if_none_match | String | ETag value to identify the last known version of requested resource.\ To avoid useless exchange, we recommend you to indicate the ETag you previously got from this operation.\ If the ETag value does not match the response will be 200 to give you a new content, otherwise the response will be: 304 Not Modified, without any content.\ For more details go to this link: http://tools.ietf.org/html/rfc7232#section-2.3 | [optional] |
- Content-Type: application/json
- Accept: application/json
Contracts get_contracts(opts)
Get contract list
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
end
api_instance = SwaggerClient::CustomerContractsApi.new
opts = {
if_none_match: "if_none_match_example" # String | ETag value to identify the last known version of requested resource.\\ To avoid useless exchange, we recommend you to indicate the ETag you previously got from this operation.\\ If the ETag value does not match the response will be 200 to give you a new content, otherwise the response will be: 304 Not Modified, without any content.\\ For more details go to this link: http://tools.ietf.org/html/rfc7232#section-2.3
}
begin
#Get contract list
result = api_instance.get_contracts(opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CustomerContractsApi->get_contracts: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
if_none_match | String | ETag value to identify the last known version of requested resource.\ To avoid useless exchange, we recommend you to indicate the ETag you previously got from this operation.\ If the ETag value does not match the response will be 200 to give you a new content, otherwise the response will be: 304 Not Modified, without any content.\ For more details go to this link: http://tools.ietf.org/html/rfc7232#section-2.3 | [optional] |
- Content-Type: application/json
- Accept: application/json
Offer get_offer(request)
Get offer pricing
Get the offer pricing then you can create your contract with the same request parameters. /v2/user/customer/contracts
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
end
api_instance = SwaggerClient::CustomerContractsApi.new
request = SwaggerClient::OfferRequest.new # OfferRequest |
begin
#Get offer pricing
result = api_instance.get_offer(request)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CustomerContractsApi->get_offer: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
request | OfferRequest |
- Content-Type: application/json
- Accept: application/json
StandardOffers get_standard_offers(opts)
Get all standard offers
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
end
api_instance = SwaggerClient::CustomerContractsApi.new
opts = {
if_none_match: "if_none_match_example" # String | ETag value to identify the last known version of requested resource.\\ To avoid useless exchange, we recommend you to indicate the ETag you previously got from this operation.\\ If the ETag value does not match the response will be 200 to give you a new content, otherwise the response will be: 304 Not Modified, without any content.\\ For more details go to this link: http://tools.ietf.org/html/rfc7232#section-2.3
}
begin
#Get all standard offers
result = api_instance.get_standard_offers(opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CustomerContractsApi->get_standard_offers: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
if_none_match | String | ETag value to identify the last known version of requested resource.\ To avoid useless exchange, we recommend you to indicate the ETag you previously got from this operation.\ If the ETag value does not match the response will be 200 to give you a new content, otherwise the response will be: 304 Not Modified, without any content.\ For more details go to this link: http://tools.ietf.org/html/rfc7232#section-2.3 | [optional] |
- Content-Type: application/json
- Accept: application/json
reactivate_current_contract
Reactivate your terminated contract.
By calling this operation you can re-enable the auto renewal.
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
end
api_instance = SwaggerClient::CustomerContractsApi.new
begin
#Reactivate your terminated contract.
api_instance.reactivate_current_contract
rescue SwaggerClient::ApiError => e
puts "Exception when calling CustomerContractsApi->reactivate_current_contract: #{e}"
end
This endpoint does not need any parameter.
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
terminate_current_contract(request)
Schedule termination of your current contract at the end of the commitment.
By default your contract are automatically renew. By calling this operation you can disable the auto renewal.
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
end
api_instance = SwaggerClient::CustomerContractsApi.new
request = SwaggerClient::TerminateContract.new # TerminateContract | Indicate the termination reason
begin
#Schedule termination of your current contract at the end of the commitment.
api_instance.terminate_current_contract(request)
rescue SwaggerClient::ApiError => e
puts "Exception when calling CustomerContractsApi->terminate_current_contract: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
request | TerminateContract | Indicate the termination reason |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json