@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
@@ -58,8 +58,8 @@ const EMBEDDED_METHODS = [
58
58
  'include_balance?: boolean;',
59
59
  'include_ledgers?: boolean;',
60
60
  ],
61
- 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; }; }",
62
- 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```",
61
+ 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; }; }",
62
+ 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```",
63
63
  perLanguage: {
64
64
  typescript: {
65
65
  method: 'client.v2.contracts.retrieve',
@@ -102,8 +102,8 @@ const EMBEDDED_METHODS = [
102
102
  'include_ledgers?: boolean;',
103
103
  'starting_at?: string;',
104
104
  ],
105
- 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; }[]; }",
106
- 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```",
105
+ 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; }[]; }",
106
+ 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```",
107
107
  perLanguage: {
108
108
  typescript: {
109
109
  method: 'client.v2.contracts.list',
@@ -142,23 +142,25 @@ const EMBEDDED_METHODS = [
142
142
  'contract_id: string;',
143
143
  'customer_id: string;',
144
144
  "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'; }; };",
145
- "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; }[];",
145
+ "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; }[];",
146
146
  "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[]; }[]; }[];",
147
147
  "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; }[];",
148
148
  "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'; }[];",
149
- "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; }; };",
149
+ "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[]; }[]; }[]; };",
150
150
  'add_professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[];',
151
151
  "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; }[];",
152
152
  "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; }[];",
153
153
  "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; }[];",
154
154
  "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'; }; };",
155
155
  "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; }[];",
156
- "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; }; };",
156
+ "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; }; }; };",
157
+ "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'; }[];",
157
158
  "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; }[];",
158
159
  'allow_contract_ending_before_finalized_invoice?: boolean;',
159
160
  'archive_commits?: { id: string; }[];',
160
161
  'archive_credits?: { id: string; }[];',
161
162
  'archive_scheduled_charges?: { id: string; }[];',
163
+ 'archive_spend_trackers?: string[];',
162
164
  'remove_overrides?: { id: string; }[];',
163
165
  'uniqueness_key?: string;',
164
166
  "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; }[];",
@@ -166,15 +168,15 @@ const EMBEDDED_METHODS = [
166
168
  'update_contract_name?: string;',
167
169
  "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; }[];",
168
170
  'update_net_payment_terms_days?: number;',
169
- "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; };",
171
+ "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; }[]; }[]; }[]; };",
170
172
  "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'; }[];",
171
173
  "update_recurring_credits?: { recurring_credit_id: string; access_amount?: { quantity?: number; unit_price?: number; }; ending_before?: string; rate_type?: 'LIST_RATE' | 'COMMIT_RATE'; }[];",
172
174
  '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; }[];',
173
- "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; };",
175
+ "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; };",
174
176
  "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; }[]; }; }[];",
175
177
  ],
176
- response: '{ data: { id: string; }; }',
177
- 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```",
178
+ 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[]; }; }; }',
179
+ 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```",
178
180
  perLanguage: {
179
181
  typescript: {
180
182
  method: 'client.v2.contracts.edit',
@@ -211,7 +213,7 @@ const EMBEDDED_METHODS = [
211
213
  qualified: 'client.v2.contracts.getEditHistory',
212
214
  params: ['contract_id: string;', 'customer_id: string;'],
213
215
  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[]; }[]; }',
214
- 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```",
216
+ 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```",
215
217
  perLanguage: {
216
218
  typescript: {
217
219
  method: 'client.v2.contracts.getEditHistory',
@@ -1989,8 +1991,8 @@ const EMBEDDED_METHODS = [
1989
1991
  'next_page?: string;',
1990
1992
  'starting_at?: string;',
1991
1993
  ],
1992
- 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; }",
1993
- 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```",
1994
+ 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; }",
1995
+ 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```",
1994
1996
  perLanguage: {
1995
1997
  typescript: {
1996
1998
  method: 'client.v1.customers.commits.list',
@@ -3051,8 +3053,8 @@ const EMBEDDED_METHODS = [
3051
3053
  'include_balance?: boolean;',
3052
3054
  'include_ledgers?: boolean;',
3053
3055
  ],
3054
- 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; }; }",
3055
- 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```",
3056
+ 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; }; }",
3057
+ 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```",
3056
3058
  perLanguage: {
3057
3059
  typescript: {
3058
3060
  method: 'client.v1.contracts.retrieve',
@@ -3095,8 +3097,8 @@ const EMBEDDED_METHODS = [
3095
3097
  'include_ledgers?: boolean;',
3096
3098
  'starting_at?: string;',
3097
3099
  ],
3098
- 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; }[]; }",
3099
- 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```",
3100
+ 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; }[]; }",
3101
+ 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```",
3100
3102
  perLanguage: {
3101
3103
  typescript: {
3102
3104
  method: 'client.v1.contracts.list',
@@ -3135,7 +3137,7 @@ const EMBEDDED_METHODS = [
3135
3137
  'customer_id: string;',
3136
3138
  'starting_at: string;',
3137
3139
  "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'; };",
3138
- "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; }[];",
3140
+ "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; }[];",
3139
3141
  "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[]; }[]; }[];",
3140
3142
  'custom_fields?: object;',
3141
3143
  "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; }[];",
@@ -3148,7 +3150,7 @@ const EMBEDDED_METHODS = [
3148
3150
  "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'; }[];",
3149
3151
  'package_alias?: string;',
3150
3152
  'package_id?: string;',
3151
- "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; }; };",
3153
+ "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[]; }[]; }[]; };",
3152
3154
  'professional_services?: { max_amount: number; product_id: string; quantity: number; unit_price: number; custom_fields?: object; description?: string; netsuite_sales_order_id?: string; }[];',
3153
3155
  'rate_card_alias?: string;',
3154
3156
  'rate_card_id?: string;',
@@ -3159,7 +3161,8 @@ const EMBEDDED_METHODS = [
3159
3161
  'salesforce_opportunity_id?: string;',
3160
3162
  "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; }[];",
3161
3163
  "scheduled_charges_on_usage_invoices?: 'ALL';",
3162
- "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; }; };",
3164
+ "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; }; }; };",
3165
+ "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'; }[];",
3163
3166
  "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; }[];",
3164
3167
  'total_contract_value?: number;',
3165
3168
  "transition?: { from_contract_id: string; type: 'SUPERSEDE' | 'RENEWAL'; future_invoice_behavior?: { trueup?: 'REMOVE' | 'AS_IS'; }; };",
@@ -3167,8 +3170,8 @@ const EMBEDDED_METHODS = [
3167
3170
  'usage_filter?: { group_key: string; group_values: string[]; starting_at?: string; };',
3168
3171
  "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; };",
3169
3172
  ],
3170
- response: '{ data: { id: string; }; }',
3171
- 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```",
3173
+ 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; }; }; }",
3174
+ 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```",
3172
3175
  perLanguage: {
3173
3176
  typescript: {
3174
3177
  method: 'client.v1.contracts.create',
@@ -3207,7 +3210,7 @@ const EMBEDDED_METHODS = [
3207
3210
  'contract_id: string;',
3208
3211
  'customer_id: string;',
3209
3212
  'starting_at: string;',
3210
- "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; }[];",
3213
+ "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; }[];",
3211
3214
  "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[]; }[]; }[];",
3212
3215
  'custom_fields?: object;',
3213
3216
  "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; }[];",
@@ -3220,7 +3223,7 @@ const EMBEDDED_METHODS = [
3220
3223
  'total_contract_value?: number;',
3221
3224
  ],
3222
3225
  response: '{ data: { id: string; }; }',
3223
- 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```",
3226
+ 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```",
3224
3227
  perLanguage: {
3225
3228
  typescript: {
3226
3229
  method: 'client.v1.contracts.amend',
@@ -3480,7 +3483,7 @@ const EMBEDDED_METHODS = [
3480
3483
  'starting_at?: string;',
3481
3484
  ],
3482
3485
  response: 'object | object',
3483
- 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```",
3486
+ 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```",
3484
3487
  perLanguage: {
3485
3488
  typescript: {
3486
3489
  method: 'client.v1.contracts.listBalances',
@@ -4577,20 +4580,21 @@ const EMBEDDED_METHODS = [
4577
4580
  "multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';",
4578
4581
  'net_payment_terms_days?: number;',
4579
4582
  "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'; }[];",
4580
- "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; }; };",
4583
+ "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[]; }[]; }[]; };",
4581
4584
  'rate_card_alias?: string;',
4582
4585
  'rate_card_id?: string;',
4583
4586
  "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; }[];",
4584
4587
  "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; }[];",
4585
4588
  "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; }[];",
4586
4589
  "scheduled_charges_on_usage_invoices?: 'ALL';",
4587
- "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; }; };",
4590
+ "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; }; }; };",
4591
+ "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'; }[];",
4588
4592
  "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; }[];",
4589
4593
  'uniqueness_key?: string;',
4590
4594
  "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; }; };",
4591
4595
  ],
4592
4596
  response: '{ data: { id: string; }; }',
4593
- 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```",
4597
+ 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```",
4594
4598
  perLanguage: {
4595
4599
  typescript: {
4596
4600
  method: 'client.v1.packages.create',
@@ -4626,8 +4630,8 @@ const EMBEDDED_METHODS = [
4626
4630
  stainlessPath: '(resource) v1.packages > (method) retrieve',
4627
4631
  qualified: 'client.v1.packages.retrieve',
4628
4632
  params: ['package_id: string;'],
4629
- 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; }; }",
4630
- 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```",
4633
+ 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; }; }",
4634
+ 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```",
4631
4635
  perLanguage: {
4632
4636
  typescript: {
4633
4637
  method: 'client.v1.packages.retrieve',
@@ -4667,8 +4671,8 @@ const EMBEDDED_METHODS = [
4667
4671
  'next_page?: string;',
4668
4672
  "archive_filter?: 'ARCHIVED' | 'NOT_ARCHIVED' | 'ALL';",
4669
4673
  ],
4670
- 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; }",
4671
- 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```",
4674
+ 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; }",
4675
+ 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```",
4672
4676
  perLanguage: {
4673
4677
  typescript: {
4674
4678
  method: 'client.v1.packages.list',
@@ -4700,7 +4704,7 @@ const EMBEDDED_METHODS = [
4700
4704
  endpoint: '/v1/packages/listContractsOnPackage',
4701
4705
  httpMethod: 'post',
4702
4706
  summary: 'List contracts associated with a package',
4703
- 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',
4707
+ 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',
4704
4708
  stainlessPath: '(resource) v1.packages > (method) list_contracts_on_package',
4705
4709
  qualified: 'client.v1.packages.listContractsOnPackage',
4706
4710
  params: [
@@ -4712,7 +4716,7 @@ const EMBEDDED_METHODS = [
4712
4716
  'starting_at?: string;',
4713
4717
  ],
4714
4718
  response: '{ contract_id: string; customer_id: string; starting_at: string; archived_at?: string; ending_before?: string; }',
4715
- 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```",
4719
+ 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```",
4716
4720
  perLanguage: {
4717
4721
  typescript: {
4718
4722
  method: 'client.v1.packages.listContractsOnPackage',
@@ -4776,123 +4780,6 @@ const EMBEDDED_METHODS = [
4776
4780
  },
4777
4781
  },
4778
4782
  },
4779
- {
4780
- name: 'list',
4781
- endpoint: '/v1/payments/list',
4782
- httpMethod: 'post',
4783
- summary: 'List payments for an invoice',
4784
- description: 'Fetch all payment attempts for the given invoice.\n',
4785
- stainlessPath: '(resource) v1.payments > (method) list',
4786
- qualified: 'client.v1.payments.list',
4787
- params: [
4788
- 'customer_id: string;',
4789
- 'invoice_id: string;',
4790
- 'limit?: number;',
4791
- 'next_page?: string;',
4792
- "statuses?: 'pending' | 'requires_intervention' | 'paid' | 'canceled'[];",
4793
- ],
4794
- 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; }",
4795
- 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```",
4796
- perLanguage: {
4797
- typescript: {
4798
- method: 'client.v1.payments.list',
4799
- 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}",
4800
- },
4801
- python: {
4802
- method: 'v1.payments.list',
4803
- 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)',
4804
- },
4805
- java: {
4806
- method: 'v1().payments().list',
4807
- 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}',
4808
- },
4809
- go: {
4810
- method: 'client.V1.Payments.List',
4811
- 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',
4812
- },
4813
- ruby: {
4814
- method: 'v1.payments.list',
4815
- 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)',
4816
- },
4817
- http: {
4818
- 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 }\'',
4819
- },
4820
- },
4821
- },
4822
- {
4823
- name: 'attempt',
4824
- endpoint: '/v1/payments/attempt',
4825
- httpMethod: 'post',
4826
- summary: 'Attempt payment for an invoice',
4827
- 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",
4828
- stainlessPath: '(resource) v1.payments > (method) attempt',
4829
- qualified: 'client.v1.payments.attempt',
4830
- params: ['customer_id: string;', 'invoice_id: string;'],
4831
- 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; }; }',
4832
- 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```",
4833
- perLanguage: {
4834
- typescript: {
4835
- method: 'client.v1.payments.attempt',
4836
- 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);",
4837
- },
4838
- python: {
4839
- method: 'v1.payments.attempt',
4840
- 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)',
4841
- },
4842
- java: {
4843
- method: 'v1().payments().attempt',
4844
- 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}',
4845
- },
4846
- go: {
4847
- method: 'client.V1.Payments.Attempt',
4848
- 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',
4849
- },
4850
- ruby: {
4851
- method: 'v1.payments.attempt',
4852
- 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)',
4853
- },
4854
- http: {
4855
- 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 }\'',
4856
- },
4857
- },
4858
- },
4859
- {
4860
- name: 'cancel',
4861
- endpoint: '/v1/payments/cancel',
4862
- httpMethod: 'post',
4863
- summary: 'Cancel a payment for an invoice',
4864
- description: 'Cancel an existing payment attempt for an invoice.\n',
4865
- stainlessPath: '(resource) v1.payments > (method) cancel',
4866
- qualified: 'client.v1.payments.cancel',
4867
- params: ['customer_id: string;', 'invoice_id: string;'],
4868
- 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; }; }',
4869
- 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```",
4870
- perLanguage: {
4871
- typescript: {
4872
- method: 'client.v1.payments.cancel',
4873
- 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);",
4874
- },
4875
- python: {
4876
- method: 'v1.payments.cancel',
4877
- 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)',
4878
- },
4879
- java: {
4880
- method: 'v1().payments().cancel',
4881
- 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}',
4882
- },
4883
- go: {
4884
- method: 'client.V1.Payments.Cancel',
4885
- 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',
4886
- },
4887
- ruby: {
4888
- method: 'v1.payments.cancel',
4889
- 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)',
4890
- },
4891
- http: {
4892
- 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 }\'',
4893
- },
4894
- },
4895
- },
4896
4783
  {
4897
4784
  name: 'upsert_avalara_credentials',
4898
4785
  endpoint: '/v1/upsertAvalaraCredentials',