class ProfitBricks::Contract
Public Class Methods
get(options = {})
click to toggle source
Retrieve a contract.
# File lib/profitbricks/contract.rb, line 7 def get(options = {}) response = ProfitBricks.request( method: :get, path: "/contracts", expects: 200, query: options ) instantiate_objects(response) end
get_by_contract_id(contract_id)
click to toggle source
Retrieve a contract by contract number.
# File lib/profitbricks/contract.rb, line 18 def get_by_contract_id(contract_id) response = ProfitBricks.request( method: :get, path: "/contracts", headers: { 'PB-Contract-Number' => "#{contract_id}" }, expects: 200 ) instantiate_objects(response) end