@metronome/mcp 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/auth.d.mts.map +1 -1
  2. package/auth.d.ts.map +1 -1
  3. package/code-tool-types.d.mts.map +1 -1
  4. package/code-tool-types.d.ts.map +1 -1
  5. package/code-tool-worker.d.mts.map +1 -1
  6. package/code-tool-worker.d.ts.map +1 -1
  7. package/code-tool-worker.js +0 -3
  8. package/code-tool-worker.js.map +1 -1
  9. package/code-tool-worker.mjs +0 -3
  10. package/code-tool-worker.mjs.map +1 -1
  11. package/code-tool.d.mts.map +1 -1
  12. package/code-tool.d.ts.map +1 -1
  13. package/code-tool.mjs.map +1 -1
  14. package/docs-search-tool.d.mts +2 -2
  15. package/docs-search-tool.d.mts.map +1 -1
  16. package/docs-search-tool.d.ts +2 -2
  17. package/docs-search-tool.d.ts.map +1 -1
  18. package/docs-search-tool.mjs.map +1 -1
  19. package/http.d.mts.map +1 -1
  20. package/http.d.ts.map +1 -1
  21. package/http.mjs.map +1 -1
  22. package/index.mjs.map +1 -1
  23. package/instructions.mjs.map +1 -1
  24. package/local-docs-search.d.mts.map +1 -1
  25. package/local-docs-search.d.ts.map +1 -1
  26. package/local-docs-search.js +39 -152
  27. package/local-docs-search.js.map +1 -1
  28. package/local-docs-search.mjs +39 -152
  29. package/local-docs-search.mjs.map +1 -1
  30. package/logger.d.mts.map +1 -1
  31. package/logger.d.ts.map +1 -1
  32. package/logger.mjs.map +1 -1
  33. package/methods.d.mts.map +1 -1
  34. package/methods.d.ts.map +1 -1
  35. package/methods.js +0 -18
  36. package/methods.js.map +1 -1
  37. package/methods.mjs +0 -18
  38. package/methods.mjs.map +1 -1
  39. package/options.mjs.map +1 -1
  40. package/package.json +2 -2
  41. package/server.d.mts.map +1 -1
  42. package/server.d.ts.map +1 -1
  43. package/server.js +1 -1
  44. package/server.mjs +1 -1
  45. package/server.mjs.map +1 -1
  46. package/src/code-tool-worker.ts +0 -3
  47. package/src/local-docs-search.ts +41 -177
  48. package/src/methods.ts +0 -18
  49. package/src/server.ts +1 -1
  50. package/stdio.d.mts.map +1 -1
  51. package/stdio.d.ts.map +1 -1
  52. package/stdio.mjs.map +1 -1
  53. package/types.d.mts.map +1 -1
  54. package/types.d.ts.map +1 -1
@@ -67,9 +67,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
67
67
  'include_ledgers?: boolean;',
68
68
  ],
69
69
  response:
70
- "{ data: { id: string; commits: object[]; created_at: string; created_by: string; customer_id: string; overrides: object[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; archived_at?: string; credits?: object[]; custom_fields?: object; customer_billing_provider_configuration?: object; discounts?: discount[]; ending_before?: string; has_more?: object; hierarchy_configuration?: object | object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; priority?: number; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration_v2; subscriptions?: object[]; total_contract_value?: number; uniqueness_key?: string; }; }",
70
+ "{ data: { id: string; commits: object[]; created_at: string; created_by: string; customer_id: string; overrides: object[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; archived_at?: string; credits?: object[]; custom_fields?: object; customer_billing_provider_configuration?: object; discounts?: discount[]; ending_before?: string; has_more?: object; hierarchy_configuration?: object | object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; priority?: number; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration_v2; spend_trackers?: object[]; subscriptions?: object[]; total_contract_value?: number; uniqueness_key?: string; }; }",
71
71
  markdown:
