Module: Agris::Api::Grain::PurchaseContracts
- Included in:
- Client
- Defined in:
- lib/agris/api/grain/purchase_contracts.rb
Instance Method Summary collapse
- #purchase_contract(contract_location, contract_number) ⇒ Object
- #purchase_contracts(extracts) ⇒ Object
- #purchase_contracts_changed_since(datetime, detail = false) ⇒ Object
Instance Method Details
#purchase_contract(contract_location, contract_number) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/agris/api/grain/purchase_contracts.rb', line 6 def purchase_contract(contract_location, contract_number) extract = Agris::Api::Grain::SpecificContractExtract .new(contract_location, contract_number) purchase_contracts([extract]) end |
#purchase_contracts(extracts) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/agris/api/grain/purchase_contracts.rb', line 13 def purchase_contracts(extracts) extract_documents( Messages::QueryPurchaseContractDocuments.new(extracts), Agris::Api::Grain::Contract ) end |
#purchase_contracts_changed_since(datetime, detail = false) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/agris/api/grain/purchase_contracts.rb', line 20 def purchase_contracts_changed_since(datetime, detail = false) extract_documents( Messages::QueryChangedPurchaseContracts.new(datetime, detail), Agris::Api::Grain::Contract ) end |