dodopayments 1.20.0 → 1.47.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -0
- data/README.md +144 -60
- data/SECURITY.md +2 -2
- data/lib/dodopayments/client.rb +25 -12
- data/lib/dodopayments/errors.rb +23 -1
- data/lib/dodopayments/file_part.rb +2 -2
- data/lib/dodopayments/internal/cursor_page_pagination.rb +90 -0
- data/lib/dodopayments/internal/default_page_number_pagination.rb +2 -2
- data/lib/dodopayments/internal/transport/base_client.rb +90 -10
- data/lib/dodopayments/internal/transport/pooled_net_requester.rb +17 -1
- data/lib/dodopayments/internal/type/array_of.rb +16 -2
- data/lib/dodopayments/internal/type/base_model.rb +152 -59
- data/lib/dodopayments/internal/type/boolean.rb +15 -1
- data/lib/dodopayments/internal/type/converter.rb +86 -33
- data/lib/dodopayments/internal/type/enum.rb +30 -6
- data/lib/dodopayments/internal/type/file_input.rb +13 -1
- data/lib/dodopayments/internal/type/hash_of.rb +16 -2
- data/lib/dodopayments/internal/type/request_parameters.rb +6 -12
- data/lib/dodopayments/internal/type/union.rb +44 -31
- data/lib/dodopayments/internal/type/unknown.rb +15 -1
- data/lib/dodopayments/internal/util.rb +136 -12
- data/lib/dodopayments/internal.rb +9 -0
- data/lib/dodopayments/models/addon_create_params.rb +6 -10
- data/lib/dodopayments/models/addon_list_params.rb +4 -4
- data/lib/dodopayments/models/addon_response.rb +6 -10
- data/lib/dodopayments/models/addon_update_params.rb +6 -10
- data/lib/dodopayments/models/attach_addon.rb +21 -0
- data/lib/dodopayments/models/billing_address.rb +3 -3
- data/lib/dodopayments/models/brand.rb +107 -0
- data/lib/dodopayments/models/brand_create_params.rb +44 -0
- data/lib/dodopayments/models/{webhook_event_retrieve_params.rb → brand_list_params.rb} +2 -2
- data/lib/dodopayments/models/brand_list_response.rb +17 -0
- data/lib/dodopayments/models/brand_retrieve_params.rb +14 -0
- data/lib/dodopayments/models/brand_update_images_params.rb +14 -0
- data/lib/dodopayments/models/brand_update_images_response.rb +25 -0
- data/lib/dodopayments/models/brand_update_params.rb +43 -0
- data/lib/dodopayments/models/create_new_customer.rb +0 -1
- data/lib/dodopayments/models/customer_list_params.rb +13 -5
- data/lib/dodopayments/models/customer_request.rb +3 -3
- data/lib/dodopayments/models/customers/customer_portal_create_params.rb +2 -2
- data/lib/dodopayments/models/discount.rb +15 -4
- data/lib/dodopayments/models/discount_create_params.rb +17 -6
- data/lib/dodopayments/models/discount_list_params.rb +4 -4
- data/lib/dodopayments/models/discount_update_params.rb +16 -5
- data/lib/dodopayments/models/dispute.rb +15 -7
- data/lib/dodopayments/models/dispute_list_params.rb +44 -16
- data/lib/dodopayments/models/dispute_list_response.rb +77 -0
- data/lib/dodopayments/models/get_dispute.rb +101 -0
- data/lib/dodopayments/models/license_key.rb +3 -3
- data/lib/dodopayments/models/license_key_duration.rb +1 -1
- data/lib/dodopayments/models/license_key_list_params.rb +23 -11
- data/lib/dodopayments/models/license_key_update_params.rb +3 -3
- data/lib/dodopayments/models/misc_list_supported_countries_response.rb +1 -1
- data/lib/dodopayments/models/new_customer.rb +27 -0
- data/lib/dodopayments/models/one_time_product_cart_item.rb +0 -1
- data/lib/dodopayments/models/payment.rb +79 -18
- data/lib/dodopayments/models/payment_create_params.rb +22 -41
- data/lib/dodopayments/models/payment_create_response.rb +16 -6
- data/lib/dodopayments/models/payment_list_params.rb +44 -16
- data/lib/dodopayments/models/payment_list_response.rb +16 -4
- data/lib/dodopayments/models/payment_method_types.rb +31 -0
- data/lib/dodopayments/models/payment_retrieve_line_items_params.rb +14 -0
- data/lib/dodopayments/models/payment_retrieve_line_items_response.rb +63 -0
- data/lib/dodopayments/models/payout_list_params.rb +4 -4
- data/lib/dodopayments/models/payout_list_response.rb +7 -3
- data/lib/dodopayments/models/price.rb +57 -30
- data/lib/dodopayments/models/product.rb +85 -12
- data/lib/dodopayments/models/product_create_params.rb +61 -12
- data/lib/dodopayments/models/product_list_params.rb +15 -7
- data/lib/dodopayments/models/product_list_response.rb +19 -11
- data/lib/dodopayments/models/product_update_files_params.rb +20 -0
- data/lib/dodopayments/models/product_update_files_response.rb +22 -0
- data/lib/dodopayments/models/product_update_params.rb +70 -13
- data/lib/dodopayments/models/products/image_update_params.rb +2 -2
- data/lib/dodopayments/models/refund.rb +15 -5
- data/lib/dodopayments/models/refund_create_params.rb +38 -1
- data/lib/dodopayments/models/refund_list_params.rb +26 -13
- data/lib/dodopayments/models/subscription.rb +38 -18
- data/lib/dodopayments/models/subscription_change_plan_params.rb +19 -3
- data/lib/dodopayments/models/subscription_charge_params.rb +38 -2
- data/lib/dodopayments/models/subscription_create_params.rb +53 -66
- data/lib/dodopayments/models/subscription_create_response.rb +24 -8
- data/lib/dodopayments/models/subscription_list_params.rb +37 -14
- data/lib/dodopayments/models/subscription_list_response.rb +37 -16
- data/lib/dodopayments/models/subscription_status.rb +0 -1
- data/lib/dodopayments/models/subscription_update_params.rb +10 -6
- data/lib/dodopayments/models/webhook_create_params.rb +86 -0
- data/lib/dodopayments/models/webhook_create_response.rb +88 -0
- data/lib/dodopayments/models/webhook_delete_params.rb +14 -0
- data/lib/dodopayments/models/webhook_event_type.rb +35 -0
- data/lib/dodopayments/models/webhook_list_params.rb +30 -0
- data/lib/dodopayments/models/webhook_list_response.rb +88 -0
- data/lib/dodopayments/models/webhook_payload.rb +161 -0
- data/lib/dodopayments/models/webhook_retrieve_params.rb +14 -0
- data/lib/dodopayments/models/webhook_retrieve_response.rb +88 -0
- data/lib/dodopayments/models/webhook_update_params.rb +69 -0
- data/lib/dodopayments/models/webhook_update_response.rb +88 -0
- data/lib/dodopayments/models/webhooks/header_retrieve_params.rb +16 -0
- data/lib/dodopayments/models/webhooks/header_retrieve_response.rb +31 -0
- data/lib/dodopayments/models/webhooks/header_update_params.rb +24 -0
- data/lib/dodopayments/models/your_webhook_url_create_params.rb +32 -0
- data/lib/dodopayments/models.rb +241 -0
- data/lib/dodopayments/request_options.rb +4 -0
- data/lib/dodopayments/resources/addons.rb +13 -21
- data/lib/dodopayments/resources/brands.rb +119 -0
- data/lib/dodopayments/resources/customers/customer_portal.rb +3 -3
- data/lib/dodopayments/resources/customers.rb +12 -10
- data/lib/dodopayments/resources/discounts.rb +24 -19
- data/lib/dodopayments/resources/disputes.rb +12 -12
- data/lib/dodopayments/resources/invoices/payments.rb +3 -2
- data/lib/dodopayments/resources/license_key_instances.rb +5 -5
- data/lib/dodopayments/resources/license_keys.rb +13 -13
- data/lib/dodopayments/resources/licenses.rb +4 -4
- data/lib/dodopayments/resources/misc.rb +1 -1
- data/lib/dodopayments/resources/payments.rb +38 -19
- data/lib/dodopayments/resources/payouts.rb +3 -3
- data/lib/dodopayments/resources/products/images.rb +2 -2
- data/lib/dodopayments/resources/products.rb +58 -24
- data/lib/dodopayments/resources/refunds.rb +14 -12
- data/lib/dodopayments/resources/subscriptions.rb +44 -29
- data/lib/dodopayments/resources/webhook_events.rb +0 -52
- data/lib/dodopayments/resources/webhooks/headers.rb +59 -0
- data/lib/dodopayments/resources/webhooks.rb +157 -0
- data/lib/dodopayments/resources/your_webhook_url.rb +56 -0
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +47 -8
- data/rbi/dodopayments/client.rbi +24 -10
- data/rbi/dodopayments/errors.rbi +51 -16
- data/rbi/dodopayments/file_part.rbi +9 -6
- data/rbi/dodopayments/internal/cursor_page_pagination.rbi +25 -0
- data/rbi/dodopayments/internal/default_page_number_pagination.rbi +2 -1
- data/rbi/dodopayments/internal/transport/base_client.rbi +165 -77
- data/rbi/dodopayments/internal/transport/pooled_net_requester.rbi +33 -13
- data/rbi/dodopayments/internal/type/array_of.rbi +40 -24
- data/rbi/dodopayments/internal/type/base_model.rbi +160 -70
- data/rbi/dodopayments/internal/type/base_page.rbi +13 -8
- data/rbi/dodopayments/internal/type/boolean.rbi +24 -14
- data/rbi/dodopayments/internal/type/converter.rbi +135 -33
- data/rbi/dodopayments/internal/type/enum.rbi +29 -13
- data/rbi/dodopayments/internal/type/file_input.rbi +13 -4
- data/rbi/dodopayments/internal/type/hash_of.rbi +40 -24
- data/rbi/dodopayments/internal/type/request_parameters.rbi +14 -4
- data/rbi/dodopayments/internal/type/union.rbi +71 -23
- data/rbi/dodopayments/internal/type/unknown.rbi +24 -6
- data/rbi/dodopayments/internal/util.rbi +274 -89
- data/rbi/dodopayments/internal.rbi +7 -0
- data/rbi/dodopayments/models/addon_cart_response_item.rbi +16 -4
- data/rbi/dodopayments/models/addon_create_params.rbi +33 -24
- data/rbi/dodopayments/models/addon_list_params.rbi +29 -17
- data/rbi/dodopayments/models/addon_response.rbi +33 -27
- data/rbi/dodopayments/models/addon_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/addon_update_images_params.rbi +18 -5
- data/rbi/dodopayments/models/addon_update_images_response.rbi +13 -3
- data/rbi/dodopayments/models/addon_update_params.rbi +34 -25
- data/rbi/dodopayments/models/attach_addon.rbi +28 -0
- data/rbi/dodopayments/models/attach_existing_customer.rbi +13 -3
- data/rbi/dodopayments/models/billing_address.rbi +24 -12
- data/rbi/dodopayments/models/brand.rbi +132 -0
- data/rbi/dodopayments/models/brand_create_params.rbi +68 -0
- data/rbi/dodopayments/models/brand_list_params.rbi +29 -0
- data/rbi/dodopayments/models/brand_list_response.rbi +34 -0
- data/rbi/dodopayments/models/brand_retrieve_params.rbi +32 -0
- data/rbi/dodopayments/models/brand_update_images_params.rbi +32 -0
- data/rbi/dodopayments/models/brand_update_images_response.rbi +36 -0
- data/rbi/dodopayments/models/brand_update_params.rbi +64 -0
- data/rbi/dodopayments/models/country_code.rbi +255 -252
- data/rbi/dodopayments/models/create_new_customer.rbi +27 -11
- data/rbi/dodopayments/models/currency.rbi +149 -148
- data/rbi/dodopayments/models/customer.rbi +27 -15
- data/rbi/dodopayments/models/customer_create_params.rbi +22 -14
- data/rbi/dodopayments/models/customer_limited_details.rbi +21 -4
- data/rbi/dodopayments/models/customer_list_params.rbi +43 -17
- data/rbi/dodopayments/models/customer_portal_session.rbi +13 -3
- data/rbi/dodopayments/models/customer_request.rbi +10 -2
- data/rbi/dodopayments/models/customer_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/customer_update_params.rbi +21 -13
- data/rbi/dodopayments/models/customers/customer_portal_create_params.rbi +26 -8
- data/rbi/dodopayments/models/discount.rbi +42 -22
- data/rbi/dodopayments/models/discount_create_params.rbi +43 -20
- data/rbi/dodopayments/models/discount_delete_params.rbi +18 -5
- data/rbi/dodopayments/models/discount_list_params.rbi +32 -17
- data/rbi/dodopayments/models/discount_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/discount_type.rbi +7 -4
- data/rbi/dodopayments/models/discount_update_params.rbi +43 -20
- data/rbi/dodopayments/models/dispute.rbi +41 -23
- data/rbi/dodopayments/models/dispute_list_params.rbi +178 -33
- data/rbi/dodopayments/models/dispute_list_response.rbi +98 -0
- data/rbi/dodopayments/models/dispute_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/dispute_stage.rbi +11 -6
- data/rbi/dodopayments/models/dispute_status.rbi +20 -10
- data/rbi/dodopayments/models/get_dispute.rbi +124 -0
- data/rbi/dodopayments/models/intent_status.rbi +32 -14
- data/rbi/dodopayments/models/invoices/payment_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/license_activate_params.rbi +21 -6
- data/rbi/dodopayments/models/license_deactivate_params.rbi +21 -13
- data/rbi/dodopayments/models/license_key.rbi +31 -23
- data/rbi/dodopayments/models/license_key_duration.rbi +24 -5
- data/rbi/dodopayments/models/license_key_instance.rbi +19 -4
- data/rbi/dodopayments/models/license_key_instance_list_params.rbi +23 -14
- data/rbi/dodopayments/models/license_key_instance_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/license_key_instance_update_params.rbi +19 -6
- data/rbi/dodopayments/models/license_key_list_params.rbi +91 -26
- data/rbi/dodopayments/models/license_key_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/license_key_status.rbi +10 -6
- data/rbi/dodopayments/models/license_key_update_params.rbi +23 -14
- data/rbi/dodopayments/models/license_validate_params.rbi +25 -13
- data/rbi/dodopayments/models/license_validate_response.rbi +13 -3
- data/rbi/dodopayments/models/misc_list_supported_countries_params.rbi +18 -5
- data/rbi/dodopayments/models/misc_list_supported_countries_response.rbi +1 -1
- data/rbi/dodopayments/models/new_customer.rbi +39 -0
- data/rbi/dodopayments/models/one_time_product_cart_item.rbi +23 -4
- data/rbi/dodopayments/models/payment.rbi +149 -54
- data/rbi/dodopayments/models/payment_create_params.rbi +67 -87
- data/rbi/dodopayments/models/payment_create_response.rbi +45 -22
- data/rbi/dodopayments/models/payment_list_params.rbi +149 -32
- data/rbi/dodopayments/models/payment_list_response.rbi +47 -26
- data/rbi/dodopayments/models/payment_method_types.rbi +52 -0
- data/rbi/dodopayments/models/payment_retrieve_line_items_params.rbi +32 -0
- data/rbi/dodopayments/models/payment_retrieve_line_items_response.rbi +114 -0
- data/rbi/dodopayments/models/payment_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/payout_list_params.rbi +29 -17
- data/rbi/dodopayments/models/payout_list_response.rbi +82 -35
- data/rbi/dodopayments/models/price.rbi +142 -55
- data/rbi/dodopayments/models/product.rbi +177 -38
- data/rbi/dodopayments/models/product_create_params.rbi +151 -36
- data/rbi/dodopayments/models/product_delete_params.rbi +18 -5
- data/rbi/dodopayments/models/product_list_params.rbi +50 -21
- data/rbi/dodopayments/models/product_list_response.rbi +57 -42
- data/rbi/dodopayments/models/product_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/product_unarchive_params.rbi +18 -5
- data/rbi/dodopayments/models/product_update_files_params.rbi +38 -0
- data/rbi/dodopayments/models/product_update_files_response.rbi +29 -0
- data/rbi/dodopayments/models/product_update_params.rbi +160 -37
- data/rbi/dodopayments/models/products/image_update_params.rbi +20 -8
- data/rbi/dodopayments/models/products/image_update_response.rbi +18 -4
- data/rbi/dodopayments/models/refund.rbi +39 -21
- data/rbi/dodopayments/models/refund_create_params.rbi +87 -11
- data/rbi/dodopayments/models/refund_list_params.rbi +86 -29
- data/rbi/dodopayments/models/refund_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/refund_status.rbi +10 -7
- data/rbi/dodopayments/models/subscription.rbi +83 -47
- data/rbi/dodopayments/models/subscription_change_plan_params.rbi +68 -21
- data/rbi/dodopayments/models/subscription_charge_params.rbi +65 -6
- data/rbi/dodopayments/models/subscription_charge_response.rbi +13 -3
- data/rbi/dodopayments/models/subscription_create_params.rbi +136 -128
- data/rbi/dodopayments/models/subscription_create_response.rbi +51 -22
- data/rbi/dodopayments/models/subscription_list_params.rbi +125 -29
- data/rbi/dodopayments/models/subscription_list_response.rbi +85 -44
- data/rbi/dodopayments/models/subscription_retrieve_params.rbi +18 -5
- data/rbi/dodopayments/models/subscription_status.rbi +16 -10
- data/rbi/dodopayments/models/subscription_update_params.rbi +63 -33
- data/rbi/dodopayments/models/tax_category.rbi +11 -7
- data/rbi/dodopayments/models/time_interval.rbi +10 -7
- data/rbi/dodopayments/models/webhook_create_params.rbi +115 -0
- data/rbi/dodopayments/models/webhook_create_response.rbi +112 -0
- data/rbi/dodopayments/models/webhook_delete_params.rbi +32 -0
- data/rbi/dodopayments/models/webhook_event_type.rbi +102 -0
- data/rbi/dodopayments/models/webhook_list_params.rbi +54 -0
- data/rbi/dodopayments/models/webhook_list_response.rbi +112 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +440 -0
- data/rbi/dodopayments/models/webhook_retrieve_params.rbi +32 -0
- data/rbi/dodopayments/models/webhook_retrieve_response.rbi +112 -0
- data/rbi/dodopayments/models/webhook_update_params.rbi +94 -0
- data/rbi/dodopayments/models/webhook_update_response.rbi +112 -0
- data/rbi/dodopayments/models/webhooks/header_retrieve_params.rbi +34 -0
- data/rbi/dodopayments/models/webhooks/header_retrieve_response.rbi +50 -0
- data/rbi/dodopayments/models/webhooks/header_update_params.rbi +48 -0
- data/rbi/dodopayments/models/your_webhook_url_create_params.rbi +56 -0
- data/rbi/dodopayments/models.rbi +209 -0
- data/rbi/dodopayments/request_options.rbi +18 -7
- data/rbi/dodopayments/resources/addons.rbi +44 -27
- data/rbi/dodopayments/resources/brands.rbi +89 -0
- data/rbi/dodopayments/resources/customers/customer_portal.rbi +8 -6
- data/rbi/dodopayments/resources/customers.rbi +31 -17
- data/rbi/dodopayments/resources/discounts.rbi +54 -22
- data/rbi/dodopayments/resources/disputes.rbi +26 -14
- data/rbi/dodopayments/resources/invoices/payments.rbi +10 -3
- data/rbi/dodopayments/resources/invoices.rbi +2 -1
- data/rbi/dodopayments/resources/license_key_instances.rbi +25 -10
- data/rbi/dodopayments/resources/license_keys.rbi +29 -15
- data/rbi/dodopayments/resources/licenses.rbi +25 -12
- data/rbi/dodopayments/resources/misc.rbi +7 -4
- data/rbi/dodopayments/resources/payments.rbi +61 -27
- data/rbi/dodopayments/resources/payouts.rbi +12 -6
- data/rbi/dodopayments/resources/products/images.rbi +10 -4
- data/rbi/dodopayments/resources/products.rbi +118 -41
- data/rbi/dodopayments/resources/refunds.rbi +35 -15
- data/rbi/dodopayments/resources/subscriptions.rbi +98 -50
- data/rbi/dodopayments/resources/webhook_events.rbi +2 -34
- data/rbi/dodopayments/resources/webhooks/headers.rbi +40 -0
- data/rbi/dodopayments/resources/webhooks.rbi +127 -0
- data/rbi/dodopayments/resources/your_webhook_url.rbi +51 -0
- data/sig/dodopayments/client.rbs +8 -2
- data/sig/dodopayments/errors.rbs +9 -0
- data/sig/dodopayments/internal/cursor_page_pagination.rbs +15 -0
- data/sig/dodopayments/internal/transport/base_client.rbs +17 -2
- data/sig/dodopayments/internal/transport/pooled_net_requester.rbs +4 -0
- data/sig/dodopayments/internal/type/array_of.rbs +3 -0
- data/sig/dodopayments/internal/type/base_model.rbs +13 -5
- data/sig/dodopayments/internal/type/base_page.rbs +1 -1
- data/sig/dodopayments/internal/type/boolean.rbs +3 -0
- data/sig/dodopayments/internal/type/converter.rbs +26 -1
- data/sig/dodopayments/internal/type/enum.rbs +3 -0
- data/sig/dodopayments/internal/type/file_input.rbs +2 -0
- data/sig/dodopayments/internal/type/hash_of.rbs +3 -0
- data/sig/dodopayments/internal/type/request_parameters.rbs +5 -1
- data/sig/dodopayments/internal/type/union.rbs +5 -2
- data/sig/dodopayments/internal/type/unknown.rbs +3 -0
- data/sig/dodopayments/internal/util.rbs +27 -0
- data/sig/dodopayments/internal.rbs +4 -0
- data/sig/dodopayments/models/addon_cart_response_item.rbs +1 -1
- data/sig/dodopayments/models/addon_create_params.rbs +8 -1
- data/sig/dodopayments/models/addon_list_params.rbs +14 -6
- data/sig/dodopayments/models/addon_response.rbs +12 -1
- data/sig/dodopayments/models/addon_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/addon_update_images_params.rbs +1 -1
- data/sig/dodopayments/models/addon_update_images_response.rbs +1 -1
- data/sig/dodopayments/models/addon_update_params.rbs +9 -1
- data/sig/dodopayments/models/attach_addon.rbs +15 -0
- data/sig/dodopayments/models/attach_existing_customer.rbs +1 -1
- data/sig/dodopayments/models/billing_address.rbs +7 -1
- data/sig/dodopayments/models/brand.rbs +88 -0
- data/sig/dodopayments/models/brand_create_params.rbs +46 -0
- data/sig/dodopayments/models/{webhook_event_retrieve_params.rbs → brand_list_params.rbs} +3 -3
- data/sig/dodopayments/models/brand_list_response.rbs +13 -0
- data/sig/dodopayments/models/brand_retrieve_params.rbs +15 -0
- data/sig/dodopayments/models/brand_update_images_params.rbs +15 -0
- data/sig/dodopayments/models/brand_update_images_response.rbs +15 -0
- data/sig/dodopayments/models/brand_update_params.rbs +41 -0
- data/sig/dodopayments/models/create_new_customer.rbs +6 -1
- data/sig/dodopayments/models/customer.rbs +8 -1
- data/sig/dodopayments/models/customer_create_params.rbs +6 -1
- data/sig/dodopayments/models/customer_limited_details.rbs +1 -1
- data/sig/dodopayments/models/customer_list_params.rbs +20 -6
- data/sig/dodopayments/models/customer_portal_session.rbs +1 -1
- data/sig/dodopayments/models/customer_request.rbs +2 -3
- data/sig/dodopayments/models/customer_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/customer_update_params.rbs +5 -1
- data/sig/dodopayments/models/customers/customer_portal_create_params.rbs +9 -4
- data/sig/dodopayments/models/discount.rbs +18 -1
- data/sig/dodopayments/models/discount_create_params.rbs +15 -1
- data/sig/dodopayments/models/discount_delete_params.rbs +1 -1
- data/sig/dodopayments/models/discount_list_params.rbs +14 -6
- data/sig/dodopayments/models/discount_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/discount_update_params.rbs +15 -1
- data/sig/dodopayments/models/dispute.rbs +17 -3
- data/sig/dodopayments/models/dispute_list_params.rbs +84 -22
- data/sig/dodopayments/models/dispute_list_response.rbs +55 -0
- data/sig/dodopayments/models/dispute_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/get_dispute.rbs +70 -0
- data/sig/dodopayments/models/invoices/payment_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/license_activate_params.rbs +5 -1
- data/sig/dodopayments/models/license_deactivate_params.rbs +5 -1
- data/sig/dodopayments/models/license_key.rbs +14 -1
- data/sig/dodopayments/models/license_key_duration.rbs +4 -1
- data/sig/dodopayments/models/license_key_instance.rbs +7 -1
- data/sig/dodopayments/models/license_key_instance_list_params.rbs +6 -1
- data/sig/dodopayments/models/license_key_instance_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/license_key_instance_update_params.rbs +4 -1
- data/sig/dodopayments/models/license_key_list_params.rbs +47 -16
- data/sig/dodopayments/models/license_key_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/license_key_update_params.rbs +6 -1
- data/sig/dodopayments/models/license_validate_params.rbs +5 -1
- data/sig/dodopayments/models/license_validate_response.rbs +1 -1
- data/sig/dodopayments/models/misc_list_supported_countries_params.rbs +1 -1
- data/sig/dodopayments/models/new_customer.rbs +21 -0
- data/sig/dodopayments/models/one_time_product_cart_item.rbs +5 -1
- data/sig/dodopayments/models/payment.rbs +76 -17
- data/sig/dodopayments/models/payment_create_params.rbs +23 -55
- data/sig/dodopayments/models/payment_create_response.rbs +21 -7
- data/sig/dodopayments/models/payment_list_params.rbs +85 -22
- data/sig/dodopayments/models/payment_list_response.rbs +25 -4
- data/sig/dodopayments/models/payment_method_types.rbs +48 -0
- data/sig/dodopayments/models/payment_retrieve_line_items_params.rbs +15 -0
- data/sig/dodopayments/models/payment_retrieve_line_items_response.rbs +67 -0
- data/sig/dodopayments/models/payment_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/payout_list_params.rbs +14 -6
- data/sig/dodopayments/models/payout_list_response.rbs +17 -1
- data/sig/dodopayments/models/price.rbs +53 -13
- data/sig/dodopayments/models/product.rbs +80 -4
- data/sig/dodopayments/models/product_create_params.rbs +45 -4
- data/sig/dodopayments/models/product_delete_params.rbs +1 -1
- data/sig/dodopayments/models/product_list_params.rbs +29 -10
- data/sig/dodopayments/models/product_list_response.rbs +20 -1
- data/sig/dodopayments/models/product_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/product_unarchive_params.rbs +1 -1
- data/sig/dodopayments/models/product_update_files_params.rbs +23 -0
- data/sig/dodopayments/models/product_update_files_response.rbs +15 -0
- data/sig/dodopayments/models/product_update_params.rbs +58 -4
- data/sig/dodopayments/models/products/image_update_params.rbs +9 -4
- data/sig/dodopayments/models/products/image_update_response.rbs +1 -1
- data/sig/dodopayments/models/refund.rbs +15 -1
- data/sig/dodopayments/models/refund_create_params.rbs +38 -2
- data/sig/dodopayments/models/refund_list_params.rbs +54 -19
- data/sig/dodopayments/models/refund_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/subscription.rbs +43 -10
- data/sig/dodopayments/models/subscription_change_plan_params.rbs +16 -3
- data/sig/dodopayments/models/subscription_charge_params.rbs +27 -2
- data/sig/dodopayments/models/subscription_charge_response.rbs +1 -1
- data/sig/dodopayments/models/subscription_create_params.rbs +58 -73
- data/sig/dodopayments/models/subscription_create_response.rbs +26 -7
- data/sig/dodopayments/models/subscription_list_params.rbs +64 -19
- data/sig/dodopayments/models/subscription_list_response.rbs +39 -7
- data/sig/dodopayments/models/subscription_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/subscription_status.rbs +1 -2
- data/sig/dodopayments/models/subscription_update_params.rbs +20 -8
- data/sig/dodopayments/models/webhook_create_params.rbs +65 -0
- data/sig/dodopayments/models/webhook_create_response.rbs +60 -0
- data/sig/dodopayments/models/webhook_delete_params.rbs +15 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +54 -0
- data/sig/dodopayments/models/webhook_list_params.rbs +28 -0
- data/sig/dodopayments/models/webhook_list_response.rbs +60 -0
- data/sig/dodopayments/models/webhook_payload.rbs +203 -0
- data/sig/dodopayments/models/webhook_retrieve_params.rbs +15 -0
- data/sig/dodopayments/models/webhook_retrieve_response.rbs +60 -0
- data/sig/dodopayments/models/webhook_update_params.rbs +51 -0
- data/sig/dodopayments/models/webhook_update_response.rbs +60 -0
- data/sig/dodopayments/models/webhooks/header_retrieve_params.rbs +17 -0
- data/sig/dodopayments/models/webhooks/header_retrieve_response.rbs +24 -0
- data/sig/dodopayments/models/webhooks/header_update_params.rbs +26 -0
- data/sig/dodopayments/models/your_webhook_url_create_params.rbs +42 -0
- data/sig/dodopayments/models.rbs +201 -0
- data/sig/dodopayments/request_options.rbs +1 -1
- data/sig/dodopayments/resources/addons.rbs +6 -6
- data/sig/dodopayments/resources/brands.rbs +39 -0
- data/sig/dodopayments/resources/customers/customer_portal.rbs +2 -2
- data/sig/dodopayments/resources/customers.rbs +7 -6
- data/sig/dodopayments/resources/discounts.rbs +8 -6
- data/sig/dodopayments/resources/disputes.rbs +9 -9
- data/sig/dodopayments/resources/invoices/payments.rbs +1 -1
- data/sig/dodopayments/resources/license_key_instances.rbs +3 -3
- data/sig/dodopayments/resources/license_keys.rbs +8 -8
- data/sig/dodopayments/resources/licenses.rbs +1 -1
- data/sig/dodopayments/resources/payments.rbs +17 -11
- data/sig/dodopayments/resources/payouts.rbs +2 -2
- data/sig/dodopayments/resources/products/images.rbs +1 -1
- data/sig/dodopayments/resources/products.rbs +20 -7
- data/sig/dodopayments/resources/refunds.rbs +10 -9
- data/sig/dodopayments/resources/subscriptions.rbs +21 -14
- data/sig/dodopayments/resources/webhook_events.rbs +0 -15
- data/sig/dodopayments/resources/webhooks/headers.rbs +20 -0
- data/sig/dodopayments/resources/webhooks.rbs +48 -0
- data/sig/dodopayments/resources/your_webhook_url.rbs +18 -0
- metadata +116 -11
- data/lib/dodopayments/models/webhook_event.rb +0 -58
- data/lib/dodopayments/models/webhook_event_list_params.rb +0 -66
- data/rbi/dodopayments/models/webhook_event.rbi +0 -71
- data/rbi/dodopayments/models/webhook_event_list_params.rbi +0 -77
- data/rbi/dodopayments/models/webhook_event_retrieve_params.rbi +0 -19
- data/sig/dodopayments/models/webhook_event.rbs +0 -46
- data/sig/dodopayments/models/webhook_event_list_params.rbs +0 -43
@@ -16,6 +16,12 @@ module Dodopayments
|
|
16
16
|
# @return [Time]
|
17
17
|
required :created_at, Time
|
18
18
|
|
19
|
+
# @!attribute is_partial
|
20
|
+
# If true the refund is a partial refund
|
21
|
+
#
|
22
|
+
# @return [Boolean]
|
23
|
+
required :is_partial, Dodopayments::Internal::Type::Boolean
|
24
|
+
|
19
25
|
# @!attribute payment_id
|
20
26
|
# The unique identifier of the payment associated with the refund.
|
21
27
|
#
|
@@ -29,9 +35,10 @@ module Dodopayments
|
|
29
35
|
required :refund_id, String
|
30
36
|
|
31
37
|
# @!attribute status
|
38
|
+
# The current status of the refund.
|
32
39
|
#
|
33
40
|
# @return [Symbol, Dodopayments::Models::RefundStatus]
|
34
|
-
required :status, enum: -> { Dodopayments::
|
41
|
+
required :status, enum: -> { Dodopayments::RefundStatus }
|
35
42
|
|
36
43
|
# @!attribute amount
|
37
44
|
# The refunded amount.
|
@@ -40,9 +47,10 @@ module Dodopayments
|
|
40
47
|
optional :amount, Integer, nil?: true
|
41
48
|
|
42
49
|
# @!attribute currency
|
50
|
+
# The currency of the refund, represented as an ISO 4217 currency code.
|
43
51
|
#
|
44
52
|
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
45
|
-
optional :currency, enum: -> { Dodopayments::
|
53
|
+
optional :currency, enum: -> { Dodopayments::Currency }, nil?: true
|
46
54
|
|
47
55
|
# @!attribute reason
|
48
56
|
# The reason provided for the refund, if any. Optional.
|
@@ -50,20 +58,22 @@ module Dodopayments
|
|
50
58
|
# @return [String, nil]
|
51
59
|
optional :reason, String, nil?: true
|
52
60
|
|
53
|
-
# @!method initialize(business_id:, created_at:, payment_id:, refund_id:, status:, amount: nil, currency: nil, reason: nil)
|
61
|
+
# @!method initialize(business_id:, created_at:, is_partial:, payment_id:, refund_id:, status:, amount: nil, currency: nil, reason: nil)
|
54
62
|
# @param business_id [String] The unique identifier of the business issuing the refund.
|
55
63
|
#
|
56
64
|
# @param created_at [Time] The timestamp of when the refund was created in UTC.
|
57
65
|
#
|
66
|
+
# @param is_partial [Boolean] If true the refund is a partial refund
|
67
|
+
#
|
58
68
|
# @param payment_id [String] The unique identifier of the payment associated with the refund.
|
59
69
|
#
|
60
70
|
# @param refund_id [String] The unique identifier of the refund.
|
61
71
|
#
|
62
|
-
# @param status [Symbol, Dodopayments::Models::RefundStatus]
|
72
|
+
# @param status [Symbol, Dodopayments::Models::RefundStatus] The current status of the refund.
|
63
73
|
#
|
64
74
|
# @param amount [Integer, nil] The refunded amount.
|
65
75
|
#
|
66
|
-
# @param currency [Symbol, Dodopayments::Models::Currency, nil]
|
76
|
+
# @param currency [Symbol, Dodopayments::Models::Currency, nil] The currency of the refund, represented as an ISO 4217 currency code.
|
67
77
|
#
|
68
78
|
# @param reason [String, nil] The reason provided for the refund, if any. Optional.
|
69
79
|
end
|
@@ -13,18 +13,55 @@ module Dodopayments
|
|
13
13
|
# @return [String]
|
14
14
|
required :payment_id, String
|
15
15
|
|
16
|
+
# @!attribute items
|
17
|
+
# Partially Refund an Individual Item
|
18
|
+
#
|
19
|
+
# @return [Array<Dodopayments::Models::RefundCreateParams::Item>, nil]
|
20
|
+
optional :items,
|
21
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::RefundCreateParams::Item] },
|
22
|
+
nil?: true
|
23
|
+
|
16
24
|
# @!attribute reason
|
17
25
|
# The reason for the refund, if any. Maximum length is 3000 characters. Optional.
|
18
26
|
#
|
19
27
|
# @return [String, nil]
|
20
28
|
optional :reason, String, nil?: true
|
21
29
|
|
22
|
-
# @!method initialize(payment_id:, reason: nil, request_options: {})
|
30
|
+
# @!method initialize(payment_id:, items: nil, reason: nil, request_options: {})
|
23
31
|
# @param payment_id [String] The unique identifier of the payment to be refunded.
|
24
32
|
#
|
33
|
+
# @param items [Array<Dodopayments::Models::RefundCreateParams::Item>, nil] Partially Refund an Individual Item
|
34
|
+
#
|
25
35
|
# @param reason [String, nil] The reason for the refund, if any. Maximum length is 3000 characters. Optional.
|
26
36
|
#
|
27
37
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
38
|
+
|
39
|
+
class Item < Dodopayments::Internal::Type::BaseModel
|
40
|
+
# @!attribute item_id
|
41
|
+
# The id of the item (i.e. `product_id` or `addon_id`)
|
42
|
+
#
|
43
|
+
# @return [String]
|
44
|
+
required :item_id, String
|
45
|
+
|
46
|
+
# @!attribute amount
|
47
|
+
# The amount to refund. if None the whole item is refunded
|
48
|
+
#
|
49
|
+
# @return [Integer, nil]
|
50
|
+
optional :amount, Integer, nil?: true
|
51
|
+
|
52
|
+
# @!attribute tax_inclusive
|
53
|
+
# Specify if tax is inclusive of the refund. Default true.
|
54
|
+
#
|
55
|
+
# @return [Boolean, nil]
|
56
|
+
optional :tax_inclusive, Dodopayments::Internal::Type::Boolean
|
57
|
+
|
58
|
+
# @!method initialize(item_id:, amount: nil, tax_inclusive: nil)
|
59
|
+
# @param item_id [String] The id of the item (i.e. `product_id` or `addon_id`)
|
60
|
+
#
|
61
|
+
# @param amount [Integer, nil] The amount to refund. if None the whole item is refunded
|
62
|
+
#
|
63
|
+
# @param tax_inclusive [Boolean] Specify if tax is inclusive of the refund. Default true.
|
64
|
+
end
|
28
65
|
end
|
29
66
|
end
|
30
67
|
end
|
@@ -11,52 +11,65 @@ module Dodopayments
|
|
11
11
|
# Get events after this created time
|
12
12
|
#
|
13
13
|
# @return [Time, nil]
|
14
|
-
optional :created_at_gte, Time
|
14
|
+
optional :created_at_gte, Time
|
15
15
|
|
16
16
|
# @!attribute created_at_lte
|
17
17
|
# Get events created before this time
|
18
18
|
#
|
19
19
|
# @return [Time, nil]
|
20
|
-
optional :created_at_lte, Time
|
20
|
+
optional :created_at_lte, Time
|
21
21
|
|
22
22
|
# @!attribute customer_id
|
23
23
|
# Filter by customer_id
|
24
24
|
#
|
25
25
|
# @return [String, nil]
|
26
|
-
optional :customer_id, String
|
26
|
+
optional :customer_id, String
|
27
27
|
|
28
28
|
# @!attribute page_number
|
29
29
|
# Page number default is 0
|
30
30
|
#
|
31
31
|
# @return [Integer, nil]
|
32
|
-
optional :page_number, Integer
|
32
|
+
optional :page_number, Integer
|
33
33
|
|
34
34
|
# @!attribute page_size
|
35
35
|
# Page size default is 10 max is 100
|
36
36
|
#
|
37
37
|
# @return [Integer, nil]
|
38
|
-
optional :page_size, Integer
|
38
|
+
optional :page_size, Integer
|
39
39
|
|
40
40
|
# @!attribute status
|
41
41
|
# Filter by status
|
42
42
|
#
|
43
|
-
# @return [Symbol, Dodopayments::Models::
|
44
|
-
optional :status, enum: -> { Dodopayments::
|
43
|
+
# @return [Symbol, Dodopayments::Models::RefundListParams::Status, nil]
|
44
|
+
optional :status, enum: -> { Dodopayments::RefundListParams::Status }
|
45
45
|
|
46
46
|
# @!method initialize(created_at_gte: nil, created_at_lte: nil, customer_id: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
|
47
|
-
# @param created_at_gte [Time
|
47
|
+
# @param created_at_gte [Time] Get events after this created time
|
48
48
|
#
|
49
|
-
# @param created_at_lte [Time
|
49
|
+
# @param created_at_lte [Time] Get events created before this time
|
50
50
|
#
|
51
|
-
# @param customer_id [String
|
51
|
+
# @param customer_id [String] Filter by customer_id
|
52
52
|
#
|
53
|
-
# @param page_number [Integer
|
53
|
+
# @param page_number [Integer] Page number default is 0
|
54
54
|
#
|
55
|
-
# @param page_size [Integer
|
55
|
+
# @param page_size [Integer] Page size default is 10 max is 100
|
56
56
|
#
|
57
|
-
# @param status [Symbol, Dodopayments::Models::
|
57
|
+
# @param status [Symbol, Dodopayments::Models::RefundListParams::Status] Filter by status
|
58
58
|
#
|
59
59
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
60
|
+
|
61
|
+
# Filter by status
|
62
|
+
module Status
|
63
|
+
extend Dodopayments::Internal::Type::Enum
|
64
|
+
|
65
|
+
SUCCEEDED = :succeeded
|
66
|
+
FAILED = :failed
|
67
|
+
PENDING = :pending
|
68
|
+
REVIEW = :review
|
69
|
+
|
70
|
+
# @!method self.values
|
71
|
+
# @return [Array<Symbol>]
|
72
|
+
end
|
60
73
|
end
|
61
74
|
end
|
62
75
|
end
|
@@ -8,13 +8,19 @@ module Dodopayments
|
|
8
8
|
# Addons associated with this subscription
|
9
9
|
#
|
10
10
|
# @return [Array<Dodopayments::Models::AddonCartResponseItem>]
|
11
|
-
required :addons,
|
12
|
-
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::AddonCartResponseItem] }
|
11
|
+
required :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AddonCartResponseItem] }
|
13
12
|
|
14
13
|
# @!attribute billing
|
14
|
+
# Billing address details for payments
|
15
15
|
#
|
16
16
|
# @return [Dodopayments::Models::BillingAddress]
|
17
|
-
required :billing, -> { Dodopayments::
|
17
|
+
required :billing, -> { Dodopayments::BillingAddress }
|
18
|
+
|
19
|
+
# @!attribute cancel_at_next_billing_date
|
20
|
+
# Indicates if the subscription will cancel at the next billing date
|
21
|
+
#
|
22
|
+
# @return [Boolean]
|
23
|
+
required :cancel_at_next_billing_date, Dodopayments::Internal::Type::Boolean
|
18
24
|
|
19
25
|
# @!attribute created_at
|
20
26
|
# Timestamp when the subscription was created
|
@@ -23,16 +29,19 @@ module Dodopayments
|
|
23
29
|
required :created_at, Time
|
24
30
|
|
25
31
|
# @!attribute currency
|
32
|
+
# Currency used for the subscription payments
|
26
33
|
#
|
27
34
|
# @return [Symbol, Dodopayments::Models::Currency]
|
28
|
-
required :currency, enum: -> { Dodopayments::
|
35
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
29
36
|
|
30
37
|
# @!attribute customer
|
38
|
+
# Customer details associated with the subscription
|
31
39
|
#
|
32
40
|
# @return [Dodopayments::Models::CustomerLimitedDetails]
|
33
|
-
required :customer, -> { Dodopayments::
|
41
|
+
required :customer, -> { Dodopayments::CustomerLimitedDetails }
|
34
42
|
|
35
43
|
# @!attribute metadata
|
44
|
+
# Additional custom data associated with the subscription
|
36
45
|
#
|
37
46
|
# @return [Hash{Symbol=>String}]
|
38
47
|
required :metadata, Dodopayments::Internal::Type::HashOf[String]
|
@@ -57,9 +66,10 @@ module Dodopayments
|
|
57
66
|
required :payment_frequency_count, Integer
|
58
67
|
|
59
68
|
# @!attribute payment_frequency_interval
|
69
|
+
# Time interval for payment frequency (e.g. month, year)
|
60
70
|
#
|
61
71
|
# @return [Symbol, Dodopayments::Models::TimeInterval]
|
62
|
-
required :payment_frequency_interval, enum: -> { Dodopayments::
|
72
|
+
required :payment_frequency_interval, enum: -> { Dodopayments::TimeInterval }
|
63
73
|
|
64
74
|
# @!attribute previous_billing_date
|
65
75
|
# Timestamp of the last payment. Indicates the start of current billing period
|
@@ -87,9 +97,10 @@ module Dodopayments
|
|
87
97
|
required :recurring_pre_tax_amount, Integer
|
88
98
|
|
89
99
|
# @!attribute status
|
100
|
+
# Current status of the subscription
|
90
101
|
#
|
91
102
|
# @return [Symbol, Dodopayments::Models::SubscriptionStatus]
|
92
|
-
required :status, enum: -> { Dodopayments::
|
103
|
+
required :status, enum: -> { Dodopayments::SubscriptionStatus }
|
93
104
|
|
94
105
|
# @!attribute subscription_id
|
95
106
|
# Unique identifier for the subscription
|
@@ -104,9 +115,10 @@ module Dodopayments
|
|
104
115
|
required :subscription_period_count, Integer
|
105
116
|
|
106
117
|
# @!attribute subscription_period_interval
|
118
|
+
# Time interval for the subscription period (e.g. month, year)
|
107
119
|
#
|
108
120
|
# @return [Symbol, Dodopayments::Models::TimeInterval]
|
109
|
-
required :subscription_period_interval, enum: -> { Dodopayments::
|
121
|
+
required :subscription_period_interval, enum: -> { Dodopayments::TimeInterval }
|
110
122
|
|
111
123
|
# @!attribute tax_inclusive
|
112
124
|
# Indicates if the recurring_pre_tax_amount is tax inclusive
|
@@ -126,13 +138,19 @@ module Dodopayments
|
|
126
138
|
# @return [Time, nil]
|
127
139
|
optional :cancelled_at, Time, nil?: true
|
128
140
|
|
141
|
+
# @!attribute discount_cycles_remaining
|
142
|
+
# Number of remaining discount cycles if discount is applied
|
143
|
+
#
|
144
|
+
# @return [Integer, nil]
|
145
|
+
optional :discount_cycles_remaining, Integer, nil?: true
|
146
|
+
|
129
147
|
# @!attribute discount_id
|
130
148
|
# The discount id if discount is applied
|
131
149
|
#
|
132
150
|
# @return [String, nil]
|
133
151
|
optional :discount_id, String, nil?: true
|
134
152
|
|
135
|
-
# @!method initialize(addons:, billing:, created_at:, currency:, customer:, metadata:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_id: nil)
|
153
|
+
# @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil)
|
136
154
|
# Some parameter documentations has been truncated, see
|
137
155
|
# {Dodopayments::Models::Subscription} for more details.
|
138
156
|
#
|
@@ -140,24 +158,25 @@ module Dodopayments
|
|
140
158
|
#
|
141
159
|
# @param addons [Array<Dodopayments::Models::AddonCartResponseItem>] Addons associated with this subscription
|
142
160
|
#
|
143
|
-
# @param billing [Dodopayments::Models::BillingAddress]
|
161
|
+
# @param billing [Dodopayments::Models::BillingAddress] Billing address details for payments
|
162
|
+
#
|
163
|
+
# @param cancel_at_next_billing_date [Boolean] Indicates if the subscription will cancel at the next billing date
|
144
164
|
#
|
145
165
|
# @param created_at [Time] Timestamp when the subscription was created
|
146
166
|
#
|
147
|
-
# @param currency [Symbol, Dodopayments::Models::Currency]
|
167
|
+
# @param currency [Symbol, Dodopayments::Models::Currency] Currency used for the subscription payments
|
148
168
|
#
|
149
|
-
# @param customer [Dodopayments::Models::CustomerLimitedDetails]
|
169
|
+
# @param customer [Dodopayments::Models::CustomerLimitedDetails] Customer details associated with the subscription
|
150
170
|
#
|
151
|
-
# @param metadata [Hash{Symbol=>String}]
|
171
|
+
# @param metadata [Hash{Symbol=>String}] Additional custom data associated with the subscription
|
152
172
|
#
|
153
173
|
# @param next_billing_date [Time] Timestamp of the next scheduled billing. Indicates the end of current billing pe
|
154
|
-
# ...
|
155
174
|
#
|
156
175
|
# @param on_demand [Boolean] Wether the subscription is on-demand or not
|
157
176
|
#
|
158
177
|
# @param payment_frequency_count [Integer] Number of payment frequency intervals
|
159
178
|
#
|
160
|
-
# @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval]
|
179
|
+
# @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval] Time interval for payment frequency (e.g. month, year)
|
161
180
|
#
|
162
181
|
# @param previous_billing_date [Time] Timestamp of the last payment. Indicates the start of current billing period
|
163
182
|
#
|
@@ -166,15 +185,14 @@ module Dodopayments
|
|
166
185
|
# @param quantity [Integer] Number of units/items included in the subscription
|
167
186
|
#
|
168
187
|
# @param recurring_pre_tax_amount [Integer] Amount charged before tax for each recurring payment in smallest currency unit (
|
169
|
-
# ...
|
170
188
|
#
|
171
|
-
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus]
|
189
|
+
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus] Current status of the subscription
|
172
190
|
#
|
173
191
|
# @param subscription_id [String] Unique identifier for the subscription
|
174
192
|
#
|
175
193
|
# @param subscription_period_count [Integer] Number of subscription period intervals
|
176
194
|
#
|
177
|
-
# @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval]
|
195
|
+
# @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval] Time interval for the subscription period (e.g. month, year)
|
178
196
|
#
|
179
197
|
# @param tax_inclusive [Boolean] Indicates if the recurring_pre_tax_amount is tax inclusive
|
180
198
|
#
|
@@ -182,6 +200,8 @@ module Dodopayments
|
|
182
200
|
#
|
183
201
|
# @param cancelled_at [Time, nil] Cancelled timestamp if the subscription is cancelled
|
184
202
|
#
|
203
|
+
# @param discount_cycles_remaining [Integer, nil] Number of remaining discount cycles if discount is applied
|
204
|
+
#
|
185
205
|
# @param discount_id [String, nil] The discount id if discount is applied
|
186
206
|
end
|
187
207
|
end
|
@@ -14,10 +14,11 @@ module Dodopayments
|
|
14
14
|
required :product_id, String
|
15
15
|
|
16
16
|
# @!attribute proration_billing_mode
|
17
|
+
# Proration Billing Mode
|
17
18
|
#
|
18
19
|
# @return [Symbol, Dodopayments::Models::SubscriptionChangePlanParams::ProrationBillingMode]
|
19
20
|
required :proration_billing_mode,
|
20
|
-
enum: -> { Dodopayments::
|
21
|
+
enum: -> { Dodopayments::SubscriptionChangePlanParams::ProrationBillingMode }
|
21
22
|
|
22
23
|
# @!attribute quantity
|
23
24
|
# Number of units to subscribe for. Must be at least 1.
|
@@ -25,19 +26,34 @@ module Dodopayments
|
|
25
26
|
# @return [Integer]
|
26
27
|
required :quantity, Integer
|
27
28
|
|
28
|
-
# @!
|
29
|
+
# @!attribute addons
|
30
|
+
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
31
|
+
# addons
|
32
|
+
#
|
33
|
+
# @return [Array<Dodopayments::Models::AttachAddon>, nil]
|
34
|
+
optional :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachAddon] }, nil?: true
|
35
|
+
|
36
|
+
# @!method initialize(product_id:, proration_billing_mode:, quantity:, addons: nil, request_options: {})
|
37
|
+
# Some parameter documentations has been truncated, see
|
38
|
+
# {Dodopayments::Models::SubscriptionChangePlanParams} for more details.
|
39
|
+
#
|
29
40
|
# @param product_id [String] Unique identifier of the product to subscribe to
|
30
41
|
#
|
31
|
-
# @param proration_billing_mode [Symbol, Dodopayments::Models::SubscriptionChangePlanParams::ProrationBillingMode]
|
42
|
+
# @param proration_billing_mode [Symbol, Dodopayments::Models::SubscriptionChangePlanParams::ProrationBillingMode] Proration Billing Mode
|
32
43
|
#
|
33
44
|
# @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
|
34
45
|
#
|
46
|
+
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
47
|
+
#
|
35
48
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
36
49
|
|
50
|
+
# Proration Billing Mode
|
37
51
|
module ProrationBillingMode
|
38
52
|
extend Dodopayments::Internal::Type::Enum
|
39
53
|
|
40
54
|
PRORATED_IMMEDIATELY = :prorated_immediately
|
55
|
+
FULL_IMMEDIATELY = :full_immediately
|
56
|
+
DIFFERENCE_IMMEDIATELY = :difference_immediately
|
41
57
|
|
42
58
|
# @!method self.values
|
43
59
|
# @return [Array<Symbol>]
|
@@ -14,12 +14,48 @@ module Dodopayments
|
|
14
14
|
# @return [Integer]
|
15
15
|
required :product_price, Integer
|
16
16
|
|
17
|
-
# @!
|
17
|
+
# @!attribute adaptive_currency_fees_inclusive
|
18
|
+
# Whether adaptive currency fees should be included in the product_price (true) or
|
19
|
+
# added on top (false). This field is ignored if adaptive pricing is not enabled
|
20
|
+
# for the business.
|
21
|
+
#
|
22
|
+
# @return [Boolean, nil]
|
23
|
+
optional :adaptive_currency_fees_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
|
24
|
+
|
25
|
+
# @!attribute metadata
|
26
|
+
# Metadata for the payment. If not passed, the metadata of the subscription will
|
27
|
+
# be taken
|
28
|
+
#
|
29
|
+
# @return [Hash{Symbol=>String}, nil]
|
30
|
+
optional :metadata, Dodopayments::Internal::Type::HashOf[String], nil?: true
|
31
|
+
|
32
|
+
# @!attribute product_currency
|
33
|
+
# Optional currency of the product price. If not specified, defaults to the
|
34
|
+
# currency of the product.
|
35
|
+
#
|
36
|
+
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
37
|
+
optional :product_currency, enum: -> { Dodopayments::Currency }, nil?: true
|
38
|
+
|
39
|
+
# @!attribute product_description
|
40
|
+
# Optional product description override for billing and line items. If not
|
41
|
+
# specified, the stored description of the product will be used.
|
42
|
+
#
|
43
|
+
# @return [String, nil]
|
44
|
+
optional :product_description, String, nil?: true
|
45
|
+
|
46
|
+
# @!method initialize(product_price:, adaptive_currency_fees_inclusive: nil, metadata: nil, product_currency: nil, product_description: nil, request_options: {})
|
18
47
|
# Some parameter documentations has been truncated, see
|
19
48
|
# {Dodopayments::Models::SubscriptionChargeParams} for more details.
|
20
49
|
#
|
21
50
|
# @param product_price [Integer] The product price. Represented in the lowest denomination of the currency (e.g.,
|
22
|
-
#
|
51
|
+
#
|
52
|
+
# @param adaptive_currency_fees_inclusive [Boolean, nil] Whether adaptive currency fees should be included in the product_price (true) or
|
53
|
+
#
|
54
|
+
# @param metadata [Hash{Symbol=>String}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
55
|
+
#
|
56
|
+
# @param product_currency [Symbol, Dodopayments::Models::Currency, nil] Optional currency of the product price. If not specified, defaults to the curren
|
57
|
+
#
|
58
|
+
# @param product_description [String, nil] Optional product description override for billing and line items.
|
23
59
|
#
|
24
60
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
25
61
|
end
|
@@ -8,14 +8,16 @@ module Dodopayments
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
9
9
|
|
10
10
|
# @!attribute billing
|
11
|
+
# Billing address information for the subscription
|
11
12
|
#
|
12
13
|
# @return [Dodopayments::Models::BillingAddress]
|
13
|
-
required :billing, -> { Dodopayments::
|
14
|
+
required :billing, -> { Dodopayments::BillingAddress }
|
14
15
|
|
15
16
|
# @!attribute customer
|
17
|
+
# Customer details for the subscription
|
16
18
|
#
|
17
|
-
# @return [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::
|
18
|
-
required :customer, union: -> { Dodopayments::
|
19
|
+
# @return [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer]
|
20
|
+
required :customer, union: -> { Dodopayments::CustomerRequest }
|
19
21
|
|
20
22
|
# @!attribute product_id
|
21
23
|
# Unique identifier of the product to subscribe to
|
@@ -32,10 +34,8 @@ module Dodopayments
|
|
32
34
|
# @!attribute addons
|
33
35
|
# Attach addons to this subscription
|
34
36
|
#
|
35
|
-
# @return [Array<Dodopayments::Models::
|
36
|
-
optional :addons,
|
37
|
-
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::SubscriptionCreateParams::Addon] },
|
38
|
-
nil?: true
|
37
|
+
# @return [Array<Dodopayments::Models::AttachAddon>, nil]
|
38
|
+
optional :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachAddon] }, nil?: true
|
39
39
|
|
40
40
|
# @!attribute allowed_payment_method_types
|
41
41
|
# List of payment methods allowed during checkout.
|
@@ -45,15 +45,17 @@ module Dodopayments
|
|
45
45
|
# Availability still depends on other factors (e.g., customer location, merchant
|
46
46
|
# settings).
|
47
47
|
#
|
48
|
-
# @return [Array<Symbol, Dodopayments::Models::
|
48
|
+
# @return [Array<Symbol, Dodopayments::Models::PaymentMethodTypes>, nil]
|
49
49
|
optional :allowed_payment_method_types,
|
50
|
-
-> { Dodopayments::Internal::Type::ArrayOf[enum: Dodopayments::
|
50
|
+
-> { Dodopayments::Internal::Type::ArrayOf[enum: Dodopayments::PaymentMethodTypes] },
|
51
51
|
nil?: true
|
52
52
|
|
53
53
|
# @!attribute billing_currency
|
54
|
+
# Fix the currency in which the end customer is billed. If Dodo Payments cannot
|
55
|
+
# support that currency for this transaction, it will not proceed
|
54
56
|
#
|
55
57
|
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
56
|
-
optional :billing_currency, enum: -> { Dodopayments::
|
58
|
+
optional :billing_currency, enum: -> { Dodopayments::Currency }, nil?: true
|
57
59
|
|
58
60
|
# @!attribute discount_code
|
59
61
|
# Discount Code to apply to the subscription
|
@@ -62,6 +64,7 @@ module Dodopayments
|
|
62
64
|
optional :discount_code, String, nil?: true
|
63
65
|
|
64
66
|
# @!attribute metadata
|
67
|
+
# Additional metadata for the subscription Defaults to empty if not specified
|
65
68
|
#
|
66
69
|
# @return [Hash{Symbol=>String}, nil]
|
67
70
|
optional :metadata, Dodopayments::Internal::Type::HashOf[String]
|
@@ -69,7 +72,7 @@ module Dodopayments
|
|
69
72
|
# @!attribute on_demand
|
70
73
|
#
|
71
74
|
# @return [Dodopayments::Models::SubscriptionCreateParams::OnDemand, nil]
|
72
|
-
optional :on_demand, -> { Dodopayments::
|
75
|
+
optional :on_demand, -> { Dodopayments::SubscriptionCreateParams::OnDemand }, nil?: true
|
73
76
|
|
74
77
|
# @!attribute payment_link
|
75
78
|
# If true, generates a payment link. Defaults to false if not specified.
|
@@ -107,81 +110,38 @@ module Dodopayments
|
|
107
110
|
# Some parameter documentations has been truncated, see
|
108
111
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
109
112
|
#
|
110
|
-
# @param billing [Dodopayments::Models::BillingAddress]
|
113
|
+
# @param billing [Dodopayments::Models::BillingAddress] Billing address information for the subscription
|
111
114
|
#
|
112
|
-
# @param customer [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::
|
115
|
+
# @param customer [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer] Customer details for the subscription
|
113
116
|
#
|
114
117
|
# @param product_id [String] Unique identifier of the product to subscribe to
|
115
118
|
#
|
116
119
|
# @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
|
117
120
|
#
|
118
|
-
# @param addons [Array<Dodopayments::Models::
|
121
|
+
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Attach addons to this subscription
|
119
122
|
#
|
120
|
-
# @param allowed_payment_method_types [Array<Symbol, Dodopayments::Models::
|
123
|
+
# @param allowed_payment_method_types [Array<Symbol, Dodopayments::Models::PaymentMethodTypes>, nil] List of payment methods allowed during checkout.
|
121
124
|
#
|
122
|
-
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil]
|
125
|
+
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Fix the currency in which the end customer is billed.
|
123
126
|
#
|
124
127
|
# @param discount_code [String, nil] Discount Code to apply to the subscription
|
125
128
|
#
|
126
|
-
# @param metadata [Hash{Symbol=>String}]
|
129
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
127
130
|
#
|
128
131
|
# @param on_demand [Dodopayments::Models::SubscriptionCreateParams::OnDemand, nil]
|
129
132
|
#
|
130
|
-
# @param payment_link [Boolean, nil] If true, generates a payment link.
|
133
|
+
# @param payment_link [Boolean, nil] If true, generates a payment link.
|
131
134
|
#
|
132
135
|
# @param return_url [String, nil] Optional URL to redirect after successful subscription creation
|
133
136
|
#
|
134
|
-
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer
|
137
|
+
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer
|
135
138
|
#
|
136
139
|
# @param tax_id [String, nil] Tax ID in case the payment is B2B. If tax id validation fails the payment creati
|
137
|
-
# ...
|
138
140
|
#
|
139
|
-
# @param trial_period_days [Integer, nil] Optional trial period in days
|
141
|
+
# @param trial_period_days [Integer, nil] Optional trial period in days
|
140
142
|
#
|
141
143
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
142
144
|
|
143
|
-
class Addon < Dodopayments::Internal::Type::BaseModel
|
144
|
-
# @!attribute addon_id
|
145
|
-
#
|
146
|
-
# @return [String]
|
147
|
-
required :addon_id, String
|
148
|
-
|
149
|
-
# @!attribute quantity
|
150
|
-
#
|
151
|
-
# @return [Integer]
|
152
|
-
required :quantity, Integer
|
153
|
-
|
154
|
-
# @!method initialize(addon_id:, quantity:)
|
155
|
-
# @param addon_id [String]
|
156
|
-
# @param quantity [Integer]
|
157
|
-
end
|
158
|
-
|
159
|
-
module AllowedPaymentMethodType
|
160
|
-
extend Dodopayments::Internal::Type::Enum
|
161
|
-
|
162
|
-
CREDIT = :credit
|
163
|
-
DEBIT = :debit
|
164
|
-
UPI_COLLECT = :upi_collect
|
165
|
-
UPI_INTENT = :upi_intent
|
166
|
-
APPLE_PAY = :apple_pay
|
167
|
-
CASHAPP = :cashapp
|
168
|
-
GOOGLE_PAY = :google_pay
|
169
|
-
MULTIBANCO = :multibanco
|
170
|
-
BANCONTACT_CARD = :bancontact_card
|
171
|
-
EPS = :eps
|
172
|
-
IDEAL = :ideal
|
173
|
-
PRZELEWY24 = :przelewy24
|
174
|
-
AFFIRM = :affirm
|
175
|
-
KLARNA = :klarna
|
176
|
-
SEPA = :sepa
|
177
|
-
ACH = :ach
|
178
|
-
AMAZON_PAY = :amazon_pay
|
179
|
-
AFTERPAY_CLEARPAY = :afterpay_clearpay
|
180
|
-
|
181
|
-
# @!method self.values
|
182
|
-
# @return [Array<Symbol>]
|
183
|
-
end
|
184
|
-
|
185
145
|
class OnDemand < Dodopayments::Internal::Type::BaseModel
|
186
146
|
# @!attribute mandate_only
|
187
147
|
# If set as True, does not perform any charge and only authorizes payment method
|
@@ -190,6 +150,28 @@ module Dodopayments
|
|
190
150
|
# @return [Boolean]
|
191
151
|
required :mandate_only, Dodopayments::Internal::Type::Boolean
|
192
152
|
|
153
|
+
# @!attribute adaptive_currency_fees_inclusive
|
154
|
+
# Whether adaptive currency fees should be included in the product_price (true) or
|
155
|
+
# added on top (false). This field is ignored if adaptive pricing is not enabled
|
156
|
+
# for the business.
|
157
|
+
#
|
158
|
+
# @return [Boolean, nil]
|
159
|
+
optional :adaptive_currency_fees_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
|
160
|
+
|
161
|
+
# @!attribute product_currency
|
162
|
+
# Optional currency of the product price. If not specified, defaults to the
|
163
|
+
# currency of the product.
|
164
|
+
#
|
165
|
+
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
166
|
+
optional :product_currency, enum: -> { Dodopayments::Currency }, nil?: true
|
167
|
+
|
168
|
+
# @!attribute product_description
|
169
|
+
# Optional product description override for billing and line items. If not
|
170
|
+
# specified, the stored description of the product will be used.
|
171
|
+
#
|
172
|
+
# @return [String, nil]
|
173
|
+
optional :product_description, String, nil?: true
|
174
|
+
|
193
175
|
# @!attribute product_price
|
194
176
|
# Product price for the initial charge to customer If not specified the stored
|
195
177
|
# price of the product will be used Represented in the lowest denomination of the
|
@@ -198,14 +180,19 @@ module Dodopayments
|
|
198
180
|
# @return [Integer, nil]
|
199
181
|
optional :product_price, Integer, nil?: true
|
200
182
|
|
201
|
-
# @!method initialize(mandate_only:, product_price: nil)
|
183
|
+
# @!method initialize(mandate_only:, adaptive_currency_fees_inclusive: nil, product_currency: nil, product_description: nil, product_price: nil)
|
202
184
|
# Some parameter documentations has been truncated, see
|
203
185
|
# {Dodopayments::Models::SubscriptionCreateParams::OnDemand} for more details.
|
204
186
|
#
|
205
187
|
# @param mandate_only [Boolean] If set as True, does not perform any charge and only authorizes payment method d
|
206
|
-
# ...
|
207
188
|
#
|
208
|
-
# @param
|
189
|
+
# @param adaptive_currency_fees_inclusive [Boolean, nil] Whether adaptive currency fees should be included in the product_price (true) or
|
190
|
+
#
|
191
|
+
# @param product_currency [Symbol, Dodopayments::Models::Currency, nil] Optional currency of the product price. If not specified, defaults to the curren
|
192
|
+
#
|
193
|
+
# @param product_description [String, nil] Optional product description override for billing and line items.
|
194
|
+
#
|
195
|
+
# @param product_price [Integer, nil] Product price for the initial charge to customer
|
209
196
|
end
|
210
197
|
end
|
211
198
|
end
|