dodopayments-mcp 2.32.2 → 2.33.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.
@@ -1 +1 @@
1
- {"version":3,"file":"local-docs-search.d.mts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;AAupQF;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiC;IAEnD,OAAO;WAKM,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAY1E,MAAM,CAAC,KAAK,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,YAAY;IA2EhB,OAAO,CAAC,YAAY;YAiBN,iBAAiB;IA4C/B,OAAO,CAAC,UAAU;CAgBnB"}
1
+ {"version":3,"file":"local-docs-search.d.mts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;AAiqQF;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiC;IAEnD,OAAO;WAKM,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAY1E,MAAM,CAAC,KAAK,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,YAAY;IA2EhB,OAAO,CAAC,YAAY;YAiBN,iBAAiB;IA4C/B,OAAO,CAAC,UAAU;CAgBnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"local-docs-search.d.ts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;AAupQF;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiC;IAEnD,OAAO;WAKM,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAY1E,MAAM,CAAC,KAAK,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,YAAY;IA2EhB,OAAO,CAAC,YAAY;YAiBN,iBAAiB;IA4C/B,OAAO,CAAC,UAAU;CAgBnB"}
1
+ {"version":3,"file":"local-docs-search.d.ts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;AAiqQF;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiC;IAEnD,OAAO;WAKM,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAY1E,MAAM,CAAC,KAAK,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,YAAY;IA2EhB,OAAO,CAAC,YAAY;YAiBN,iBAAiB;IA4C/B,OAAO,CAAC,UAAU;CAgBnB"}
@@ -377,8 +377,8 @@ const EMBEDDED_METHODS = [
377
377
  stainlessPath: '(resource) payments > (method) retrieve',
378
378
  qualified: 'client.payments.retrieve',
379
379
  params: ['payment_id: string;'],
380
- response: "{ billing: object; brand_id: string; business_id: string; created_at: string; currency: string; customer: object; digital_products_delivered: boolean; disputes: object[]; metadata: object; payment_id: string; refunds: object[]; settlement_amount: number; settlement_currency: string; total_amount: number; card_holder_name?: string; card_issuing_country?: string; card_last_four?: string; card_network?: string; card_type?: string; checkout_session_id?: string; custom_field_responses?: object[]; discount_id?: string; discounts?: object[]; error_code?: string; error_message?: string; invoice_id?: string; invoice_url?: string; payment_link?: string; payment_method?: string; payment_method_type?: string; product_cart?: { product_id: string; quantity: number; }[]; refund_status?: 'partial' | 'full'; settlement_tax?: number; status?: string; subscription_id?: string; tax?: number; updated_at?: string; }",
381
- markdown: "## retrieve\n\n`client.payments.retrieve(payment_id: string): { billing: billing_address; brand_id: string; business_id: string; created_at: string; currency: currency; customer: customer_limited_details; digital_products_delivered: boolean; disputes: dispute[]; metadata: object; payment_id: string; refunds: refund_list_item[]; settlement_amount: number; settlement_currency: currency; total_amount: number; card_holder_name?: string; card_issuing_country?: country_code; card_last_four?: string; card_network?: string; card_type?: string; checkout_session_id?: string; custom_field_responses?: custom_field_response[]; discount_id?: string; discounts?: discount_detail[]; error_code?: string; error_message?: string; invoice_id?: string; invoice_url?: string; payment_link?: string; payment_method?: string; payment_method_type?: string; product_cart?: object[]; refund_status?: payment_refund_status; settlement_tax?: number; status?: intent_status; subscription_id?: string; tax?: number; updated_at?: string; }`\n\n**get** `/payments/{payment_id}`\n\n### Parameters\n\n- `payment_id: string`\n\n### Returns\n\n- `{ billing: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }; brand_id: string; business_id: string; created_at: string; currency: string; customer: { customer_id: string; email: string; name: string; metadata?: object; phone_number?: string; }; digital_products_delivered: boolean; disputes: { amount: string; business_id: string; created_at: string; currency: string; dispute_id: string; dispute_stage: dispute_stage; dispute_status: dispute_status; payment_id: string; is_resolved_by_rdr?: boolean; remarks?: string; }[]; metadata: object; payment_id: string; refunds: { business_id: string; created_at: string; is_partial: boolean; payment_id: string; refund_id: string; status: refund_status; amount?: number; currency?: currency; reason?: string; }[]; settlement_amount: number; settlement_currency: string; total_amount: number; card_holder_name?: string; card_issuing_country?: string; card_last_four?: string; card_network?: string; card_type?: string; checkout_session_id?: string; custom_field_responses?: { key: string; value: string; }[]; discount_id?: string; discounts?: { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; position: number; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; cycles_remaining?: number; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }[]; error_code?: string; error_message?: string; invoice_id?: string; invoice_url?: string; payment_link?: string; payment_method?: string; payment_method_type?: string; product_cart?: { product_id: string; quantity: number; }[]; refund_status?: 'partial' | 'full'; settlement_tax?: number; status?: string; subscription_id?: string; tax?: number; updated_at?: string; }`\n\n - `billing: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `customer: { customer_id: string; email: string; name: string; metadata?: object; phone_number?: string; }`\n - `digital_products_delivered: boolean`\n - `disputes: { amount: string; business_id: string; created_at: string; currency: string; dispute_id: string; dispute_stage: 'pre_dispute' | 'dispute' | 'pre_arbitration'; dispute_status: string; payment_id: string; is_resolved_by_rdr?: boolean; remarks?: string; }[]`\n - `metadata: object`\n - `payment_id: string`\n - `refunds: { business_id: string; created_at: string; is_partial: boolean; payment_id: string; refund_id: string; status: 'succeeded' | 'failed' | 'pending' | 'review'; amount?: number; currency?: string; reason?: string; }[]`\n - `settlement_amount: number`\n - `settlement_currency: string`\n - `total_amount: number`\n - `card_holder_name?: string`\n - `card_issuing_country?: string`\n - `card_last_four?: string`\n - `card_network?: string`\n - `card_type?: string`\n - `checkout_session_id?: string`\n - `custom_field_responses?: { key: string; value: string; }[]`\n - `discount_id?: string`\n - `discounts?: { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; position: number; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; cycles_remaining?: number; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }[]`\n - `error_code?: string`\n - `error_message?: string`\n - `invoice_id?: string`\n - `invoice_url?: string`\n - `payment_link?: string`\n - `payment_method?: string`\n - `payment_method_type?: string`\n - `product_cart?: { product_id: string; quantity: number; }[]`\n - `refund_status?: 'partial' | 'full'`\n - `settlement_tax?: number`\n - `status?: string`\n - `subscription_id?: string`\n - `tax?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst payment = await client.payments.retrieve('payment_id');\n\nconsole.log(payment);\n```",
380
+ response: "{ billing: object; brand_id: string; business_id: string; created_at: string; currency: string; customer: object; digital_products_delivered: boolean; disputes: object[]; metadata: object; payment_id: string; refunds: object[]; retry_attempt: number; settlement_amount: number; settlement_currency: string; total_amount: number; card_holder_name?: string; card_issuing_country?: string; card_last_four?: string; card_network?: string; card_type?: string; checkout_session_id?: string; custom_field_responses?: object[]; discount_id?: string; discounts?: object[]; error_code?: string; error_message?: string; invoice_id?: string; invoice_url?: string; payment_link?: string; payment_method?: string; payment_method_type?: string; product_cart?: { product_id: string; quantity: number; }[]; refund_status?: 'partial' | 'full'; settlement_tax?: number; status?: string; subscription_id?: string; tax?: number; updated_at?: string; }",
381
+ markdown: "## retrieve\n\n`client.payments.retrieve(payment_id: string): { billing: billing_address; brand_id: string; business_id: string; created_at: string; currency: currency; customer: customer_limited_details; digital_products_delivered: boolean; disputes: dispute[]; metadata: object; payment_id: string; refunds: refund_list_item[]; retry_attempt: number; settlement_amount: number; settlement_currency: currency; total_amount: number; card_holder_name?: string; card_issuing_country?: country_code; card_last_four?: string; card_network?: string; card_type?: string; checkout_session_id?: string; custom_field_responses?: custom_field_response[]; discount_id?: string; discounts?: discount_detail[]; error_code?: string; error_message?: string; invoice_id?: string; invoice_url?: string; payment_link?: string; payment_method?: string; payment_method_type?: string; product_cart?: object[]; refund_status?: payment_refund_status; settlement_tax?: number; status?: intent_status; subscription_id?: string; tax?: number; updated_at?: string; }`\n\n**get** `/payments/{payment_id}`\n\n### Parameters\n\n- `payment_id: string`\n\n### Returns\n\n- `{ billing: { country: country_code; city?: string; state?: string; street?: string; zipcode?: string; }; brand_id: string; business_id: string; created_at: string; currency: string; customer: { customer_id: string; email: string; name: string; metadata?: object; phone_number?: string; }; digital_products_delivered: boolean; disputes: { amount: string; business_id: string; created_at: string; currency: string; dispute_id: string; dispute_stage: dispute_stage; dispute_status: dispute_status; payment_id: string; is_resolved_by_rdr?: boolean; remarks?: string; }[]; metadata: object; payment_id: string; refunds: { business_id: string; created_at: string; is_partial: boolean; payment_id: string; refund_id: string; status: refund_status; amount?: number; currency?: currency; reason?: string; }[]; retry_attempt: number; settlement_amount: number; settlement_currency: string; total_amount: number; card_holder_name?: string; card_issuing_country?: string; card_last_four?: string; card_network?: string; card_type?: string; checkout_session_id?: string; custom_field_responses?: { key: string; value: string; }[]; discount_id?: string; discounts?: { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; position: number; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; cycles_remaining?: number; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }[]; error_code?: string; error_message?: string; invoice_id?: string; invoice_url?: string; payment_link?: string; payment_method?: string; payment_method_type?: string; product_cart?: { product_id: string; quantity: number; }[]; refund_status?: 'partial' | 'full'; settlement_tax?: number; status?: string; subscription_id?: string; tax?: number; updated_at?: string; }`\n\n - `billing: { country: string; city?: string; state?: string; street?: string; zipcode?: string; }`\n - `brand_id: string`\n - `business_id: string`\n - `created_at: string`\n - `currency: string`\n - `customer: { customer_id: string; email: string; name: string; metadata?: object; phone_number?: string; }`\n - `digital_products_delivered: boolean`\n - `disputes: { amount: string; business_id: string; created_at: string; currency: string; dispute_id: string; dispute_stage: 'pre_dispute' | 'dispute' | 'pre_arbitration'; dispute_status: string; payment_id: string; is_resolved_by_rdr?: boolean; remarks?: string; }[]`\n - `metadata: object`\n - `payment_id: string`\n - `refunds: { business_id: string; created_at: string; is_partial: boolean; payment_id: string; refund_id: string; status: 'succeeded' | 'failed' | 'pending' | 'review'; amount?: number; currency?: string; reason?: string; }[]`\n - `retry_attempt: number`\n - `settlement_amount: number`\n - `settlement_currency: string`\n - `total_amount: number`\n - `card_holder_name?: string`\n - `card_issuing_country?: string`\n - `card_last_four?: string`\n - `card_network?: string`\n - `card_type?: string`\n - `checkout_session_id?: string`\n - `custom_field_responses?: { key: string; value: string; }[]`\n - `discount_id?: string`\n - `discounts?: { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; position: number; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; cycles_remaining?: number; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }[]`\n - `error_code?: string`\n - `error_message?: string`\n - `invoice_id?: string`\n - `invoice_url?: string`\n - `payment_link?: string`\n - `payment_method?: string`\n - `payment_method_type?: string`\n - `product_cart?: { product_id: string; quantity: number; }[]`\n - `refund_status?: 'partial' | 'full'`\n - `settlement_tax?: number`\n - `status?: string`\n - `subscription_id?: string`\n - `tax?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst payment = await client.payments.retrieve('payment_id');\n\nconsole.log(payment);\n```",
382
382
  perLanguage: {
383
383
  typescript: {
384
384
  method: 'client.payments.retrieve',
@@ -3413,7 +3413,7 @@ const EMBEDDED_METHODS = [
3413
3413
  'product_id?: string;',
3414
3414
  ],
3415
3415
  response: "{ amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }",
3416
- markdown: "## list\n\n`client.discounts.list(active?: boolean, code?: string, discount_type?: 'percentage', page_number?: number, page_size?: number, product_id?: string): { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n**get** `/discounts`\n\nGET /discounts\n\n### Parameters\n\n- `active?: boolean`\n Filter by active status (true = not expired, false = expired)\n\n- `code?: string`\n Filter by discount code (partial match, case-insensitive)\n\n- `discount_type?: 'percentage'`\n Filter by discount type (percentage)\n\n- `page_number?: number`\n Page number (default = 0).\n\n- `page_size?: number`\n Page size (default = 10, max = 100).\n\n- `product_id?: string`\n Filter by product restriction (only discounts that apply to this product)\n\n### Returns\n\n- `{ amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n - `amount: number`\n - `business_id: string`\n - `code: string`\n - `created_at: string`\n - `discount_id: string`\n - `metadata: object`\n - `preserve_on_plan_change: boolean`\n - `restricted_to: string[]`\n - `times_used: number`\n - `type: 'percentage'`\n - `expires_at?: string`\n - `name?: string`\n - `subscription_cycles?: number`\n - `usage_limit?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\n// Automatically fetches more pages as needed.\nfor await (const discount of client.discounts.list()) {\n console.log(discount);\n}\n```",
3416
+ markdown: "## list\n\n`client.discounts.list(active?: boolean, code?: string, discount_type?: 'percentage', page_number?: number, page_size?: number, product_id?: string): { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n**get** `/discounts`\n\nGET /discounts\n\n### Parameters\n\n- `active?: boolean`\n Filter by active status (true = not expired, false = expired)\n\n- `code?: string`\n Filter by discount code (partial match, case-insensitive)\n\n- `discount_type?: 'percentage'`\n Filter by discount type\n\n- `page_number?: number`\n Page number (default = 0).\n\n- `page_size?: number`\n Page size (default = 10, max = 100).\n\n- `product_id?: string`\n Filter by product restriction (only discounts that apply to this product)\n\n### Returns\n\n- `{ amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n - `amount: number`\n - `business_id: string`\n - `code: string`\n - `created_at: string`\n - `discount_id: string`\n - `metadata: object`\n - `preserve_on_plan_change: boolean`\n - `restricted_to: string[]`\n - `times_used: number`\n - `type: 'percentage'`\n - `expires_at?: string`\n - `name?: string`\n - `subscription_cycles?: number`\n - `usage_limit?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\n// Automatically fetches more pages as needed.\nfor await (const discount of client.discounts.list()) {\n console.log(discount);\n}\n```",
3417
3417
  perLanguage: {
3418
3418
  typescript: {
3419
3419
  method: 'client.discounts.list',
@@ -3473,7 +3473,7 @@ const EMBEDDED_METHODS = [
3473
3473
  'usage_limit?: number;',
3474
3474
  ],
3475
3475
  response: "{ amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }",
3476
- markdown: "## create\n\n`client.discounts.create(amount: number, type: 'percentage', code?: string, expires_at?: string, metadata?: object, name?: string, preserve_on_plan_change?: boolean, restricted_to?: string[], subscription_cycles?: number, usage_limit?: number): { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n**post** `/discounts`\n\nPOST /discounts\nIf `code` is omitted or empty, a random 16-char uppercase code is generated.\n\n### Parameters\n\n- `amount: number`\n The discount amount.\n\n- If `discount_type` is **not** `percentage`, `amount` is in **USD cents**. For example, `100` means `$1.00`.\n Only USD is allowed.\n- If `discount_type` **is** `percentage`, `amount` is in **basis points**. For example, `540` means `5.4%`.\n\nMust be at least 1.\n\n- `type: 'percentage'`\n The discount type (e.g. `percentage`, `flat`, or `flat_per_unit`).\n\n- `code?: string`\n Optionally supply a code (will be uppercased).\n- Must be at least 3 characters if provided.\n- If omitted, a random 16-character code is generated.\n\n- `expires_at?: string`\n When the discount expires, if ever.\n\n- `metadata?: object`\n Additional metadata for the discount\n\n- `name?: string`\n\n- `preserve_on_plan_change?: boolean`\n Whether this discount should be preserved when a subscription changes plans.\nDefault: false (discount is removed on plan change)\n\n- `restricted_to?: string[]`\n List of product IDs to restrict usage (if any).\n\n- `subscription_cycles?: number`\n Number of subscription billing cycles this discount is valid for.\nIf not provided, the discount will be applied indefinitely to\nall recurring payments related to the subscription.\n\n- `usage_limit?: number`\n How many times this discount can be used (if any).\nMust be >= 1 if provided.\n\n### Returns\n\n- `{ amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n - `amount: number`\n - `business_id: string`\n - `code: string`\n - `created_at: string`\n - `discount_id: string`\n - `metadata: object`\n - `preserve_on_plan_change: boolean`\n - `restricted_to: string[]`\n - `times_used: number`\n - `type: 'percentage'`\n - `expires_at?: string`\n - `name?: string`\n - `subscription_cycles?: number`\n - `usage_limit?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst discount = await client.discounts.create({ amount: 0, type: 'percentage' });\n\nconsole.log(discount);\n```",
3476
+ markdown: "## create\n\n`client.discounts.create(amount: number, type: 'percentage', code?: string, expires_at?: string, metadata?: object, name?: string, preserve_on_plan_change?: boolean, restricted_to?: string[], subscription_cycles?: number, usage_limit?: number): { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n**post** `/discounts`\n\nPOST /discounts\nIf `code` is omitted or empty, a random 16-char uppercase code is generated.\n\n### Parameters\n\n- `amount: number`\n The discount amount in **basis points** (e.g. `540` means `5.4%`, `10000` means `100%`).\n\nMust be at least 1.\n\n- `type: 'percentage'`\n The discount type. Currently only `percentage` is supported.\n\n- `code?: string`\n Optionally supply a code (will be uppercased).\n- Must be at least 3 characters if provided.\n- If omitted, a random 16-character code is generated.\n\n- `expires_at?: string`\n When the discount expires, if ever.\n\n- `metadata?: object`\n Additional metadata for the discount\n\n- `name?: string`\n\n- `preserve_on_plan_change?: boolean`\n Whether this discount should be preserved when a subscription changes plans.\nDefault: false (discount is removed on plan change)\n\n- `restricted_to?: string[]`\n List of product IDs to restrict usage (if any).\n\n- `subscription_cycles?: number`\n Number of subscription billing cycles this discount is valid for.\nIf not provided, the discount will be applied indefinitely to\nall recurring payments related to the subscription.\n\n- `usage_limit?: number`\n How many times this discount can be used (if any).\nMust be >= 1 if provided.\n\n### Returns\n\n- `{ amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n - `amount: number`\n - `business_id: string`\n - `code: string`\n - `created_at: string`\n - `discount_id: string`\n - `metadata: object`\n - `preserve_on_plan_change: boolean`\n - `restricted_to: string[]`\n - `times_used: number`\n - `type: 'percentage'`\n - `expires_at?: string`\n - `name?: string`\n - `subscription_cycles?: number`\n - `usage_limit?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst discount = await client.discounts.create({ amount: 0, type: 'percentage' });\n\nconsole.log(discount);\n```",
3477
3477
  perLanguage: {
3478
3478
  typescript: {
3479
3479
  method: 'client.discounts.create',
@@ -3631,7 +3631,7 @@ const EMBEDDED_METHODS = [
3631
3631
  'usage_limit?: number;',
3632
3632
  ],
3633
3633
  response: "{ amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }",
3634
- markdown: "## update\n\n`client.discounts.update(discount_id: string, amount?: number, code?: string, expires_at?: string, metadata?: object, name?: string, preserve_on_plan_change?: boolean, restricted_to?: string[], subscription_cycles?: number, type?: 'percentage', usage_limit?: number): { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n**patch** `/discounts/{discount_id}`\n\nPATCH /discounts/{discount_id}\n\n### Parameters\n\n- `discount_id: string`\n\n- `amount?: number`\n If present, update the discount amount:\n- If `discount_type` is `percentage`, this represents **basis points** (e.g., `540` = `5.4%`).\n- Otherwise, this represents **USD cents** (e.g., `100` = `$1.00`).\n\nMust be at least 1 if provided.\n\n- `code?: string`\n If present, update the discount code (uppercase).\n\n- `expires_at?: string`\n\n- `metadata?: object`\n Additional metadata for the discount\n\n- `name?: string`\n\n- `preserve_on_plan_change?: boolean`\n Whether this discount should be preserved when a subscription changes plans.\nIf not provided, the existing value is kept.\n\n- `restricted_to?: string[]`\n If present, replaces all restricted product IDs with this new set.\nTo remove all restrictions, send empty array\n\n- `subscription_cycles?: number`\n Number of subscription billing cycles this discount is valid for.\nIf not provided, the discount will be applied indefinitely to\nall recurring payments related to the subscription.\n\n- `type?: 'percentage'`\n If present, update the discount type.\n\n- `usage_limit?: number`\n\n### Returns\n\n- `{ amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n - `amount: number`\n - `business_id: string`\n - `code: string`\n - `created_at: string`\n - `discount_id: string`\n - `metadata: object`\n - `preserve_on_plan_change: boolean`\n - `restricted_to: string[]`\n - `times_used: number`\n - `type: 'percentage'`\n - `expires_at?: string`\n - `name?: string`\n - `subscription_cycles?: number`\n - `usage_limit?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst discount = await client.discounts.update('discount_id');\n\nconsole.log(discount);\n```",
3634
+ markdown: "## update\n\n`client.discounts.update(discount_id: string, amount?: number, code?: string, expires_at?: string, metadata?: object, name?: string, preserve_on_plan_change?: boolean, restricted_to?: string[], subscription_cycles?: number, type?: 'percentage', usage_limit?: number): { amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: discount_type; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n**patch** `/discounts/{discount_id}`\n\nPATCH /discounts/{discount_id}\n\n### Parameters\n\n- `discount_id: string`\n\n- `amount?: number`\n If present, update the discount amount in **basis points** (e.g., `540` = `5.4%`, `10000` = `100%`).\n\nMust be at least 1 if provided.\n\n- `code?: string`\n If present, update the discount code (uppercase).\n\n- `expires_at?: string`\n\n- `metadata?: object`\n Additional metadata for the discount\n\n- `name?: string`\n\n- `preserve_on_plan_change?: boolean`\n Whether this discount should be preserved when a subscription changes plans.\nIf not provided, the existing value is kept.\n\n- `restricted_to?: string[]`\n If present, replaces all restricted product IDs with this new set.\nTo remove all restrictions, send empty array\n\n- `subscription_cycles?: number`\n Number of subscription billing cycles this discount is valid for.\nIf not provided, the discount will be applied indefinitely to\nall recurring payments related to the subscription.\n\n- `type?: 'percentage'`\n If present, update the discount type. Currently only `percentage` is supported.\n\n- `usage_limit?: number`\n\n### Returns\n\n- `{ amount: number; business_id: string; code: string; created_at: string; discount_id: string; metadata: object; preserve_on_plan_change: boolean; restricted_to: string[]; times_used: number; type: 'percentage'; expires_at?: string; name?: string; subscription_cycles?: number; usage_limit?: number; }`\n\n - `amount: number`\n - `business_id: string`\n - `code: string`\n - `created_at: string`\n - `discount_id: string`\n - `metadata: object`\n - `preserve_on_plan_change: boolean`\n - `restricted_to: string[]`\n - `times_used: number`\n - `type: 'percentage'`\n - `expires_at?: string`\n - `name?: string`\n - `subscription_cycles?: number`\n - `usage_limit?: number`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst discount = await client.discounts.update('discount_id');\n\nconsole.log(discount);\n```",
3635
3635
  perLanguage: {
3636
3636
  typescript: {
3637
3637
  method: 'client.discounts.update',
@@ -6307,9 +6307,14 @@ const EMBEDDED_METHODS = [
6307
6307
  'name: string;',
6308
6308
  'brand_id?: string;',
6309
6309
  'description?: string;',
6310
+ "effective_at_on_downgrade?: 'immediately' | 'next_billing_date';",
6311
+ "effective_at_on_upgrade?: 'immediately' | 'next_billing_date';",
6312
+ "on_payment_failure?: 'prevent_change' | 'apply_change';",
6313
+ "proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill';",
6314
+ "proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill';",
6310
6315
  ],
6311
- response: '{ id: string; brand_id: string; created_at: string; groups: { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }[]; name: string; updated_at: string; description?: string; image?: string; }',
6312
- markdown: "## create\n\n`client.productCollections.create(groups: { products: group_product[]; group_name?: string; status?: boolean; }[], name: string, brand_id?: string, description?: string): { id: string; brand_id: string; created_at: string; groups: product_collection_group_response[]; name: string; updated_at: string; description?: string; image?: string; }`\n\n**post** `/product-collections`\n\n### Parameters\n\n- `groups: { products: { product_id: string; status?: boolean; }[]; group_name?: string; status?: boolean; }[]`\n Groups of products in this collection\n\n- `name: string`\n Name of the product collection\n\n- `brand_id?: string`\n Brand id for the collection, if not provided will default to primary brand\n\n- `description?: string`\n Optional description of the product collection\n\n### Returns\n\n- `{ id: string; brand_id: string; created_at: string; groups: { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }[]; name: string; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `brand_id: string`\n - `created_at: string`\n - `groups: { group_id: string; products: { id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: currency; description?: string; name?: string; price?: number; price_detail?: price; tax_category?: tax_category; tax_inclusive?: boolean; }[]; status: boolean; group_name?: string; }[]`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n - `image?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst productCollection = await client.productCollections.create({ groups: [{ products: [{ product_id: 'product_id' }] }], name: 'name' });\n\nconsole.log(productCollection);\n```",
6316
+ response: "{ id: string; brand_id: string; created_at: string; groups: { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }[]; name: string; updated_at: string; description?: string; effective_at_on_downgrade?: 'immediately' | 'next_billing_date'; effective_at_on_upgrade?: 'immediately' | 'next_billing_date'; image?: string; on_payment_failure?: 'prevent_change' | 'apply_change'; proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; }",
6317
+ markdown: "## create\n\n`client.productCollections.create(groups: { products: group_product[]; group_name?: string; status?: boolean; }[], name: string, brand_id?: string, description?: string, effective_at_on_downgrade?: 'immediately' | 'next_billing_date', effective_at_on_upgrade?: 'immediately' | 'next_billing_date', on_payment_failure?: 'prevent_change' | 'apply_change', proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill', proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'): { id: string; brand_id: string; created_at: string; groups: product_collection_group_response[]; name: string; updated_at: string; description?: string; effective_at_on_downgrade?: 'immediately' | 'next_billing_date'; effective_at_on_upgrade?: 'immediately' | 'next_billing_date'; image?: string; on_payment_failure?: 'prevent_change' | 'apply_change'; proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; }`\n\n**post** `/product-collections`\n\n### Parameters\n\n- `groups: { products: { product_id: string; status?: boolean; }[]; group_name?: string; status?: boolean; }[]`\n Groups of products in this collection\n\n- `name: string`\n Name of the product collection\n\n- `brand_id?: string`\n Brand id for the collection, if not provided will default to primary brand\n\n- `description?: string`\n Optional description of the product collection\n\n- `effective_at_on_downgrade?: 'immediately' | 'next_billing_date'`\n Default effective_at setting for subscription plan downgrades (NULL = inherit from business)\n\n- `effective_at_on_upgrade?: 'immediately' | 'next_billing_date'`\n Default effective_at setting for subscription plan upgrades (NULL = inherit from business)\n\n- `on_payment_failure?: 'prevent_change' | 'apply_change'`\n Default behavior for subscription plan changes on payment failure (NULL = inherit from business)\n\n- `proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n Default proration billing mode for subscription plan downgrades (NULL = inherit from business)\n\n- `proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n Default proration billing mode for subscription plan upgrades (NULL = inherit from business)\n\n### Returns\n\n- `{ id: string; brand_id: string; created_at: string; groups: { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }[]; name: string; updated_at: string; description?: string; effective_at_on_downgrade?: 'immediately' | 'next_billing_date'; effective_at_on_upgrade?: 'immediately' | 'next_billing_date'; image?: string; on_payment_failure?: 'prevent_change' | 'apply_change'; proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; }`\n\n - `id: string`\n - `brand_id: string`\n - `created_at: string`\n - `groups: { group_id: string; products: { id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: currency; description?: string; name?: string; price?: number; price_detail?: price; tax_category?: tax_category; tax_inclusive?: boolean; }[]; status: boolean; group_name?: string; }[]`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n - `effective_at_on_downgrade?: 'immediately' | 'next_billing_date'`\n - `effective_at_on_upgrade?: 'immediately' | 'next_billing_date'`\n - `image?: string`\n - `on_payment_failure?: 'prevent_change' | 'apply_change'`\n - `proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n - `proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst productCollection = await client.productCollections.create({ groups: [{ products: [{ product_id: 'product_id' }] }], name: 'name' });\n\nconsole.log(productCollection);\n```",
6313
6318
  perLanguage: {
6314
6319
  typescript: {
6315
6320
  method: 'client.productCollections.create',
@@ -6340,7 +6345,7 @@ const EMBEDDED_METHODS = [
6340
6345
  },
6341
6346
  php: {
6342
6347
  method: 'productCollections->create',
6343
- example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$productCollection = $client->productCollections->create(\n groups: [\n [\n 'products' => [['productID' => 'product_id', 'status' => true]],\n 'groupName' => 'group_name',\n 'status' => true,\n ],\n ],\n name: 'name',\n brandID: 'brand_id',\n description: 'description',\n);\n\nvar_dump($productCollection);",
6348
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$productCollection = $client->productCollections->create(\n groups: [\n [\n 'products' => [['productID' => 'product_id', 'status' => true]],\n 'groupName' => 'group_name',\n 'status' => true,\n ],\n ],\n name: 'name',\n brandID: 'brand_id',\n description: 'description',\n effectiveAtOnDowngrade: 'immediately',\n effectiveAtOnUpgrade: 'immediately',\n onPaymentFailure: 'prevent_change',\n prorationBillingModeOnDowngrade: 'prorated_immediately',\n prorationBillingModeOnUpgrade: 'prorated_immediately',\n);\n\nvar_dump($productCollection);",
6344
6349
  },
6345
6350
  csharp: {
6346
6351
  method: 'ProductCollections.Create',
@@ -6357,8 +6362,8 @@ const EMBEDDED_METHODS = [
6357
6362
  stainlessPath: '(resource) product_collections > (method) retrieve',
6358
6363
  qualified: 'client.productCollections.retrieve',
6359
6364
  params: ['id: string;'],
6360
- response: '{ id: string; brand_id: string; created_at: string; groups: { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }[]; name: string; updated_at: string; description?: string; image?: string; }',
6361
- markdown: "## retrieve\n\n`client.productCollections.retrieve(id: string): { id: string; brand_id: string; created_at: string; groups: product_collection_group_response[]; name: string; updated_at: string; description?: string; image?: string; }`\n\n**get** `/product-collections/{id}`\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ id: string; brand_id: string; created_at: string; groups: { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }[]; name: string; updated_at: string; description?: string; image?: string; }`\n\n - `id: string`\n - `brand_id: string`\n - `created_at: string`\n - `groups: { group_id: string; products: { id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: currency; description?: string; name?: string; price?: number; price_detail?: price; tax_category?: tax_category; tax_inclusive?: boolean; }[]; status: boolean; group_name?: string; }[]`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n - `image?: string`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst productCollection = await client.productCollections.retrieve('id');\n\nconsole.log(productCollection);\n```",
6365
+ response: "{ id: string; brand_id: string; created_at: string; groups: { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }[]; name: string; updated_at: string; description?: string; effective_at_on_downgrade?: 'immediately' | 'next_billing_date'; effective_at_on_upgrade?: 'immediately' | 'next_billing_date'; image?: string; on_payment_failure?: 'prevent_change' | 'apply_change'; proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; }",
6366
+ markdown: "## retrieve\n\n`client.productCollections.retrieve(id: string): { id: string; brand_id: string; created_at: string; groups: product_collection_group_response[]; name: string; updated_at: string; description?: string; effective_at_on_downgrade?: 'immediately' | 'next_billing_date'; effective_at_on_upgrade?: 'immediately' | 'next_billing_date'; image?: string; on_payment_failure?: 'prevent_change' | 'apply_change'; proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; }`\n\n**get** `/product-collections/{id}`\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ id: string; brand_id: string; created_at: string; groups: { group_id: string; products: product_collection_product[]; status: boolean; group_name?: string; }[]; name: string; updated_at: string; description?: string; effective_at_on_downgrade?: 'immediately' | 'next_billing_date'; effective_at_on_upgrade?: 'immediately' | 'next_billing_date'; image?: string; on_payment_failure?: 'prevent_change' | 'apply_change'; proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'; }`\n\n - `id: string`\n - `brand_id: string`\n - `created_at: string`\n - `groups: { group_id: string; products: { id: string; addons_count: number; files_count: number; has_credit_entitlements: boolean; is_recurring: boolean; license_key_enabled: boolean; meters_count: number; product_id: string; status: boolean; currency?: currency; description?: string; name?: string; price?: number; price_detail?: price; tax_category?: tax_category; tax_inclusive?: boolean; }[]; status: boolean; group_name?: string; }[]`\n - `name: string`\n - `updated_at: string`\n - `description?: string`\n - `effective_at_on_downgrade?: 'immediately' | 'next_billing_date'`\n - `effective_at_on_upgrade?: 'immediately' | 'next_billing_date'`\n - `image?: string`\n - `on_payment_failure?: 'prevent_change' | 'apply_change'`\n - `proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n - `proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nconst productCollection = await client.productCollections.retrieve('id');\n\nconsole.log(productCollection);\n```",
6362
6367
  perLanguage: {
6363
6368
  typescript: {
6364
6369
  method: 'client.productCollections.retrieve',
@@ -6457,11 +6462,16 @@ const EMBEDDED_METHODS = [
6457
6462
  'id: string;',
6458
6463
  'brand_id?: string;',
6459
6464
  'description?: string;',
6465
+ "effective_at_on_downgrade?: 'immediately' | 'next_billing_date';",
6466
+ "effective_at_on_upgrade?: 'immediately' | 'next_billing_date';",
6460
6467
  'group_order?: string[];',
6461
6468
  'image_id?: string;',
6462
6469
  'name?: string;',
6470
+ "on_payment_failure?: 'prevent_change' | 'apply_change';",
6471
+ "proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill';",
6472
+ "proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill';",
6463
6473
  ],
6464
- markdown: "## update\n\n`client.productCollections.update(id: string, brand_id?: string, description?: string, group_order?: string[], image_id?: string, name?: string): void`\n\n**patch** `/product-collections/{id}`\n\n### Parameters\n\n- `id: string`\n\n- `brand_id?: string`\n Optional brand_id update\n\n- `description?: string`\n Optional description update - pass null to remove, omit to keep unchanged\n\n- `group_order?: string[]`\n Optional new order for groups (array of group UUIDs in desired order)\n\n- `image_id?: string`\n Optional image update - pass null to remove, omit to keep unchanged\n\n- `name?: string`\n Optional new name for the collection\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nawait client.productCollections.update('id')\n```",
6474
+ markdown: "## update\n\n`client.productCollections.update(id: string, brand_id?: string, description?: string, effective_at_on_downgrade?: 'immediately' | 'next_billing_date', effective_at_on_upgrade?: 'immediately' | 'next_billing_date', group_order?: string[], image_id?: string, name?: string, on_payment_failure?: 'prevent_change' | 'apply_change', proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill', proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'): void`\n\n**patch** `/product-collections/{id}`\n\n### Parameters\n\n- `id: string`\n\n- `brand_id?: string`\n Optional brand_id update\n\n- `description?: string`\n Optional description update - pass null to remove, omit to keep unchanged\n\n- `effective_at_on_downgrade?: 'immediately' | 'next_billing_date'`\n Effective_at setting for downgrades: Some(Some(val)) = set, Some(None) = clear (inherit), None = no change\n\n- `effective_at_on_upgrade?: 'immediately' | 'next_billing_date'`\n Effective_at setting for upgrades: Some(Some(val)) = set, Some(None) = clear (inherit), None = no change\n\n- `group_order?: string[]`\n Optional new order for groups (array of group UUIDs in desired order)\n\n- `image_id?: string`\n Optional image update - pass null to remove, omit to keep unchanged\n\n- `name?: string`\n Optional new name for the collection\n\n- `on_payment_failure?: 'prevent_change' | 'apply_change'`\n On payment failure behavior: Some(Some(val)) = set, Some(None) = clear (inherit), None = no change\n\n- `proration_billing_mode_on_downgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n Proration billing mode for downgrades: Some(Some(val)) = set, Some(None) = clear (inherit), None = no change\n\n- `proration_billing_mode_on_upgrade?: 'prorated_immediately' | 'full_immediately' | 'difference_immediately' | 'do_not_bill'`\n Proration billing mode for upgrades: Some(Some(val)) = set, Some(None) = clear (inherit), None = no change\n\n### Example\n\n```typescript\nimport DodoPayments from 'dodopayments';\n\nconst client = new DodoPayments();\n\nawait client.productCollections.update('id')\n```",
6465
6475
  perLanguage: {
6466
6476
  typescript: {
6467
6477
  method: 'client.productCollections.update',
@@ -6492,7 +6502,7 @@ const EMBEDDED_METHODS = [
6492
6502
  },
6493
6503
  php: {
6494
6504
  method: 'productCollections->update',
6495
- example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$result = $client->productCollections->update(\n 'id',\n brandID: 'brand_id',\n description: 'description',\n groupOrder: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],\n imageID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n name: 'name',\n);\n\nvar_dump($result);",
6505
+ example: "<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(bearerToken: 'My Bearer Token', environment: 'test_mode');\n\n$result = $client->productCollections->update(\n 'id',\n brandID: 'brand_id',\n description: 'description',\n effectiveAtOnDowngrade: 'immediately',\n effectiveAtOnUpgrade: 'immediately',\n groupOrder: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],\n imageID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n name: 'name',\n onPaymentFailure: 'prevent_change',\n prorationBillingModeOnDowngrade: 'prorated_immediately',\n prorationBillingModeOnUpgrade: 'prorated_immediately',\n);\n\nvar_dump($result);",
6496
6506
  },
6497
6507
  csharp: {
6498
6508
  method: 'ProductCollections.Update',