Module: PactasItero::Api::RatedItems
- Included in:
- PactasItero::Api
- Defined in:
- lib/pactas_itero/api/rated_items.rb
Instance Method Summary collapse
- #create_rated_item(contract_id, quantity, description, price_per_unit, tax_policy_id, options = {}) ⇒ Object
- #delete_rated_item(rated_item_id) ⇒ Object
- #rated_items(contract_id) ⇒ Object
Instance Method Details
#create_rated_item(contract_id, quantity, description, price_per_unit, tax_policy_id, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pactas_itero/api/rated_items.rb', line 6 def create_rated_item( contract_id, quantity, description, price_per_unit, tax_policy_id, = {} ) .merge!( quantity: quantity, description: description, price_per_unit: price_per_unit, tax_policy_id: tax_policy_id ) = .camelize_keys post "api/v1/contracts/#{contract_id}/ratedItems", end |
#delete_rated_item(rated_item_id) ⇒ Object
28 29 30 |
# File 'lib/pactas_itero/api/rated_items.rb', line 28 def delete_rated_item(rated_item_id) delete "api/v1/ratedItems/#{rated_item_id}" end |
#rated_items(contract_id) ⇒ Object
24 25 26 |
# File 'lib/pactas_itero/api/rated_items.rb', line 24 def rated_items(contract_id) get "api/v1/contracts/#{contract_id}/ratedItems" end |