List
List commits
client.V1.Customers.Commits.List(ctx, body) (*DataarrayNextPagestringV1CustomerCommitListResponse, error)
post/v1/contracts/customerCommits/list
List commits.
Parameters
bodyCustomerIDfieldCommitIDfieldCoveringDatefieldEffectiveBeforefieldIncludeArchivedfieldIncludeBalancefieldIncludeContractCommitsfieldIncludeLedgersfieldLimitfieldNextPagefieldStartingAtfieldV1CustomerCommitListParams
Returns
V1CustomerCommitListResponsestruct
package main
import (
"context"
"fmt"
"github.com/Metronome-Industries/metronome-go"
"github.com/Metronome-Industries/metronome-go/option"
)
func main() {
client := metronome.NewClient(
option.WithBearerToken("My Bearer Token"),
)
commits, err := client.V1.Customers.Commits.List(context.TODO(), metronome.V1CustomerCommitListParams{
CustomerID: metronome.F("13117714-3f05-48e5-a6e9-a66093f13b4d"),
CommitID: metronome.F("6162d87b-e5db-4a33-b7f2-76ce6ead4e85"),
IncludeLedgers: metronome.F(true),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", commits.Data)
}
200 Example
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"product": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"type": "PREPAID",
"access_schedule": {
"schedule_items": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"amount": 0,
"ending_before": "2019-12-27T18:11:19.117Z",
"starting_at": "2019-12-27T18:11:19.117Z"
}
],
"credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
}
},
"amount": 0,
"applicable_contract_ids": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"applicable_product_ids": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"applicable_product_tags": [
"string"
],
"archived_at": "2019-12-27T18:11:19.117Z",
"balance": 0,
"contract": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
},
"custom_fields": {
"foo": "string"
},
"description": "description",
"hierarchy_configuration": {
"child_access": {
"type": "ALL"
}
},
"invoice_contract": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
},
"invoice_schedule": {
"credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"do_not_invoice": true,
"schedule_items": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"amount": 0,
"quantity": 0,
"timestamp": "2019-12-27T18:11:19.117Z",
"unit_price": 0,
"invoice_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}
]
},
"ledger": [
{
"amount": 0,
"segment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"timestamp": "2019-12-27T18:11:19.117Z",
"type": "PREPAID_COMMIT_SEGMENT_START"
}
],
"name": "name",
"netsuite_sales_order_id": "netsuite_sales_order_id",
"priority": 0,
"rate_type": "COMMIT_RATE",
"rolled_over_from": {
"commit_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"contract_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
},
"rollover_fraction": 0,
"salesforce_opportunity_id": "salesforce_opportunity_id",
"specifiers": [
{
"presentation_group_values": {
"foo": "string"
},
"pricing_group_values": {
"foo": "string"
},
"product_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"product_tags": [
"string"
]
}
],
"uniqueness_key": "x"
}
],
"next_page": "next_page"
}