dodopayments 1.22.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 +13 -0
- data/README.md +143 -59
- data/SECURITY.md +2 -2
- data/lib/dodopayments/client.rb +16 -4
- 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/transport/base_client.rb +88 -8
- 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 +155 -54
- 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 +4 -4
- data/lib/dodopayments/internal/type/union.rb +44 -31
- data/lib/dodopayments/internal/type/unknown.rb +15 -1
- data/lib/dodopayments/internal/util.rb +119 -11
- 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 +6 -5
- data/lib/dodopayments/models/dispute_list_params.rb +44 -16
- data/lib/dodopayments/models/dispute_list_response.rb +6 -5
- data/lib/dodopayments/models/{dispute_retrieve_response.rb → get_dispute.rb} +11 -9
- 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 +50 -21
- 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 +9 -23
- 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 +77 -3
- 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 +10 -10
- 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 +39 -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 +46 -9
- data/rbi/dodopayments/client.rbi +19 -6
- 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 +272 -91
- 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 +32 -22
- data/rbi/dodopayments/models/dispute_list_params.rbi +178 -33
- data/rbi/dodopayments/models/dispute_list_response.rbi +34 -21
- 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/{dispute_retrieve_response.rbi → get_dispute.rbi} +40 -28
- 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 +125 -62
- 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 +61 -40
- 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 +50 -8
- 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 +95 -53
- 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 +6 -0
- 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 +25 -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 +11 -1
- data/sig/dodopayments/models/dispute_list_params.rbs +84 -22
- data/sig/dodopayments/models/dispute_list_response.rbs +10 -1
- data/sig/dodopayments/models/dispute_retrieve_params.rbs +1 -1
- data/sig/dodopayments/models/{dispute_retrieve_response.rbs → get_dispute.rbs} +18 -6
- 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 +60 -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 +14 -17
- 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 +39 -3
- 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 +8 -8
- 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 -15
- 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 +110 -14
- 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
@@ -22,6 +22,12 @@ module Dodopayments
|
|
22
22
|
# @return [Boolean]
|
23
23
|
required :is_recurring, Dodopayments::Internal::Type::Boolean
|
24
24
|
|
25
|
+
# @!attribute metadata
|
26
|
+
# Additional custom data associated with the product
|
27
|
+
#
|
28
|
+
# @return [Hash{Symbol=>String}]
|
29
|
+
required :metadata, Dodopayments::Internal::Type::HashOf[String]
|
30
|
+
|
25
31
|
# @!attribute product_id
|
26
32
|
# Unique identifier for the product.
|
27
33
|
#
|
@@ -29,11 +35,10 @@ module Dodopayments
|
|
29
35
|
required :product_id, String
|
30
36
|
|
31
37
|
# @!attribute tax_category
|
32
|
-
#
|
33
|
-
# and services.
|
38
|
+
# Tax category associated with the product.
|
34
39
|
#
|
35
40
|
# @return [Symbol, Dodopayments::Models::TaxCategory]
|
36
|
-
required :tax_category, enum: -> { Dodopayments::
|
41
|
+
required :tax_category, enum: -> { Dodopayments::TaxCategory }
|
37
42
|
|
38
43
|
# @!attribute updated_at
|
39
44
|
# Timestamp when the product was last updated.
|
@@ -42,9 +47,10 @@ module Dodopayments
|
|
42
47
|
required :updated_at, Time
|
43
48
|
|
44
49
|
# @!attribute currency
|
50
|
+
# Currency of the price
|
45
51
|
#
|
46
52
|
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
47
|
-
optional :currency, enum: -> { Dodopayments::
|
53
|
+
optional :currency, enum: -> { Dodopayments::Currency }, nil?: true
|
48
54
|
|
49
55
|
# @!attribute description
|
50
56
|
# Description of the product, optional.
|
@@ -80,9 +86,10 @@ module Dodopayments
|
|
80
86
|
optional :price, Integer, nil?: true
|
81
87
|
|
82
88
|
# @!attribute price_detail
|
89
|
+
# Details of the price
|
83
90
|
#
|
84
91
|
# @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
|
85
|
-
optional :price_detail, union: -> { Dodopayments::
|
92
|
+
optional :price_detail, union: -> { Dodopayments::Price }, nil?: true
|
86
93
|
|
87
94
|
# @!attribute tax_inclusive
|
88
95
|
# Indicates if the price is tax inclusive
|
@@ -90,7 +97,7 @@ module Dodopayments
|
|
90
97
|
# @return [Boolean, nil]
|
91
98
|
optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
|
92
99
|
|
93
|
-
# @!method initialize(business_id:, created_at:, is_recurring:, product_id:, tax_category:, updated_at:, currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, tax_inclusive: nil)
|
100
|
+
# @!method initialize(business_id:, created_at:, is_recurring:, metadata:, product_id:, tax_category:, updated_at:, currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, tax_inclusive: nil)
|
94
101
|
# Some parameter documentations has been truncated, see
|
95
102
|
# {Dodopayments::Models::ProductListResponse} for more details.
|
96
103
|
#
|
@@ -100,14 +107,15 @@ module Dodopayments
|
|
100
107
|
#
|
101
108
|
# @param is_recurring [Boolean] Indicates if the product is recurring (e.g., subscriptions).
|
102
109
|
#
|
110
|
+
# @param metadata [Hash{Symbol=>String}] Additional custom data associated with the product
|
111
|
+
#
|
103
112
|
# @param product_id [String] Unique identifier for the product.
|
104
113
|
#
|
105
|
-
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory]
|
106
|
-
# ...
|
114
|
+
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Tax category associated with the product.
|
107
115
|
#
|
108
116
|
# @param updated_at [Time] Timestamp when the product was last updated.
|
109
117
|
#
|
110
|
-
# @param currency [Symbol, Dodopayments::Models::Currency, nil]
|
118
|
+
# @param currency [Symbol, Dodopayments::Models::Currency, nil] Currency of the price
|
111
119
|
#
|
112
120
|
# @param description [String, nil] Description of the product, optional.
|
113
121
|
#
|
@@ -115,9 +123,9 @@ module Dodopayments
|
|
115
123
|
#
|
116
124
|
# @param name [String, nil] Name of the product, optional.
|
117
125
|
#
|
118
|
-
# @param price [Integer, nil] Price of the product, optional.
|
126
|
+
# @param price [Integer, nil] Price of the product, optional.
|
119
127
|
#
|
120
|
-
# @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
|
128
|
+
# @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil] Details of the price
|
121
129
|
#
|
122
130
|
# @param tax_inclusive [Boolean, nil] Indicates if the price is tax inclusive
|
123
131
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
# @see Dodopayments::Resources::Products#update_files
|
6
|
+
class ProductUpdateFilesParams < Dodopayments::Internal::Type::BaseModel
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
# @!attribute file_name
|
11
|
+
#
|
12
|
+
# @return [String]
|
13
|
+
required :file_name, String
|
14
|
+
|
15
|
+
# @!method initialize(file_name:, request_options: {})
|
16
|
+
# @param file_name [String]
|
17
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
# @see Dodopayments::Resources::Products#update_files
|
6
|
+
class ProductUpdateFilesResponse < Dodopayments::Internal::Type::BaseModel
|
7
|
+
# @!attribute file_id
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
required :file_id, String
|
11
|
+
|
12
|
+
# @!attribute url
|
13
|
+
#
|
14
|
+
# @return [String]
|
15
|
+
required :url, String
|
16
|
+
|
17
|
+
# @!method initialize(file_id:, url:)
|
18
|
+
# @param file_id [String]
|
19
|
+
# @param url [String]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -13,12 +13,25 @@ module Dodopayments
|
|
13
13
|
# @return [Array<String>, nil]
|
14
14
|
optional :addons, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
|
15
15
|
|
16
|
+
# @!attribute brand_id
|
17
|
+
#
|
18
|
+
# @return [String, nil]
|
19
|
+
optional :brand_id, String, nil?: true
|
20
|
+
|
16
21
|
# @!attribute description
|
17
22
|
# Description of the product, optional and must be at most 1000 characters.
|
18
23
|
#
|
19
24
|
# @return [String, nil]
|
20
25
|
optional :description, String, nil?: true
|
21
26
|
|
27
|
+
# @!attribute digital_product_delivery
|
28
|
+
# Choose how you would like you digital product delivered
|
29
|
+
#
|
30
|
+
# @return [Dodopayments::Models::ProductUpdateParams::DigitalProductDelivery, nil]
|
31
|
+
optional :digital_product_delivery,
|
32
|
+
-> { Dodopayments::ProductUpdateParams::DigitalProductDelivery },
|
33
|
+
nil?: true
|
34
|
+
|
22
35
|
# @!attribute image_id
|
23
36
|
# Product image id after its uploaded to S3
|
24
37
|
#
|
@@ -44,9 +57,13 @@ module Dodopayments
|
|
44
57
|
optional :license_key_activations_limit, Integer, nil?: true
|
45
58
|
|
46
59
|
# @!attribute license_key_duration
|
60
|
+
# Duration of the license key if enabled.
|
61
|
+
#
|
62
|
+
# Only applicable if `license_key_enabled` is `true`. Represents the duration in
|
63
|
+
# days for which the license key is valid.
|
47
64
|
#
|
48
65
|
# @return [Dodopayments::Models::LicenseKeyDuration, nil]
|
49
|
-
optional :license_key_duration, -> { Dodopayments::
|
66
|
+
optional :license_key_duration, -> { Dodopayments::LicenseKeyDuration }, nil?: true
|
50
67
|
|
51
68
|
# @!attribute license_key_enabled
|
52
69
|
# Whether the product requires a license key.
|
@@ -57,6 +74,12 @@ module Dodopayments
|
|
57
74
|
# @return [Boolean, nil]
|
58
75
|
optional :license_key_enabled, Dodopayments::Internal::Type::Boolean, nil?: true
|
59
76
|
|
77
|
+
# @!attribute metadata
|
78
|
+
# Additional metadata for the product
|
79
|
+
#
|
80
|
+
# @return [Hash{Symbol=>String}, nil]
|
81
|
+
optional :metadata, Dodopayments::Internal::Type::HashOf[String], nil?: true
|
82
|
+
|
60
83
|
# @!attribute name
|
61
84
|
# Name of the product, optional and must be at most 100 characters.
|
62
85
|
#
|
@@ -64,43 +87,77 @@ module Dodopayments
|
|
64
87
|
optional :name, String, nil?: true
|
65
88
|
|
66
89
|
# @!attribute price
|
90
|
+
# Price details of the product.
|
67
91
|
#
|
68
92
|
# @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
|
69
|
-
optional :price, union: -> { Dodopayments::
|
93
|
+
optional :price, union: -> { Dodopayments::Price }, nil?: true
|
70
94
|
|
71
95
|
# @!attribute tax_category
|
72
|
-
#
|
73
|
-
# and services.
|
96
|
+
# Tax category of the product.
|
74
97
|
#
|
75
98
|
# @return [Symbol, Dodopayments::Models::TaxCategory, nil]
|
76
|
-
optional :tax_category, enum: -> { Dodopayments::
|
99
|
+
optional :tax_category, enum: -> { Dodopayments::TaxCategory }, nil?: true
|
77
100
|
|
78
|
-
# @!method initialize(addons: nil, description: nil, image_id: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, name: nil, price: nil, tax_category: nil, request_options: {})
|
101
|
+
# @!method initialize(addons: nil, brand_id: nil, description: nil, digital_product_delivery: nil, image_id: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, name: nil, price: nil, tax_category: nil, request_options: {})
|
79
102
|
# Some parameter documentations has been truncated, see
|
80
103
|
# {Dodopayments::Models::ProductUpdateParams} for more details.
|
81
104
|
#
|
82
105
|
# @param addons [Array<String>, nil] Available Addons for subscription products
|
83
106
|
#
|
107
|
+
# @param brand_id [String, nil]
|
108
|
+
#
|
84
109
|
# @param description [String, nil] Description of the product, optional and must be at most 1000 characters.
|
85
110
|
#
|
111
|
+
# @param digital_product_delivery [Dodopayments::Models::ProductUpdateParams::DigitalProductDelivery, nil] Choose how you would like you digital product delivered
|
112
|
+
#
|
86
113
|
# @param image_id [String, nil] Product image id after its uploaded to S3
|
87
114
|
#
|
88
|
-
# @param license_key_activation_message [String, nil] Message sent to the customer upon license key activation.
|
115
|
+
# @param license_key_activation_message [String, nil] Message sent to the customer upon license key activation.
|
89
116
|
#
|
90
|
-
# @param license_key_activations_limit [Integer, nil] Limit for the number of activations for the license key.
|
117
|
+
# @param license_key_activations_limit [Integer, nil] Limit for the number of activations for the license key.
|
91
118
|
#
|
92
|
-
# @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
|
119
|
+
# @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil] Duration of the license key if enabled.
|
93
120
|
#
|
94
|
-
# @param license_key_enabled [Boolean, nil] Whether the product requires a license key.
|
121
|
+
# @param license_key_enabled [Boolean, nil] Whether the product requires a license key.
|
122
|
+
#
|
123
|
+
# @param metadata [Hash{Symbol=>String}, nil] Additional metadata for the product
|
95
124
|
#
|
96
125
|
# @param name [String, nil] Name of the product, optional and must be at most 100 characters.
|
97
126
|
#
|
98
|
-
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
|
127
|
+
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil] Price details of the product.
|
99
128
|
#
|
100
|
-
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil]
|
101
|
-
# ...
|
129
|
+
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Tax category of the product.
|
102
130
|
#
|
103
131
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
132
|
+
|
133
|
+
class DigitalProductDelivery < Dodopayments::Internal::Type::BaseModel
|
134
|
+
# @!attribute external_url
|
135
|
+
# External URL to digital product
|
136
|
+
#
|
137
|
+
# @return [String, nil]
|
138
|
+
optional :external_url, String, nil?: true
|
139
|
+
|
140
|
+
# @!attribute files
|
141
|
+
# Uploaded files ids of digital product
|
142
|
+
#
|
143
|
+
# @return [Array<String>, nil]
|
144
|
+
optional :files, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
|
145
|
+
|
146
|
+
# @!attribute instructions
|
147
|
+
# Instructions to download and use the digital product
|
148
|
+
#
|
149
|
+
# @return [String, nil]
|
150
|
+
optional :instructions, String, nil?: true
|
151
|
+
|
152
|
+
# @!method initialize(external_url: nil, files: nil, instructions: nil)
|
153
|
+
# Choose how you would like you digital product delivered
|
154
|
+
#
|
155
|
+
# @param external_url [String, nil] External URL to digital product
|
156
|
+
#
|
157
|
+
# @param files [Array<String>, nil] Uploaded files ids of digital product
|
158
|
+
#
|
159
|
+
# @param instructions [String, nil] Instructions to download and use the digital product
|
160
|
+
end
|
104
161
|
end
|
105
162
|
end
|
106
163
|
end
|
@@ -11,10 +11,10 @@ module Dodopayments
|
|
11
11
|
# @!attribute force_update
|
12
12
|
#
|
13
13
|
# @return [Boolean, nil]
|
14
|
-
optional :force_update, Dodopayments::Internal::Type::Boolean
|
14
|
+
optional :force_update, Dodopayments::Internal::Type::Boolean
|
15
15
|
|
16
16
|
# @!method initialize(force_update: nil, request_options: {})
|
17
|
-
# @param force_update [Boolean
|
17
|
+
# @param force_update [Boolean]
|
18
18
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
19
19
|
end
|
20
20
|
end
|
@@ -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
|