Module: PactasItero::Api::Contracts
- Included in:
- PactasItero::Api
- Defined in:
- lib/pactas_itero/api/contracts.rb
Instance Method Summary collapse
- #contract(contract_id, options = {}) ⇒ Object
- #contract_cancellation_preview(contract_id, options = {}) ⇒ Object
- #contract_changes(contract_id, options = {}) ⇒ Object
- #contract_metered_usage(contract_id, options = {}) ⇒ Object
- #contracts(options = {}) ⇒ Object
- #customer_contracts(customer_id, options = {}) ⇒ Object
- #get_self_service_token_for_contract(contract_id, options = {}) ⇒ Object
- #terminate_contract(contract_id, options = {}) ⇒ Object
- #update_contract(contract_id, options = {}) ⇒ Object
Instance Method Details
#contract(contract_id, options = {}) ⇒ Object
26 27 28 29 |
# File 'lib/pactas_itero/api/contracts.rb', line 26 def contract(contract_id, = {}) = .camelize_keys get "api/v1/contracts/#{contract_id}", end |
#contract_cancellation_preview(contract_id, options = {}) ⇒ Object
31 32 33 34 |
# File 'lib/pactas_itero/api/contracts.rb', line 31 def contract_cancellation_preview(contract_id, = {}) = .camelize_keys get "api/v1/contracts/#{contract_id}/cancellationPreview", end |
#contract_changes(contract_id, options = {}) ⇒ Object
11 12 13 14 |
# File 'lib/pactas_itero/api/contracts.rb', line 11 def contract_changes(contract_id, = {}) = .camelize_keys get "api/v1/contractChanges", .merge(contractId: contract_id) end |
#contract_metered_usage(contract_id, options = {}) ⇒ Object
46 47 48 49 |
# File 'lib/pactas_itero/api/contracts.rb', line 46 def contract_metered_usage(contract_id, = {}) = .camelize_keys post "api/v1/contracts/#{contract_id}/usage", end |
#contracts(options = {}) ⇒ Object
16 17 18 19 |
# File 'lib/pactas_itero/api/contracts.rb', line 16 def contracts( = {}) = .camelize_keys get "api/v1/contracts", end |
#customer_contracts(customer_id, options = {}) ⇒ Object
6 7 8 9 |
# File 'lib/pactas_itero/api/contracts.rb', line 6 def customer_contracts(customer_id, = {}) = .camelize_keys get "api/v1/customers/#{customer_id}/contracts", end |
#get_self_service_token_for_contract(contract_id, options = {}) ⇒ Object
36 37 38 39 |
# File 'lib/pactas_itero/api/contracts.rb', line 36 def get_self_service_token_for_contract(contract_id, = {}) = .camelize_keys get "api/v1/contracts/#{contract_id}/SelfServiceToken", end |
#terminate_contract(contract_id, options = {}) ⇒ Object
41 42 43 44 |
# File 'lib/pactas_itero/api/contracts.rb', line 41 def terminate_contract(contract_id, = {}) = .camelize_keys post "api/v1/contracts/#{contract_id}/end", end |
#update_contract(contract_id, options = {}) ⇒ Object
21 22 23 24 |
# File 'lib/pactas_itero/api/contracts.rb', line 21 def update_contract(contract_id, = {}) = .camelize_keys patch "api/v1/contracts/#{contract_id}", end |