72
- "## retrieve\n\n`client.v2.contracts.retrieve(contract_id: string, customer_id: string, as_of_date?: string, include_balance?: boolean, include_ledgers?: boolean): { data: contract_v2; }`\n\n**post** `/v2/contracts/get`\n\nGets the details for a specific contract, including contract term, rate card information, credits and commits, and more. \n\n### Use this endpoint to: \n- Check the duration of a customer's current contract\n- Get details on contract terms, including access schedule amounts for commitments and credits\n- Understand the state of a contract at a past time. As you can evolve the terms of a contract over time through editing, use the `as_of_date` parameter to view the full contract configuration as of that point in time. \n\n### Usage guidelines: \n- Optionally, use the `include_balance` and `include_ledger` fields to include balances and ledgers in the credit and commit responses. Using these fields will cause the query to be slower.\n\n\n### Parameters\n\n- `contract_id: string`\n\n- `customer_id: string`\n\n- `as_of_date?: string`\n Optional RFC 3339 timestamp. Return the contract as of this date. Cannot be used with include_ledgers parameter.\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower.\n\n- `include_ledgers?: boolean`\n Include commit/credit ledgers in the response. Setting this flag may cause the query to be slower. Cannot be used with as_of_date parameter.\n\n### Returns\n\n- `{ data: { id: string; commits: object[]; created_at: string; created_by: string; customer_id: string; overrides: object[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; archived_at?: string; credits?: object[]; custom_fields?: object; customer_billing_provider_configuration?: object; discounts?: discount[]; ending_before?: string; has_more?: object; hierarchy_configuration?: object | object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; priority?: number; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration_v2; subscriptions?: object[]; total_contract_value?: number; uniqueness_key?: string; }; }`\n\n - `data: { id: string; commits: { id: string; created_at: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_contract?: { id: string; }; invoice_schedule?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: { commit_id: string; contract_id: string; }; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: object[]; subscription_config?: object; }[]; created_at: string; created_by: string; customer_id: string; overrides: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; override_tiers?: object[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: credit_type_data; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: object; schedule: schedule_point_in_time; archived_at?: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; starting_at: string; transitions: { from_contract_id: string; to_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; }[]; usage_filter: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; usage_statement_schedule: { billing_anchor_date: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; }; archived_at?: string; credits?: { id: string; product: { id: string; name: string; }; type: 'CREDIT'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; created_at?: string; custom_fields?: object; description?: string; hierarchy_configuration?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CREDITED'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'CREDIT_MANUAL'; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'CREDIT_ROLLOVER'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; recurring_credit_id?: string; rolled_over_from?: { contract_id: string; credit_id: string; }; salesforce_opportunity_id?: string; specifiers?: object[]; subscription_config?: object; }[]; custom_fields?: object; customer_billing_provider_configuration?: { id: string; billing_provider: string; delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; discounts?: { id: string; product: object; schedule: schedule_point_in_time; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; ending_before?: string; has_more?: { commits: boolean; credits: boolean; }; hierarchy_configuration?: { children: { contract_id: string; customer_id: string; }[]; parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }; } | { parent: { contract_id: string; customer_id: string; }; payer?: 'SELF' | 'PARENT'; usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; }; priority?: number; professional_services?: { id: string; max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]; rate_card_id?: string; recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; segments: { fraction: number; netsuite_reseller_id: string; reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; gcp_account_id?: string; gcp_offer_id?: string; reseller_contract_value?: number; }[]; }[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; threshold_amount: number; discount_configuration?: object; }; subscriptions?: { billing_periods: { current?: object; next?: object; previous?: object; }; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: { quantity: number; starting_at: string; ending_before?: string; }[]; starting_at: string; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: object; }; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: { seat_group_key: string; }; }[]; total_contract_value?: number; uniqueness_key?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contract = await client.v2.contracts.retrieve({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(contract);\n```",
72
+ "## retrieve\n\n`client.v2.contracts.retrieve(contract_id: string, customer_id: string, as_of_date?: string, include_balance?: boolean, include_ledgers?: boolean): { data: contract_v2; }`\n\n**post** `/v2/contracts/get`\n\nGets the details for a specific contract, including contract term, rate card information, credits and commits, and more. \n\n### Use this endpoint to: \n- Check the duration of a customer's current contract\n- Get details on contract terms, including access schedule amounts for commitments and credits\n- Understand the state of a contract at a past time. As you can evolve the terms of a contract over time through editing, use the `as_of_date` parameter to view the full contract configuration as of that point in time. \n\n### Usage guidelines: \n- Optionally, use the `include_balance` and `include_ledger` fields to include balances and ledgers in the credit and commit responses. Using these fields will cause the query to be slower.\n\n\n### Parameters\n\n- `contract_id: string`\n\n- `customer_id: string`\n\n- `as_of_date?: string`\n Optional RFC 3339 timestamp. Return the contract as of this date. Cannot be used with include_ledgers parameter.\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower.\n\n- `include_ledgers?: boolean`\n Include commit/credit ledgers in the response. Setting this flag may cause the query to be slower. Cannot be used with as_of_date parameter.\n\n### Returns\n\n- `{ data: { id: string; commits: object[]; created_at: string; created_by: string; customer_id: string; overrides: object[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; archived_at?: string; credits?: object[]; custom_fields?: object; customer_billing_provider_configuration?: object; discounts?: discount[]; ending_before?: string; has_more?: object; hierarchy_configuration?: object | object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; priority?: number; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration_v2; spend_trackers?: object[]; subscriptions?: object[]; total_contract_value?: number; uniqueness_key?: string; }; }`\n\n - `data: { id: string; commits: { id: string; created_at: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_contract?: { id: string; }; invoice_schedule?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: { commit_id: string; contract_id: string; }; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: object[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; subscription_config?: object; }[]; created_at: string; created_by: string; customer_id: string; overrides: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; override_tiers?: object[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: credit_type_data; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: object; schedule: schedule_point_in_time; archived_at?: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; starting_at: string; transitions: { from_contract_id: string; to_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; }[]; usage_filter: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; usage_statement_schedule: { billing_anchor_date: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; }; archived_at?: string; credits?: { id: string; product: { id: string; name: string; }; type: 'CREDIT'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; created_at?: string; custom_fields?: object; description?: string; hierarchy_configuration?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CREDITED'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'CREDIT_MANUAL'; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'CREDIT_ROLLOVER'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; recurring_credit_id?: string; rolled_over_from?: { contract_id: string; credit_id: string; }; salesforce_opportunity_id?: string; specifiers?: object[]; subscription_config?: object; }[]; custom_fields?: object; customer_billing_provider_configuration?: { id: string; billing_provider: string; delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; discounts?: { id: string; product: object; schedule: schedule_point_in_time; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; ending_before?: string; has_more?: { commits: boolean; credits: boolean; }; hierarchy_configuration?: { children: { contract_id: string; customer_id: string; }[]; parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }; } | { parent: { contract_id: string; customer_id: string; }; payer?: 'SELF' | 'PARENT'; usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }; priority?: number; professional_services?: { id: string; max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]; rate_card_id?: string; recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; segments: { fraction: number; netsuite_reseller_id: string; reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; gcp_account_id?: string; gcp_offer_id?: string; reseller_contract_value?: number; }[]; }[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; threshold_amount: number; discount_configuration?: object; }; spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; accumulated_spend?: { amount: number; period_ending_before: string; period_starting_at: string; }; }[]; subscriptions?: { billing_periods: { current?: object; next?: object; previous?: object; }; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: { quantity: number; starting_at: string; ending_before?: string; }[]; starting_at: string; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: object; }; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: { seat_group_key: string; }; }[]; total_contract_value?: number; uniqueness_key?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contract = await client.v2.contracts.retrieve({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(contract);\n```",
73
73
  perLanguage: {
74
74
  typescript: {
75
75
  method: 'client.v2.contracts.retrieve',
@@ -120,9 +120,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
120
120
  'starting_at?: string;',
121
121
  ],
122
122
  response:
123
- "{ data: { id: string; commits: object[]; created_at: string; created_by: string; customer_id: string; overrides: object[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; archived_at?: string; credits?: object[]; custom_fields?: object; customer_billing_provider_configuration?: object; discounts?: discount[]; ending_before?: string; has_more?: object; hierarchy_configuration?: object | object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; priority?: number; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration_v2; subscriptions?: object[]; total_contract_value?: number; uniqueness_key?: string; }[]; }",
123
+ "{ data: { id: string; commits: object[]; created_at: string; created_by: string; customer_id: string; overrides: object[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; archived_at?: string; credits?: object[]; custom_fields?: object; customer_billing_provider_configuration?: object; discounts?: discount[]; ending_before?: string; has_more?: object; hierarchy_configuration?: object | object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; priority?: number; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration_v2; spend_trackers?: object[]; subscriptions?: object[]; total_contract_value?: number; uniqueness_key?: string; }[]; }",
124
124
  markdown:
125
- "## list\n\n`client.v2.contracts.list(customer_id: string, covering_date?: string, include_archived?: boolean, include_balance?: boolean, include_ledgers?: boolean, starting_at?: string): { data: contract_v2[]; }`\n\n**post** `/v2/contracts/list`\n\nFor a given customer, lists all of their contracts in chronological order. \n\n### Use this endpoint to:\n- Check if a customer is provisioned with any contract, and at which tier\n- Check the duration and terms of a customer's current contract\n- Power a page in your end customer experience that shows the customer's history of tiers (e.g. this customer started out on the Pro Plan, then downgraded to the Starter plan).\n\n### Usage guidelines:\nUse the `starting_at`, `covering_date`, and `include_archived` parameters to filter the list of returned contracts. For example, to list only currently active contracts, pass `covering_date` equal to the current time.\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `covering_date?: string`\n Optional RFC 3339 timestamp. Only include contracts active on the provided date. This cannot be provided if starting_at filter is provided.\n\n- `include_archived?: boolean`\n Include archived contracts in the response.\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the response to be slower.\n\n- `include_ledgers?: boolean`\n Include commit/credit ledgers in the response. Setting this flag may cause the response to be slower.\n\n- `starting_at?: string`\n Optional RFC 3339 timestamp. Only include contracts that started on or after this date. This cannot be provided if covering_date filter is provided.\n\n### Returns\n\n- `{ data: { id: string; commits: object[]; created_at: string; created_by: string; customer_id: string; overrides: object[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; archived_at?: string; credits?: object[]; custom_fields?: object; customer_billing_provider_configuration?: object; discounts?: discount[]; ending_before?: string; has_more?: object; hierarchy_configuration?: object | object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; priority?: number; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration_v2; subscriptions?: object[]; total_contract_value?: number; uniqueness_key?: string; }[]; }`\n\n - `data: { id: string; commits: { id: string; created_at: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_contract?: { id: string; }; invoice_schedule?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: { commit_id: string; contract_id: string; }; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: object[]; subscription_config?: object; }[]; created_at: string; created_by: string; customer_id: string; overrides: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; override_tiers?: object[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: credit_type_data; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: object; schedule: schedule_point_in_time; archived_at?: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; starting_at: string; transitions: { from_contract_id: string; to_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; }[]; usage_filter: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; usage_statement_schedule: { billing_anchor_date: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; }; archived_at?: string; credits?: { id: string; product: { id: string; name: string; }; type: 'CREDIT'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; created_at?: string; custom_fields?: object; description?: string; hierarchy_configuration?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CREDITED'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'CREDIT_MANUAL'; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'CREDIT_ROLLOVER'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; recurring_credit_id?: string; rolled_over_from?: { contract_id: string; credit_id: string; }; salesforce_opportunity_id?: string; specifiers?: object[]; subscription_config?: object; }[]; custom_fields?: object; customer_billing_provider_configuration?: { id: string; billing_provider: string; delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; discounts?: { id: string; product: object; schedule: schedule_point_in_time; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; ending_before?: string; has_more?: { commits: boolean; credits: boolean; }; hierarchy_configuration?: { children: { contract_id: string; customer_id: string; }[]; parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }; } | { parent: { contract_id: string; customer_id: string; }; payer?: 'SELF' | 'PARENT'; usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; }; priority?: number; professional_services?: { id: string; max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]; rate_card_id?: string; recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; segments: { fraction: number; netsuite_reseller_id: string; reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; gcp_account_id?: string; gcp_offer_id?: string; reseller_contract_value?: number; }[]; }[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; threshold_amount: number; discount_configuration?: object; }; subscriptions?: { billing_periods: { current?: object; next?: object; previous?: object; }; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: { quantity: number; starting_at: string; ending_before?: string; }[]; starting_at: string; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: object; }; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: { seat_group_key: string; }; }[]; total_contract_value?: number; uniqueness_key?: string; }[]`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contracts = await client.v2.contracts.list({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(contracts);\n```",
125
+ "## list\n\n`client.v2.contracts.list(customer_id: string, covering_date?: string, include_archived?: boolean, include_balance?: boolean, include_ledgers?: boolean, starting_at?: string): { data: contract_v2[]; }`\n\n**post** `/v2/contracts/list`\n\nFor a given customer, lists all of their contracts in chronological order. \n\n### Use this endpoint to:\n- Check if a customer is provisioned with any contract, and at which tier\n- Check the duration and terms of a customer's current contract\n- Power a page in your end customer experience that shows the customer's history of tiers (e.g. this customer started out on the Pro Plan, then downgraded to the Starter plan).\n\n### Usage guidelines:\nUse the `starting_at`, `covering_date`, and `include_archived` parameters to filter the list of returned contracts. For example, to list only currently active contracts, pass `covering_date` equal to the current time.\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `covering_date?: string`\n Optional RFC 3339 timestamp. Only include contracts active on the provided date. This cannot be provided if starting_at filter is provided.\n\n- `include_archived?: boolean`\n Include archived contracts in the response.\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the response to be slower.\n\n- `include_ledgers?: boolean`\n Include commit/credit ledgers in the response. Setting this flag may cause the response to be slower.\n\n- `starting_at?: string`\n Optional RFC 3339 timestamp. Only include contracts that started on or after this date. This cannot be provided if covering_date filter is provided.\n\n### Returns\n\n- `{ data: { id: string; commits: object[]; created_at: string; created_by: string; customer_id: string; overrides: object[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; archived_at?: string; credits?: object[]; custom_fields?: object; customer_billing_provider_configuration?: object; discounts?: discount[]; ending_before?: string; has_more?: object; hierarchy_configuration?: object | object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; priority?: number; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration_v2; spend_trackers?: object[]; subscriptions?: object[]; total_contract_value?: number; uniqueness_key?: string; }[]; }`\n\n - `data: { id: string; commits: { id: string; created_at: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_contract?: { id: string; }; invoice_schedule?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: { commit_id: string; contract_id: string; }; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: object[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; subscription_config?: object; }[]; created_at: string; created_by: string; customer_id: string; overrides: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; override_tiers?: object[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: credit_type_data; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: object; schedule: schedule_point_in_time; archived_at?: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; starting_at: string; transitions: { from_contract_id: string; to_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; }[]; usage_filter: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; usage_statement_schedule: { billing_anchor_date: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; }; archived_at?: string; credits?: { id: string; product: { id: string; name: string; }; type: 'CREDIT'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; created_at?: string; custom_fields?: object; description?: string; hierarchy_configuration?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CREDITED'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'CREDIT_MANUAL'; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'CREDIT_ROLLOVER'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; recurring_credit_id?: string; rolled_over_from?: { contract_id: string; credit_id: string; }; salesforce_opportunity_id?: string; specifiers?: object[]; subscription_config?: object; }[]; custom_fields?: object; customer_billing_provider_configuration?: { id: string; billing_provider: string; delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; discounts?: { id: string; product: object; schedule: schedule_point_in_time; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; ending_before?: string; has_more?: { commits: boolean; credits: boolean; }; hierarchy_configuration?: { children: { contract_id: string; customer_id: string; }[]; parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }; } | { parent: { contract_id: string; customer_id: string; }; payer?: 'SELF' | 'PARENT'; usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }; priority?: number; professional_services?: { id: string; max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]; rate_card_id?: string; recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; segments: { fraction: number; netsuite_reseller_id: string; reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; gcp_account_id?: string; gcp_offer_id?: string; reseller_contract_value?: number; }[]; }[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; threshold_amount: number; discount_configuration?: object; }; spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; accumulated_spend?: { amount: number; period_ending_before: string; period_starting_at: string; }; }[]; subscriptions?: { billing_periods: { current?: object; next?: object; previous?: object; }; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: { quantity: number; starting_at: string; ending_before?: string; }[]; starting_at: string; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: object; }; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: { seat_group_key: string; }; }[]; total_contract_value?: number; uniqueness_key?: string; }[]`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contracts = await client.v2.contracts.list({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(contracts);\n```",
126
126
  perLanguage: {
127
127
  typescript: {
128
128
  method: 'client.v2.contracts.list',
@@ -168,23 +168,25 @@ const EMBEDDED_METHODS: MethodEntry[] = [
168
168
  'contract_id: string;',
169
169
  'customer_id: string;',
170
170
  "add_billing_provider_configuration_update?: { billing_provider_configuration: { billing_provider?: string; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; };",
171
- "add_commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; on_session_payment?: boolean; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; temporary_id?: string; }[];",
171
+ "add_commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; on_session_payment?: boolean; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; temporary_id?: string; }[];",
172
172
  "add_credits?: { access_schedule: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[];",
173
173
  "add_discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[];",
174
174
  "add_overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[];",
175
- "add_prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; }; };",
175
+ "add_prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; threshold_balance_specifiers?: { exclude: { custom_field_filters: object[]; }[]; }[]; };",
176
176
  'add_professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[];',
177
177
  "add_recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[];",
178
178
  "add_recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[];",
179
179
  "add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; fraction?: number; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[];",
180
180
  "add_revenue_system_configuration_update?: { revenue_system_configuration: { delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; };",
181
181
  "add_scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[];",
182
- "add_spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; }; };",
182
+ "add_spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; };",
183
+ "add_spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[];",
183
184
  "add_subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[];",
184
185
  'allow_contract_ending_before_finalized_invoice?: boolean;',
185
186
  'archive_commits?: { id: string; }[];',
186
187
  'archive_credits?: { id: string; }[];',
187
188
  'archive_scheduled_charges?: { id: string; }[];',
189
+ 'archive_spend_trackers?: string[];',
188
190
  'remove_overrides?: { id: string; }[];',
189
191
  'uniqueness_key?: string;',
190
192
  "update_commits?: { commit_id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[];",
@@ -192,16 +194,17 @@ const EMBEDDED_METHODS: MethodEntry[] = [
192
194
  'update_contract_name?: string;',
193
195
  "update_credits?: { credit_id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[];",
194
196
  'update_net_payment_terms_days?: number;',
195
- "update_prepaid_balance_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; custom_credit_type_id?: string; discount_configuration?: { payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount?: number; threshold_amount?: number; };",
197
+ "update_prepaid_balance_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; custom_credit_type_id?: string; discount_configuration?: { cap?: { amount: number; spend_tracker_alias: string; }; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount?: number; threshold_amount?: number; threshold_balance_specifiers?: { exclude: { custom_field_filters: { entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit'; key: string; value: string; }[]; }[]; }[]; };",
196
198
  "update_recurring_commits?: { recurring_commit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; invoice_amount?: { quantity?: number; unit_price?: number; }; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[];",
197
199
  "update_recurring_credits?: { recurring_credit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[];",
198
200
  'update_scheduled_charges?: { scheduled_charge_id: string; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; netsuite_sales_order_id?: string; }[];',
199
- "update_spend_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; discount_configuration?: { payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount?: number; };",
201
+ "update_spend_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; discount_configuration?: { cap?: { amount: number; spend_tracker_alias: string; }; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount?: number; };",
200
202
  "update_subscriptions?: { subscription_id: string; ending_before?: string; quantity_management_mode_update?: { quantity_management_mode: 'SEAT_BASED'; seat_config: { seat_group_key: string; }; }; quantity_updates?: { starting_at: string; quantity?: number; quantity_delta?: number; }[]; seat_updates?: { add_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; add_unassigned_seats?: { quantity: number; starting_at: string; }[]; remove_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; remove_unassigned_seats?: { quantity: number; starting_at: string; }[]; }; }[];",
201
203
  ],
202
- response: '{ data: { id: string; }; }',
204
+ response:
205
+ '{ data: { id: string; edit?: { id: string; add_commits?: object[]; add_credits?: object[]; add_discounts?: discount[]; add_overrides?: object[]; add_prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; add_pro_services?: pro_service[]; add_recurring_commits?: object[]; add_recurring_credits?: object[]; add_reseller_royalties?: object[]; add_scheduled_charges?: object[]; add_spend_threshold_configuration?: spend_threshold_configuration_v2; add_subscriptions?: object[]; add_usage_filters?: object[]; archive_commits?: object[]; archive_credits?: object[]; archive_scheduled_charges?: object[]; remove_overrides?: object[]; timestamp?: string; uniqueness_key?: string; update_commits?: object[]; update_contract_end_date?: string; update_contract_name?: string; update_credits?: object[]; update_discounts?: object[]; update_prepaid_balance_threshold_configuration?: object; update_recurring_commits?: object[]; update_recurring_credits?: object[]; update_refund_invoices?: object[]; update_scheduled_charges?: object[]; update_spend_threshold_configuration?: object; update_subscriptions?: object[]; }; }; }',
203
206
  markdown:
204
- "## edit\n\n`client.v2.contracts.edit(contract_id: string, customer_id: string, add_billing_provider_configuration_update?: { billing_provider_configuration: { billing_provider?: string; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; }, add_commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; temporary_id?: string; }[], add_credits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; }[], add_discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], add_overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[], add_prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; }, add_professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[], add_recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[], add_recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[], add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; fraction?: number; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[], add_revenue_system_configuration_update?: { revenue_system_configuration: { delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; }, add_scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], add_spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; threshold_amount: number; discount_configuration?: object; }, add_subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[], allow_contract_ending_before_finalized_invoice?: boolean, archive_commits?: { id: string; }[], archive_credits?: { id: string; }[], archive_scheduled_charges?: { id: string; }[], remove_overrides?: { id: string; }[], uniqueness_key?: string, update_commits?: { commit_id: string; access_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: object; invoice_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[], update_contract_end_date?: string, update_contract_name?: string, update_credits?: { credit_id: string; access_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[], update_net_payment_terms_days?: number, update_prepaid_balance_threshold_configuration?: { commit?: object; custom_credit_type_id?: string; discount_configuration?: { payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: object; recharge_to_amount?: number; threshold_amount?: number; }, update_recurring_commits?: { recurring_commit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; invoice_amount?: { quantity?: number; unit_price?: number; }; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[], update_recurring_credits?: { recurring_credit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[], update_scheduled_charges?: { scheduled_charge_id: string; invoice_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; netsuite_sales_order_id?: string; }[], update_spend_threshold_configuration?: { commit?: object; discount_configuration?: { payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: object; threshold_amount?: number; }, update_subscriptions?: { subscription_id: string; ending_before?: string; quantity_management_mode_update?: { quantity_management_mode: 'SEAT_BASED'; seat_config: object; }; quantity_updates?: { starting_at: string; quantity?: number; quantity_delta?: number; }[]; seat_updates?: { add_seat_ids?: object[]; add_unassigned_seats?: object[]; remove_seat_ids?: object[]; remove_unassigned_seats?: object[]; }; }[]): { data: id; }`\n\n**post** `/v2/contracts/edit`\n\nThe ability to edit a contract helps you react quickly to the needs of your customers and your business.\n\n### Use this endpoint to:\n- Encode mid-term commitment and discount changes\n- Fix configuration mistakes and easily roll back packaging changes\n\n### Key response fields:\n- The `id` of the edit\n- Complete edit details. For example, if you edited the contract to add new overrides and credits, you will receive the IDs of those overrides and credits in the response.\n\n### Usage guidelines:\n- When you edit a contract, any draft invoices update immediately to reflect that edit. Finalized invoices remain unchanged - you must void and regenerate them in the UI or API to reflect the edit.\n- Contract editing must be enabled to use this endpoint. Reach out to your Metronome representative to learn more.\n\n\n### Parameters\n\n- `contract_id: string`\n ID of the contract being edited\n\n- `customer_id: string`\n ID of the customer whose contract is being edited\n\n- `add_billing_provider_configuration_update?: { billing_provider_configuration: { billing_provider?: string; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; }`\n Update the billing provider configuration on the contract. Currently only supports adding a billing provider configuration to a contract that does not already have one.\n - `billing_provider_configuration: { billing_provider?: string; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }`\n - `schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }`\n Indicates when the billing provider will be active on the contract. Any charges accrued during the schedule will be billed to the indicated billing provider.\n\n- `add_commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; on_session_payment?: boolean; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; temporary_id?: string; }[]`\n\n- `add_credits?: { access_schedule: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n\n- `add_discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n\n- `add_overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n\n- `add_prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; }; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `recharge_to_amount: number`\n Specify the amount the balance should be recharged to.\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's balance lowers to this amount, a threshold charge will be initiated.\n - `custom_credit_type_id?: string`\n If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.\n - `discount_configuration?: { payment_fraction: number; }`\n\n- `add_professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `add_recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[]`\n\n- `add_recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[]`\n\n- `add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; fraction?: number; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]`\n\n- `add_revenue_system_configuration_update?: { revenue_system_configuration: { delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; }`\n Update the revenue system configuration on the contract. Currently only supports adding a revenue system configuration to a contract that does not already have one.\n - `revenue_system_configuration: { delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }`\n - `schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }`\n\n- `add_scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n\n- `add_spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; }; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.\n - `discount_configuration?: { payment_fraction: number; }`\n\n- `add_subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[]`\n Optional list of [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/) to add to the contract.\n\n- `allow_contract_ending_before_finalized_invoice?: boolean`\n If true, allows setting the contract end date earlier than the end_timestamp of existing finalized invoices. Finalized invoices will be unchanged; if you want to incorporate the new end date, you can void and regenerate finalized usage invoices. Defaults to true.\n\n- `archive_commits?: { id: string; }[]`\n IDs of commits to archive\n\n- `archive_credits?: { id: string; }[]`\n IDs of credits to archive\n\n- `archive_scheduled_charges?: { id: string; }[]`\n IDs of scheduled charges to archive\n\n- `remove_overrides?: { id: string; }[]`\n IDs of overrides to remove\n\n- `uniqueness_key?: string`\n Optional uniqueness key to prevent duplicate contract edits.\n\n- `update_commits?: { commit_id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[]`\n\n- `update_contract_end_date?: string`\n RFC 3339 timestamp indicating when the contract will end (exclusive).\n\n- `update_contract_name?: string`\n Value to update the contract name to. If not provided, the contract name will remain unchanged.\n\n- `update_credits?: { credit_id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[]`\n\n- `update_net_payment_terms_days?: number`\n Number of days after issuance of invoice after which the invoice is due (e.g. Net 30).\n\n- `update_prepaid_balance_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; custom_credit_type_id?: string; discount_configuration?: { payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount?: number; threshold_amount?: number; }`\n - `commit?: { description?: string; name?: string; priority?: number; product_id?: string; }`\n - `custom_credit_type_id?: string`\n If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.\n - `discount_configuration?: { payment_fraction?: number; }`\n - `is_enabled?: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `recharge_to_amount?: number`\n Specify the amount the balance should be recharged to.\n - `threshold_amount?: number`\n Specify the threshold amount for the contract. Each time the contract's balance lowers to this amount, a threshold charge will be initiated.\n\n- `update_recurring_commits?: { recurring_commit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; invoice_amount?: { quantity?: number; unit_price?: number; }; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]`\n Edits to these recurring commits will only affect commits whose access schedules has not started. Expired commits, and commits with an active access schedule will remain unchanged.\n\n- `update_recurring_credits?: { recurring_credit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]`\n Edits to these recurring credits will only affect credits whose access schedules has not started. Expired credits, and credits with an active access schedule will remain unchanged.\n\n- `update_scheduled_charges?: { scheduled_charge_id: string; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; netsuite_sales_order_id?: string; }[]`\n\n- `update_spend_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; discount_configuration?: { payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount?: number; }`\n - `commit?: { description?: string; name?: string; priority?: number; product_id?: string; }`\n - `discount_configuration?: { payment_fraction?: number; }`\n - `is_enabled?: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `threshold_amount?: number`\n Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.\n\n- `update_subscriptions?: { subscription_id: string; ending_before?: string; quantity_management_mode_update?: { quantity_management_mode: 'SEAT_BASED'; seat_config: { seat_group_key: string; }; }; quantity_updates?: { starting_at: string; quantity?: number; quantity_delta?: number; }[]; seat_updates?: { add_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; add_unassigned_seats?: { quantity: number; starting_at: string; }[]; remove_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; remove_unassigned_seats?: { quantity: number; starting_at: string; }[]; }; }[]`\n Optional list of subscriptions to update.\n\n### Returns\n\n- `{ data: { id: string; }; }`\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst response = await client.v2.contracts.edit({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(response);\n```",
207
+ "## edit\n\n`client.v2.contracts.edit(contract_id: string, customer_id: string, add_billing_provider_configuration_update?: { billing_provider_configuration: { billing_provider?: string; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; }, add_commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; temporary_id?: string; }[], add_credits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; }[], add_discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], add_overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[], add_prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }, add_professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[], add_recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[], add_recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[], add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; fraction?: number; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[], add_revenue_system_configuration_update?: { revenue_system_configuration: { delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; }, add_scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], add_spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; threshold_amount: number; discount_configuration?: object; }, add_spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[], add_subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[], allow_contract_ending_before_finalized_invoice?: boolean, archive_commits?: { id: string; }[], archive_credits?: { id: string; }[], archive_scheduled_charges?: { id: string; }[], archive_spend_trackers?: string[], remove_overrides?: { id: string; }[], uniqueness_key?: string, update_commits?: { commit_id: string; access_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: object; invoice_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[], update_contract_end_date?: string, update_contract_name?: string, update_credits?: { credit_id: string; access_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[], update_net_payment_terms_days?: number, update_prepaid_balance_threshold_configuration?: { commit?: object; custom_credit_type_id?: string; discount_configuration?: { cap?: object; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: object; recharge_to_amount?: number; threshold_amount?: number; threshold_balance_specifiers?: { exclude: object[]; }[]; }, update_recurring_commits?: { recurring_commit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; invoice_amount?: { quantity?: number; unit_price?: number; }; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[], update_recurring_credits?: { recurring_credit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[], update_scheduled_charges?: { scheduled_charge_id: string; invoice_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; netsuite_sales_order_id?: string; }[], update_spend_threshold_configuration?: { commit?: object; discount_configuration?: { cap?: object; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: object; threshold_amount?: number; }, update_subscriptions?: { subscription_id: string; ending_before?: string; quantity_management_mode_update?: { quantity_management_mode: 'SEAT_BASED'; seat_config: object; }; quantity_updates?: { starting_at: string; quantity?: number; quantity_delta?: number; }[]; seat_updates?: { add_seat_ids?: object[]; add_unassigned_seats?: object[]; remove_seat_ids?: object[]; remove_unassigned_seats?: object[]; }; }[]): { data: object; }`\n\n**post** `/v2/contracts/edit`\n\nThe ability to edit a contract helps you react quickly to the needs of your customers and your business.\n\n### Use this endpoint to:\n- Encode mid-term commitment and discount changes\n- Fix configuration mistakes and easily roll back packaging changes\n\n### Key response fields:\n- The `id` of the edit\n- Complete edit details. For example, if you edited the contract to add new overrides and credits, you will receive the IDs of those overrides and credits in the response.\n\n### Usage guidelines:\n- When you edit a contract, any draft invoices update immediately to reflect that edit. Finalized invoices remain unchanged - you must void and regenerate them in the UI or API to reflect the edit.\n- Contract editing must be enabled to use this endpoint. Reach out to your Metronome representative to learn more.\n\n\n### Parameters\n\n- `contract_id: string`\n ID of the contract being edited\n\n- `customer_id: string`\n ID of the customer whose contract is being edited\n\n- `add_billing_provider_configuration_update?: { billing_provider_configuration: { billing_provider?: string; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; }`\n Update the billing provider configuration on the contract. Currently only supports adding a billing provider configuration to a contract that does not already have one.\n - `billing_provider_configuration: { billing_provider?: string; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }`\n - `schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }`\n Indicates when the billing provider will be active on the contract. Any charges accrued during the schedule will be billed to the indicated billing provider.\n\n- `add_commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; on_session_payment?: boolean; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; temporary_id?: string; }[]`\n\n- `add_credits?: { access_schedule: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n\n- `add_discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n\n- `add_overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n\n- `add_prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; threshold_balance_specifiers?: { exclude: { custom_field_filters: object[]; }[]; }[]; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `recharge_to_amount: number`\n Specify the amount the balance should be recharged to.\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's balance lowers to this amount, a threshold charge will be initiated.\n - `custom_credit_type_id?: string`\n If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.\n - `discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }`\n - `threshold_balance_specifiers?: { exclude: { custom_field_filters: { entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit'; key: string; value: string; }[]; }[]; }[]`\n\n- `add_professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `add_recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[]`\n\n- `add_recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'POOLED' | 'INDIVIDUAL'; }; temporary_id?: string; }[]`\n\n- `add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; fraction?: number; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]`\n\n- `add_revenue_system_configuration_update?: { revenue_system_configuration: { delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }; schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }; }`\n Update the revenue system configuration on the contract. Currently only supports adding a revenue system configuration to a contract that does not already have one.\n - `revenue_system_configuration: { delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }`\n - `schedule: { effective_at: 'START_OF_CURRENT_PERIOD'; }`\n\n- `add_scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n\n- `add_spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.\n - `discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }`\n\n- `add_spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[]`\n Spend trackers to add to this contract. Aliases must be unique within a contract.\n\n- `add_subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[]`\n Optional list of [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/) to add to the contract.\n\n- `allow_contract_ending_before_finalized_invoice?: boolean`\n If true, allows setting the contract end date earlier than the end_timestamp of existing finalized invoices. Finalized invoices will be unchanged; if you want to incorporate the new end date, you can void and regenerate finalized usage invoices. Defaults to true.\n\n- `archive_commits?: { id: string; }[]`\n IDs of commits to archive\n\n- `archive_credits?: { id: string; }[]`\n IDs of credits to archive\n\n- `archive_scheduled_charges?: { id: string; }[]`\n IDs of scheduled charges to archive\n\n- `archive_spend_trackers?: string[]`\n Aliases of spend trackers to archive.\n\n- `remove_overrides?: { id: string; }[]`\n IDs of overrides to remove\n\n- `uniqueness_key?: string`\n Optional uniqueness key to prevent duplicate contract edits.\n\n- `update_commits?: { commit_id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[]`\n\n- `update_contract_end_date?: string`\n RFC 3339 timestamp indicating when the contract will end (exclusive).\n\n- `update_contract_name?: string`\n Value to update the contract name to. If not provided, the contract name will remain unchanged.\n\n- `update_credits?: { credit_id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; }[]`\n\n- `update_net_payment_terms_days?: number`\n Number of days after issuance of invoice after which the invoice is due (e.g. Net 30).\n\n- `update_prepaid_balance_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; custom_credit_type_id?: string; discount_configuration?: { cap?: { amount: number; spend_tracker_alias: string; }; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount?: number; threshold_amount?: number; threshold_balance_specifiers?: { exclude: { custom_field_filters: { entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit'; key: string; value: string; }[]; }[]; }[]; }`\n - `commit?: { description?: string; name?: string; priority?: number; product_id?: string; }`\n - `custom_credit_type_id?: string`\n If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.\n - `discount_configuration?: { cap?: { amount: number; spend_tracker_alias: string; }; payment_fraction?: number; }`\n - `is_enabled?: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `recharge_to_amount?: number`\n Specify the amount the balance should be recharged to.\n - `threshold_amount?: number`\n Specify the threshold amount for the contract. Each time the contract's balance lowers to this amount, a threshold charge will be initiated.\n - `threshold_balance_specifiers?: { exclude: { custom_field_filters: { entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit'; key: string; value: string; }[]; }[]; }[]`\n\n- `update_recurring_commits?: { recurring_commit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; invoice_amount?: { quantity?: number; unit_price?: number; }; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]`\n Edits to these recurring commits will only affect commits whose access schedules has not started. Expired commits, and commits with an active access schedule will remain unchanged.\n\n- `update_recurring_credits?: { recurring_credit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]`\n Edits to these recurring credits will only affect credits whose access schedules has not started. Expired credits, and credits with an active access schedule will remain unchanged.\n\n- `update_scheduled_charges?: { scheduled_charge_id: string; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; netsuite_sales_order_id?: string; }[]`\n\n- `update_spend_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; discount_configuration?: { cap?: { amount: number; spend_tracker_alias: string; }; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount?: number; }`\n - `commit?: { description?: string; name?: string; priority?: number; product_id?: string; }`\n - `discount_configuration?: { cap?: { amount: number; spend_tracker_alias: string; }; payment_fraction?: number; }`\n - `is_enabled?: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `threshold_amount?: number`\n Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.\n\n- `update_subscriptions?: { subscription_id: string; ending_before?: string; quantity_management_mode_update?: { quantity_management_mode: 'SEAT_BASED'; seat_config: { seat_group_key: string; }; }; quantity_updates?: { starting_at: string; quantity?: number; quantity_delta?: number; }[]; seat_updates?: { add_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; add_unassigned_seats?: { quantity: number; starting_at: string; }[]; remove_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; remove_unassigned_seats?: { quantity: number; starting_at: string; }[]; }; }[]`\n Optional list of subscriptions to update.\n\n### Returns\n\n- `{ data: { id: string; edit?: { id: string; add_commits?: object[]; add_credits?: object[]; add_discounts?: discount[]; add_overrides?: object[]; add_prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; add_pro_services?: pro_service[]; add_recurring_commits?: object[]; add_recurring_credits?: object[]; add_reseller_royalties?: object[]; add_scheduled_charges?: object[]; add_spend_threshold_configuration?: spend_threshold_configuration_v2; add_subscriptions?: object[]; add_usage_filters?: object[]; archive_commits?: object[]; archive_credits?: object[]; archive_scheduled_charges?: object[]; remove_overrides?: object[]; timestamp?: string; uniqueness_key?: string; update_commits?: object[]; update_contract_end_date?: string; update_contract_name?: string; update_credits?: object[]; update_discounts?: object[]; update_prepaid_balance_threshold_configuration?: object; update_recurring_commits?: object[]; update_recurring_credits?: object[]; update_refund_invoices?: object[]; update_scheduled_charges?: object[]; update_spend_threshold_configuration?: object; update_subscriptions?: object[]; }; }; }`\n\n - `data: { id: string; edit?: { id: string; add_commits?: { id: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: object; invoice_schedule?: { credit_type?: credit_type_data; do_not_invoice?: boolean; schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: object[]; }[]; add_credits?: { id: string; product: { id: string; name: string; }; type: 'CREDIT'; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: object[]; }[]; add_discounts?: { id: string; product: object; schedule: schedule_point_in_time; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; add_overrides?: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; override_tiers?: object[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: credit_type_data; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; add_prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }; add_pro_services?: { id: string; max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]; add_recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; add_recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; fraction?: number; gcp_account_id?: string; gcp_offer_id?: string; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]; add_scheduled_charges?: { id: string; product: { id: string; name: string; }; schedule: object; name?: string; netsuite_sales_order_id?: string; }[]; add_spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config_v2; threshold_amount: number; discount_configuration?: object; }; add_subscriptions?: { billing_periods: { current?: object; next?: object; previous?: object; }; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: { quantity: number; starting_at: string; ending_before?: string; }[]; starting_at: string; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: object; }; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: { seat_group_key: string; }; }[]; add_usage_filters?: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; archive_commits?: { id: string; }[]; archive_credits?: { id: string; }[]; archive_scheduled_charges?: { id: string; }[]; remove_overrides?: { id: string; }[]; timestamp?: string; uniqueness_key?: string; update_commits?: { id: string; access_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: object; invoice_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; }[]; update_contract_end_date?: string; update_contract_name?: string; update_credits?: { id: string; access_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; specifiers?: object[]; }[]; update_discounts?: { id: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; }[]; update_prepaid_balance_threshold_configuration?: { commit?: object; custom_credit_type_id?: string; discount_configuration?: { cap?: object; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: object; recharge_to_amount?: number; threshold_amount?: number; threshold_balance_specifiers?: { exclude: object[]; }[]; }; update_recurring_commits?: { id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; invoice_amount?: { quantity?: number; unit_price?: number; }; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_recurring_credits?: { id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_refund_invoices?: { date: string; invoice_id: string; }[]; update_scheduled_charges?: { id: string; invoice_schedule?: { add_schedule_items?: object[]; remove_schedule_items?: object[]; update_schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; }[]; update_spend_threshold_configuration?: { commit?: object; discount_configuration?: { cap?: object; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: object; threshold_amount?: number; }; update_subscriptions?: { id: string; ending_before?: string; quantity_updates?: { starting_at: string; quantity?: number; quantity_delta?: number; }[]; seat_updates?: { add_seat_ids?: object[]; add_unassigned_seats?: object[]; remove_seat_ids?: object[]; remove_unassigned_seats?: object[]; }; }[]; }; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst response = await client.v2.contracts.edit({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(response);\n```",
205
208
  perLanguage: {
206
209
  typescript: {
207
210
  method: 'client.v2.contracts.edit',
@@ -247,7 +250,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
247
250
  response:
248
251
  '{ data: { id: string; add_commits?: object[]; add_credits?: object[]; add_discounts?: discount[]; add_overrides?: object[]; add_prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration_v2; add_pro_services?: pro_service[]; add_recurring_commits?: object[]; add_recurring_credits?: object[]; add_reseller_royalties?: object[]; add_scheduled_charges?: object[]; add_spend_threshold_configuration?: spend_threshold_configuration_v2; add_subscriptions?: object[]; add_usage_filters?: object[]; archive_commits?: object[]; archive_credits?: object[]; archive_scheduled_charges?: object[]; remove_overrides?: object[]; timestamp?: string; uniqueness_key?: string; update_commits?: object[]; update_contract_end_date?: string; update_contract_name?: string; update_credits?: object[]; update_discounts?: object[]; update_prepaid_balance_threshold_configuration?: object; update_recurring_commits?: object[]; update_recurring_credits?: object[]; update_refund_invoices?: object[]; update_scheduled_charges?: object[]; update_spend_threshold_configuration?: object; update_subscriptions?: object[]; }[]; }',
249
252
  markdown:
250
- "## get_edit_history\n\n`client.v2.contracts.getEditHistory(contract_id: string, customer_id: string): { data: object[]; }`\n\n**post** `/v2/contracts/getEditHistory`\n\nList all the edits made to a contract over time. In Metronome, you can edit a contract at any point after it's created to fix mistakes or reflect changes in terms. Metronome stores a full history of all edits that were ever made to a contract, whether through the UI, `editContract` endpoint, or other endpoints like `updateContractEndDate`. \n\n### Use this endpoint to: \n- Understand what changes were made to a contract, when, and by who\n\n### Key response fields: \n- An array of every edit ever made to the contract\n- Details on each individual edit - for example showing that in one edit, a user added two discounts and incremented a subscription quantity.\n\n\n### Parameters\n\n- `contract_id: string`\n\n- `customer_id: string`\n\n### Returns\n\n- `{ data: { id: string; add_commits?: { id: string; product: object; type: 'PREPAID' | 'POSTPAID'; access_schedule?: schedule_duration; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_schedule?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: commit_specifier_input[]; }[]; add_credits?: { id: string; product: object; type: 'CREDIT'; access_schedule?: schedule_duration; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: commit_specifier_input[]; }[]; add_discounts?: object[]; add_overrides?: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: object[]; override_tiers?: override_tier[]; overwrite_rate?: object; priority?: number; product?: object; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; add_prepaid_balance_threshold_configuration?: object; add_pro_services?: object[]; add_recurring_commits?: { id: string; access_amount: object; commit_duration: object; priority: number; product: object; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: object; description?: string; ending_before?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_amount?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: commit_specifier[]; subscription_config?: recurring_commit_subscription_config; }[]; add_recurring_credits?: { id: string; access_amount: object; commit_duration: object; priority: number; product: object; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: object; description?: string; ending_before?: string; hierarchy_configuration?: commit_hierarchy_configuration; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: commit_specifier[]; subscription_config?: recurring_commit_subscription_config; }[]; add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; fraction?: number; gcp_account_id?: string; gcp_offer_id?: string; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]; add_scheduled_charges?: { id: string; product: object; schedule: schedule_point_in_time; name?: string; netsuite_sales_order_id?: string; }[]; add_spend_threshold_configuration?: object; add_subscriptions?: { billing_periods: object; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: object; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: object[]; starting_at: string; subscription_rate: object; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: object; }[]; add_usage_filters?: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; archive_commits?: { id: string; }[]; archive_credits?: { id: string; }[]; archive_scheduled_charges?: { id: string; }[]; remove_overrides?: { id: string; }[]; timestamp?: string; uniqueness_key?: string; update_commits?: { id: string; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_schedule?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: commit_specifier_input[]; }[]; update_contract_end_date?: string; update_contract_name?: string; update_credits?: { id: string; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; specifiers?: commit_specifier_input[]; }[]; update_discounts?: { id: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; schedule?: object; }[]; update_prepaid_balance_threshold_configuration?: { commit?: update_base_threshold_commit; custom_credit_type_id?: string; discount_configuration?: object; is_enabled?: boolean; payment_gate_config?: payment_gate_config_v2; recharge_to_amount?: number; threshold_amount?: number; }; update_recurring_commits?: { id: string; access_amount?: object; ending_before?: string; invoice_amount?: object; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_recurring_credits?: { id: string; access_amount?: object; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_refund_invoices?: { date: string; invoice_id: string; }[]; update_scheduled_charges?: { id: string; invoice_schedule?: object; name?: string; netsuite_sales_order_id?: string; }[]; update_spend_threshold_configuration?: { commit?: update_base_threshold_commit; discount_configuration?: object; is_enabled?: boolean; payment_gate_config?: payment_gate_config_v2; threshold_amount?: number; }; update_subscriptions?: { id: string; ending_before?: string; quantity_updates?: object[]; seat_updates?: object; }[]; }[]; }`\n\n - `data: { id: string; add_commits?: { id: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type?: credit_type_data; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; invoice_schedule?: { credit_type?: object; do_not_invoice?: boolean; schedule_items?: { id: string; timestamp: string; amount?: number; invoice_id?: string; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; add_credits?: { id: string; product: { id: string; name: string; }; type: 'CREDIT'; access_schedule?: { schedule_items: object[]; credit_type?: credit_type_data; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; add_discounts?: { id: string; product: { id: string; name: string; }; schedule: object; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; add_overrides?: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; override_tiers?: { multiplier: number; size?: number; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: object; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: object[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; add_prepaid_balance_threshold_configuration?: { commit: object; is_enabled: boolean; payment_gate_config: object; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; }; }; add_pro_services?: { id: string; max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]; add_recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: object | object | object; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: object; subscription_id: string; }; }[]; add_recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: object | object | object; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: object; subscription_id: string; }; }[]; add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; fraction?: number; gcp_account_id?: string; gcp_offer_id?: string; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]; add_scheduled_charges?: { id: string; product: { id: string; name: string; }; schedule: { credit_type?: credit_type_data; do_not_invoice?: boolean; schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; }[]; add_spend_threshold_configuration?: { commit: object; is_enabled: boolean; payment_gate_config: object; threshold_amount: number; discount_configuration?: { payment_fraction: number; }; }; add_subscriptions?: { billing_periods: { current?: { ending_before: string; starting_at: string; }; next?: { ending_before: string; starting_at: string; }; previous?: { ending_before: string; starting_at: string; }; }; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: { quantity: number; starting_at: string; ending_before?: string; }[]; starting_at: string; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: { id: string; name: string; }; }; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: { seat_group_key: string; }; }[]; add_usage_filters?: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; archive_commits?: { id: string; }[]; archive_credits?: { id: string; }[]; archive_scheduled_charges?: { id: string; }[]; remove_overrides?: { id: string; }[]; timestamp?: string; uniqueness_key?: string; update_commits?: { id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; update_contract_end_date?: string; update_contract_name?: string; update_credits?: { id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; update_discounts?: { id: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; }[]; update_prepaid_balance_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; custom_credit_type_id?: string; discount_configuration?: { payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount?: number; threshold_amount?: number; }; update_recurring_commits?: { id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; invoice_amount?: { quantity?: number; unit_price?: number; }; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_recurring_credits?: { id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_refund_invoices?: { date: string; invoice_id: string; }[]; update_scheduled_charges?: { id: string; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; }[]; update_spend_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; discount_configuration?: { payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount?: number; }; update_subscriptions?: { id: string; ending_before?: string; quantity_updates?: { starting_at: string; quantity?: number; quantity_delta?: number; }[]; seat_updates?: { add_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; add_unassigned_seats?: { quantity: number; starting_at: string; }[]; remove_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; remove_unassigned_seats?: { quantity: number; starting_at: string; }[]; }; }[]; }[]`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst response = await client.v2.contracts.getEditHistory({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(response);\n```",
253
+ "## get_edit_history\n\n`client.v2.contracts.getEditHistory(contract_id: string, customer_id: string): { data: object[]; }`\n\n**post** `/v2/contracts/getEditHistory`\n\nList all the edits made to a contract over time. In Metronome, you can edit a contract at any point after it's created to fix mistakes or reflect changes in terms. Metronome stores a full history of all edits that were ever made to a contract, whether through the UI, `editContract` endpoint, or other endpoints like `updateContractEndDate`. \n\n### Use this endpoint to: \n- Understand what changes were made to a contract, when, and by who\n\n### Key response fields: \n- An array of every edit ever made to the contract\n- Details on each individual edit - for example showing that in one edit, a user added two discounts and incremented a subscription quantity.\n\n\n### Parameters\n\n- `contract_id: string`\n\n- `customer_id: string`\n\n### Returns\n\n- `{ data: { id: string; add_commits?: { id: string; product: object; type: 'PREPAID' | 'POSTPAID'; access_schedule?: schedule_duration; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_schedule?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: commit_specifier_input[]; }[]; add_credits?: { id: string; product: object; type: 'CREDIT'; access_schedule?: schedule_duration; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: commit_specifier_input[]; }[]; add_discounts?: object[]; add_overrides?: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: object[]; override_tiers?: override_tier[]; overwrite_rate?: object; priority?: number; product?: object; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; add_prepaid_balance_threshold_configuration?: object; add_pro_services?: object[]; add_recurring_commits?: { id: string; access_amount: object; commit_duration: object; priority: number; product: object; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: object; description?: string; ending_before?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_amount?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: commit_specifier[]; subscription_config?: recurring_commit_subscription_config; }[]; add_recurring_credits?: { id: string; access_amount: object; commit_duration: object; priority: number; product: object; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: object; description?: string; ending_before?: string; hierarchy_configuration?: commit_hierarchy_configuration; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: commit_specifier[]; subscription_config?: recurring_commit_subscription_config; }[]; add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; fraction?: number; gcp_account_id?: string; gcp_offer_id?: string; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]; add_scheduled_charges?: { id: string; product: object; schedule: schedule_point_in_time; name?: string; netsuite_sales_order_id?: string; }[]; add_spend_threshold_configuration?: object; add_subscriptions?: { billing_periods: object; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: object; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: object[]; starting_at: string; subscription_rate: object; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: object; }[]; add_usage_filters?: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; archive_commits?: { id: string; }[]; archive_credits?: { id: string; }[]; archive_scheduled_charges?: { id: string; }[]; remove_overrides?: { id: string; }[]; timestamp?: string; uniqueness_key?: string; update_commits?: { id: string; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_schedule?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: commit_specifier_input[]; }[]; update_contract_end_date?: string; update_contract_name?: string; update_credits?: { id: string; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; specifiers?: commit_specifier_input[]; }[]; update_discounts?: { id: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; schedule?: object; }[]; update_prepaid_balance_threshold_configuration?: { commit?: update_base_threshold_commit; custom_credit_type_id?: string; discount_configuration?: object; is_enabled?: boolean; payment_gate_config?: payment_gate_config_v2; recharge_to_amount?: number; threshold_amount?: number; threshold_balance_specifiers?: object[]; }; update_recurring_commits?: { id: string; access_amount?: object; ending_before?: string; invoice_amount?: object; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_recurring_credits?: { id: string; access_amount?: object; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_refund_invoices?: { date: string; invoice_id: string; }[]; update_scheduled_charges?: { id: string; invoice_schedule?: object; name?: string; netsuite_sales_order_id?: string; }[]; update_spend_threshold_configuration?: { commit?: update_base_threshold_commit; discount_configuration?: object; is_enabled?: boolean; payment_gate_config?: payment_gate_config_v2; threshold_amount?: number; }; update_subscriptions?: { id: string; ending_before?: string; quantity_updates?: object[]; seat_updates?: object; }[]; }[]; }`\n\n - `data: { id: string; add_commits?: { id: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type?: credit_type_data; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; invoice_schedule?: { credit_type?: object; do_not_invoice?: boolean; schedule_items?: { id: string; timestamp: string; amount?: number; invoice_id?: string; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; add_credits?: { id: string; product: { id: string; name: string; }; type: 'CREDIT'; access_schedule?: { schedule_items: object[]; credit_type?: credit_type_data; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; add_discounts?: { id: string; product: { id: string; name: string; }; schedule: object; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; add_overrides?: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; override_tiers?: { multiplier: number; size?: number; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: object; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: object[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; add_prepaid_balance_threshold_configuration?: { commit: object; is_enabled: boolean; payment_gate_config: object; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; cap?: object; }; threshold_balance_specifiers?: { exclude: object[]; }[]; }; add_pro_services?: { id: string; max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]; add_recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: object | object | object; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: object; subscription_id: string; }; }[]; add_recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: object | object | object; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: object; subscription_id: string; }; }[]; add_reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; fraction?: number; gcp_account_id?: string; gcp_offer_id?: string; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]; add_scheduled_charges?: { id: string; product: { id: string; name: string; }; schedule: { credit_type?: credit_type_data; do_not_invoice?: boolean; schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; }[]; add_spend_threshold_configuration?: { commit: object; is_enabled: boolean; payment_gate_config: object; threshold_amount: number; discount_configuration?: { payment_fraction: number; cap?: object; }; }; add_subscriptions?: { billing_periods: { current?: { ending_before: string; starting_at: string; }; next?: { ending_before: string; starting_at: string; }; previous?: { ending_before: string; starting_at: string; }; }; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: { quantity: number; starting_at: string; ending_before?: string; }[]; starting_at: string; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: { id: string; name: string; }; }; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: { seat_group_key: string; }; }[]; add_usage_filters?: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; archive_commits?: { id: string; }[]; archive_credits?: { id: string; }[]; archive_scheduled_charges?: { id: string; }[]; remove_overrides?: { id: string; }[]; timestamp?: string; uniqueness_key?: string; update_commits?: { id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; update_contract_end_date?: string; update_contract_name?: string; update_credits?: { id: string; access_schedule?: { add_schedule_items?: { amount: number; ending_before: string; starting_at: string; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; ending_before?: string; starting_at?: string; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; name?: string; netsuite_sales_order_id?: string; priority?: number; product_id?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; update_discounts?: { id: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; }[]; update_prepaid_balance_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; custom_credit_type_id?: string; discount_configuration?: { cap?: { amount: number; spend_tracker_alias: string; }; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount?: number; threshold_amount?: number; threshold_balance_specifiers?: { exclude: { custom_field_filters: object[]; }[]; }[]; }; update_recurring_commits?: { id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; invoice_amount?: { quantity?: number; unit_price?: number; }; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_recurring_credits?: { id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[]; update_refund_invoices?: { date: string; invoice_id: string; }[]; update_scheduled_charges?: { id: string; invoice_schedule?: { add_schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; remove_schedule_items?: { id: string; }[]; update_schedule_items?: { id: string; amount?: number; quantity?: number; timestamp?: string; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; }[]; update_spend_threshold_configuration?: { commit?: { description?: string; name?: string; priority?: number; product_id?: string; }; discount_configuration?: { cap?: { amount: number; spend_tracker_alias: string; }; payment_fraction?: number; }; is_enabled?: boolean; payment_gate_config?: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount?: number; }; update_subscriptions?: { id: string; ending_before?: string; quantity_updates?: { starting_at: string; quantity?: number; quantity_delta?: number; }[]; seat_updates?: { add_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; add_unassigned_seats?: { quantity: number; starting_at: string; }[]; remove_seat_ids?: { seat_ids: string[]; starting_at: string; }[]; remove_unassigned_seats?: { quantity: number; starting_at: string; }[]; }; }[]; }[]`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst response = await client.v2.contracts.getEditHistory({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(response);\n```",
251
254
  perLanguage: {
252
255
  typescript: {
253
256
  method: 'client.v2.contracts.getEditHistory',
@@ -2390,9 +2393,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
2390
2393
  'starting_at?: string;',
2391
2394
  ],
2392
2395
  response:
2393
- "{ id: string; created_at: string; product: object; type: 'PREPAID' | 'POSTPAID'; access_schedule?: schedule_duration; amount?: number; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: object; custom_fields?: object; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_contract?: object; invoice_schedule?: schedule_point_in_time; ledger?: object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: object; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: commit_specifier[]; subscription_config?: object; uniqueness_key?: string; }",
2396
+ "{ id: string; created_at: string; product: object; type: 'PREPAID' | 'POSTPAID'; access_schedule?: schedule_duration; amount?: number; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: object; custom_fields?: object; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_contract?: object; invoice_schedule?: schedule_point_in_time; ledger?: object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: object; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: commit_specifier[]; spend_tracker_attributes?: object; subscription_config?: object; uniqueness_key?: string; }",
2394
2397
  markdown:
2395
- "## list\n\n`client.v1.customers.commits.list(customer_id: string, commit_id?: string, covering_date?: string, effective_before?: string, include_archived?: boolean, include_balance?: boolean, include_contract_commits?: boolean, include_ledgers?: boolean, limit?: number, next_page?: string, starting_at?: string): { id: string; created_at: string; product: object; type: 'PREPAID' | 'POSTPAID'; access_schedule?: schedule_duration; amount?: number; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: object; custom_fields?: object; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_contract?: object; invoice_schedule?: schedule_point_in_time; ledger?: object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: object; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: commit_specifier[]; subscription_config?: object; uniqueness_key?: string; }`\n\n**post** `/v1/contracts/customerCommits/list`\n\nRetrieve all commit agreements for a customer, including both prepaid and postpaid commitments. This endpoint provides comprehensive visibility into contractual spending obligations, enabling you to track commitment utilization and manage customer contracts effectively.\n\n### Use this endpoint to:\n- Display commitment balances and utilization in customer dashboards\n- Track prepaid commitment drawdown and remaining balances\n- Monitor postpaid commitment progress toward minimum thresholds\n- Build commitment tracking and forecasting tools\n- Show commitment history with optional ledger details\n- Manage rollover balances between contract periods\n\n### Key response fields:\nAn array of Commit objects containing:\n- Commit type: PREPAID (pay upfront) or POSTPAID (pay at true-up)\n- Rate type: COMMIT_RATE (discounted) or LIST_RATE (standard pricing)\n- Access schedule: When commitment funds become available\n- Invoice schedule: When the customer is billed\n- Product targeting: Which product(s) usage is eligible to draw from this commit\n- Optional ledger entries: Transaction history (if `include_ledgers=true`)\n- Balance information: Current available amount (if `include_balance=true`)\n- Rollover settings: Fraction of unused amount that carries forward\n\n### Usage guidelines:\n- Pagination: Results limited to 25 commits per page; use 'next_page' for more\n- Date filtering options:\n - `covering_date`: Commits active on a specific date\n - `starting_at`: Commits with access on/after a date\n - `effective_before`: Commits with access before a date (exclusive)\n- Scope options:\n - `include_contract_commits`: Include contract-level commits (not just customer-level)\n - `include_archived`: Include archived commits and commits from archived contracts\n- Performance considerations:\n - include_ledgers: Adds detailed transaction history (slower)\n - include_balance: Adds current balance calculation (slower)\n- Optional filtering: Use commit_id to retrieve a specific commit\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `commit_id?: string`\n\n- `covering_date?: string`\n Include only commits that have access schedules that \"cover\" the provided date\n\n- `effective_before?: string`\n Include only commits that have any access before the provided date (exclusive)\n\n- `include_archived?: boolean`\n Include archived commits and commits from archived contracts.\n\n- `include_balance?: boolean`\n Include the balance in the response. Setting this flag may cause the query to be slower.\n\n- `include_contract_commits?: boolean`\n Include commits on the contract level.\n\n- `include_ledgers?: boolean`\n Include commit ledgers in the response. Setting this flag may cause the query to be slower.\n\n- `limit?: number`\n The maximum number of commits to return. Defaults to 25.\n\n- `next_page?: string`\n The next page token from a previous response.\n\n- `starting_at?: string`\n Include only commits that have any access on or after the provided date\n\n### Returns\n\n- `{ id: string; created_at: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type?: credit_type_data; }; amount?: number; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; invoice_contract?: { id: string; }; invoice_schedule?: { credit_type?: credit_type_data; do_not_invoice?: boolean; schedule_items?: object[]; }; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: { commit_id: string; contract_id: string; }; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation?: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config?: { is_prorated: boolean; }; subscription_id?: string; }; uniqueness_key?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `product: { id: string; name: string; }`\n - `type: 'PREPAID' | 'POSTPAID'`\n - `access_schedule?: { schedule_items: { id: string; amount: number; ending_before: string; starting_at: string; }[]; credit_type?: { id: string; name: string; }; }`\n - `amount?: number`\n - `applicable_contract_ids?: string[]`\n - `applicable_product_ids?: string[]`\n - `applicable_product_tags?: string[]`\n - `archived_at?: string`\n - `balance?: number`\n - `contract?: { id: string; }`\n - `custom_fields?: object`\n - `description?: string`\n - `hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }`\n - `invoice_contract?: { id: string; }`\n - `invoice_schedule?: { credit_type?: { id: string; name: string; }; do_not_invoice?: boolean; schedule_items?: { id: string; amount: number; quantity: number; timestamp: string; unit_price: number; invoice_id?: string; }[]; }`\n - `ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]`\n - `name?: string`\n - `netsuite_sales_order_id?: string`\n - `priority?: number`\n - `rate_type?: 'COMMIT_RATE' | 'LIST_RATE'`\n - `recurring_commit_id?: string`\n - `rolled_over_from?: { commit_id: string; contract_id: string; }`\n - `rollover_fraction?: number`\n - `salesforce_opportunity_id?: string`\n - `specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]`\n - `subscription_config?: { allocation?: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config?: { is_prorated: boolean; }; subscription_id?: string; }`\n - `uniqueness_key?: string`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\n// Automatically fetches more pages as needed.\nfor await (const commit of client.v1.customers.commits.list({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' })) {\n console.log(commit);\n}\n```",
2398
+ "## list\n\n`client.v1.customers.commits.list(customer_id: string, commit_id?: string, covering_date?: string, effective_before?: string, include_archived?: boolean, include_balance?: boolean, include_contract_commits?: boolean, include_ledgers?: boolean, limit?: number, next_page?: string, starting_at?: string): { id: string; created_at: string; product: object; type: 'PREPAID' | 'POSTPAID'; access_schedule?: schedule_duration; amount?: number; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: object; custom_fields?: object; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_contract?: object; invoice_schedule?: schedule_point_in_time; ledger?: object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: object; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: commit_specifier[]; spend_tracker_attributes?: object; subscription_config?: object; uniqueness_key?: string; }`\n\n**post** `/v1/contracts/customerCommits/list`\n\nRetrieve all commit agreements for a customer, including both prepaid and postpaid commitments. This endpoint provides comprehensive visibility into contractual spending obligations, enabling you to track commitment utilization and manage customer contracts effectively.\n\n### Use this endpoint to:\n- Display commitment balances and utilization in customer dashboards\n- Track prepaid commitment drawdown and remaining balances\n- Monitor postpaid commitment progress toward minimum thresholds\n- Build commitment tracking and forecasting tools\n- Show commitment history with optional ledger details\n- Manage rollover balances between contract periods\n\n### Key response fields:\nAn array of Commit objects containing:\n- Commit type: PREPAID (pay upfront) or POSTPAID (pay at true-up)\n- Rate type: COMMIT_RATE (discounted) or LIST_RATE (standard pricing)\n- Access schedule: When commitment funds become available\n- Invoice schedule: When the customer is billed\n- Product targeting: Which product(s) usage is eligible to draw from this commit\n- Optional ledger entries: Transaction history (if `include_ledgers=true`)\n- Balance information: Current available amount (if `include_balance=true`)\n- Rollover settings: Fraction of unused amount that carries forward\n\n### Usage guidelines:\n- Pagination: Results limited to 25 commits per page; use 'next_page' for more\n- Date filtering options:\n - `covering_date`: Commits active on a specific date\n - `starting_at`: Commits with access on/after a date\n - `effective_before`: Commits with access before a date (exclusive)\n- Scope options:\n - `include_contract_commits`: Include contract-level commits (not just customer-level)\n - `include_archived`: Include archived commits and commits from archived contracts\n- Performance considerations:\n - include_ledgers: Adds detailed transaction history (slower)\n - include_balance: Adds current balance calculation (slower)\n- Optional filtering: Use commit_id to retrieve a specific commit\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `commit_id?: string`\n\n- `covering_date?: string`\n Include only commits that have access schedules that \"cover\" the provided date\n\n- `effective_before?: string`\n Include only commits that have any access before the provided date (exclusive)\n\n- `include_archived?: boolean`\n Include archived commits and commits from archived contracts.\n\n- `include_balance?: boolean`\n Include the balance in the response. Setting this flag may cause the query to be slower.\n\n- `include_contract_commits?: boolean`\n Include commits on the contract level.\n\n- `include_ledgers?: boolean`\n Include commit ledgers in the response. Setting this flag may cause the query to be slower.\n\n- `limit?: number`\n The maximum number of commits to return. Defaults to 25.\n\n- `next_page?: string`\n The next page token from a previous response.\n\n- `starting_at?: string`\n Include only commits that have any access on or after the provided date\n\n### Returns\n\n- `{ id: string; created_at: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type?: credit_type_data; }; amount?: number; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: object | object | object; }; invoice_contract?: { id: string; }; invoice_schedule?: { credit_type?: credit_type_data; do_not_invoice?: boolean; schedule_items?: object[]; }; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: { commit_id: string; contract_id: string; }; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; subscription_config?: { allocation?: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config?: { is_prorated: boolean; }; subscription_id?: string; }; uniqueness_key?: string; }`\n\n - `id: string`\n - `created_at: string`\n - `product: { id: string; name: string; }`\n - `type: 'PREPAID' | 'POSTPAID'`\n - `access_schedule?: { schedule_items: { id: string; amount: number; ending_before: string; starting_at: string; }[]; credit_type?: { id: string; name: string; }; }`\n - `amount?: number`\n - `applicable_contract_ids?: string[]`\n - `applicable_product_ids?: string[]`\n - `applicable_product_tags?: string[]`\n - `archived_at?: string`\n - `balance?: number`\n - `contract?: { id: string; }`\n - `custom_fields?: object`\n - `description?: string`\n - `hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }`\n - `invoice_contract?: { id: string; }`\n - `invoice_schedule?: { credit_type?: { id: string; name: string; }; do_not_invoice?: boolean; schedule_items?: { id: string; amount: number; quantity: number; timestamp: string; unit_price: number; invoice_id?: string; }[]; }`\n - `ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]`\n - `name?: string`\n - `netsuite_sales_order_id?: string`\n - `priority?: number`\n - `rate_type?: 'COMMIT_RATE' | 'LIST_RATE'`\n - `recurring_commit_id?: string`\n - `rolled_over_from?: { commit_id: string; contract_id: string; }`\n - `rollover_fraction?: number`\n - `salesforce_opportunity_id?: string`\n - `specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]`\n - `spend_tracker_attributes?: { counts_as_discounted: boolean; }`\n - `subscription_config?: { allocation?: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config?: { is_prorated: boolean; }; subscription_id?: string; }`\n - `uniqueness_key?: string`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\n// Automatically fetches more pages as needed.\nfor await (const commit of client.v1.customers.commits.list({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' })) {\n console.log(commit);\n}\n```",
2396
2399
  perLanguage: {
2397
2400
  typescript: {
2398
2401
  method: 'client.v1.customers.commits.list',
@@ -3669,9 +3672,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3669
3672
  'include_ledgers?: boolean;',
3670
3673
  ],
3671
3674
  response:
3672
- "{ data: { id: string; amendments: object[]; current: contract_without_amendments; customer_id: string; initial: contract_without_amendments; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: object; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; subscriptions?: subscription[]; uniqueness_key?: string; }; }",
3675
+ "{ data: { id: string; amendments: object[]; current: contract_without_amendments; customer_id: string; initial: contract_without_amendments; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: object; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; subscriptions?: subscription[]; uniqueness_key?: string; }; }",
3673
3676
  markdown:
3674
- "## retrieve\n\n`client.v1.contracts.retrieve(contract_id: string, customer_id: string, include_balance?: boolean, include_ledgers?: boolean): { data: contract; }`\n\n**post** `/v1/contracts/get`\n\nThis is the v1 endpoint to get a contract. New clients should implement using the v2 endpoint.\n\n\n### Parameters\n\n- `contract_id: string`\n\n- `customer_id: string`\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower.\n\n- `include_ledgers?: boolean`\n Include commit ledgers in the response. Setting this flag may cause the query to be slower.\n\n### Returns\n\n- `{ data: { id: string; amendments: object[]; current: contract_without_amendments; customer_id: string; initial: contract_without_amendments; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: object; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; subscriptions?: subscription[]; uniqueness_key?: string; }; }`\n\n - `data: { id: string; amendments: { id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; starting_at: string; credits?: object[]; discounts?: object[]; netsuite_sales_order_id?: string; professional_services?: object[]; reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; fraction?: number; gcp_account_id?: string; gcp_offer_id?: string; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]; salesforce_opportunity_id?: string; }[]; current: { commits: commit[]; created_at: string; created_by: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_statement_schedule: object; credits?: credit[]; discounts?: discount[]; ending_before?: string; hierarchy_configuration?: hierarchy_configuration; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; total_contract_value?: number; usage_filter?: object; }; customer_id: string; initial: { commits: commit[]; created_at: string; created_by: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_statement_schedule: object; credits?: credit[]; discounts?: discount[]; ending_before?: string; hierarchy_configuration?: hierarchy_configuration; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; total_contract_value?: number; usage_filter?: object; }; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: { archived_at: string; billing_provider: string; delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; id?: string; configuration?: object; }; package_id?: string; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; }; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }; subscriptions?: { billing_periods: object; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: object; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: object[]; starting_at: string; subscription_rate: object; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: object; }[]; uniqueness_key?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contract = await client.v1.contracts.retrieve({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(contract);\n```",
3677
+ "## retrieve\n\n`client.v1.contracts.retrieve(contract_id: string, customer_id: string, include_balance?: boolean, include_ledgers?: boolean): { data: contract; }`\n\n**post** `/v1/contracts/get`\n\nThis is the v1 endpoint to get a contract. New clients should implement using the v2 endpoint.\n\n\n### Parameters\n\n- `contract_id: string`\n\n- `customer_id: string`\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower.\n\n- `include_ledgers?: boolean`\n Include commit ledgers in the response. Setting this flag may cause the query to be slower.\n\n### Returns\n\n- `{ data: { id: string; amendments: object[]; current: contract_without_amendments; customer_id: string; initial: contract_without_amendments; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: object; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; subscriptions?: subscription[]; uniqueness_key?: string; }; }`\n\n - `data: { id: string; amendments: { id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; starting_at: string; credits?: object[]; discounts?: object[]; netsuite_sales_order_id?: string; professional_services?: object[]; reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; fraction?: number; gcp_account_id?: string; gcp_offer_id?: string; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]; salesforce_opportunity_id?: string; }[]; current: { commits: commit[]; created_at: string; created_by: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_statement_schedule: object; credits?: credit[]; discounts?: discount[]; ending_before?: string; hierarchy_configuration?: hierarchy_configuration; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; total_contract_value?: number; usage_filter?: object; }; customer_id: string; initial: { commits: commit[]; created_at: string; created_by: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_statement_schedule: object; credits?: credit[]; discounts?: discount[]; ending_before?: string; hierarchy_configuration?: hierarchy_configuration; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; total_contract_value?: number; usage_filter?: object; }; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: { archived_at: string; billing_provider: string; delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; id?: string; configuration?: object; }; package_id?: string; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }; spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; accumulated_spend?: { amount: number; period_ending_before: string; period_starting_at: string; }; }[]; subscriptions?: { billing_periods: object; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: object; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: object[]; starting_at: string; subscription_rate: object; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: object; }[]; uniqueness_key?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contract = await client.v1.contracts.retrieve({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' });\n\nconsole.log(contract);\n```",
3675
3678
  perLanguage: {
3676
3679
  typescript: {
3677
3680
  method: 'client.v1.contracts.retrieve',
@@ -3722,9 +3725,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3722
3725
  'starting_at?: string;',
3723
3726
  ],
3724
3727
  response:
3725
- "{ data: { id: string; amendments: object[]; current: contract_without_amendments; customer_id: string; initial: contract_without_amendments; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: object; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; subscriptions?: subscription[]; uniqueness_key?: string; }[]; }",
3728
+ "{ data: { id: string; amendments: object[]; current: contract_without_amendments; customer_id: string; initial: contract_without_amendments; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: object; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; subscriptions?: subscription[]; uniqueness_key?: string; }[]; }",
3726
3729
  markdown:
3727
- "## list\n\n`client.v1.contracts.list(customer_id: string, covering_date?: string, include_archived?: boolean, include_balance?: boolean, include_ledgers?: boolean, starting_at?: string): { data: contract[]; }`\n\n**post** `/v1/contracts/list`\n\nRetrieves all contracts for a specific customer, including pricing, terms, credits, and commitments. Use this to view a customer's contract history and current agreements for billing management. Returns contract details with optional ledgers and balance information. \n\n⚠️ Note: This is the legacy v1 endpoint - new integrations should use the v2 endpoint for enhanced features.\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `covering_date?: string`\n Optional RFC 3339 timestamp. If provided, the response will include only contracts effective on the provided date. This cannot be provided if the starting_at filter is provided.\n\n- `include_archived?: boolean`\n Include archived contracts in the response\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower.\n\n- `include_ledgers?: boolean`\n Include commit ledgers in the response. Setting this flag may cause the query to be slower.\n\n- `starting_at?: string`\n Optional RFC 3339 timestamp. If provided, the response will include only contracts where effective_at is on or after the provided date. This cannot be provided if the covering_date filter is provided.\n\n### Returns\n\n- `{ data: { id: string; amendments: object[]; current: contract_without_amendments; customer_id: string; initial: contract_without_amendments; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: object; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; subscriptions?: subscription[]; uniqueness_key?: string; }[]; }`\n\n - `data: { id: string; amendments: { id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; starting_at: string; credits?: object[]; discounts?: object[]; netsuite_sales_order_id?: string; professional_services?: object[]; reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; fraction?: number; gcp_account_id?: string; gcp_offer_id?: string; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]; salesforce_opportunity_id?: string; }[]; current: { commits: commit[]; created_at: string; created_by: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_statement_schedule: object; credits?: credit[]; discounts?: discount[]; ending_before?: string; hierarchy_configuration?: hierarchy_configuration; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; total_contract_value?: number; usage_filter?: object; }; customer_id: string; initial: { commits: commit[]; created_at: string; created_by: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_statement_schedule: object; credits?: credit[]; discounts?: discount[]; ending_before?: string; hierarchy_configuration?: hierarchy_configuration; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; total_contract_value?: number; usage_filter?: object; }; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: { archived_at: string; billing_provider: string; delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; id?: string; configuration?: object; }; package_id?: string; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; }; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }; subscriptions?: { billing_periods: object; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: object; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: object[]; starting_at: string; subscription_rate: object; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: object; }[]; uniqueness_key?: string; }[]`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contracts = await client.v1.contracts.list({ customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1' });\n\nconsole.log(contracts);\n```",
3730
+ "## list\n\n`client.v1.contracts.list(customer_id: string, covering_date?: string, include_archived?: boolean, include_balance?: boolean, include_ledgers?: boolean, starting_at?: string): { data: contract[]; }`\n\n**post** `/v1/contracts/list`\n\nRetrieves all contracts for a specific customer, including pricing, terms, credits, and commitments. Use this to view a customer's contract history and current agreements for billing management. Returns contract details with optional ledgers and balance information. \n\n⚠️ Note: This is the legacy v1 endpoint - new integrations should use the v2 endpoint for enhanced features.\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `covering_date?: string`\n Optional RFC 3339 timestamp. If provided, the response will include only contracts effective on the provided date. This cannot be provided if the starting_at filter is provided.\n\n- `include_archived?: boolean`\n Include archived contracts in the response\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower.\n\n- `include_ledgers?: boolean`\n Include commit ledgers in the response. Setting this flag may cause the query to be slower.\n\n- `starting_at?: string`\n Optional RFC 3339 timestamp. If provided, the response will include only contracts where effective_at is on or after the provided date. This cannot be provided if the covering_date filter is provided.\n\n### Returns\n\n- `{ data: { id: string; amendments: object[]; current: contract_without_amendments; customer_id: string; initial: contract_without_amendments; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: object; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; subscriptions?: subscription[]; uniqueness_key?: string; }[]; }`\n\n - `data: { id: string; amendments: { id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; starting_at: string; credits?: object[]; discounts?: object[]; netsuite_sales_order_id?: string; professional_services?: object[]; reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; ending_before?: string; fraction?: number; gcp_account_id?: string; gcp_offer_id?: string; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]; salesforce_opportunity_id?: string; }[]; current: { commits: commit[]; created_at: string; created_by: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_statement_schedule: object; credits?: credit[]; discounts?: discount[]; ending_before?: string; hierarchy_configuration?: hierarchy_configuration; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; total_contract_value?: number; usage_filter?: object; }; customer_id: string; initial: { commits: commit[]; created_at: string; created_by: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_statement_schedule: object; credits?: credit[]; discounts?: discount[]; ending_before?: string; hierarchy_configuration?: hierarchy_configuration; name?: string; net_payment_terms_days?: number; netsuite_sales_order_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; professional_services?: pro_service[]; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; reseller_royalties?: object[]; salesforce_opportunity_id?: string; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; total_contract_value?: number; usage_filter?: object; }; archived_at?: string; custom_fields?: object; customer_billing_provider_configuration?: { archived_at: string; billing_provider: string; delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; id?: string; configuration?: object; }; package_id?: string; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }; spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; accumulated_spend?: { amount: number; period_ending_before: string; period_starting_at: string; }; }[]; subscriptions?: { billing_periods: object; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: object; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: object[]; starting_at: string; subscription_rate: object; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: object; }[]; uniqueness_key?: string; }[]`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contracts = await client.v1.contracts.list({ customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1' });\n\nconsole.log(contracts);\n```",
3728
3731
  perLanguage: {
3729
3732
  typescript: {
3730
3733
  method: 'client.v1.contracts.list',
@@ -3770,7 +3773,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3770
3773
  'customer_id: string;',
3771
3774
  'starting_at: string;',
3772
3775
  "billing_provider_configuration?: { billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite'; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; };",
3773
- "commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; temporary_id?: string; }[];",
3776
+ "commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; temporary_id?: string; }[];",
3774
3777
  "credits?: { access_schedule: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[];",
3775
3778
  'custom_fields?: object;',
3776
3779
  "discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[];",
@@ -3783,7 +3786,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3783
3786
  "overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[];",
3784
3787
  'package_alias?: string;',
3785
3788
  'package_id?: string;',
3786
- "prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; }; };",
3789
+ "prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; threshold_balance_specifiers?: { exclude: { custom_field_filters: object[]; }[]; }[]; };",
3787
3790
  'professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[];',
3788
3791
  'rate_card_alias?: string;',
3789
3792
  'rate_card_id?: string;',
@@ -3794,7 +3797,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3794
3797
  'salesforce_opportunity_id?: string;',
3795
3798
  "scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[];",
3796
3799
  "scheduled_charges_on_usage_invoices?: 'ALL';",
3797
- "spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; }; };",
3800
+ "spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; };",
3801
+ "spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[];",
3798
3802
  "subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[];",
3799
3803
  'total_contract_value?: number;',
3800
3804
  "transition?: { from_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; future_invoice_behavior?: { trueup?: 'REMOVE' | 'AS_IS'; }; };",
@@ -3802,9 +3806,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3802
3806
  'usage_filter?: { group_key: string; group_values: string[]; starting_at?: string; };',
3803
3807
  "usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; billing_anchor_date?: string; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START' | 'CUSTOM_DATE'; invoice_generation_starting_at?: string; };",
3804
3808
  ],
3805
- response: '{ data: { id: string; }; }',
3809
+ response:
3810
+ "{ data: { id: string; contract?: { id: string; commits: commit[]; created_at: string; created_by: string; customer_id: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; credits?: credit[]; custom_fields?: object; customer_billing_provider_configuration?: object; ending_before?: string; has_more?: object; hierarchy_configuration?: hierarchy_configuration; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; subscriptions?: subscription[]; uniqueness_key?: string; }; }; }",
3806
3811
  markdown:
3807
- "## create\n\n`client.v1.contracts.create(customer_id: string, starting_at: string, billing_provider_configuration?: { billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite'; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }, commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; temporary_id?: string; }[], credits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; }[], custom_fields?: object, discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], ending_before?: string, hierarchy_configuration?: { parent?: { contract_id: string; customer_id: string; }; parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }; payer?: 'SELF' | 'PARENT'; usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'; }, multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT', name?: string, net_payment_terms_days?: number, netsuite_sales_order_id?: string, overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[], package_alias?: string, package_id?: string, prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; }, professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[], rate_card_alias?: string, rate_card_id?: string, recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[], recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[], reseller_royalties?: { fraction: number; netsuite_reseller_id: string; reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; reseller_contract_value?: number; }[], revenue_system_configuration?: { delivery_method?: 'direct_to_billing_provider'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }, salesforce_opportunity_id?: string, scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], scheduled_charges_on_usage_invoices?: 'ALL', spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }, subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[], total_contract_value?: number, transition?: { from_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; future_invoice_behavior?: { trueup?: 'REMOVE' | 'AS_IS'; }; }, uniqueness_key?: string, usage_filter?: { group_key: string; group_values: string[]; starting_at?: string; }, usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; billing_anchor_date?: string; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START' | 'CUSTOM_DATE'; invoice_generation_starting_at?: string; }): { data: id; }`\n\n**post** `/v1/contracts/create`\n\nContracts define a customer's products, pricing, discounts, access duration, and billing configuration. Contracts serve as the central billing agreement for both PLG and Enterprise customers. You can automatically grant customers access to your products and services directly from your product or CRM.\n\n### Use this endpoint to:\n- PLG onboarding: Automatically provision new self-serve customers with contracts when they sign up.\n- Enterprise sales: Push negotiated contracts from Salesforce with custom pricing and commitments\n- Promotional pricing: Implement time-limited discounts and free trials through overrides\n\n### Key components:\n#### Contract Term and Billing Schedule\n- Set contract duration using `starting_at` and `ending_before` fields. PLG contracts typically use perpetual agreements (no end date), while Enterprise contracts have fixed end dates which can be edited over time in the case of co-term upsells.\n\n#### Rate Card\nIf you are offering usage based pricing, you can set a rate card for the contract to reference through `rate_card_id` or `rate_card_alias`. The rate card is a store of all of your usage based products and their centralized pricing. Any new products or price changes on the rate card can be set to automatically propagate to all associated contracts - this ensures consistent pricing and product launches flow to contracts without manual updates and migrations. The `usage_statement_schedule` determines the cadence on which Metronome will finalize a usage invoice for the customer. This defaults to monthly on the 1st, with options for custom dates, quarterly, or annual cadences. Note: Most usage based billing companies align usage statements to be evaluated aligned to the first of the month.\nRead more about [Rate Cards](https://docs.metronome.com/pricing-packaging/create-manage-rate-cards/).\n\n#### Overrides and discounts\nCustomize pricing on the contract through time-bounded overrides that can target specific products, product families, or complex usage scenarios. Overrides enable two key capabilities:\n- Discounts: Apply percentage discounts, fixed rate reductions, or quantity-based pricing tiers\n- Entitlements: Provide special pricing or access to specific products for negotiated deals\n\nRead more about [Contract Overrides](https://docs.metronome.com/manage-product-access/add-contract-override/).\n\n#### Commits and Credits\nUsing commits, configure prepaid or postpaid spending commitments where customers promise to spend a certain amount over the contract period paid in advance or in arrears. Use credits to provide free spending allowances. Under the hood these are the same mechanisms, however, credits are typically offered for free (SLA or promotional) or as a part of an allotment associated with a Subscription.\n\nIn Metronome, you can set commits and credits to only be applicable for a subset of usage. Use `applicable_product_ids` or `applicable_product_tags` to create product or product-family specific commits or credits, or you can build complex boolean logic specifiers to target usage based on pricing and presentation group values using `override_specifiers`.\n\nThese objects can also also be configured to have a recurrence schedule to easily model customer packaging which includes recurring monthly or quarterly allotments.\n\nCommits support rollover settings (`rollover_fraction`) to transfer unused balances between contract periods, either entirely or as a percentage.\n\nRead more about [Credits and Commits](https://docs.metronome.com/pricing-packaging/apply-credits-commits/).\n\n#### Subscriptions\nYou can add a fixed recurring charge to a contract, like monthly licenses or seat-based fees, using the subscription charge. Subscription charges are defined on your rate card and you can select which subscription is applicable to add to each contract. When you add a subscription to a contract you need to:\n- Define whether the subscription is paid for in-advance or in-arrears (`collection_schedule`)\n- Define the proration behavior (`proration`)\n- Specify an initial quantity (`initial_quantity`)\n- Define which subscription rate on the rate card should be used (`subscription_rate`)\n\nRead more about [Subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/).\n\n#### Scheduled Charges\nSet up one-time, recurring, or entirely custom charges that occur on specific dates, separate from usage-based billing or commitments. These can be used to model non-recurring platform charges or professional services.\n\n#### Threshold Billing\nMetronome allows you to configure automatic billing triggers when customers reach spending thresholds to prevent fraud and manage risk. You can use `spend_threshold_configuration` to trigger an invoice to cover current charges whenever the threshold is reached or you can ensure the customer maintains a minimum prepaid balance using the `prepaid_balance_configuration`.\n\nRead more about [Spend Threshold](https://docs.metronome.com/manage-product-access/spend-thresholds/) and [Prepaid Balance Thresholds](https://docs.metronome.com/manage-product-access/prepaid-balance-thresholds/).\n\n### Usage guidelines:\n- You can always [Edit Contracts](https://docs.metronome.com/manage-product-access/edit-contract/) after it has been created, using the `editContract` endpoint. Metronome keeps track of all edits, both in the audit log and over the `getEditHistory` endpoint.\n- Customers in Metronome can have multiple concurrent contracts at one time. Use `usage_filters` to route the correct usage to each contract. [Read more about usage filters](https://docs.metronome.com/manage-product-access/provision-customer/#create-a-usage-filter).\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `starting_at: string`\n inclusive contract start time\n\n- `billing_provider_configuration?: { billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite'; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }`\n The billing provider configuration associated with a contract. Provide either an ID or the provider and delivery method.\n - `billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite'`\n Do not specify if using billing_provider_configuration_id.\n - `billing_provider_configuration_id?: string`\n The Metronome ID of the billing provider configuration. Use when a customer has multiple configurations with the same billing provider and delivery method. Otherwise, specify the billing_provider and delivery_method.\n - `delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'`\n Do not specify if using billing_provider_configuration_id.\n\n- `commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; temporary_id?: string; }[]`\n\n- `credits?: { access_schedule: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n\n- `custom_fields?: object`\n Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }\n\n- `discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `ending_before?: string`\n exclusive contract end time\n\n- `hierarchy_configuration?: { parent?: { contract_id: string; customer_id: string; }; parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }; payer?: 'SELF' | 'PARENT'; usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'; }`\n - `parent?: { contract_id: string; customer_id: string; }`\n - `parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }`\n - `payer?: 'SELF' | 'PARENT'`\n Indicates which customer should pay for the child's invoice charges\n\n**SELF**: The child pays for its own invoice charges\n\n**PARENT**: The parent pays for the child's invoice charges\n - `usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'`\n Indicates the behavior of the child's invoice statements on the parent's invoices.\n\n**CONSOLIDATE**: Child's invoice statements will be added to parent's consolidated invoices\n\n**SEPARATE**: Child's invoice statements will appear not appear on parent's consolidated invoices\n\n- `multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'`\n Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list prices automatically. EXPLICIT prioritization requires specifying priorities for each multiplier; the one with the lowest priority value will be prioritized first. If tiered overrides are used, prioritization must be explicit.\n\n- `name?: string`\n\n- `net_payment_terms_days?: number`\n\n- `netsuite_sales_order_id?: string`\n This field's availability is dependent on your client's configuration.\n\n- `overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n\n- `package_alias?: string`\n Selects the package linked to the specified alias as of the contract's start date. Mutually exclusive with package_id.\n\n- `package_id?: string`\n If provided, provisions a customer on a package instead of creating a traditional contract. When specified, only customer_id, starting_at, package_id, uniqueness_key, transition, and custom_fields are allowed.\n\n- `prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; }; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `recharge_to_amount: number`\n Specify the amount the balance should be recharged to.\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's prepaid balance lowers to this amount, a threshold charge will be initiated.\n - `custom_credit_type_id?: string`\n If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.\n - `discount_configuration?: { payment_fraction: number; }`\n\n- `professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `rate_card_alias?: string`\n Selects the rate card linked to the specified alias as of the contract's start date.\n\n- `rate_card_id?: string`\n\n- `recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[]`\n\n- `recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[]`\n\n- `reseller_royalties?: { fraction: number; netsuite_reseller_id: string; reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; reseller_contract_value?: number; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `revenue_system_configuration?: { delivery_method?: 'direct_to_billing_provider'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }`\n The revenue system configuration associated with a contract. Provide either an ID or the provider and delivery method.\n - `delivery_method?: 'direct_to_billing_provider'`\n How revenue recognition records should be delivered to the revenue system. Do not specify if using revenue_system_configuration_id.\n - `provider?: 'netsuite'`\n The system that is providing services for revenue recognition. Do not specify if using revenue_system_configuration_id.\n - `revenue_system_configuration_id?: string`\n The Metronome ID of the revenue system configuration. Use when a customer has multiple configurations with the same provider and delivery method. Otherwise, specify the provider and delivery_method.\n\n- `salesforce_opportunity_id?: string`\n This field's availability is dependent on your client's configuration.\n\n- `scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n\n- `scheduled_charges_on_usage_invoices?: 'ALL'`\n Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.\n\n- `spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; }; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.\n - `discount_configuration?: { payment_fraction: number; }`\n\n- `subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[]`\n Optional list of [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/) to add to the contract.\n\n- `total_contract_value?: number`\n This field's availability is dependent on your client's configuration.\n\n- `transition?: { from_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; future_invoice_behavior?: { trueup?: 'REMOVE' | 'AS_IS'; }; }`\n - `from_contract_id: string`\n - `type: 'SUPERSEDE' | 'RENEWAL'`\n This field's available values may vary based on your client's configuration.\n - `future_invoice_behavior?: { trueup?: 'REMOVE' | 'AS_IS'; }`\n\n- `uniqueness_key?: string`\n Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.\n\n- `usage_filter?: { group_key: string; group_values: string[]; starting_at?: string; }`\n - `group_key: string`\n - `group_values: string[]`\n - `starting_at?: string`\n\n- `usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; billing_anchor_date?: string; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START' | 'CUSTOM_DATE'; invoice_generation_starting_at?: string; }`\n - `frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'`\n - `billing_anchor_date?: string`\n Required when using CUSTOM_DATE. This option lets you set a historical billing anchor date, aligning future billing cycles with a chosen cadence. For example, if a contract starts on 2024-09-15 and you set the anchor date to 2024-09-10 with a MONTHLY frequency, the first usage statement will cover 09-15 to 10-10. Subsequent statements will follow the 10th of each month.\n - `day?: 'FIRST_OF_MONTH' | 'CONTRACT_START' | 'CUSTOM_DATE'`\n If not provided, defaults to the first day of the month.\n - `invoice_generation_starting_at?: string`\n The date Metronome should start generating usage invoices. If unspecified, contract start date will be used. This is useful to set if you want to import historical invoices via our 'Create Historical Invoices' API rather than having Metronome automatically generate them.\n\n### Returns\n\n- `{ data: { id: string; }; }`\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contract = await client.v1.contracts.create({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d', starting_at: '2020-01-01T00:00:00.000Z' });\n\nconsole.log(contract);\n```",
3812
+ "## create\n\n`client.v1.contracts.create(customer_id: string, starting_at: string, billing_provider_configuration?: { billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite'; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }, commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; temporary_id?: string; }[], credits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; }[], custom_fields?: object, discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], ending_before?: string, hierarchy_configuration?: { parent?: { contract_id: string; customer_id: string; }; parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }; payer?: 'SELF' | 'PARENT'; usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'; }, multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT', name?: string, net_payment_terms_days?: number, netsuite_sales_order_id?: string, overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[], package_alias?: string, package_id?: string, prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }, professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[], rate_card_alias?: string, rate_card_id?: string, recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[], recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[], reseller_royalties?: { fraction: number; netsuite_reseller_id: string; reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; reseller_contract_value?: number; }[], revenue_system_configuration?: { delivery_method?: 'direct_to_billing_provider'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }, salesforce_opportunity_id?: string, scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], scheduled_charges_on_usage_invoices?: 'ALL', spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }, spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[], subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[], total_contract_value?: number, transition?: { from_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; future_invoice_behavior?: { trueup?: 'REMOVE' | 'AS_IS'; }; }, uniqueness_key?: string, usage_filter?: { group_key: string; group_values: string[]; starting_at?: string; }, usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; billing_anchor_date?: string; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START' | 'CUSTOM_DATE'; invoice_generation_starting_at?: string; }): { data: object; }`\n\n**post** `/v1/contracts/create`\n\nContracts define a customer's products, pricing, discounts, access duration, and billing configuration. Contracts serve as the central billing agreement for both PLG and Enterprise customers. You can automatically grant customers access to your products and services directly from your product or CRM.\n\n### Use this endpoint to:\n- PLG onboarding: Automatically provision new self-serve customers with contracts when they sign up.\n- Enterprise sales: Push negotiated contracts from Salesforce with custom pricing and commitments\n- Promotional pricing: Implement time-limited discounts and free trials through overrides\n\n### Key components:\n#### Contract Term and Billing Schedule\n- Set contract duration using `starting_at` and `ending_before` fields. PLG contracts typically use perpetual agreements (no end date), while Enterprise contracts have fixed end dates which can be edited over time in the case of co-term upsells.\n\n#### Rate Card\nIf you are offering usage based pricing, you can set a rate card for the contract to reference through `rate_card_id` or `rate_card_alias`. The rate card is a store of all of your usage based products and their centralized pricing. Any new products or price changes on the rate card can be set to automatically propagate to all associated contracts - this ensures consistent pricing and product launches flow to contracts without manual updates and migrations. The `usage_statement_schedule` determines the cadence on which Metronome will finalize a usage invoice for the customer. This defaults to monthly on the 1st, with options for custom dates, quarterly, or annual cadences. Note: Most usage based billing companies align usage statements to be evaluated aligned to the first of the month.\nRead more about [Rate Cards](https://docs.metronome.com/pricing-packaging/create-manage-rate-cards/).\n\n#### Overrides and discounts\nCustomize pricing on the contract through time-bounded overrides that can target specific products, product families, or complex usage scenarios. Overrides enable two key capabilities:\n- Discounts: Apply percentage discounts, fixed rate reductions, or quantity-based pricing tiers\n- Entitlements: Provide special pricing or access to specific products for negotiated deals\n\nRead more about [Contract Overrides](https://docs.metronome.com/manage-product-access/add-contract-override/).\n\n#### Commits and Credits\nUsing commits, configure prepaid or postpaid spending commitments where customers promise to spend a certain amount over the contract period paid in advance or in arrears. Use credits to provide free spending allowances. Under the hood these are the same mechanisms, however, credits are typically offered for free (SLA or promotional) or as a part of an allotment associated with a Subscription.\n\nIn Metronome, you can set commits and credits to only be applicable for a subset of usage. Use `applicable_product_ids` or `applicable_product_tags` to create product or product-family specific commits or credits, or you can build complex boolean logic specifiers to target usage based on pricing and presentation group values using `override_specifiers`.\n\nThese objects can also also be configured to have a recurrence schedule to easily model customer packaging which includes recurring monthly or quarterly allotments.\n\nCommits support rollover settings (`rollover_fraction`) to transfer unused balances between contract periods, either entirely or as a percentage.\n\nRead more about [Credits and Commits](https://docs.metronome.com/pricing-packaging/apply-credits-commits/).\n\n#### Subscriptions\nYou can add a fixed recurring charge to a contract, like monthly licenses or seat-based fees, using the subscription charge. Subscription charges are defined on your rate card and you can select which subscription is applicable to add to each contract. When you add a subscription to a contract you need to:\n- Define whether the subscription is paid for in-advance or in-arrears (`collection_schedule`)\n- Define the proration behavior (`proration`)\n- Specify an initial quantity (`initial_quantity`)\n- Define which subscription rate on the rate card should be used (`subscription_rate`)\n\nRead more about [Subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/).\n\n#### Scheduled Charges\nSet up one-time, recurring, or entirely custom charges that occur on specific dates, separate from usage-based billing or commitments. These can be used to model non-recurring platform charges or professional services.\n\n#### Threshold Billing\nMetronome allows you to configure automatic billing triggers when customers reach spending thresholds to prevent fraud and manage risk. You can use `spend_threshold_configuration` to trigger an invoice to cover current charges whenever the threshold is reached or you can ensure the customer maintains a minimum prepaid balance using the `prepaid_balance_configuration`.\n\nRead more about [Spend Threshold](https://docs.metronome.com/manage-product-access/spend-thresholds/) and [Prepaid Balance Thresholds](https://docs.metronome.com/manage-product-access/prepaid-balance-thresholds/).\n\n### Usage guidelines:\n- You can always [Edit Contracts](https://docs.metronome.com/manage-product-access/edit-contract/) after it has been created, using the `editContract` endpoint. Metronome keeps track of all edits, both in the audit log and over the `getEditHistory` endpoint.\n- Customers in Metronome can have multiple concurrent contracts at one time. Use `usage_filters` to route the correct usage to each contract. [Read more about usage filters](https://docs.metronome.com/manage-product-access/provision-customer/#create-a-usage-filter).\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `starting_at: string`\n inclusive contract start time\n\n- `billing_provider_configuration?: { billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite'; billing_provider_configuration_id?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }`\n The billing provider configuration associated with a contract. Provide either an ID or the provider and delivery method.\n - `billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite'`\n Do not specify if using billing_provider_configuration_id.\n - `billing_provider_configuration_id?: string`\n The Metronome ID of the billing provider configuration. Use when a customer has multiple configurations with the same billing provider and delivery method. Otherwise, specify the billing_provider and delivery_method.\n - `delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'`\n Do not specify if using billing_provider_configuration_id.\n\n- `commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; temporary_id?: string; }[]`\n\n- `credits?: { access_schedule: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n\n- `custom_fields?: object`\n Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }\n\n- `discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `ending_before?: string`\n exclusive contract end time\n\n- `hierarchy_configuration?: { parent?: { contract_id: string; customer_id: string; }; parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }; payer?: 'SELF' | 'PARENT'; usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'; }`\n - `parent?: { contract_id: string; customer_id: string; }`\n - `parent_behavior?: { invoice_consolidation_type?: 'CONCATENATE' | 'NONE'; }`\n - `payer?: 'SELF' | 'PARENT'`\n Indicates which customer should pay for the child's invoice charges\n\n**SELF**: The child pays for its own invoice charges\n\n**PARENT**: The parent pays for the child's invoice charges\n - `usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'`\n Indicates the behavior of the child's invoice statements on the parent's invoices.\n\n**CONSOLIDATE**: Child's invoice statements will be added to parent's consolidated invoices\n\n**SEPARATE**: Child's invoice statements will appear not appear on parent's consolidated invoices\n\n- `multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'`\n Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list prices automatically. EXPLICIT prioritization requires specifying priorities for each multiplier; the one with the lowest priority value will be prioritized first. If tiered overrides are used, prioritization must be explicit.\n\n- `name?: string`\n\n- `net_payment_terms_days?: number`\n\n- `netsuite_sales_order_id?: string`\n This field's availability is dependent on your client's configuration.\n\n- `overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n\n- `package_alias?: string`\n Selects the package linked to the specified alias as of the contract's start date. Mutually exclusive with package_id.\n\n- `package_id?: string`\n If provided, provisions a customer on a package instead of creating a traditional contract. When specified, only customer_id, starting_at, package_id, uniqueness_key, transition, and custom_fields are allowed.\n\n- `prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; threshold_balance_specifiers?: { exclude: { custom_field_filters: object[]; }[]; }[]; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `recharge_to_amount: number`\n Specify the amount the balance should be recharged to.\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's prepaid balance lowers to this amount, a threshold charge will be initiated.\n - `custom_credit_type_id?: string`\n If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.\n - `discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }`\n - `threshold_balance_specifiers?: { exclude: { custom_field_filters: { entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit'; key: string; value: string; }[]; }[]; }[]`\n\n- `professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `rate_card_alias?: string`\n Selects the rate card linked to the specified alias as of the contract's start date.\n\n- `rate_card_id?: string`\n\n- `recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[]`\n\n- `recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; ending_before?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[]`\n\n- `reseller_royalties?: { fraction: number; netsuite_reseller_id: string; reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; reseller_contract_value?: number; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `revenue_system_configuration?: { delivery_method?: 'direct_to_billing_provider'; provider?: 'netsuite'; revenue_system_configuration_id?: string; }`\n The revenue system configuration associated with a contract. Provide either an ID or the provider and delivery method.\n - `delivery_method?: 'direct_to_billing_provider'`\n How revenue recognition records should be delivered to the revenue system. Do not specify if using revenue_system_configuration_id.\n - `provider?: 'netsuite'`\n The system that is providing services for revenue recognition. Do not specify if using revenue_system_configuration_id.\n - `revenue_system_configuration_id?: string`\n The Metronome ID of the revenue system configuration. Use when a customer has multiple configurations with the same provider and delivery method. Otherwise, specify the provider and delivery_method.\n\n- `salesforce_opportunity_id?: string`\n This field's availability is dependent on your client's configuration.\n\n- `scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n\n- `scheduled_charges_on_usage_invoices?: 'ALL'`\n Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.\n\n- `spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.\n - `discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }`\n\n- `spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[]`\n Spend trackers to attach to this contract. Aliases must be unique within a contract.\n\n- `subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; ending_before?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { initial_seat_ids: string[]; seat_group_key: string; initial_unassigned_seats?: number; }; starting_at?: string; temporary_id?: string; }[]`\n Optional list of [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/) to add to the contract.\n\n- `total_contract_value?: number`\n This field's availability is dependent on your client's configuration.\n\n- `transition?: { from_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; future_invoice_behavior?: { trueup?: 'REMOVE' | 'AS_IS'; }; }`\n - `from_contract_id: string`\n - `type: 'SUPERSEDE' | 'RENEWAL'`\n This field's available values may vary based on your client's configuration.\n - `future_invoice_behavior?: { trueup?: 'REMOVE' | 'AS_IS'; }`\n\n- `uniqueness_key?: string`\n Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.\n\n- `usage_filter?: { group_key: string; group_values: string[]; starting_at?: string; }`\n - `group_key: string`\n - `group_values: string[]`\n - `starting_at?: string`\n\n- `usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; billing_anchor_date?: string; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START' | 'CUSTOM_DATE'; invoice_generation_starting_at?: string; }`\n - `frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'`\n - `billing_anchor_date?: string`\n Required when using CUSTOM_DATE. This option lets you set a historical billing anchor date, aligning future billing cycles with a chosen cadence. For example, if a contract starts on 2024-09-15 and you set the anchor date to 2024-09-10 with a MONTHLY frequency, the first usage statement will cover 09-15 to 10-10. Subsequent statements will follow the 10th of each month.\n - `day?: 'FIRST_OF_MONTH' | 'CONTRACT_START' | 'CUSTOM_DATE'`\n If not provided, defaults to the first day of the month.\n - `invoice_generation_starting_at?: string`\n The date Metronome should start generating usage invoices. If unspecified, contract start date will be used. This is useful to set if you want to import historical invoices via our 'Create Historical Invoices' API rather than having Metronome automatically generate them.\n\n### Returns\n\n- `{ data: { id: string; contract?: { id: string; commits: commit[]; created_at: string; created_by: string; customer_id: string; overrides: override[]; scheduled_charges: scheduled_charge[]; starting_at: string; transitions: object[]; usage_filter: object[]; usage_statement_schedule: object; credits?: credit[]; custom_fields?: object; customer_billing_provider_configuration?: object; ending_before?: string; has_more?: object; hierarchy_configuration?: hierarchy_configuration; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; package_id?: string; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; subscriptions?: subscription[]; uniqueness_key?: string; }; }; }`\n\n - `data: { id: string; contract?: { id: string; commits: { id: string; created_at: string; product: object; type: 'PREPAID' | 'POSTPAID'; access_schedule?: schedule_duration; amount?: number; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: object; custom_fields?: object; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; invoice_contract?: object; invoice_schedule?: schedule_point_in_time; ledger?: object | object | object | object | object | object | object | object | object | object | object | object | object | object[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: object; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: commit_specifier[]; spend_tracker_attributes?: object; subscription_config?: object; uniqueness_key?: string; }[]; created_at: string; created_by: string; customer_id: string; overrides: { id: string; created_at: string; starting_at: string; applicable_product_tags?: string[]; credit_type?: credit_type_data; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; is_prorated?: boolean; multiplier?: number; override_specifiers?: object[]; override_tiers?: override_tier[]; overwrite_rate?: overwrite_rate; price?: number; priority?: number; product?: object; quantity?: number; rate_type?: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: tier[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; value?: object; }[]; scheduled_charges: { id: string; product: object; schedule: schedule_point_in_time; archived_at?: string; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]; starting_at: string; transitions: { from_contract_id: string; to_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; }[]; usage_filter: { group_key: string; group_values: string[]; starting_at: string; ending_before?: string; }[]; usage_statement_schedule: { billing_anchor_date: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; }; credits?: { id: string; product: object; type: 'CREDIT'; access_schedule?: schedule_duration; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; balance?: number; contract?: object; custom_fields?: object; description?: string; hierarchy_configuration?: commit_hierarchy_configuration; ledger?: object | object | object | object | object | object | object | object[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_credit_id?: string; rolled_over_from?: object; salesforce_opportunity_id?: string; specifiers?: commit_specifier[]; subscription_config?: object; uniqueness_key?: string; }[]; custom_fields?: object; customer_billing_provider_configuration?: { id?: string; billing_provider?: string; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; }; ending_before?: string; has_more?: { commits: boolean; credits: boolean; }; hierarchy_configuration?: { children: object[]; parent_behavior?: object; } | { parent: object; payer?: 'SELF' | 'PARENT'; usage_statement_behavior?: 'CONSOLIDATE' | 'SEPARATE'; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; package_id?: string; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }; rate_card_id?: string; recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; contract?: { id: string; }; description?: string; ending_before?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: object; }[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }; subscriptions?: { billing_periods: object; collection_schedule: 'ADVANCE' | 'ARREARS'; proration: object; quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY'; quantity_schedule: object[]; starting_at: string; subscription_rate: object; id?: string; custom_fields?: object; description?: string; ending_before?: string; fiat_credit_type_id?: string; name?: string; seat_config?: object; }[]; uniqueness_key?: string; }; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst contract = await client.v1.contracts.create({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d', starting_at: '2020-01-01T00:00:00.000Z' });\n\nconsole.log(contract);\n```",
3808
3813
  perLanguage: {
3809
3814
  typescript: {
3810
3815
  method: 'client.v1.contracts.create',
@@ -3850,7 +3855,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3850
3855
  'contract_id: string;',
3851
3856
  'customer_id: string;',
3852
3857
  'starting_at: string;',
3853
- "commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; temporary_id?: string; }[];",
3858
+ "commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; temporary_id?: string; }[];",
3854
3859
  "credits?: { access_schedule: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[];",
3855
3860
  'custom_fields?: object;',
3856
3861
  "discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[];",
@@ -3864,7 +3869,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
3864
3869
  ],
3865
3870
  response: '{ data: { id: string; }; }',
3866
3871
  markdown:
3867
- "## amend\n\n`client.v1.contracts.amend(contract_id: string, customer_id: string, starting_at: string, commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; temporary_id?: string; }[], credits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; }[], custom_fields?: object, discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], netsuite_sales_order_id?: string, overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[], professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[], reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; fraction?: number; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[], salesforce_opportunity_id?: string, scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], total_contract_value?: number): { data: id; }`\n\n**post** `/v1/contracts/amend`\n\nAmendments will be replaced by Contract editing. New clients should implement using the `editContract` endpoint. Read more about the migration to contract editing [here](/guides/implement-metronome/migrate-amendments-to-edits/) and reach out to your Metronome representative for more details. Once contract editing is enabled, access to this endpoint will be removed.\n\n\n### Parameters\n\n- `contract_id: string`\n ID of the contract to amend\n\n- `customer_id: string`\n ID of the customer whose contract is to be amended\n\n- `starting_at: string`\n inclusive start time for the amendment\n\n- `commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; temporary_id?: string; }[]`\n\n- `credits?: { access_schedule: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n\n- `custom_fields?: object`\n Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }\n\n- `discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `netsuite_sales_order_id?: string`\n This field's availability is dependent on your client's configuration.\n\n- `overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n\n- `professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; fraction?: number; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `salesforce_opportunity_id?: string`\n This field's availability is dependent on your client's configuration.\n\n- `scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n\n- `total_contract_value?: number`\n This field's availability is dependent on your client's configuration.\n\n### Returns\n\n- `{ data: { id: string; }; }`\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst response = await client.v1.contracts.amend({\n contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',\n customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',\n starting_at: '2020-01-01T00:00:00.000Z',\n});\n\nconsole.log(response);\n```",
3872
+ "## amend\n\n`client.v1.contracts.amend(contract_id: string, customer_id: string, starting_at: string, commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: object[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; temporary_id?: string; }[], credits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: object; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; }[], custom_fields?: object, discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], netsuite_sales_order_id?: string, overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[], professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[], reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; fraction?: number; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[], salesforce_opportunity_id?: string, scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: object; schedule_items?: object[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[], total_contract_value?: number): { data: id; }`\n\n**post** `/v1/contracts/amend`\n\nAmendments will be replaced by Contract editing. New clients should implement using the `editContract` endpoint. Read more about the migration to contract editing [here](/guides/implement-metronome/migrate-amendments-to-edits/) and reach out to your Metronome representative for more details. Once contract editing is enabled, access to this endpoint will be removed.\n\n\n### Parameters\n\n- `contract_id: string`\n ID of the contract to amend\n\n- `customer_id: string`\n ID of the customer whose contract is to be amended\n\n- `starting_at: string`\n inclusive start time for the amendment\n\n- `commits?: { product_id: string; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; amount?: number; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; invoice_schedule?: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; temporary_id?: string; }[]`\n\n- `credits?: { access_schedule: { schedule_items: { amount: number; ending_before: string; starting_at: string; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; hierarchy_configuration?: { child_access: { type: 'ALL'; } | { type: 'NONE'; } | { contract_ids: string[]; type: 'CONTRACT_IDS'; }; }; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n\n- `custom_fields?: object`\n Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }\n\n- `discounts?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `netsuite_sales_order_id?: string`\n This field's availability is dependent on your client's configuration.\n\n- `overrides?: { starting_at: string; applicable_product_tags?: string[]; ending_before?: string; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_specifiers?: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; product_id?: string; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n\n- `professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `reseller_royalties?: { reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; aws_options?: { aws_account_number?: string; aws_offer_id?: string; aws_payer_reference_id?: string; }; ending_before?: string; fraction?: number; gcp_options?: { gcp_account_id?: string; gcp_offer_id?: string; }; netsuite_reseller_id?: string; reseller_contract_value?: number; starting_at?: string; }[]`\n This field's availability is dependent on your client's configuration.\n\n- `salesforce_opportunity_id?: string`\n This field's availability is dependent on your client's configuration.\n\n- `scheduled_charges?: { product_id: string; schedule: { credit_type_id?: string; do_not_invoice?: boolean; recurring_schedule?: { amount_distribution: 'DIVIDED' | 'DIVIDED_ROUNDED' | 'EACH'; ending_before: string; frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL'; starting_at: string; amount?: number; quantity?: number; unit_price?: number; }; schedule_items?: { timestamp: string; amount?: number; quantity?: number; unit_price?: number; }[]; }; custom_fields?: object; name?: string; netsuite_sales_order_id?: string; }[]`\n\n- `total_contract_value?: number`\n This field's availability is dependent on your client's configuration.\n\n### Returns\n\n- `{ data: { id: string; }; }`\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst response = await client.v1.contracts.amend({\n contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',\n customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',\n starting_at: '2020-01-01T00:00:00.000Z',\n});\n\nconsole.log(response);\n```",
3868
3873
  perLanguage: {
3869
3874
  typescript: {
3870
3875
  method: 'client.v1.contracts.amend',
@@ -4173,7 +4178,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
4173
4178
  ],
4174
4179
  response: 'object | object',
4175
4180
  markdown:
4176
- "## list_balances\n\n`client.v1.contracts.listBalances(customer_id: string, id?: string, covering_date?: string, effective_before?: string, exclude_zero_balances?: boolean, include_archived?: boolean, include_balance?: boolean, include_contract_balances?: boolean, include_ledgers?: boolean, limit?: number, next_page?: string, starting_at?: string): object | object`\n\n**post** `/v1/contracts/customerBalances/list`\n\nRetrieve a comprehensive view of all available balances (commits and credits) for a customer. This endpoint provides real-time visibility into prepaid funds, postpaid commitments, promotional credits, and other balance types that can offset usage charges, helping you build transparent billing experiences.\n\n### Use this endpoint to:\n- Display current available balances in customer dashboards\n- Verify available funds before approving high-usage operations\n- Generate balance reports for finance teams\n- Filter balances by contract or date ranges\n\n### Key response fields:\nAn array of balance objects (all credits and commits) containing:\n\n- Balance details: Current available amount for each commit or credit\n- Metadata: Product associations, priorities, applicable date ranges\n- Optional ledger entries: Detailed transaction history (if `include_ledgers=true`)\n- Balance calculations: Including pending transactions and future-dated entries\n- Custom fields: Any additional metadata attached to balances\n\n### Usage guidelines:\n- Use the [getNetBalance](https://docs.metronome.com/api-reference/credits-and-commits/get-the-net-balance-of-a-customer) endpoint to retrieve a single combined current balance\n- Date filtering: Use `effective_before` to include only balances with access before a specific date (exclusive)\n- Set `include_balance=true` for calculated balance amounts on each commit or credit\n- Set `include_ledgers=true` for full transaction history\n- Set `include_contract_balances = true` to see contract level balances\n- Balance logic: Reflects currently accessible amounts, excluding expired/future segments\n- Manual adjustments: Includes all manual ledger entries, even future-dated ones\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `id?: string`\n\n- `covering_date?: string`\n Return only balances that have access schedules that \"cover\" the provided date\n\n- `effective_before?: string`\n Include only balances that have any access before the provided date (exclusive)\n\n- `exclude_zero_balances?: boolean`\n Exclude balances with zero amounts from the response.\n\n- `include_archived?: boolean`\n Include archived credits and credits from archived contracts.\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower.\n\n- `include_contract_balances?: boolean`\n Include balances on the contract level.\n\n- `include_ledgers?: boolean`\n Include ledgers in the response. Setting this flag may cause the query to be slower.\n\n- `limit?: number`\n The maximum number of commits to return. Defaults to 25.\n\n- `next_page?: string`\n The next page token from a previous response.\n\n- `starting_at?: string`\n Include only balances that have any access on or after the provided date\n\n### Returns\n\n- `{ id: string; created_at: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: object; amount?: number; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_contract?: { id: string; }; invoice_schedule?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: { commit_id: string; contract_id: string; }; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: object[]; subscription_config?: { allocation?: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config?: object; subscription_id?: string; }; uniqueness_key?: string; } | { id: string; product: { id: string; name: string; }; type: 'CREDIT'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CREDITED'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'CREDIT_MANUAL'; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'CREDIT_ROLLOVER'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_credit_id?: string; rolled_over_from?: { contract_id: string; credit_id: string; }; salesforce_opportunity_id?: string; specifiers?: object[]; subscription_config?: { allocation?: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config?: object; subscription_id?: string; }; uniqueness_key?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\n// Automatically fetches more pages as needed.\nfor await (const contractListBalancesResponse of client.v1.contracts.listBalances({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' })) {\n console.log(contractListBalancesResponse);\n}\n```",
4181
+ "## list_balances\n\n`client.v1.contracts.listBalances(customer_id: string, id?: string, covering_date?: string, effective_before?: string, exclude_zero_balances?: boolean, include_archived?: boolean, include_balance?: boolean, include_contract_balances?: boolean, include_ledgers?: boolean, limit?: number, next_page?: string, starting_at?: string): object | object`\n\n**post** `/v1/contracts/customerBalances/list`\n\nRetrieve a comprehensive view of all available balances (commits and credits) for a customer. This endpoint provides real-time visibility into prepaid funds, postpaid commitments, promotional credits, and other balance types that can offset usage charges, helping you build transparent billing experiences.\n\n### Use this endpoint to:\n- Display current available balances in customer dashboards\n- Verify available funds before approving high-usage operations\n- Generate balance reports for finance teams\n- Filter balances by contract or date ranges\n\n### Key response fields:\nAn array of balance objects (all credits and commits) containing:\n\n- Balance details: Current available amount for each commit or credit\n- Metadata: Product associations, priorities, applicable date ranges\n- Optional ledger entries: Detailed transaction history (if `include_ledgers=true`)\n- Balance calculations: Including pending transactions and future-dated entries\n- Custom fields: Any additional metadata attached to balances\n\n### Usage guidelines:\n- Use the [getNetBalance](https://docs.metronome.com/api-reference/credits-and-commits/get-the-net-balance-of-a-customer) endpoint to retrieve a single combined current balance\n- Date filtering: Use `effective_before` to include only balances with access before a specific date (exclusive)\n- Set `include_balance=true` for calculated balance amounts on each commit or credit\n- Set `include_ledgers=true` for full transaction history\n- Set `include_contract_balances = true` to see contract level balances\n- Balance logic: Reflects currently accessible amounts, excluding expired/future segments\n- Manual adjustments: Includes all manual ledger entries, even future-dated ones\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `id?: string`\n\n- `covering_date?: string`\n Return only balances that have access schedules that \"cover\" the provided date\n\n- `effective_before?: string`\n Include only balances that have any access before the provided date (exclusive)\n\n- `exclude_zero_balances?: boolean`\n Exclude balances with zero amounts from the response.\n\n- `include_archived?: boolean`\n Include archived credits and credits from archived contracts.\n\n- `include_balance?: boolean`\n Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower.\n\n- `include_contract_balances?: boolean`\n Include balances on the contract level.\n\n- `include_ledgers?: boolean`\n Include ledgers in the response. Setting this flag may cause the query to be slower.\n\n- `limit?: number`\n The maximum number of commits to return. Defaults to 25.\n\n- `next_page?: string`\n The next page token from a previous response.\n\n- `starting_at?: string`\n Include only balances that have any access on or after the provided date\n\n### Returns\n\n- `{ id: string; created_at: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: object; amount?: number; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; archived_at?: string; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: object; invoice_contract?: { id: string; }; invoice_schedule?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_ROLLOVER'; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_CREDITED'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_INITIAL_BALANCE'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'POSTPAID_COMMIT_ROLLOVER'; } | { amount: number; invoice_id: string; timestamp: string; type: 'POSTPAID_COMMIT_TRUEUP'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'PREPAID_COMMIT_MANUAL'; } | { amount: number; reason: string; timestamp: string; type: 'POSTPAID_COMMIT_MANUAL'; } | { amount: number; timestamp: string; type: 'POSTPAID_COMMIT_EXPIRATION'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_commit_id?: string; rolled_over_from?: { commit_id: string; contract_id: string; }; rollover_fraction?: number; salesforce_opportunity_id?: string; specifiers?: object[]; spend_tracker_attributes?: { counts_as_discounted: boolean; }; subscription_config?: { allocation?: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config?: object; subscription_id?: string; }; uniqueness_key?: string; } | { id: string; product: { id: string; name: string; }; type: 'CREDIT'; access_schedule?: object; applicable_contract_ids?: string[]; applicable_product_ids?: string[]; applicable_product_tags?: string[]; balance?: number; contract?: { id: string; }; custom_fields?: object; description?: string; hierarchy_configuration?: object; ledger?: { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEGMENT_START'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION'; contract_id?: string; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_EXPIRATION'; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CANCELED'; contract_id?: string; } | { amount: number; invoice_id: string; segment_id: string; timestamp: string; type: 'CREDIT_CREDITED'; contract_id?: string; } | { amount: number; reason: string; timestamp: string; type: 'CREDIT_MANUAL'; } | { amount: number; segment_id: string; timestamp: string; type: 'CREDIT_SEAT_BASED_ADJUSTMENT'; } | { amount: number; new_contract_id: string; segment_id: string; timestamp: string; type: 'CREDIT_ROLLOVER'; }[]; name?: string; netsuite_sales_order_id?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurring_credit_id?: string; rolled_over_from?: { contract_id: string; credit_id: string; }; salesforce_opportunity_id?: string; specifiers?: object[]; subscription_config?: { allocation?: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config?: object; subscription_id?: string; }; uniqueness_key?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\n// Automatically fetches more pages as needed.\nfor await (const contractListBalancesResponse of client.v1.contracts.listBalances({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' })) {\n console.log(contractListBalancesResponse);\n}\n```",
4177
4182
  perLanguage: {
4178
4183
  typescript: {
4179
4184
  method: 'client.v1.contracts.listBalances',
@@ -5485,21 +5490,22 @@ const EMBEDDED_METHODS: MethodEntry[] = [
5485
5490
  "multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';",
5486
5491
  'net_payment_terms_days?: number;',
5487
5492
  "overrides?: { override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[];",
5488
- "prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; }; };",
5493
+ "prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; threshold_balance_specifiers?: { exclude: { custom_field_filters: object[]; }[]; }[]; };",
5489
5494
  'rate_card_alias?: string;',
5490
5495
  'rate_card_id?: string;',
5491
5496
  "recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[];",
5492
5497
  "recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[];",
5493
5498
  "scheduled_charges?: { product_id: string; schedule: { schedule_items: { date_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; quantity: number; unit_price: number; }[]; credit_type_id?: string; }; custom_fields?: object; name?: string; }[];",
5494
5499
  "scheduled_charges_on_usage_invoices?: 'ALL';",
5495
- "spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; }; };",
5500
+ "spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; };",
5501
+ "spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[];",
5496
5502
  "subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; initial_unassigned_seats?: number; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; temporary_id?: string; }[];",
5497
5503
  'uniqueness_key?: string;',
5498
5504
  "usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; invoice_generation_starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; };",
5499
5505
  ],
5500
5506
  response: '{ data: { id: string; }; }',
5501
5507
  markdown:
5502
- "## create\n\n`client.v1.packages.create(name: string, aliases?: { name: string; ending_before?: string; starting_at?: string; }[], billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite', commits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; type: 'PREPAID' | 'POSTPAID'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { schedule_items: object[]; credit_type_id?: string; do_not_invoice?: boolean; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; temporary_id?: string; }[], contract_name?: string, credits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: object[]; }[], delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns', duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }, multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT', net_payment_terms_days?: number, overrides?: { override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[], prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; }, rate_card_alias?: string, rate_card_id?: string, recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[], recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[], scheduled_charges?: { product_id: string; schedule: { schedule_items: object[]; credit_type_id?: string; }; custom_fields?: object; name?: string; }[], scheduled_charges_on_usage_invoices?: 'ALL', spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }, subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; initial_unassigned_seats?: number; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; temporary_id?: string; }[], uniqueness_key?: string, usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; invoice_generation_starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }): { data: id; }`\n\n**post** `/v1/packages/create`\n\nCreate a package that defines a set of reusable, time-relative contract terms that can be used across cohorts of customers. Packages provide an abstraction layer on top of rate cards to provide an easy way to provision customers with standard pricing. \n\n### **Use this endpoint to:**\n- Model standard pay-as-you-go pricing packages that can be easily reused across customers\n- Define standardized contract terms and discounting for sales-led motions\n- Set aliases for the package to facilitate easy package transition. Aliases are human-readable names that you can use in the place of the id of the package when provisioning a customer’s contract. By using an alias, you can easily create a contract and provision a customer by choosing the “Starter Plan” package, without storing the package ID in your internal systems. This is helpful when launching terms for a package, as you can create a new package with the “Starter Plan” alias scheduled to be assigned without updating your provisioning code.\n\n### Key input fields:\n- `starting_at_offset`: Starting date relative to contract start. Generates the `starting_at` date when a contract is provisioned using a package.\n- `duration`: Duration starting from `starting_at_offset`. Generates the `ending_before` date when a contract is provisioned using a package.\n- `date_offset`: Date relative to contract start. Used for point-in-time dates without a duration.\n- `aliases`: Human-readable name to use when provisioning contracts with a package.\n\n### Usage guidelines:\n- Use packages for standard self-serve use cases where customers have consistent terms. For customers with negotiated custom contract terms, use the `createContract` endpoint for maximum flexibility.\n- Billing provider configuration can be set when creating a package by using `billing_provider` and `delivery_method`. To provision a customer successfully with a package, the customer must have one and only one billing provider configuration that matches the billing provider configuration set on the package.\n- A package alias can only be used by one package at a time. If you create a new package with an alias that is already in use by another package, the original package’s alias schedule will be updated. The alias will reference the package to which it was most recently assigned.\n- Terms can only be specified using times relative to the contract start date. Supported granularities are: `days`, `weeks`, `months`, `years`\n- Packages cannot be edited once created. Use the rate card to easily add new rates across all of your customers or make direct edits to a contract after provisioning with a package. Edited contracts will still be associated with the package used during provisioning.\n\n\n### Parameters\n\n- `name: string`\n\n- `aliases?: { name: string; ending_before?: string; starting_at?: string; }[]`\n Reference this alias when creating a contract. If the same alias is assigned to multiple packages, it will reference the package to which it was most recently assigned. It is not exposed to end customers.\n\n- `billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite'`\n\n- `commits?: { access_schedule: { schedule_items: { amount: number; duration: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; credit_type_id?: string; }; product_id: string; type: 'PREPAID' | 'POSTPAID'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { schedule_items: { date_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; quantity: number; unit_price: number; }[]; credit_type_id?: string; do_not_invoice?: boolean; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; temporary_id?: string; }[]`\n\n- `contract_name?: string`\n\n- `credits?: { access_schedule: { schedule_items: { amount: number; duration: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n\n- `delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'`\n\n- `duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }`\n - `unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'`\n - `value: number`\n\n- `multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'`\n Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list prices automatically. EXPLICIT prioritization requires specifying priorities for each multiplier; the one with the lowest priority value will be prioritized first. If tiered overrides are used, prioritization must be explicit.\n\n- `net_payment_terms_days?: number`\n\n- `overrides?: { override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n\n- `prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; }; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `recharge_to_amount: number`\n Specify the amount the balance should be recharged to.\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's prepaid balance lowers to this amount, a threshold charge will be initiated.\n - `custom_credit_type_id?: string`\n If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.\n - `discount_configuration?: { payment_fraction: number; }`\n\n- `rate_card_alias?: string`\n Selects the rate card linked to the specified alias as of the contract's start date.\n\n- `rate_card_id?: string`\n\n- `recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[]`\n\n- `recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[]`\n\n- `scheduled_charges?: { product_id: string; schedule: { schedule_items: { date_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; quantity: number; unit_price: number; }[]; credit_type_id?: string; }; custom_fields?: object; name?: string; }[]`\n\n- `scheduled_charges_on_usage_invoices?: 'ALL'`\n Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.\n\n- `spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; }; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.\n - `discount_configuration?: { payment_fraction: number; }`\n\n- `subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; initial_unassigned_seats?: number; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; temporary_id?: string; }[]`\n\n- `uniqueness_key?: string`\n Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.\n\n- `usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; invoice_generation_starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }`\n - `frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'`\n - `day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'`\n If not provided, defaults to the first day of the month.\n - `invoice_generation_starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }`\n The offset at which Metronome should start generating usage invoices, relative to the contract start date. If unspecified, contract start date will be used. This is useful to set if you want to import historical invoices via our 'Create Historical Invoices' API rather than having Metronome automatically generate them.\n\n### Returns\n\n- `{ data: { id: string; }; }`\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst _package = await client.v1.packages.create({ name: 'My package' });\n\nconsole.log(_package);\n```",
5508
+ "## create\n\n`client.v1.packages.create(name: string, aliases?: { name: string; ending_before?: string; starting_at?: string; }[], billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite', commits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; type: 'PREPAID' | 'POSTPAID'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { schedule_items: object[]; credit_type_id?: string; do_not_invoice?: boolean; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; temporary_id?: string; }[], contract_name?: string, credits?: { access_schedule: { schedule_items: object[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: object[]; }[], delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns', duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }, multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT', net_payment_terms_days?: number, overrides?: { override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[], prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }, rate_card_alias?: string, rate_card_id?: string, recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[], recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { apply_seat_increase_config: object; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[], scheduled_charges?: { product_id: string; schedule: { schedule_items: object[]; credit_type_id?: string; }; custom_fields?: object; name?: string; }[], scheduled_charges_on_usage_invoices?: 'ALL', spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }, spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[], subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; initial_unassigned_seats?: number; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; temporary_id?: string; }[], uniqueness_key?: string, usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; invoice_generation_starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }): { data: id; }`\n\n**post** `/v1/packages/create`\n\nCreate a package that defines a set of reusable, time-relative contract terms that can be used across cohorts of customers. Packages provide an abstraction layer on top of rate cards to provide an easy way to provision customers with standard pricing. \n\n### **Use this endpoint to:**\n- Model standard pay-as-you-go pricing packages that can be easily reused across customers\n- Define standardized contract terms and discounting for sales-led motions\n- Set aliases for the package to facilitate easy package transition. Aliases are human-readable names that you can use in the place of the id of the package when provisioning a customer’s contract. By using an alias, you can easily create a contract and provision a customer by choosing the “Starter Plan” package, without storing the package ID in your internal systems. This is helpful when launching terms for a package, as you can create a new package with the “Starter Plan” alias scheduled to be assigned without updating your provisioning code.\n\n### Key input fields:\n- `starting_at_offset`: Starting date relative to contract start. Generates the `starting_at` date when a contract is provisioned using a package.\n- `duration`: Duration starting from `starting_at_offset`. Generates the `ending_before` date when a contract is provisioned using a package.\n- `date_offset`: Date relative to contract start. Used for point-in-time dates without a duration.\n- `aliases`: Human-readable name to use when provisioning contracts with a package.\n\n### Usage guidelines:\n- Use packages for standard self-serve use cases where customers have consistent terms. For customers with negotiated custom contract terms, use the `createContract` endpoint for maximum flexibility.\n- Billing provider configuration can be set when creating a package by using `billing_provider` and `delivery_method`. To provision a customer successfully with a package, the customer must have one and only one billing provider configuration that matches the billing provider configuration set on the package.\n- A package alias can only be used by one package at a time. If you create a new package with an alias that is already in use by another package, the original package’s alias schedule will be updated. The alias will reference the package to which it was most recently assigned.\n- Terms can only be specified using times relative to the contract start date. Supported granularities are: `days`, `weeks`, `months`, `years`\n- Packages cannot be edited once created. Use the rate card to easily add new rates across all of your customers or make direct edits to a contract after provisioning with a package. Edited contracts will still be associated with the package used during provisioning.\n\n\n### Parameters\n\n- `name: string`\n\n- `aliases?: { name: string; ending_before?: string; starting_at?: string; }[]`\n Reference this alias when creating a contract. If the same alias is assigned to multiple packages, it will reference the package to which it was most recently assigned. It is not exposed to end customers.\n\n- `billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite'`\n\n- `commits?: { access_schedule: { schedule_items: { amount: number; duration: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; credit_type_id?: string; }; product_id: string; type: 'PREPAID' | 'POSTPAID'; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { schedule_items: { date_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; quantity: number; unit_price: number; }[]; credit_type_id?: string; do_not_invoice?: boolean; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; temporary_id?: string; }[]`\n\n- `contract_name?: string`\n\n- `credits?: { access_schedule: { schedule_items: { amount: number; duration: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; credit_type_id?: string; }; product_id: string; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n\n- `delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'`\n\n- `duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }`\n - `unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'`\n - `value: number`\n\n- `multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'`\n Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list prices automatically. EXPLICIT prioritization requires specifying priorities for each multiplier; the one with the lowest priority value will be prioritized first. If tiered overrides are used, prioritization must be explicit.\n\n- `net_payment_terms_days?: number`\n\n- `overrides?: { override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type_id?: string; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: { price: number; size?: number; }[]; }; priority?: number; target?: 'COMMIT_RATE' | 'LIST_RATE'; tiers?: { multiplier: number; size?: number; }[]; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n\n- `prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; threshold_balance_specifiers?: { exclude: { custom_field_filters: object[]; }[]; }[]; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `recharge_to_amount: number`\n Specify the amount the balance should be recharged to.\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's prepaid balance lowers to this amount, a threshold charge will be initiated.\n - `custom_credit_type_id?: string`\n If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.\n - `discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }`\n - `threshold_balance_specifiers?: { exclude: { custom_field_filters: { entity: 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit'; key: string; value: string; }[]; }[]; }[]`\n\n- `rate_card_alias?: string`\n Selects the rate card linked to the specified alias as of the contract's start date.\n\n- `rate_card_id?: string`\n\n- `recurring_commits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[]`\n\n- `recurring_credits?: { access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product_id: string; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { apply_seat_increase_config: { is_prorated: boolean; }; subscription_id: string; allocation?: 'INDIVIDUAL' | 'POOLED'; }; temporary_id?: string; }[]`\n\n- `scheduled_charges?: { product_id: string; schedule: { schedule_items: { date_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; quantity: number; unit_price: number; }[]; credit_type_id?: string; }; custom_fields?: object; name?: string; }[]`\n\n- `scheduled_charges_on_usage_invoices?: 'ALL'`\n Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges.\n\n- `spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; }`\n - `commit: { product_id: string; description?: string; name?: string; priority?: number; }`\n - `is_enabled: boolean`\n When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.\n - `payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: { tax_amount: number; tax_name?: string; }; stripe_config?: { payment_type: 'INVOICE' | 'PAYMENT_INTENT'; invoice_metadata?: object; }; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }`\n - `threshold_amount: number`\n Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.\n - `discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }`\n\n- `spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[]`\n\n- `subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated?: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product_id: string; }; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; initial_unassigned_seats?: number; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; temporary_id?: string; }[]`\n\n- `uniqueness_key?: string`\n Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.\n\n- `usage_statement_schedule?: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; invoice_generation_starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }`\n - `frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'`\n - `day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'`\n If not provided, defaults to the first day of the month.\n - `invoice_generation_starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }`\n The offset at which Metronome should start generating usage invoices, relative to the contract start date. If unspecified, contract start date will be used. This is useful to set if you want to import historical invoices via our 'Create Historical Invoices' API rather than having Metronome automatically generate them.\n\n### Returns\n\n- `{ data: { id: string; }; }`\n\n - `data: { id: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst _package = await client.v1.packages.create({ name: 'My package' });\n\nconsole.log(_package);\n```",
5503
5509
  perLanguage: {
5504
5510
  typescript: {
5505
5511
  method: 'client.v1.packages.create',
@@ -5543,9 +5549,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
5543
5549
  qualified: 'client.v1.packages.retrieve',
5544
5550
  params: ['package_id: string;'],
5545
5551
  response:
5546
- "{ data: { id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; usage_statement_schedule: object; aliases?: object[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: object[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; subscriptions?: object[]; uniqueness_key?: string; }; }",
5552
+ "{ data: { id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; usage_statement_schedule: object; aliases?: object[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: object[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; subscriptions?: object[]; uniqueness_key?: string; }; }",
5547
5553
  markdown:
5548
- "## retrieve\n\n`client.v1.packages.retrieve(package_id: string): { data: object; }`\n\n**post** `/v1/packages/get`\n\nGets the details for a specific package, including name, aliases, duration, and terms. Use this endpoint to understand a package’s alias schedule, or display a specific package’s details to end customers.\n\n\n### Parameters\n\n- `package_id: string`\n\n### Returns\n\n- `{ data: { id: string; commits: { id: string; product: object; type: 'PREPAID' | 'POSTPAID'; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: object; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: commit_specifier[]; }[]; created_at: string; created_by: string; overrides: { id: string; override_specifiers: object[]; starting_at_offset: object; applicable_product_tags?: string[]; duration?: object; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_tiers?: override_tier[]; overwrite_rate?: overwrite_rate; priority?: number; product?: object; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: object; schedule: object; custom_fields?: object; description?: string; name?: string; }[]; usage_statement_schedule: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; }; aliases?: { name: string; ending_before?: string; starting_at?: string; }[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: { id: string; product: object; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: commit_specifier[]; }[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: object; rate_card_id?: string; recurring_commits?: { id: string; access_amount: object; commit_duration: object; priority: number; product: object; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: object; invoice_amount?: object; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: commit_specifier[]; subscription_config?: object; }[]; recurring_credits?: { id: string; access_amount: object; commit_duration: object; priority: number; product: object; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: object; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: commit_specifier[]; subscription_config?: object; }[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: object; subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: object; subscription_rate: object; id?: string; custom_fields?: object; description?: string; duration?: object; fiat_credit_type_id?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: object; starting_at_offset?: object; }[]; uniqueness_key?: string; }; }`\n\n - `data: { id: string; commits: { id: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { credit_type: object; schedule_items: { id: string; amount: number; duration: object; starting_at_offset: object; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { credit_type: object; do_not_invoice: boolean; schedule_items: { id: string; date_offset: object; quantity: number; unit_price: number; }[]; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; created_at: string; created_by: string; overrides: { id: string; override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_template_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_template_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_tags?: string[]; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_tiers?: { multiplier: number; size?: number; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: credit_type_data; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: { id: string; name: string; }; schedule: { credit_type: object; schedule_items: { id: string; date_offset: object; quantity: number; unit_price: number; }[]; }; custom_fields?: object; description?: string; name?: string; }[]; usage_statement_schedule: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; }; aliases?: { name: string; ending_before?: string; starting_at?: string; }[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: { id: string; product: { id: string; name: string; }; access_schedule?: { credit_type: object; schedule_items: { id: string; amount: number; duration: object; starting_at_offset: object; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: { commit: object; is_enabled: boolean; payment_gate_config: object; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; }; }; rate_card_id?: string; recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: { is_prorated: boolean; }; subscription_template_id: string; }; }[]; recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: { is_prorated: boolean; }; subscription_template_id: string; }; }[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: object; is_enabled: boolean; payment_gate_config: object; threshold_amount: number; discount_configuration?: { payment_fraction: number; }; }; subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: { id: string; name: string; }; }; id?: string; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; fiat_credit_type_id?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; uniqueness_key?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst _package = await client.v1.packages.retrieve({ package_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' });\n\nconsole.log(_package);\n```",
5554
+ "## retrieve\n\n`client.v1.packages.retrieve(package_id: string): { data: object; }`\n\n**post** `/v1/packages/get`\n\nGets the details for a specific package, including name, aliases, duration, and terms. Use this endpoint to understand a package’s alias schedule, or display a specific package’s details to end customers.\n\n\n### Parameters\n\n- `package_id: string`\n\n### Returns\n\n- `{ data: { id: string; commits: { id: string; product: object; type: 'PREPAID' | 'POSTPAID'; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: object; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: commit_specifier[]; }[]; created_at: string; created_by: string; overrides: { id: string; override_specifiers: object[]; starting_at_offset: object; applicable_product_tags?: string[]; duration?: object; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_tiers?: override_tier[]; overwrite_rate?: overwrite_rate; priority?: number; product?: object; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: object; schedule: object; custom_fields?: object; description?: string; name?: string; }[]; usage_statement_schedule: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; }; aliases?: { name: string; ending_before?: string; starting_at?: string; }[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: { id: string; product: object; access_schedule?: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: commit_specifier[]; }[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: object; rate_card_id?: string; recurring_commits?: { id: string; access_amount: object; commit_duration: object; priority: number; product: object; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: object; invoice_amount?: object; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: commit_specifier[]; subscription_config?: object; }[]; recurring_credits?: { id: string; access_amount: object; commit_duration: object; priority: number; product: object; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: object; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: object; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: commit_specifier[]; subscription_config?: object; }[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: object; spend_trackers?: { alias: string; applicable_spend_specifiers: object[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[]; subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: object; subscription_rate: object; id?: string; custom_fields?: object; description?: string; duration?: object; fiat_credit_type_id?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: object; starting_at_offset?: object; }[]; uniqueness_key?: string; }; }`\n\n - `data: { id: string; commits: { id: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { credit_type: object; schedule_items: { id: string; amount: number; duration: object; starting_at_offset: object; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { credit_type: object; do_not_invoice: boolean; schedule_items: { id: string; date_offset: object; quantity: number; unit_price: number; }[]; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; created_at: string; created_by: string; overrides: { id: string; override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_template_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_template_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_tags?: string[]; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_tiers?: { multiplier: number; size?: number; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: credit_type_data; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: tier[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: { id: string; name: string; }; schedule: { credit_type: object; schedule_items: { id: string; date_offset: object; quantity: number; unit_price: number; }[]; }; custom_fields?: object; description?: string; name?: string; }[]; usage_statement_schedule: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; }; aliases?: { name: string; ending_before?: string; starting_at?: string; }[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: { id: string; product: { id: string; name: string; }; access_schedule?: { credit_type: object; schedule_items: { id: string; amount: number; duration: object; starting_at_offset: object; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: { commit: object; is_enabled: boolean; payment_gate_config: object; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; cap?: object; }; threshold_balance_specifiers?: { exclude: object[]; }[]; }; rate_card_id?: string; recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: { is_prorated: boolean; }; subscription_template_id: string; }; }[]; recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: { is_prorated: boolean; }; subscription_template_id: string; }; }[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: object; is_enabled: boolean; payment_gate_config: object; threshold_amount: number; discount_configuration?: { payment_fraction: number; cap?: object; }; }; spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[]; subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: { id: string; name: string; }; }; id?: string; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; fiat_credit_type_id?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; uniqueness_key?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst _package = await client.v1.packages.retrieve({ package_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' });\n\nconsole.log(_package);\n```",
5549
5555
  perLanguage: {
5550
5556
  typescript: {
5551
5557
  method: 'client.v1.packages.retrieve',
@@ -5593,9 +5599,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
5593
5599
  "archive_filter?: 'ARCHIVED' | 'NOT_ARCHIVED' | 'ALL';",
5594
5600
  ],
5595
5601
  response:
5596
- "{ id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; usage_statement_schedule: object; aliases?: object[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: object[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; subscriptions?: object[]; uniqueness_key?: string; }",
5602
+ "{ id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; usage_statement_schedule: object; aliases?: object[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: object[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; subscriptions?: object[]; uniqueness_key?: string; }",
5597
5603
  markdown:
5598
- "## list\n\n`client.v1.packages.list(limit?: number, next_page?: string, archive_filter?: 'ARCHIVED' | 'NOT_ARCHIVED' | 'ALL'): { id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; usage_statement_schedule: object; aliases?: object[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: object[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; subscriptions?: object[]; uniqueness_key?: string; }`\n\n**post** `/v1/packages/list`\n\nLists all packages with details including name, aliases, duration, and terms. To view contracts on a specific package, use the `listContractsOnPackage` endpoint.\n\n\n### Parameters\n\n- `limit?: number`\n The maximum number of packages to return. Defaults to 10.\n\n- `next_page?: string`\n Cursor that indicates where the next page of results should start.\n\n- `archive_filter?: 'ARCHIVED' | 'NOT_ARCHIVED' | 'ALL'`\n Filter packages by archived status. Defaults to NOT_ARCHIVED.\n\n### Returns\n\n- `{ id: string; commits: { id: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { credit_type: credit_type_data; schedule_items: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { credit_type: credit_type_data; do_not_invoice: boolean; schedule_items: object[]; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; }[]; created_at: string; created_by: string; overrides: { id: string; override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_template_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_template_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_tags?: string[]; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_tiers?: object[]; overwrite_rate?: object; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: { id: string; name: string; }; schedule: { credit_type: credit_type_data; schedule_items: object[]; }; custom_fields?: object; description?: string; name?: string; }[]; usage_statement_schedule: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; }; aliases?: { name: string; ending_before?: string; starting_at?: string; }[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: { id: string; product: { id: string; name: string; }; access_schedule?: { credit_type: credit_type_data; schedule_items: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: object[]; }[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; }; rate_card_id?: string; recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: object; subscription_template_id: string; }; }[]; recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: object; subscription_template_id: string; }; }[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }; subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: object; }; id?: string; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; fiat_credit_type_id?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; uniqueness_key?: string; }`\n\n - `id: string`\n - `commits: { id: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { credit_type: { id: string; name: string; }; schedule_items: { id: string; amount: number; duration: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { credit_type: { id: string; name: string; }; do_not_invoice: boolean; schedule_items: { id: string; date_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; quantity: number; unit_price: number; }[]; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n - `created_at: string`\n - `created_by: string`\n - `overrides: { id: string; override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_template_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_template_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_tags?: string[]; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_tiers?: { multiplier: number; size?: number; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: object; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: object[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n - `scheduled_charges: { id: string; product: { id: string; name: string; }; schedule: { credit_type: { id: string; name: string; }; schedule_items: { id: string; date_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; quantity: number; unit_price: number; }[]; }; custom_fields?: object; description?: string; name?: string; }[]`\n - `usage_statement_schedule: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; }`\n - `aliases?: { name: string; ending_before?: string; starting_at?: string; }[]`\n - `archived_at?: string`\n - `billing_provider?: string`\n - `contract_name?: string`\n - `credits?: { id: string; product: { id: string; name: string; }; access_schedule?: { credit_type: { id: string; name: string; }; schedule_items: { id: string; amount: number; duration: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n - `delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'`\n - `duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }`\n - `multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'`\n - `name?: string`\n - `net_payment_terms_days?: number`\n - `prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; }; }`\n - `rate_card_id?: string`\n - `recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: { is_prorated: boolean; }; subscription_template_id: string; }; }[]`\n - `recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: { is_prorated: boolean; }; subscription_template_id: string; }; }[]`\n - `scheduled_charges_on_usage_invoices?: 'ALL'`\n - `spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; }; }`\n - `subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: { id: string; name: string; }; }; id?: string; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; fiat_credit_type_id?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]`\n - `uniqueness_key?: string`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\n// Automatically fetches more pages as needed.\nfor await (const packageListResponse of client.v1.packages.list()) {\n console.log(packageListResponse);\n}\n```",
5604
+ "## list\n\n`client.v1.packages.list(limit?: number, next_page?: string, archive_filter?: 'ARCHIVED' | 'NOT_ARCHIVED' | 'ALL'): { id: string; commits: object[]; created_at: string; created_by: string; overrides: object[]; scheduled_charges: object[]; usage_statement_schedule: object; aliases?: object[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: object[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: object; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: prepaid_balance_threshold_configuration; rate_card_id?: string; recurring_commits?: object[]; recurring_credits?: object[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: spend_threshold_configuration; spend_trackers?: object[]; subscriptions?: object[]; uniqueness_key?: string; }`\n\n**post** `/v1/packages/list`\n\nLists all packages with details including name, aliases, duration, and terms. To view contracts on a specific package, use the `listContractsOnPackage` endpoint.\n\n\n### Parameters\n\n- `limit?: number`\n The maximum number of packages to return. Defaults to 10.\n\n- `next_page?: string`\n Cursor that indicates where the next page of results should start.\n\n- `archive_filter?: 'ARCHIVED' | 'NOT_ARCHIVED' | 'ALL'`\n Filter packages by archived status. Defaults to NOT_ARCHIVED.\n\n### Returns\n\n- `{ id: string; commits: { id: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { credit_type: credit_type_data; schedule_items: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { credit_type: credit_type_data; do_not_invoice: boolean; schedule_items: object[]; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: object[]; }[]; created_at: string; created_by: string; overrides: { id: string; override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_template_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_template_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_tags?: string[]; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_tiers?: object[]; overwrite_rate?: object; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]; scheduled_charges: { id: string; product: { id: string; name: string; }; schedule: { credit_type: credit_type_data; schedule_items: object[]; }; custom_fields?: object; description?: string; name?: string; }[]; usage_statement_schedule: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; }; aliases?: { name: string; ending_before?: string; starting_at?: string; }[]; archived_at?: string; billing_provider?: string; contract_name?: string; credits?: { id: string; product: { id: string; name: string; }; access_schedule?: { credit_type: credit_type_data; schedule_items: object[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: object[]; }[]; delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'; name?: string; net_payment_terms_days?: number; prepaid_balance_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: object; threshold_balance_specifiers?: object[]; }; rate_card_id?: string; recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: object; subscription_template_id: string; }; }[]; recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: object[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: object; subscription_template_id: string; }; }[]; scheduled_charges_on_usage_invoices?: 'ALL'; spend_threshold_configuration?: { commit: base_threshold_commit; is_enabled: boolean; payment_gate_config: payment_gate_config; threshold_amount: number; discount_configuration?: object; }; spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[]; subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: object; }; id?: string; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; fiat_credit_type_id?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; uniqueness_key?: string; }`\n\n - `id: string`\n - `commits: { id: string; product: { id: string; name: string; }; type: 'PREPAID' | 'POSTPAID'; access_schedule?: { credit_type: { id: string; name: string; }; schedule_items: { id: string; amount: number; duration: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; invoice_schedule?: { credit_type: { id: string; name: string; }; do_not_invoice: boolean; schedule_items: { id: string; date_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; quantity: number; unit_price: number; }[]; }; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n - `created_at: string`\n - `created_by: string`\n - `overrides: { id: string; override_specifiers: { billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; commit_template_ids?: string[]; presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; recurring_commit_template_ids?: string[]; }[]; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_tags?: string[]; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; entitled?: boolean; is_commit_specific?: boolean; multiplier?: number; override_tiers?: { multiplier: number; size?: number; }[]; overwrite_rate?: { rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'TIERED_PERCENTAGE' | 'CUSTOM'; credit_type?: object; custom_rate?: object; is_prorated?: boolean; price?: number; quantity?: number; tiers?: object[]; }; priority?: number; product?: { id: string; name: string; }; target?: 'COMMIT_RATE' | 'LIST_RATE'; type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED'; }[]`\n - `scheduled_charges: { id: string; product: { id: string; name: string; }; schedule: { credit_type: { id: string; name: string; }; schedule_items: { id: string; date_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; quantity: number; unit_price: number; }[]; }; custom_fields?: object; description?: string; name?: string; }[]`\n - `usage_statement_schedule: { frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; day?: 'FIRST_OF_MONTH' | 'CONTRACT_START'; }`\n - `aliases?: { name: string; ending_before?: string; starting_at?: string; }[]`\n - `archived_at?: string`\n - `billing_provider?: string`\n - `contract_name?: string`\n - `credits?: { id: string; product: { id: string; name: string; }; access_schedule?: { credit_type: { id: string; name: string; }; schedule_items: { id: string; amount: number; duration: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; custom_fields?: object; description?: string; name?: string; priority?: number; rate_type?: 'COMMIT_RATE' | 'LIST_RATE'; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; }[]`\n - `delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns'`\n - `duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }`\n - `multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT'`\n - `name?: string`\n - `net_payment_terms_days?: number`\n - `prepaid_balance_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; recharge_to_amount: number; threshold_amount: number; custom_credit_type_id?: string; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; threshold_balance_specifiers?: { exclude: { custom_field_filters: object[]; }[]; }[]; }`\n - `rate_card_id?: string`\n - `recurring_commits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; invoice_amount?: { credit_type_id: string; quantity: number; unit_price: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: { is_prorated: boolean; }; subscription_template_id: string; }; }[]`\n - `recurring_credits?: { id: string; access_amount: { credit_type_id: string; unit_price: number; quantity?: number; }; commit_duration: { value: number; unit?: 'PERIODS'; }; priority: number; product: { id: string; name: string; }; rate_type: 'COMMIT_RATE' | 'LIST_RATE'; starting_at_offset: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; applicable_product_ids?: string[]; applicable_product_tags?: string[]; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; name?: string; proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST'; recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; rollover_fraction?: number; specifiers?: { presentation_group_values?: object; pricing_group_values?: object; product_id?: string; product_tags?: string[]; }[]; subscription_config?: { allocation: 'INDIVIDUAL' | 'POOLED'; apply_seat_increase_config: { is_prorated: boolean; }; subscription_template_id: string; }; }[]`\n - `scheduled_charges_on_usage_invoices?: 'ALL'`\n - `spend_threshold_configuration?: { commit: { product_id: string; description?: string; name?: string; priority?: number; }; is_enabled: boolean; payment_gate_config: { payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL'; precalculated_tax_config?: object; stripe_config?: object; tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED'; }; threshold_amount: number; discount_configuration?: { payment_fraction: number; cap?: { amount: number; spend_tracker_alias: string; }; }; }`\n - `spend_trackers?: { alias: string; applicable_spend_specifiers: { sources: 'THRESHOLD_RECHARGE' | 'MANUAL'[]; spend_type: 'COMMIT_PURCHASE'; discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY'; }[]; credit_type_id: string; reset_frequency: 'BILLING_PERIOD'; }[]`\n - `subscriptions?: { collection_schedule: 'ADVANCE' | 'ARREARS'; proration: { invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE'; is_prorated: boolean; }; subscription_rate: { billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY'; product: { id: string; name: string; }; }; id?: string; custom_fields?: object; description?: string; duration?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; fiat_credit_type_id?: string; initial_quantity?: number; name?: string; quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY'; seat_config?: { seat_group_key: string; }; starting_at_offset?: { unit: 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; value: number; }; }[]`\n - `uniqueness_key?: string`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\n// Automatically fetches more pages as needed.\nfor await (const packageListResponse of client.v1.packages.list()) {\n console.log(packageListResponse);\n}\n```",
5599
5605
  perLanguage: {
5600
5606
  typescript: {
5601
5607
  method: 'client.v1.packages.list',
@@ -5634,7 +5640,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
5634
5640
  httpMethod: 'post',
5635
5641
  summary: 'List contracts associated with a package',
5636
5642
  description:
5637
- 'For a given package, returns all contract IDs and customer IDs associated with the package over a specific time period. \n\n### Use this endpoint to:\n- Understand which customers are provisioned on a package at any given time for internal cohort management\n- Manage customer migrations to a new package. For example, to migrate all active customers to a new package, call this endpoint, end contracts, and provision customers on a new package.\n\n### **Usage guidelines:**\nUse the **`starting_at`**, **`covering_date`**, and **`include_archived`** parameters to filter the list of returned contracts. For example, to list only currently active contracts, pass **`covering_date`** equal to the current time.\n',
5643
+ 'For a given package, returns all contract IDs and customer IDs associated with the package over a specific time period. \n\n### Use this endpoint to:\n- Understand which customers are provisioned on a package at any given time for internal cohort management\n- Manage customer migrations to a new package. For example, to migrate all active customers to a new package, call this endpoint, end contracts, and provision customers on a new package.\n\n### **Usage guidelines:**\nUse the **`starting_at`**, **`covering_date`**, and **`include_archived`** parameters to filter the list of returned contracts. For example, to list only currently active contracts, pass **`covering_date`** equal to the current time.\n',
5638
5644
  stainlessPath: '(resource) v1.packages > (method) list_contracts_on_package',
5639
5645
  qualified: 'client.v1.packages.listContractsOnPackage',
5640
5646
  params: [
@@ -5648,7 +5654,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
5648
5654
  response:
5649
5655
  '{ contract_id: string; customer_id: string; starting_at: string; archived_at?: string; ending_before?: string; }',
5650
5656
  markdown:
5651
- "## list_contracts_on_package\n\n`client.v1.packages.listContractsOnPackage(package_id: string, limit?: number, next_page?: string, covering_date?: string, include_archived?: boolean, starting_at?: string): { contract_id: string; customer_id: string; starting_at: string; archived_at?: string; ending_before?: string; }`\n\n**post** `/v1/packages/listContractsOnPackage`\n\nFor a given package, returns all contract IDs and customer IDs associated with the package over a specific time period. \n\n### Use this endpoint to:\n- Understand which customers are provisioned on a package at any given time for internal cohort management\n- Manage customer migrations to a new package. For example, to migrate all active customers to a new package, call this endpoint, end contracts, and provision customers on a new package.\n\n### **Usage guidelines:**\nUse the **`starting_at`**, **`covering_date`**, and **`include_archived`** parameters to filter the list of returned contracts. For example, to list only currently active contracts, pass **`covering_date`** equal to the current time.\n\n\n### Parameters\n\n- `package_id: string`\n\n- `limit?: number`\n Max number of results that should be returned\n\n- `next_page?: string`\n Cursor that indicates where the next page of results should start.\n\n- `covering_date?: string`\n Optional RFC 3339 timestamp. Only include contracts active on the provided date. This cannot be provided if starting_at filter is provided.\n\n- `include_archived?: boolean`\n Default false. Determines whether to include archived contracts in the results\n\n- `starting_at?: string`\n Optional RFC 3339 timestamp. Only include contracts that started on or after this date. This cannot be provided if covering_date filter is provided.\n\n### Returns\n\n- `{ contract_id: string; customer_id: string; starting_at: string; archived_at?: string; ending_before?: string; }`\n\n - `contract_id: string`\n - `customer_id: string`\n - `starting_at: string`\n - `archived_at?: string`\n - `ending_before?: string`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\n// Automatically fetches more pages as needed.\nfor await (const packageListContractsOnPackageResponse of client.v1.packages.listContractsOnPackage({ package_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' })) {\n console.log(packageListContractsOnPackageResponse);\n}\n```",
5657
+ "## list_contracts_on_package\n\n`client.v1.packages.listContractsOnPackage(package_id: string, limit?: number, next_page?: string, covering_date?: string, include_archived?: boolean, starting_at?: string): { contract_id: string; customer_id: string; starting_at: string; archived_at?: string; ending_before?: string; }`\n\n**post** `/v1/packages/listContractsOnPackage`\n\nFor a given package, returns all contract IDs and customer IDs associated with the package over a specific time period. \n\n### Use this endpoint to:\n- Understand which customers are provisioned on a package at any given time for internal cohort management\n- Manage customer migrations to a new package. For example, to migrate all active customers to a new package, call this endpoint, end contracts, and provision customers on a new package.\n\n### **Usage guidelines:**\nUse the **`starting_at`**, **`covering_date`**, and **`include_archived`** parameters to filter the list of returned contracts. For example, to list only currently active contracts, pass **`covering_date`** equal to the current time.\n\n\n### Parameters\n\n- `package_id: string`\n\n- `limit?: number`\n Max number of results that should be returned\n\n- `next_page?: string`\n Cursor that indicates where the next page of results should start.\n\n- `covering_date?: string`\n Optional RFC 3339 timestamp. Only include contracts active on the provided date. This cannot be provided if starting_at filter is provided.\n\n- `include_archived?: boolean`\n Default false. Determines whether to include archived contracts in the results\n\n- `starting_at?: string`\n Optional RFC 3339 timestamp. Only include contracts that started on or after this date. This cannot be provided if covering_date filter is provided.\n\n### Returns\n\n- `{ contract_id: string; customer_id: string; starting_at: string; archived_at?: string; ending_before?: string; }`\n\n - `contract_id: string`\n - `customer_id: string`\n - `starting_at: string`\n - `archived_at?: string`\n - `ending_before?: string`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\n// Automatically fetches more pages as needed.\nfor await (const packageListContractsOnPackageResponse of client.v1.packages.listContractsOnPackage({ package_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' })) {\n console.log(packageListContractsOnPackageResponse);\n}\n```",
5652
5658
  perLanguage: {
5653
5659
  typescript: {
5654
5660
  method: 'client.v1.packages.listContractsOnPackage',
@@ -5726,148 +5732,6 @@ const EMBEDDED_METHODS: MethodEntry[] = [
5726
5732
  },
5727
5733
  },
5728
5734
  },
5729
- {
5730
- name: 'list',
5731
- endpoint: '/v1/payments/list',
5732
- httpMethod: 'post',
5733
- summary: 'List payments for an invoice',
5734
- description: 'Fetch all payment attempts for the given invoice.\n',
5735
- stainlessPath: '(resource) v1.payments > (method) list',
5736
- qualified: 'client.v1.payments.list',
5737
- params: [
5738
- 'customer_id: string;',
5739
- 'invoice_id: string;',
5740
- 'limit?: number;',
5741
- 'next_page?: string;',
5742
- "statuses?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'[];",
5743
- ],
5744
- response:
5745
- "{ id: string; amount?: number; amount_paid?: number; contract_id?: string; created_at?: string; customer_id?: string; error_message?: string; fiat_credit_type?: { id: string; name: string; }; invoice_id?: string; payment_gateway?: { stripe: { payment_intent_id: string; error?: object; payment_method_id?: string; }; type: 'stripe'; }; revenue_system_payments?: { revenue_system_provider: string; sync_status: string; error_message?: string; revenue_system_external_payment_id?: string; }[]; status?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'; updated_at?: string; }",
5746
- markdown:
5747
- "## list\n\n`client.v1.payments.list(customer_id: string, invoice_id: string, limit?: number, next_page?: string, statuses?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'[]): { id: string; amount?: number; amount_paid?: number; contract_id?: string; created_at?: string; customer_id?: string; error_message?: string; fiat_credit_type?: credit_type_data; invoice_id?: string; payment_gateway?: object; revenue_system_payments?: object[]; status?: payment_status; updated_at?: string; }`\n\n**post** `/v1/payments/list`\n\nFetch all payment attempts for the given invoice.\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `invoice_id: string`\n\n- `limit?: number`\n The maximum number of payments to return. Defaults to 25.\n\n- `next_page?: string`\n The next page token from a previous response.\n\n- `statuses?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'[]`\n\n### Returns\n\n- `{ id: string; amount?: number; amount_paid?: number; contract_id?: string; created_at?: string; customer_id?: string; error_message?: string; fiat_credit_type?: { id: string; name: string; }; invoice_id?: string; payment_gateway?: { stripe: { payment_intent_id: string; error?: object; payment_method_id?: string; }; type: 'stripe'; }; revenue_system_payments?: { revenue_system_provider: string; sync_status: string; error_message?: string; revenue_system_external_payment_id?: string; }[]; status?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'; updated_at?: string; }`\n\n - `id: string`\n - `amount?: number`\n - `amount_paid?: number`\n - `contract_id?: string`\n - `created_at?: string`\n - `customer_id?: string`\n - `error_message?: string`\n - `fiat_credit_type?: { id: string; name: string; }`\n - `invoice_id?: string`\n - `payment_gateway?: { stripe: { payment_intent_id: string; error?: { code?: string; decline_code?: string; type?: string; }; payment_method_id?: string; }; type: 'stripe'; }`\n - `revenue_system_payments?: { revenue_system_provider: string; sync_status: string; error_message?: string; revenue_system_external_payment_id?: string; }[]`\n - `status?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\n// Automatically fetches more pages as needed.\nfor await (const payment of client.v1.payments.list({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d', invoice_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85' })) {\n console.log(payment);\n}\n```",
5748
- perLanguage: {
5749
- typescript: {
5750
- method: 'client.v1.payments.list',
5751
- example:
5752
- "import Metronome from '@metronome/sdk';\n\nconst client = new Metronome({\n bearerToken: process.env['METRONOME_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const payment of client.v1.payments.list({\n customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',\n invoice_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',\n statuses: ['pending', 'requires_intervention'],\n})) {\n console.log(payment.id);\n}",
5753
- },
5754
- python: {
5755
- method: 'v1.payments.list',
5756
- example:
5757
- 'import os\nfrom metronome import Metronome\n\nclient = Metronome(\n bearer_token=os.environ.get("METRONOME_BEARER_TOKEN"), # This is the default and can be omitted\n)\npage = client.v1.payments.list(\n customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d",\n invoice_id="6162d87b-e5db-4a33-b7f2-76ce6ead4e85",\n statuses=["pending", "requires_intervention"],\n)\npage = page.data[0]\nprint(page.id)',
5758
- },
5759
- java: {
5760
- method: 'v1().payments().list',
5761
- example:
5762
- 'package com.metronome.api.example;\n\nimport com.metronome.api.client.MetronomeClient;\nimport com.metronome.api.client.okhttp.MetronomeOkHttpClient;\nimport com.metronome.api.models.v1.payments.PaymentListPage;\nimport com.metronome.api.models.v1.payments.PaymentListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n MetronomeClient client = MetronomeOkHttpClient.fromEnv();\n\n PaymentListParams params = PaymentListParams.builder()\n .customerId("13117714-3f05-48e5-a6e9-a66093f13b4d")\n .invoiceId("6162d87b-e5db-4a33-b7f2-76ce6ead4e85")\n .build();\n PaymentListPage page = client.v1().payments().list(params);\n }\n}',
5763
- },
5764
- go: {
5765
- method: 'client.V1.Payments.List',
5766
- example:
5767
- 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Metronome-Industries/metronome-go"\n\t"github.com/Metronome-Industries/metronome-go/option"\n)\n\nfunc main() {\n\tclient := metronome.NewClient(\n\t\toption.WithBearerToken("My Bearer Token"),\n\t)\n\tpage, err := client.V1.Payments.List(context.TODO(), metronome.V1PaymentListParams{\n\t\tCustomerID: "13117714-3f05-48e5-a6e9-a66093f13b4d",\n\t\tInvoiceID: "6162d87b-e5db-4a33-b7f2-76ce6ead4e85",\n\t\tStatuses: []metronome.PaymentStatus{metronome.PaymentStatusPending, metronome.PaymentStatusRequiresIntervention},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
5768
- },
5769
- ruby: {
5770
- method: 'v1.payments.list',
5771
- example:
5772
- 'require "metronome_sdk"\n\nmetronome = MetronomeSDK::Client.new(bearer_token: "My Bearer Token")\n\npage = metronome.v1.payments.list(\n customer_id: "13117714-3f05-48e5-a6e9-a66093f13b4d",\n invoice_id: "6162d87b-e5db-4a33-b7f2-76ce6ead4e85"\n)\n\nputs(page)',
5773
- },
5774
- http: {
5775
- example:
5776
- 'curl https://api.metronome.com/v1/payments/list \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \\\n -d \'{\n "customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",\n "invoice_id": "6162d87b-e5db-4a33-b7f2-76ce6ead4e85",\n "statuses": [\n "pending",\n "requires_intervention"\n ]\n }\'',
5777
- },
5778
- },
5779
- },
5780
- {
5781
- name: 'attempt',
5782
- endpoint: '/v1/payments/attempt',
5783
- httpMethod: 'post',
5784
- summary: 'Attempt payment for an invoice',
5785
- description:
5786
- "Trigger a new attempt by canceling any existing attempts for this invoice and creating a new Payment. This will trigger another attempt to charge the Customer's configured Payment Gateway. \nPayment can only be attempted if all of the following are true:\n - The Metronome Invoice is finalized\n - PLG Invoicing is configured for the Customer\n - You cannot attempt payments for invoices that have already been `paid` or `voided`.\n\nAttempting to payment on an ineligible Invoice or Customer will result in a `400` response.\n",
5787
- stainlessPath: '(resource) v1.payments > (method) attempt',
5788
- qualified: 'client.v1.payments.attempt',
5789
- params: ['customer_id: string;', 'invoice_id: string;'],
5790
- response:
5791
- '{ data: { id: string; amount?: number; amount_paid?: number; contract_id?: string; created_at?: string; customer_id?: string; error_message?: string; fiat_credit_type?: credit_type_data; invoice_id?: string; payment_gateway?: object; revenue_system_payments?: object[]; status?: payment_status; updated_at?: string; }; }',
5792
- markdown:
5793
- "## attempt\n\n`client.v1.payments.attempt(customer_id: string, invoice_id: string): { data: payment; }`\n\n**post** `/v1/payments/attempt`\n\nTrigger a new attempt by canceling any existing attempts for this invoice and creating a new Payment. This will trigger another attempt to charge the Customer's configured Payment Gateway. \nPayment can only be attempted if all of the following are true:\n - The Metronome Invoice is finalized\n - PLG Invoicing is configured for the Customer\n - You cannot attempt payments for invoices that have already been `paid` or `voided`.\n\nAttempting to payment on an ineligible Invoice or Customer will result in a `400` response.\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `invoice_id: string`\n\n### Returns\n\n- `{ data: { id: string; amount?: number; amount_paid?: number; contract_id?: string; created_at?: string; customer_id?: string; error_message?: string; fiat_credit_type?: credit_type_data; invoice_id?: string; payment_gateway?: object; revenue_system_payments?: object[]; status?: payment_status; updated_at?: string; }; }`\n\n - `data: { id: string; amount?: number; amount_paid?: number; contract_id?: string; created_at?: string; customer_id?: string; error_message?: string; fiat_credit_type?: { id: string; name: string; }; invoice_id?: string; payment_gateway?: { stripe: { payment_intent_id: string; error?: object; payment_method_id?: string; }; type: 'stripe'; }; revenue_system_payments?: { revenue_system_provider: string; sync_status: string; error_message?: string; revenue_system_external_payment_id?: string; }[]; status?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'; updated_at?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst response = await client.v1.payments.attempt({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d', invoice_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85' });\n\nconsole.log(response);\n```",
5794
- perLanguage: {
5795
- typescript: {
5796
- method: 'client.v1.payments.attempt',
5797
- example:
5798
- "import Metronome from '@metronome/sdk';\n\nconst client = new Metronome({\n bearerToken: process.env['METRONOME_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.payments.attempt({\n customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',\n invoice_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',\n});\n\nconsole.log(response.data);",
5799
- },
5800
- python: {
5801
- method: 'v1.payments.attempt',
5802
- example:
5803
- 'import os\nfrom metronome import Metronome\n\nclient = Metronome(\n bearer_token=os.environ.get("METRONOME_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.v1.payments.attempt(\n customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d",\n invoice_id="6162d87b-e5db-4a33-b7f2-76ce6ead4e85",\n)\nprint(response.data)',
5804
- },
5805
- java: {
5806
- method: 'v1().payments().attempt',
5807
- example:
5808
- 'package com.metronome.api.example;\n\nimport com.metronome.api.client.MetronomeClient;\nimport com.metronome.api.client.okhttp.MetronomeOkHttpClient;\nimport com.metronome.api.models.v1.payments.PaymentAttemptParams;\nimport com.metronome.api.models.v1.payments.PaymentAttemptResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n MetronomeClient client = MetronomeOkHttpClient.fromEnv();\n\n PaymentAttemptParams params = PaymentAttemptParams.builder()\n .customerId("13117714-3f05-48e5-a6e9-a66093f13b4d")\n .invoiceId("6162d87b-e5db-4a33-b7f2-76ce6ead4e85")\n .build();\n PaymentAttemptResponse response = client.v1().payments().attempt(params);\n }\n}',
5809
- },
5810
- go: {
5811
- method: 'client.V1.Payments.Attempt',
5812
- example:
5813
- 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Metronome-Industries/metronome-go"\n\t"github.com/Metronome-Industries/metronome-go/option"\n)\n\nfunc main() {\n\tclient := metronome.NewClient(\n\t\toption.WithBearerToken("My Bearer Token"),\n\t)\n\tresponse, err := client.V1.Payments.Attempt(context.TODO(), metronome.V1PaymentAttemptParams{\n\t\tCustomerID: "13117714-3f05-48e5-a6e9-a66093f13b4d",\n\t\tInvoiceID: "6162d87b-e5db-4a33-b7f2-76ce6ead4e85",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
5814
- },
5815
- ruby: {
5816
- method: 'v1.payments.attempt',
5817
- example:
5818
- 'require "metronome_sdk"\n\nmetronome = MetronomeSDK::Client.new(bearer_token: "My Bearer Token")\n\nresponse = metronome.v1.payments.attempt(\n customer_id: "13117714-3f05-48e5-a6e9-a66093f13b4d",\n invoice_id: "6162d87b-e5db-4a33-b7f2-76ce6ead4e85"\n)\n\nputs(response)',
5819
- },
5820
- http: {
5821
- example:
5822
- 'curl https://api.metronome.com/v1/payments/attempt \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \\\n -d \'{\n "customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",\n "invoice_id": "6162d87b-e5db-4a33-b7f2-76ce6ead4e85"\n }\'',
5823
- },
5824
- },
5825
- },
5826
- {
5827
- name: 'cancel',
5828
- endpoint: '/v1/payments/cancel',
5829
- httpMethod: 'post',
5830
- summary: 'Cancel a payment for an invoice',
5831
- description: 'Cancel an existing payment attempt for an invoice.\n',
5832
- stainlessPath: '(resource) v1.payments > (method) cancel',
5833
- qualified: 'client.v1.payments.cancel',
5834
- params: ['customer_id: string;', 'invoice_id: string;'],
5835
- response:
5836
- '{ data: { id: string; amount?: number; amount_paid?: number; contract_id?: string; created_at?: string; customer_id?: string; error_message?: string; fiat_credit_type?: credit_type_data; invoice_id?: string; payment_gateway?: object; revenue_system_payments?: object[]; status?: payment_status; updated_at?: string; }; }',
5837
- markdown:
5838
- "## cancel\n\n`client.v1.payments.cancel(customer_id: string, invoice_id: string): { data: payment; }`\n\n**post** `/v1/payments/cancel`\n\nCancel an existing payment attempt for an invoice.\n\n\n### Parameters\n\n- `customer_id: string`\n\n- `invoice_id: string`\n\n### Returns\n\n- `{ data: { id: string; amount?: number; amount_paid?: number; contract_id?: string; created_at?: string; customer_id?: string; error_message?: string; fiat_credit_type?: credit_type_data; invoice_id?: string; payment_gateway?: object; revenue_system_payments?: object[]; status?: payment_status; updated_at?: string; }; }`\n\n - `data: { id: string; amount?: number; amount_paid?: number; contract_id?: string; created_at?: string; customer_id?: string; error_message?: string; fiat_credit_type?: { id: string; name: string; }; invoice_id?: string; payment_gateway?: { stripe: { payment_intent_id: string; error?: object; payment_method_id?: string; }; type: 'stripe'; }; revenue_system_payments?: { revenue_system_provider: string; sync_status: string; error_message?: string; revenue_system_external_payment_id?: string; }[]; status?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'; updated_at?: string; }`\n\n### Example\n\n```typescript\nimport Metronome from '@metronome/sdk';\n\nconst client = new Metronome();\n\nconst response = await client.v1.payments.cancel({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d', invoice_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85' });\n\nconsole.log(response);\n```",
5839
- perLanguage: {
5840
- typescript: {
5841
- method: 'client.v1.payments.cancel',
5842
- example:
5843
- "import Metronome from '@metronome/sdk';\n\nconst client = new Metronome({\n bearerToken: process.env['METRONOME_BEARER_TOKEN'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.payments.cancel({\n customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',\n invoice_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',\n});\n\nconsole.log(response.data);",
5844
- },
5845
- python: {
5846
- method: 'v1.payments.cancel',
5847
- example:
5848
- 'import os\nfrom metronome import Metronome\n\nclient = Metronome(\n bearer_token=os.environ.get("METRONOME_BEARER_TOKEN"), # This is the default and can be omitted\n)\nresponse = client.v1.payments.cancel(\n customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d",\n invoice_id="6162d87b-e5db-4a33-b7f2-76ce6ead4e85",\n)\nprint(response.data)',
5849
- },
5850
- java: {
5851
- method: 'v1().payments().cancel',
5852
- example:
5853
- 'package com.metronome.api.example;\n\nimport com.metronome.api.client.MetronomeClient;\nimport com.metronome.api.client.okhttp.MetronomeOkHttpClient;\nimport com.metronome.api.models.v1.payments.PaymentCancelParams;\nimport com.metronome.api.models.v1.payments.PaymentCancelResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n MetronomeClient client = MetronomeOkHttpClient.fromEnv();\n\n PaymentCancelParams params = PaymentCancelParams.builder()\n .customerId("13117714-3f05-48e5-a6e9-a66093f13b4d")\n .invoiceId("6162d87b-e5db-4a33-b7f2-76ce6ead4e85")\n .build();\n PaymentCancelResponse response = client.v1().payments().cancel(params);\n }\n}',
5854
- },
5855
- go: {
5856
- method: 'client.V1.Payments.Cancel',
5857
- example:
5858
- 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Metronome-Industries/metronome-go"\n\t"github.com/Metronome-Industries/metronome-go/option"\n)\n\nfunc main() {\n\tclient := metronome.NewClient(\n\t\toption.WithBearerToken("My Bearer Token"),\n\t)\n\tresponse, err := client.V1.Payments.Cancel(context.TODO(), metronome.V1PaymentCancelParams{\n\t\tCustomerID: "13117714-3f05-48e5-a6e9-a66093f13b4d",\n\t\tInvoiceID: "6162d87b-e5db-4a33-b7f2-76ce6ead4e85",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
5859
- },
5860
- ruby: {
5861
- method: 'v1.payments.cancel',
5862
- example:
5863
- 'require "metronome_sdk"\n\nmetronome = MetronomeSDK::Client.new(bearer_token: "My Bearer Token")\n\nresponse = metronome.v1.payments.cancel(\n customer_id: "13117714-3f05-48e5-a6e9-a66093f13b4d",\n invoice_id: "6162d87b-e5db-4a33-b7f2-76ce6ead4e85"\n)\n\nputs(response)',
5864
- },
5865
- http: {
5866
- example:
5867
- 'curl https://api.metronome.com/v1/payments/cancel \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \\\n -d \'{\n "customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",\n "invoice_id": "6162d87b-e5db-4a33-b7f2-76ce6ead4e85"\n }\'',
5868
- },
5869
- },
5870
- },
5871
5735
  {
5872
5736
  name: 'upsert_avalara_credentials',
5873
5737
  endpoint: '/v1/upsertAvalaraCredentials',