## Retrieve Rate Schedule `client.V1.Contracts.GetRateSchedule(ctx, params) (*V1ContractGetRateScheduleResponse, error)` **post** `/v1/contracts/getContractRateSchedule` Get the rate schedule for the rate card on a given contract. ### Parameters - **params:** `V1ContractGetRateScheduleParams` - **ContractID:** `param.Field[string]` Body param: ID of the contract to get the rate schedule for. - **CustomerID:** `param.Field[string]` Body param: ID of the customer for whose contract to get the rate schedule for. - **Limit:** `param.Field[int64]` Query param: Max number of results that should be returned - **NextPage:** `param.Field[string]` Query param: Cursor that indicates where the next page of results should start. - **At:** `param.Field[Time]` Body param: optional timestamp which overlaps with the returned rate schedule segments. When not specified, the current timestamp will be used. - **Selectors:** `param.Field[[]V1ContractGetRateScheduleParamsSelector]` Body param: 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. - **BillingFrequency:** `V1ContractGetRateScheduleParamsSelectorsBillingFrequency` Subscription rates matching the billing frequency will be included in the response. - `V1ContractGetRateScheduleParamsSelectorsBillingFrequency` - `V1ContractGetRateScheduleParamsSelectorsBillingFrequency` - `V1ContractGetRateScheduleParamsSelectorsBillingFrequency` - `V1ContractGetRateScheduleParamsSelectorsBillingFrequency` - **PartialPricingGroupValues:** `map[string, string]` List of pricing group key value pairs, rates containing the matching key / value pairs will be included in the response. - **PricingGroupValues:** `map[string, string]` List of pricing group key value pairs, rates matching all of the key / value pairs will be included in the response. - **ProductID:** `string` Rates matching the product id will be included in the response. - **ProductTags:** `[]string` List of product tags, rates matching any of the tags will be included in the response. ### Returns - Not supported - **Data:** `[]V1ContractGetRateScheduleResponseData` - **Entitled:** `bool` - **ListRate:** `Rate` - **ProductCustomFields:** `map[string, string]` - **ProductID:** `string` - **ProductName:** `string` - **ProductTags:** `[]string` - **RateCardID:** `string` - **StartingAt:** `Time` - **BillingFrequency:** `V1ContractGetRateScheduleResponseDataBillingFrequency` - `V1ContractGetRateScheduleResponseDataBillingFrequency` - `V1ContractGetRateScheduleResponseDataBillingFrequency` - `V1ContractGetRateScheduleResponseDataBillingFrequency` - `V1ContractGetRateScheduleResponseDataBillingFrequency` - **CommitRate:** `V1ContractGetRateScheduleResponseDataCommitRate` A distinct rate on the rate card. You can choose to use this rate rather than list rate when consuming a credit or commit. - **RateType:** `V1ContractGetRateScheduleResponseDataCommitRateRateType` - `V1ContractGetRateScheduleResponseDataCommitRateRateType` - `V1ContractGetRateScheduleResponseDataCommitRateRateType` - `V1ContractGetRateScheduleResponseDataCommitRateRateType` - `V1ContractGetRateScheduleResponseDataCommitRateRateType` - `V1ContractGetRateScheduleResponseDataCommitRateRateType` - **Price:** `float64` Commit rate price. For FLAT rate_type, this must be >=0. - **Tiers:** `[]Tier` Only set for TIERED rate_type. - **Price:** `float64` - **Size:** `float64` - **EndingBefore:** `Time` - **OverrideRate:** `Rate` - **PricingGroupValues:** `map[string, string]` - **NextPage:** `string` ### Example ```go package main import ( "context" "fmt" "time" "github.com/Metronome-Industries/metronome-go" "github.com/Metronome-Industries/metronome-go/option" ) func main() { client := metronome.NewClient( option.WithBearerToken("My Bearer Token"), ) response, err := client.V1.Contracts.GetRateSchedule(context.TODO(), metronome.V1ContractGetRateScheduleParams{ ContractID: metronome.F("d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"), CustomerID: metronome.F("13117714-3f05-48e5-a6e9-a66093f13b4d"), At: metronome.F(time.Now()), Selectors: metronome.F([]metronome.V1ContractGetRateScheduleParamsSelector{metronome.V1ContractGetRateScheduleParamsSelector{ ProductID: metronome.F("d6300dbb-882e-4d2d-8dec-5125d16b65d0"), PartialPricingGroupValues: metronome.F(map[string]string{ "region": "us-west-2", "cloud": "aws", }), }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ```