Class: MetronomeSDK::Resources::V1::Contracts::NamedSchedules
- Inherits:
-
Object
- Object
- MetronomeSDK::Resources::V1::Contracts::NamedSchedules
- Defined in:
- lib/metronome_sdk/resources/v1/contracts/named_schedules.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ NamedSchedules
constructor
private
A new instance of NamedSchedules.
-
#retrieve(rate_card_id: , schedule_name: , covering_date: nil, request_options: {}) ⇒ MetronomeSDK::Models::V1::Contracts::NamedScheduleRetrieveResponse
Some parameter documentations has been truncated, see Models::V1::Contracts::NamedScheduleRetrieveParams for more details.
-
#update(rate_card_id: , schedule_name: , starting_at: , value: , ending_before: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::V1::Contracts::NamedScheduleUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ NamedSchedules
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 NamedSchedules.
77 78 79 |
# File 'lib/metronome_sdk/resources/v1/contracts/named_schedules.rb', line 77 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(rate_card_id: , schedule_name: , covering_date: nil, request_options: {}) ⇒ MetronomeSDK::Models::V1::Contracts::NamedScheduleRetrieveResponse
Some parameter documentations has been truncated, see Models::V1::Contracts::NamedScheduleRetrieveParams for more details.
Get a named schedule for the given rate card. This endpoint’s availability is dependent on your client’s configuration.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/metronome_sdk/resources/v1/contracts/named_schedules.rb', line 28 def retrieve(params) parsed, = MetronomeSDK::V1::Contracts::NamedScheduleRetrieveParams.dump_request(params) @client.request( method: :post, path: "v1/contract-pricing/rate-cards/getNamedSchedule", body: parsed, model: MetronomeSDK::Models::V1::Contracts::NamedScheduleRetrieveResponse, options: ) end |
#update(rate_card_id: , schedule_name: , starting_at: , value: , ending_before: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::V1::Contracts::NamedScheduleUpdateParams for more details.
Update a named schedule for the given rate card. This endpoint’s availability is dependent on your client’s configuration.
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/metronome_sdk/resources/v1/contracts/named_schedules.rb', line 63 def update(params) parsed, = MetronomeSDK::V1::Contracts::NamedScheduleUpdateParams.dump_request(params) @client.request( method: :post, path: "v1/contract-pricing/rate-cards/updateNamedSchedule", body: parsed, model: NilClass, options: ) end |