Retrieve Rate Schedule
Get the rate schedule for a contract
v1.contracts.retrieve_rate_schedule(**kwargs) -> dataarraynext_pageStringContractRetrieveRateScheduleResponse
post/v1/contracts/getContractRateSchedule
Get the rate schedule for the rate card on a given contract.
Parameters
contract_idString
ID of the contract to get the rate schedule for.
formatuuid
customer_idString
ID of the customer for whose contract to get the rate schedule for.
formatuuid
limitInteger
optional
Max number of results that should be returned
minimum1
maximum100
next_pageString
optional
Cursor that indicates where the next page of results should start.
atTime
optional
optional timestamp which overlaps with the returned rate schedule segments. When not specified, the current timestamp will be used.
formatdate-time
selectorsarray
optional
Array[{ billing_frequency, partial_pricing_group_values, pricing_group_values, 2 more}]
List of rate selectors, rates matching ANY of the selectors will be included in the response. Passing no selectors will result in all rates being returned.
Returns
ContractRetrieveRateScheduleResponseclass
require "metronome_sdk"
metronome = MetronomeSDK::Client.new(bearer_token: "My Bearer Token")
response = metronome.v1.contracts.retrieve_rate_schedule(
contract_id: "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
customer_id: "13117714-3f05-48e5-a6e9-a66093f13b4d"
)
puts(response)
200 Example
{
"data": [
{
"entitled": true,
"list_rate": {
"rate_type": "FLAT",
"credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"custom_rate": {
"foo": "bar"
},
"is_prorated": true,
"price": 0,
"pricing_group_values": {
"foo": "string"
},
"quantity": 0,
"tiers": [
{
"price": 0,
"size": 0
}
],
"use_list_prices": true
},
"product_custom_fields": {
"foo": "string"
},
"product_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"product_name": "product_name",
"product_tags": [
"string"
],
"rate_card_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"starting_at": "2019-12-27T18:11:19.117Z",
"billing_frequency": "MONTHLY",
"commit_rate": {
"rate_type": "FLAT",
"price": 0,
"tiers": [
{
"price": 0,
"size": 0
}
]
},
"ending_before": "2019-12-27T18:11:19.117Z",
"override_rate": {
"rate_type": "FLAT",
"credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"custom_rate": {
"foo": "bar"
},
"is_prorated": true,
"price": 0,
"pricing_group_values": {
"foo": "string"
},
"quantity": 0,
"tiers": [
{
"price": 0,
"size": 0
}
],
"use_list_prices": true
},
"pricing_group_values": {
"foo": "string"
}
}
],
"next_page": "next_page"
}