Class: MetronomeSDK::Resources::V1::Contracts::RateCards::ProductOrders
- Inherits:
-
Object
- Object
- MetronomeSDK::Resources::V1::Contracts::RateCards::ProductOrders
- Defined in:
- lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb
Overview
Rate cards are used to define default pricing for products.
Instance Method Summary collapse
-
#initialize(client:) ⇒ ProductOrders
constructor
private
A new instance of ProductOrders.
-
#set(product_order:, rate_card_id:, request_options: {}) ⇒ MetronomeSDK::Models::V1::Contracts::RateCards::ProductOrderSetResponse
The ordering of products on a rate card determines the order in which the products will appear on customers’ invoices.
-
#update(product_moves:, rate_card_id:, request_options: {}) ⇒ MetronomeSDK::Models::V1::Contracts::RateCards::ProductOrderUpdateResponse
The ordering of products on a rate card determines the order in which the products will appear on customers’ invoices.
Constructor Details
#initialize(client:) ⇒ ProductOrders
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ProductOrders.
66 67 68 |
# File 'lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb', line 66 def initialize(client:) @client = client end |
Instance Method Details
#set(product_order:, rate_card_id:, request_options: {}) ⇒ MetronomeSDK::Models::V1::Contracts::RateCards::ProductOrderSetResponse
The ordering of products on a rate card determines the order in which the products will appear on customers’ invoices. Use this endpoint to set the order of products on the rate card.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb', line 52 def set(params) parsed, = MetronomeSDK::V1::Contracts::RateCards::ProductOrderSetParams.dump_request(params) @client.request( method: :post, path: "v1/contract-pricing/rate-cards/setRateCardProductsOrder", body: parsed, model: MetronomeSDK::Models::V1::Contracts::RateCards::ProductOrderSetResponse, options: ) end |
#update(product_moves:, rate_card_id:, request_options: {}) ⇒ MetronomeSDK::Models::V1::Contracts::RateCards::ProductOrderUpdateResponse
The ordering of products on a rate card determines the order in which the products will appear on customers’ invoices. Use this endpoint to set the order of specific products on the rate card by moving them relative to their current location.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb', line 26 def update(params) parsed, = MetronomeSDK::V1::Contracts::RateCards::ProductOrderUpdateParams.dump_request(params) @client.request( method: :post, path: "v1/contract-pricing/rate-cards/moveRateCardProducts", body: parsed, model: MetronomeSDK::Models::V1::Contracts::RateCards::ProductOrderUpdateResponse, options: ) end |