@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
@@ -19,8 +19,8 @@ const EMBEDDED_METHODS = [
19
19
  'include_balance?: boolean;',
20
20
  'include_ledgers?: boolean;',
21
21
  ],
22
- response: "{ 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; }; }",
23
- markdown: "## 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```",
22
+ response: "{ 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; }; }",
23
+ markdown: "## 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```",
24
24
  perLanguage: {
25
25
  typescript: {
26
26
  method: 'client.v2.contracts.retrieve',
@@ -63,8 +63,8 @@ const EMBEDDED_METHODS = [
63
63
  'include_ledgers?: boolean;',
64
64
  'starting_at?: string;',
65
65
  ],
66
- response: "{ 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; }[]; }",
67
- markdown: "## 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```",
66
+ response: "{ 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; }[]; }",
67
+ markdown: "## 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```",
68
68
  perLanguage: {
69
69
  typescript: {
70
70
  method: 'client.v2.contracts.list',
@@ -103,23 +103,25 @@ const EMBEDDED_METHODS = [
103
103
  'contract_id: string;',
104
104
  'customer_id: string;',
105
105
  "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'; }; };",
106
- "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; }[];",
106
+ "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; }[];",
107
107
  "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[]; }[]; }[];",
108
108
  "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; }[];",
109
109
  "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'; }[];",
110
- "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; }; };",
110
+ "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[]; }[]; }[]; };",
111
111
  'add_professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[];',
112
112
  "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; }[];",
113
113
  "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; }[];",
114
114
  "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; }[];",
115
115
  "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'; }; };",
116
116
  "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; }[];",
117
- "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; }; };",
117
+ "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; }; }; };",
118
+ "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'; }[];",
118
119
  "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; }[];",
119
120
  'allow_contract_ending_before_finalized_invoice?: boolean;',
120
121
  'archive_commits?: { id: string; }[];',
121
122
  'archive_credits?: { id: string; }[];',
122
123
  'archive_scheduled_charges?: { id: string; }[];',
124
+ 'archive_spend_trackers?: string[];',
123
125
  'remove_overrides?: { id: string; }[];',
124
126
  'uniqueness_key?: string;',
125
127
  "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; }[];",
@@ -127,15 +129,15 @@ const EMBEDDED_METHODS = [
127
129
  'update_contract_name?: string;',
128
130
  "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; }[];",
129
131
  'update_net_payment_terms_days?: number;',
130
- "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; };",
132
+ "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; }[]; }[]; }[]; };",
131
133
  "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'; }[];",
132
134
  "update_recurring_credits?: { recurring_credit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[];",
133
135
  '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; }[];',
134
- "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; };",
136
+ "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; };",
135
137
  "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; }[]; }; }[];",
136
138
  ],
137
- response: '{ data: { id: string; }; }',
138
- markdown: "## 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```",
139
+ response: '{ 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[]; }; }; }',
140
+ markdown: "## 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```",
139
141
  perLanguage: {
140
142
  typescript: {
141
143
  method: 'client.v2.contracts.edit',
@@ -172,7 +174,7 @@ const EMBEDDED_METHODS = [
172
174
  qualified: 'client.v2.contracts.getEditHistory',
173
175
  params: ['contract_id: string;', 'customer_id: string;'],
174
176
  response: '{ 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[]; }[]; }',
175
- markdown: "## 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```",
177
+ markdown: "## 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```",
176
178
  perLanguage: {
177
179
  typescript: {
178
180
  method: 'client.v2.contracts.getEditHistory',
@@ -1950,8 +1952,8 @@ const EMBEDDED_METHODS = [
1950
1952
  'next_page?: string;',
1951
1953
  'starting_at?: string;',
1952
1954
  ],
1953
- response: "{ 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; }",
1954
- markdown: "## 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```",
1955
+ response: "{ 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; }",
1956
+ markdown: "## 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```",
1955
1957
  perLanguage: {
1956
1958
  typescript: {
1957
1959
  method: 'client.v1.customers.commits.list',
@@ -3012,8 +3014,8 @@ const EMBEDDED_METHODS = [
3012
3014
  'include_balance?: boolean;',
3013
3015
  'include_ledgers?: boolean;',
3014
3016
  ],
3015
- response: "{ 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; }; }",
3016
- markdown: "## 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```",
3017
+ response: "{ 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; }; }",
3018
+ markdown: "## 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```",
3017
3019
  perLanguage: {
3018
3020
  typescript: {
3019
3021
  method: 'client.v1.contracts.retrieve',
@@ -3056,8 +3058,8 @@ const EMBEDDED_METHODS = [
3056
3058
  'include_ledgers?: boolean;',
3057
3059
  'starting_at?: string;',
3058
3060
  ],
3059
- response: "{ 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; }[]; }",
3060
- markdown: "## 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```",
3061
+ response: "{ 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; }[]; }",
3062
+ markdown: "## 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```",
3061
3063
  perLanguage: {
3062
3064
  typescript: {
3063
3065
  method: 'client.v1.contracts.list',
@@ -3096,7 +3098,7 @@ const EMBEDDED_METHODS = [
3096
3098
  'customer_id: string;',
3097
3099
  'starting_at: string;',
3098
3100
  "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'; };",
3099
- "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; }[];",
3101
+ "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; }[];",
3100
3102
  "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[]; }[]; }[];",
3101
3103
  'custom_fields?: object;',
3102
3104
  "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; }[];",
@@ -3109,7 +3111,7 @@ const EMBEDDED_METHODS = [
3109
3111
  "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'; }[];",
3110
3112
  'package_alias?: string;',
3111
3113
  'package_id?: string;',
3112
- "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; }; };",
3114
+ "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[]; }[]; }[]; };",
3113
3115
  'professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[];',
3114
3116
  'rate_card_alias?: string;',
3115
3117
  'rate_card_id?: string;',
@@ -3120,7 +3122,8 @@ const EMBEDDED_METHODS = [
3120
3122
  'salesforce_opportunity_id?: string;',
3121
3123
  "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; }[];",
3122
3124
  "scheduled_charges_on_usage_invoices?: 'ALL';",
3123
- "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; }; };",
3125
+ "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; }; }; };",
3126
+ "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'; }[];",
3124
3127
  "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; }[];",
3125
3128
  'total_contract_value?: number;',
3126
3129
  "transition?: { from_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; future_invoice_behavior?: { trueup?: 'REMOVE' | 'AS_IS'; }; };",
@@ -3128,8 +3131,8 @@ const EMBEDDED_METHODS = [
3128
3131
  'usage_filter?: { group_key: string; group_values: string[]; starting_at?: string; };',
3129
3132
  "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; };",
3130
3133
  ],
3131
- response: '{ data: { id: string; }; }',
3132
- markdown: "## 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```",
3134
+ response: "{ 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; }; }; }",
3135
+ markdown: "## 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```",
3133
3136
  perLanguage: {
3134
3137
  typescript: {
3135
3138
  method: 'client.v1.contracts.create',
@@ -3168,7 +3171,7 @@ const EMBEDDED_METHODS = [
3168
3171
  'contract_id: string;',
3169
3172
  'customer_id: string;',
3170
3173
  'starting_at: string;',
3171
- "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; }[];",
3174
+ "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; }[];",
3172
3175
  "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[]; }[]; }[];",
3173
3176
  'custom_fields?: object;',
3174
3177
  "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; }[];",
@@ -3181,7 +3184,7 @@ const EMBEDDED_METHODS = [
3181
3184
  'total_contract_value?: number;',
3182
3185
  ],
3183
3186
  response: '{ data: { id: string; }; }',
3184
- markdown: "## 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```",
3187
+ markdown: "## 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```",
3185
3188
  perLanguage: {
3186
3189
  typescript: {
3187
3190
  method: 'client.v1.contracts.amend',
@@ -3441,7 +3444,7 @@ const EMBEDDED_METHODS = [
3441
3444
  'starting_at?: string;',
3442
3445
  ],
3443
3446
  response: 'object | object',
3444
- markdown: "## 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```",
3447
+ markdown: "## 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```",
3445
3448
  perLanguage: {
3446
3449
  typescript: {
3447
3450
  method: 'client.v1.contracts.listBalances',
@@ -4538,20 +4541,21 @@ const EMBEDDED_METHODS = [
4538
4541
  "multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';",
4539
4542
  'net_payment_terms_days?: number;',
4540
4543
  "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'; }[];",
4541
- "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; }; };",
4544
+ "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[]; }[]; }[]; };",
4542
4545
  'rate_card_alias?: string;',
4543
4546
  'rate_card_id?: string;',
4544
4547
  "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; }[];",
4545
4548
  "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; }[];",
4546
4549
  "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; }[];",
4547
4550
  "scheduled_charges_on_usage_invoices?: 'ALL';",
4548
- "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; }; };",
4551
+ "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; }; }; };",
4552
+ "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'; }[];",
4549
4553
  "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; }[];",
4550
4554
  'uniqueness_key?: string;',
4551
4555
  "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; }; };",
4552
4556
  ],
4553
4557
  response: '{ data: { id: string; }; }',
4554
- markdown: "## 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```",
4558
+ markdown: "## 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```",
4555
4559
  perLanguage: {
4556
4560
  typescript: {
4557
4561
  method: 'client.v1.packages.create',
@@ -4587,8 +4591,8 @@ const EMBEDDED_METHODS = [
4587
4591
  stainlessPath: '(resource) v1.packages > (method) retrieve',
4588
4592
  qualified: 'client.v1.packages.retrieve',
4589
4593
  params: ['package_id: string;'],
4590
- response: "{ 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; }; }",
4591
- markdown: "## 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```",
4594
+ response: "{ 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; }; }",
4595
+ markdown: "## 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```",
4592
4596
  perLanguage: {
4593
4597
  typescript: {
4594
4598
  method: 'client.v1.packages.retrieve',
@@ -4628,8 +4632,8 @@ const EMBEDDED_METHODS = [
4628
4632
  'next_page?: string;',
4629
4633
  "archive_filter?: 'ARCHIVED' | 'NOT_ARCHIVED' | 'ALL';",
4630
4634
  ],
4631
- response: "{ 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; }",
4632
- markdown: "## 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```",
4635
+ response: "{ 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; }",
4636
+ markdown: "## 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```",
4633
4637
  perLanguage: {
4634
4638
  typescript: {
4635
4639
  method: 'client.v1.packages.list',
@@ -4661,7 +4665,7 @@ const EMBEDDED_METHODS = [
4661
4665
  endpoint: '/v1/packages/listContractsOnPackage',
4662
4666
  httpMethod: 'post',
4663
4667
  summary: 'List contracts associated with a package',
4664
- description: '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',
4668
+ description: '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',
4665
4669
  stainlessPath: '(resource) v1.packages > (method) list_contracts_on_package',
4666
4670
  qualified: 'client.v1.packages.listContractsOnPackage',
4667
4671
  params: [
@@ -4673,7 +4677,7 @@ const EMBEDDED_METHODS = [
4673
4677
  'starting_at?: string;',
4674
4678
  ],
4675
4679
  response: '{ contract_id: string; customer_id: string; starting_at: string; archived_at?: string; ending_before?: string; }',
4676
- markdown: "## 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```",
4680
+ markdown: "## 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```",
4677
4681
  perLanguage: {
4678
4682
  typescript: {
4679
4683
  method: 'client.v1.packages.listContractsOnPackage',
@@ -4737,123 +4741,6 @@ const EMBEDDED_METHODS = [
4737
4741
  },
4738
4742
  },
4739
4743
  },
4740
- {
4741
- name: 'list',
4742
- endpoint: '/v1/payments/list',
4743
- httpMethod: 'post',
4744
- summary: 'List payments for an invoice',
4745
- description: 'Fetch all payment attempts for the given invoice.\n',
4746
- stainlessPath: '(resource) v1.payments > (method) list',
4747
- qualified: 'client.v1.payments.list',
4748
- params: [
4749
- 'customer_id: string;',
4750
- 'invoice_id: string;',
4751
- 'limit?: number;',
4752
- 'next_page?: string;',
4753
- "statuses?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'[];",
4754
- ],
4755
- response: "{ 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; }",
4756
- markdown: "## 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```",
4757
- perLanguage: {
4758
- typescript: {
4759
- method: 'client.v1.payments.list',
4760
- example: "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}",
4761
- },
4762
- python: {
4763
- method: 'v1.payments.list',
4764
- example: '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)',
4765
- },
4766
- java: {
4767
- method: 'v1().payments().list',
4768
- example: '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}',
4769
- },
4770
- go: {
4771
- method: 'client.V1.Payments.List',
4772
- example: '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',
4773
- },
4774
- ruby: {
4775
- method: 'v1.payments.list',
4776
- example: '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)',
4777
- },
4778
- http: {
4779
- example: '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 }\'',
4780
- },
4781
- },
4782
- },
4783
- {
4784
- name: 'attempt',
4785
- endpoint: '/v1/payments/attempt',
4786
- httpMethod: 'post',
4787
- summary: 'Attempt payment for an invoice',
4788
- description: "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",
4789
- stainlessPath: '(resource) v1.payments > (method) attempt',
4790
- qualified: 'client.v1.payments.attempt',
4791
- params: ['customer_id: string;', 'invoice_id: string;'],
4792
- response: '{ 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; }; }',
4793
- markdown: "## 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```",
4794
- perLanguage: {
4795
- typescript: {
4796
- method: 'client.v1.payments.attempt',
4797
- example: "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);",
4798
- },
4799
- python: {
4800
- method: 'v1.payments.attempt',
4801
- example: '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)',
4802
- },
4803
- java: {
4804
- method: 'v1().payments().attempt',
4805
- example: '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}',
4806
- },
4807
- go: {
4808
- method: 'client.V1.Payments.Attempt',
4809
- example: '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',
4810
- },
4811
- ruby: {
4812
- method: 'v1.payments.attempt',
4813
- example: '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)',
4814
- },
4815
- http: {
4816
- example: '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 }\'',
4817
- },
4818
- },
4819
- },
4820
- {
4821
- name: 'cancel',
4822
- endpoint: '/v1/payments/cancel',
4823
- httpMethod: 'post',
4824
- summary: 'Cancel a payment for an invoice',
4825
- description: 'Cancel an existing payment attempt for an invoice.\n',
4826
- stainlessPath: '(resource) v1.payments > (method) cancel',
4827
- qualified: 'client.v1.payments.cancel',
4828
- params: ['customer_id: string;', 'invoice_id: string;'],
4829
- response: '{ 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; }; }',
4830
- markdown: "## 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```",
4831
- perLanguage: {
4832
- typescript: {
4833
- method: 'client.v1.payments.cancel',
4834
- example: "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);",
4835
- },
4836
- python: {
4837
- method: 'v1.payments.cancel',
4838
- example: '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)',
4839
- },
4840
- java: {
4841
- method: 'v1().payments().cancel',
4842
- example: '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}',
4843
- },
4844
- go: {
4845
- method: 'client.V1.Payments.Cancel',
4846
- example: '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',
4847
- },
4848
- ruby: {
4849
- method: 'v1.payments.cancel',
4850
- example: '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)',
4851
- },
4852
- http: {
4853
- example: '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 }\'',
4854
- },
4855
- },
4856
- },
4857
4744
  {
4858
4745
  name: 'upsert_avalara_credentials',
4859
4746
  endpoint: '/v1/upsertAvalaraCredentials',