dodopayments 2.34.0 → 2.36.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 +17 -0
- data/README.md +21 -1
- data/lib/dodopayments/client.rb +133 -4
- data/lib/dodopayments/models/addon_delete_params.rb +20 -0
- data/lib/dodopayments/models/addon_list_params.rb +25 -1
- data/lib/dodopayments/models/addon_retrieve_params.rb +18 -1
- data/lib/dodopayments/models/addon_unarchive_params.rb +20 -0
- data/lib/dodopayments/models/addons/translation_delete_params.rb +36 -0
- data/lib/dodopayments/models/addons/translation_list_params.rb +35 -0
- data/lib/dodopayments/models/addons/translation_update_params.rb +52 -0
- data/lib/dodopayments/models/balance_ledger_entry.rb +1 -0
- data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +1 -0
- data/lib/dodopayments/models/checkout_session_preview_params.rb +17 -1
- data/lib/dodopayments/models/create_new_customer.rb +12 -1
- data/lib/dodopayments/models/credit_entitlement_list_params.rb +17 -1
- data/lib/dodopayments/models/credit_entitlement_retrieve_params.rb +18 -1
- data/lib/dodopayments/models/credit_entitlements/credit_entitlement_translation.rb +47 -0
- data/lib/dodopayments/models/credit_entitlements/credit_entitlement_translations_list_response.rb +23 -0
- data/lib/dodopayments/models/credit_entitlements/translation_delete_params.rb +37 -0
- data/lib/dodopayments/models/credit_entitlements/translation_list_params.rb +36 -0
- data/lib/dodopayments/models/credit_entitlements/translation_update_params.rb +53 -0
- data/lib/dodopayments/models/customer.rb +9 -1
- data/lib/dodopayments/models/customer_create_params.rb +14 -1
- data/lib/dodopayments/models/customer_update_params.rb +14 -1
- data/lib/dodopayments/models/entitlement_list_params.rb +17 -1
- data/lib/dodopayments/models/entitlement_retrieve_params.rb +18 -1
- data/lib/dodopayments/models/entitlements/entitlement_translation.rb +67 -0
- data/lib/dodopayments/models/entitlements/entitlement_translations_list_response.rb +23 -0
- data/lib/dodopayments/models/entitlements/translation_delete_params.rb +36 -0
- data/lib/dodopayments/models/entitlements/translation_list_params.rb +35 -0
- data/lib/dodopayments/models/entitlements/translation_update_params.rb +69 -0
- data/lib/dodopayments/models/locale.rb +38 -0
- data/lib/dodopayments/models/locale_info.rb +34 -0
- data/lib/dodopayments/models/meter_list_params.rb +17 -1
- data/lib/dodopayments/models/meter_retrieve_params.rb +18 -1
- data/lib/dodopayments/models/meter_update_params.rb +49 -0
- data/lib/dodopayments/models/meters/translation_delete_params.rb +36 -0
- data/lib/dodopayments/models/meters/translation_list_params.rb +35 -0
- data/lib/dodopayments/models/meters/translation_update_params.rb +52 -0
- data/lib/dodopayments/models/misc_list_locales_params.rb +14 -0
- data/lib/dodopayments/models/misc_list_locales_response.rb +8 -0
- data/lib/dodopayments/models/payment.rb +29 -1
- data/lib/dodopayments/models/payment_list_response.rb +29 -1
- data/lib/dodopayments/models/payment_retrieve_line_items_params.rb +14 -1
- data/lib/dodopayments/models/payment_retrieve_line_items_response.rb +10 -1
- data/lib/dodopayments/models/payouts/breakup/detail_list_response.rb +3 -1
- data/lib/dodopayments/models/payouts/breakup_retrieve_response.rb +2 -1
- data/lib/dodopayments/models/product_collection_list_params.rb +17 -1
- data/lib/dodopayments/models/product_collection_retrieve_params.rb +18 -1
- data/lib/dodopayments/models/product_collections/translation_delete_params.rb +37 -0
- data/lib/dodopayments/models/product_collections/translation_list_params.rb +36 -0
- data/lib/dodopayments/models/product_collections/translation_update_params.rb +53 -0
- data/lib/dodopayments/models/product_list_params.rb +14 -1
- data/lib/dodopayments/models/product_retrieve_params.rb +18 -1
- data/lib/dodopayments/models/products/translation.rb +50 -0
- data/lib/dodopayments/models/products/translation_delete_params.rb +36 -0
- data/lib/dodopayments/models/products/translation_list_params.rb +35 -0
- data/lib/dodopayments/models/products/translation_update_params.rb +52 -0
- data/lib/dodopayments/models/products/translations_list_response.rb +20 -0
- data/lib/dodopayments/models/refund_create_params.rb +13 -1
- data/lib/dodopayments/models/subscription_list_params.rb +14 -1
- data/lib/dodopayments/models/subscription_retrieve_params.rb +18 -1
- data/lib/dodopayments/models/three_ds_flow.rb +16 -0
- data/lib/dodopayments/models/three_ds_status.rb +21 -0
- data/lib/dodopayments/models/update_subscription_plan_req.rb +10 -0
- data/lib/dodopayments/models.rb +20 -0
- data/lib/dodopayments/resources/addons/translations.rb +110 -0
- data/lib/dodopayments/resources/addons.rb +58 -3
- data/lib/dodopayments/resources/checkout_sessions.rb +31 -26
- data/lib/dodopayments/resources/credit_entitlements/translations.rb +113 -0
- data/lib/dodopayments/resources/credit_entitlements.rb +20 -3
- data/lib/dodopayments/resources/customers.rb +12 -2
- data/lib/dodopayments/resources/entitlements/translations.rb +114 -0
- data/lib/dodopayments/resources/entitlements.rb +20 -3
- data/lib/dodopayments/resources/meters/translations.rb +110 -0
- data/lib/dodopayments/resources/meters.rb +49 -3
- data/lib/dodopayments/resources/misc.rb +18 -0
- data/lib/dodopayments/resources/payments.rb +10 -2
- data/lib/dodopayments/resources/payouts/breakup/details.rb +5 -2
- data/lib/dodopayments/resources/payouts/breakup.rb +4 -1
- data/lib/dodopayments/resources/product_collections/translations.rb +113 -0
- data/lib/dodopayments/resources/product_collections.rb +20 -3
- data/lib/dodopayments/resources/products/translations.rb +110 -0
- data/lib/dodopayments/resources/products.rb +17 -3
- data/lib/dodopayments/resources/refunds.rb +6 -1
- data/lib/dodopayments/resources/subscriptions.rb +13 -3
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments/workload_identity.rb +351 -0
- data/lib/dodopayments.rb +40 -0
- data/rbi/dodopayments/client.rbi +15 -2
- data/rbi/dodopayments/models/addon_delete_params.rbi +38 -0
- data/rbi/dodopayments/models/addon_list_params.rbi +32 -0
- data/rbi/dodopayments/models/addon_retrieve_params.rbi +29 -2
- data/rbi/dodopayments/models/addon_unarchive_params.rbi +38 -0
- data/rbi/dodopayments/models/addons/translation_delete_params.rbi +58 -0
- data/rbi/dodopayments/models/addons/translation_list_params.rbi +59 -0
- data/rbi/dodopayments/models/addons/translation_update_params.rbi +74 -0
- data/rbi/dodopayments/models/balance_ledger_entry.rbi +5 -0
- data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +5 -0
- data/rbi/dodopayments/models/checkout_session_preview_params.rbi +29 -5
- data/rbi/dodopayments/models/create_new_customer.rbi +17 -3
- data/rbi/dodopayments/models/credit_entitlement_list_params.rbi +21 -0
- data/rbi/dodopayments/models/credit_entitlement_retrieve_params.rbi +29 -2
- data/rbi/dodopayments/models/credit_entitlements/credit_entitlement_translation.rbi +70 -0
- data/rbi/dodopayments/models/credit_entitlements/credit_entitlement_translations_list_response.rbi +54 -0
- data/rbi/dodopayments/models/credit_entitlements/translation_delete_params.rbi +58 -0
- data/rbi/dodopayments/models/credit_entitlements/translation_list_params.rbi +59 -0
- data/rbi/dodopayments/models/credit_entitlements/translation_update_params.rbi +74 -0
- data/rbi/dodopayments/models/customer.rbi +11 -3
- data/rbi/dodopayments/models/customer_create_params.rbi +12 -0
- data/rbi/dodopayments/models/customer_update_params.rbi +12 -0
- data/rbi/dodopayments/models/entitlement_list_params.rbi +21 -0
- data/rbi/dodopayments/models/entitlement_retrieve_params.rbi +29 -2
- data/rbi/dodopayments/models/entitlements/entitlement_translation.rbi +87 -0
- data/rbi/dodopayments/models/entitlements/entitlement_translations_list_response.rbi +48 -0
- data/rbi/dodopayments/models/entitlements/translation_delete_params.rbi +58 -0
- data/rbi/dodopayments/models/entitlements/translation_list_params.rbi +59 -0
- data/rbi/dodopayments/models/entitlements/translation_update_params.rbi +92 -0
- data/rbi/dodopayments/models/locale.rbi +42 -0
- data/rbi/dodopayments/models/locale_info.rbi +54 -0
- data/rbi/dodopayments/models/meter_list_params.rbi +21 -0
- data/rbi/dodopayments/models/meter_retrieve_params.rbi +29 -2
- data/rbi/dodopayments/models/meter_update_params.rbi +70 -0
- data/rbi/dodopayments/models/meters/translation_delete_params.rbi +58 -0
- data/rbi/dodopayments/models/meters/translation_list_params.rbi +59 -0
- data/rbi/dodopayments/models/meters/translation_update_params.rbi +74 -0
- data/rbi/dodopayments/models/misc_list_locales_params.rbi +32 -0
- data/rbi/dodopayments/models/misc_list_locales_response.rbi +11 -0
- data/rbi/dodopayments/models/payment.rbi +33 -0
- data/rbi/dodopayments/models/payment_list_response.rbi +36 -3
- data/rbi/dodopayments/models/payment_retrieve_line_items_params.rbi +21 -2
- data/rbi/dodopayments/models/payment_retrieve_line_items_response.rbi +14 -3
- data/rbi/dodopayments/models/payouts/breakup/detail_list_response.rbi +6 -2
- data/rbi/dodopayments/models/payouts/breakup_retrieve_response.rbi +4 -2
- data/rbi/dodopayments/models/product_collection_list_params.rbi +21 -0
- data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +29 -2
- data/rbi/dodopayments/models/product_collections/translation_delete_params.rbi +58 -0
- data/rbi/dodopayments/models/product_collections/translation_list_params.rbi +59 -0
- data/rbi/dodopayments/models/product_collections/translation_update_params.rbi +74 -0
- data/rbi/dodopayments/models/product_list_params.rbi +21 -0
- data/rbi/dodopayments/models/product_retrieve_params.rbi +29 -2
- data/rbi/dodopayments/models/products/translation.rbi +70 -0
- data/rbi/dodopayments/models/products/translation_delete_params.rbi +58 -0
- data/rbi/dodopayments/models/products/translation_list_params.rbi +59 -0
- data/rbi/dodopayments/models/products/translation_update_params.rbi +74 -0
- data/rbi/dodopayments/models/products/translations_list_response.rbi +37 -0
- data/rbi/dodopayments/models/refund_create_params.rbi +10 -0
- data/rbi/dodopayments/models/subscription_list_params.rbi +21 -0
- data/rbi/dodopayments/models/subscription_retrieve_params.rbi +25 -1
- data/rbi/dodopayments/models/three_ds_flow.rbi +23 -0
- data/rbi/dodopayments/models/three_ds_status.rbi +31 -0
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +15 -0
- data/rbi/dodopayments/models.rbi +20 -0
- data/rbi/dodopayments/resources/addons/translations.rbi +77 -0
- data/rbi/dodopayments/resources/addons.rbi +48 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +55 -39
- data/rbi/dodopayments/resources/credit_entitlements/translations.rbi +81 -0
- data/rbi/dodopayments/resources/credit_entitlements.rbi +19 -0
- data/rbi/dodopayments/resources/customers.rbi +10 -0
- data/rbi/dodopayments/resources/entitlements/translations.rbi +87 -0
- data/rbi/dodopayments/resources/entitlements.rbi +19 -0
- data/rbi/dodopayments/resources/meters/translations.rbi +77 -0
- data/rbi/dodopayments/resources/meters.rbi +42 -0
- data/rbi/dodopayments/resources/misc.rbi +9 -0
- data/rbi/dodopayments/resources/payments.rbi +4 -0
- data/rbi/dodopayments/resources/payouts/breakup/details.rbi +5 -2
- data/rbi/dodopayments/resources/payouts/breakup.rbi +4 -1
- data/rbi/dodopayments/resources/product_collections/translations.rbi +77 -0
- data/rbi/dodopayments/resources/product_collections.rbi +19 -0
- data/rbi/dodopayments/resources/products/translations.rbi +77 -0
- data/rbi/dodopayments/resources/products.rbi +19 -0
- data/rbi/dodopayments/resources/refunds.rbi +4 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +26 -0
- data/rbi/dodopayments/workload_identity.rbi +219 -0
- data/sig/dodopayments/client.rbs +6 -1
- data/sig/dodopayments/models/addon_delete_params.rbs +23 -0
- data/sig/dodopayments/models/addon_list_params.rbs +18 -1
- data/sig/dodopayments/models/addon_retrieve_params.rbs +8 -1
- data/sig/dodopayments/models/addon_unarchive_params.rbs +23 -0
- data/sig/dodopayments/models/addons/translation_delete_params.rbs +30 -0
- data/sig/dodopayments/models/addons/translation_list_params.rbs +32 -0
- data/sig/dodopayments/models/addons/translation_update_params.rbs +43 -0
- data/sig/dodopayments/models/balance_ledger_entry.rbs +2 -0
- data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +2 -0
- data/sig/dodopayments/models/checkout_session_preview_params.rbs +13 -3
- data/sig/dodopayments/models/create_new_customer.rbs +8 -3
- data/sig/dodopayments/models/credit_entitlement_list_params.rbs +12 -1
- data/sig/dodopayments/models/credit_entitlement_retrieve_params.rbs +8 -1
- data/sig/dodopayments/models/credit_entitlements/credit_entitlement_translation.rbs +39 -0
- data/sig/dodopayments/models/credit_entitlements/credit_entitlement_translations_list_response.rbs +24 -0
- data/sig/dodopayments/models/credit_entitlements/translation_delete_params.rbs +30 -0
- data/sig/dodopayments/models/credit_entitlements/translation_list_params.rbs +32 -0
- data/sig/dodopayments/models/credit_entitlements/translation_update_params.rbs +43 -0
- data/sig/dodopayments/models/customer.rbs +8 -3
- data/sig/dodopayments/models/customer_create_params.rbs +6 -1
- data/sig/dodopayments/models/customer_update_params.rbs +6 -1
- data/sig/dodopayments/models/entitlement_list_params.rbs +7 -0
- data/sig/dodopayments/models/entitlement_retrieve_params.rbs +8 -1
- data/sig/dodopayments/models/entitlements/entitlement_translation.rbs +49 -0
- data/sig/dodopayments/models/entitlements/entitlement_translations_list_response.rbs +22 -0
- data/sig/dodopayments/models/entitlements/translation_delete_params.rbs +30 -0
- data/sig/dodopayments/models/entitlements/translation_list_params.rbs +32 -0
- data/sig/dodopayments/models/entitlements/translation_update_params.rbs +53 -0
- data/sig/dodopayments/models/locale.rbs +56 -0
- data/sig/dodopayments/models/locale_info.rbs +26 -0
- data/sig/dodopayments/models/meter_list_params.rbs +12 -1
- data/sig/dodopayments/models/meter_retrieve_params.rbs +8 -1
- data/sig/dodopayments/models/meter_update_params.rbs +41 -0
- data/sig/dodopayments/models/meters/translation_delete_params.rbs +30 -0
- data/sig/dodopayments/models/meters/translation_list_params.rbs +32 -0
- data/sig/dodopayments/models/meters/translation_update_params.rbs +43 -0
- data/sig/dodopayments/models/misc_list_locales_params.rbs +15 -0
- data/sig/dodopayments/models/misc_list_locales_response.rbs +7 -0
- data/sig/dodopayments/models/payment.rbs +15 -0
- data/sig/dodopayments/models/payment_list_response.rbs +18 -3
- data/sig/dodopayments/models/payment_retrieve_line_items_params.rbs +10 -1
- data/sig/dodopayments/models/payment_retrieve_line_items_response.rbs +8 -3
- data/sig/dodopayments/models/product_collection_list_params.rbs +7 -0
- data/sig/dodopayments/models/product_collection_retrieve_params.rbs +8 -1
- data/sig/dodopayments/models/product_collections/translation_delete_params.rbs +30 -0
- data/sig/dodopayments/models/product_collections/translation_list_params.rbs +32 -0
- data/sig/dodopayments/models/product_collections/translation_update_params.rbs +43 -0
- data/sig/dodopayments/models/product_list_params.rbs +7 -0
- data/sig/dodopayments/models/product_retrieve_params.rbs +8 -1
- data/sig/dodopayments/models/products/translation.rbs +37 -0
- data/sig/dodopayments/models/products/translation_delete_params.rbs +30 -0
- data/sig/dodopayments/models/products/translation_list_params.rbs +32 -0
- data/sig/dodopayments/models/products/translation_update_params.rbs +43 -0
- data/sig/dodopayments/models/products/translations_list_response.rbs +18 -0
- data/sig/dodopayments/models/refund_create_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_list_params.rbs +7 -0
- data/sig/dodopayments/models/subscription_retrieve_params.rbs +7 -1
- data/sig/dodopayments/models/three_ds_flow.rbs +14 -0
- data/sig/dodopayments/models/three_ds_status.rbs +24 -0
- data/sig/dodopayments/models.rbs +20 -0
- data/sig/dodopayments/resources/addons/translations.rbs +29 -0
- data/sig/dodopayments/resources/addons.rbs +15 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
- data/sig/dodopayments/resources/credit_entitlements/translations.rbs +29 -0
- data/sig/dodopayments/resources/credit_entitlements.rbs +4 -0
- data/sig/dodopayments/resources/customers.rbs +2 -0
- data/sig/dodopayments/resources/entitlements/translations.rbs +31 -0
- data/sig/dodopayments/resources/entitlements.rbs +4 -0
- data/sig/dodopayments/resources/meters/translations.rbs +29 -0
- data/sig/dodopayments/resources/meters.rbs +12 -0
- data/sig/dodopayments/resources/misc.rbs +4 -0
- data/sig/dodopayments/resources/payments.rbs +1 -0
- data/sig/dodopayments/resources/product_collections/translations.rbs +29 -0
- data/sig/dodopayments/resources/product_collections.rbs +4 -0
- data/sig/dodopayments/resources/products/translations.rbs +29 -0
- data/sig/dodopayments/resources/products.rbs +4 -0
- data/sig/dodopayments/resources/refunds.rbs +1 -0
- data/sig/dodopayments/resources/subscriptions.rbs +2 -0
- data/sig/dodopayments/workload_identity.rbs +89 -0
- metadata +122 -2
|
@@ -93,55 +93,57 @@ module Dodopayments
|
|
|
93
93
|
# Some parameter documentations has been truncated, see
|
|
94
94
|
# {Dodopayments::Models::CheckoutSessionPreviewParams} for more details.
|
|
95
95
|
#
|
|
96
|
-
# @overload preview(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customer_business_name: nil, customization: nil, discount_code: nil, discount_codes: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil, request_options: {})
|
|
96
|
+
# @overload preview(product_cart:, locale: nil, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customer_business_name: nil, customization: nil, discount_code: nil, discount_codes: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil, request_options: {})
|
|
97
97
|
#
|
|
98
|
-
# @param product_cart [Array<Dodopayments::Models::ProductItemReq>] The products of the checkout. A cart holds at most 20 of them, one-
|
|
98
|
+
# @param product_cart [Array<Dodopayments::Models::ProductItemReq>] Body param: The products of the checkout. A cart holds at most 20 of them, one-t
|
|
99
99
|
#
|
|
100
|
-
# @param
|
|
100
|
+
# @param locale [String] Query param: Shows the translated name, description and unit of the catalog enti
|
|
101
101
|
#
|
|
102
|
-
# @param
|
|
102
|
+
# @param allowed_payment_method_types [Array<Symbol, Dodopayments::Models::PaymentMethodTypes>, nil] Body param: Customers will never see payment methods that are not in this list.
|
|
103
103
|
#
|
|
104
|
-
# @param
|
|
104
|
+
# @param billing_address [Dodopayments::Models::CheckoutSessionBillingAddress, nil] Body param: Billing address information for the session
|
|
105
105
|
#
|
|
106
|
-
# @param
|
|
106
|
+
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Body param: The currency to charge the customer in.
|
|
107
107
|
#
|
|
108
|
-
# @param
|
|
108
|
+
# @param cancel_url [String, nil] Body param: The URL to redirect the customer if they cancel or go back from the
|
|
109
109
|
#
|
|
110
|
-
# @param
|
|
110
|
+
# @param confirm [Boolean] Body param: If confirm is true, all the details will be finalized. If required d
|
|
111
111
|
#
|
|
112
|
-
# @param
|
|
112
|
+
# @param custom_fields [Array<Dodopayments::Models::CustomField>, nil] Body param: Custom fields to collect from customer during checkout (max 5 fields
|
|
113
113
|
#
|
|
114
|
-
# @param
|
|
114
|
+
# @param customer [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer, nil] Body param: Customer details for the session
|
|
115
115
|
#
|
|
116
|
-
# @param
|
|
116
|
+
# @param customer_business_name [String, nil] Body param: Optional business / legal name associated with the tax id. When prov
|
|
117
117
|
#
|
|
118
|
-
# @param
|
|
118
|
+
# @param customization [Dodopayments::Models::CheckoutSessionCustomization] Body param: Customization for the checkout session page
|
|
119
119
|
#
|
|
120
|
-
# @param
|
|
120
|
+
# @param discount_code [String, nil] Body param: DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
121
121
|
#
|
|
122
|
-
# @param
|
|
122
|
+
# @param discount_codes [Array<String>, nil] Body param: Stacked discount codes to apply, in order. Max 20.
|
|
123
123
|
#
|
|
124
|
-
# @param
|
|
124
|
+
# @param feature_flags [Dodopayments::Models::CheckoutSessionFlags] Body param
|
|
125
125
|
#
|
|
126
|
-
# @param
|
|
126
|
+
# @param force_3ds [Boolean, nil] Body param: Override merchant default 3DS behaviour for this session
|
|
127
127
|
#
|
|
128
|
-
# @param
|
|
128
|
+
# @param mandate_min_amount_inr_paise [Integer, nil] Body param: Override the merchant-level mandate floor (in INR paise) for INR
|
|
129
129
|
#
|
|
130
|
-
# @param
|
|
130
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Body param: Additional metadata associated with the payment. Defaults to empty i
|
|
131
131
|
#
|
|
132
|
-
# @param
|
|
132
|
+
# @param minimal_address [Boolean, nil] Body param: If true, only zipcode is required when confirm is true; other addres
|
|
133
133
|
#
|
|
134
|
-
# @param
|
|
134
|
+
# @param payment_method_id [String, nil] Body param: Optional payment method ID to use for this checkout session.
|
|
135
135
|
#
|
|
136
|
-
# @param
|
|
136
|
+
# @param product_collection_id [String, nil] Body param: Product collection ID for collection-based checkout flow
|
|
137
137
|
#
|
|
138
|
-
# @param
|
|
138
|
+
# @param return_url [String, nil] Body param: The url to redirect after payment failure or success.
|
|
139
139
|
#
|
|
140
|
-
# @param
|
|
140
|
+
# @param short_link [Boolean] Body param: If true, returns a shortened checkout URL.
|
|
141
141
|
#
|
|
142
|
-
# @param
|
|
142
|
+
# @param show_saved_payment_methods [Boolean] Body param: Display saved payment methods of a returning customer False by defau
|
|
143
143
|
#
|
|
144
|
-
# @param
|
|
144
|
+
# @param subscription_data [Dodopayments::Models::SubscriptionData, nil] Body param
|
|
145
|
+
#
|
|
146
|
+
# @param tax_id [String, nil] Body param: Tax ID for the customer (e.g. VAT number). Requires billing_address
|
|
145
147
|
#
|
|
146
148
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
147
149
|
#
|
|
@@ -149,11 +151,14 @@ module Dodopayments
|
|
|
149
151
|
#
|
|
150
152
|
# @see Dodopayments::Models::CheckoutSessionPreviewParams
|
|
151
153
|
def preview(params)
|
|
154
|
+
query_params = [:locale]
|
|
152
155
|
parsed, options = Dodopayments::CheckoutSessionPreviewParams.dump_request(params)
|
|
156
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
153
157
|
@client.request(
|
|
154
158
|
method: :post,
|
|
155
159
|
path: "checkouts/preview",
|
|
156
|
-
|
|
160
|
+
query: query,
|
|
161
|
+
body: parsed.except(*query_params),
|
|
157
162
|
model: Dodopayments::Models::CheckoutSessionPreviewResponse,
|
|
158
163
|
options: options
|
|
159
164
|
)
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class CreditEntitlements
|
|
6
|
+
class Translations
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {Dodopayments::Models::CreditEntitlements::TranslationUpdateParams} for more
|
|
9
|
+
# details.
|
|
10
|
+
#
|
|
11
|
+
# Creates or replaces the translation of one locale. The response is 201 for a new
|
|
12
|
+
# locale and 200 for a replaced locale.
|
|
13
|
+
#
|
|
14
|
+
# @overload update(locale, id:, name: nil, unit: nil, request_options: {})
|
|
15
|
+
#
|
|
16
|
+
# @param locale [Symbol, Dodopayments::Models::Locale] Path param: A locale that the checkout and the customer portal can show.
|
|
17
|
+
#
|
|
18
|
+
# @param id [String] Path param: Credit Entitlement Id
|
|
19
|
+
#
|
|
20
|
+
# @param name [String, nil] Body param: The translated name.
|
|
21
|
+
#
|
|
22
|
+
# @param unit [String, nil] Body param: The translated unit.
|
|
23
|
+
#
|
|
24
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
25
|
+
#
|
|
26
|
+
# @return [Dodopayments::Models::CreditEntitlements::CreditEntitlementTranslation]
|
|
27
|
+
#
|
|
28
|
+
# @see Dodopayments::Models::CreditEntitlements::TranslationUpdateParams
|
|
29
|
+
def update(locale, params)
|
|
30
|
+
parsed, options = Dodopayments::CreditEntitlements::TranslationUpdateParams.dump_request(params)
|
|
31
|
+
id =
|
|
32
|
+
parsed.delete(:id) do
|
|
33
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
34
|
+
end
|
|
35
|
+
@client.request(
|
|
36
|
+
method: :put,
|
|
37
|
+
path: ["credit-entitlements/%1$s/translations/%2$s", id, locale],
|
|
38
|
+
body: parsed,
|
|
39
|
+
model: Dodopayments::CreditEntitlements::CreditEntitlementTranslation,
|
|
40
|
+
options: options
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Some parameter documentations has been truncated, see
|
|
45
|
+
# {Dodopayments::Models::CreditEntitlements::TranslationListParams} for more
|
|
46
|
+
# details.
|
|
47
|
+
#
|
|
48
|
+
# Lists the translations, for all the locales or for the locales of the filter.
|
|
49
|
+
#
|
|
50
|
+
# @overload list(id, locale: nil, request_options: {})
|
|
51
|
+
#
|
|
52
|
+
# @param id [String] Credit Entitlement Id
|
|
53
|
+
#
|
|
54
|
+
# @param locale [Array<String>] Returns only these locales, for example `?locale=fr&locale=de`. With no value, t
|
|
55
|
+
#
|
|
56
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
57
|
+
#
|
|
58
|
+
# @return [Dodopayments::Models::CreditEntitlements::CreditEntitlementTranslationsListResponse]
|
|
59
|
+
#
|
|
60
|
+
# @see Dodopayments::Models::CreditEntitlements::TranslationListParams
|
|
61
|
+
def list(id, params = {})
|
|
62
|
+
parsed, options = Dodopayments::CreditEntitlements::TranslationListParams.dump_request(params)
|
|
63
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
64
|
+
@client.request(
|
|
65
|
+
method: :get,
|
|
66
|
+
path: ["credit-entitlements/%1$s/translations", id],
|
|
67
|
+
query: query,
|
|
68
|
+
model: Dodopayments::CreditEntitlements::CreditEntitlementTranslationsListResponse,
|
|
69
|
+
options: options
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Some parameter documentations has been truncated, see
|
|
74
|
+
# {Dodopayments::Models::CreditEntitlements::TranslationDeleteParams} for more
|
|
75
|
+
# details.
|
|
76
|
+
#
|
|
77
|
+
# Deletes the translation of one locale.
|
|
78
|
+
#
|
|
79
|
+
# @overload delete(locale, id:, request_options: {})
|
|
80
|
+
#
|
|
81
|
+
# @param locale [Symbol, Dodopayments::Models::Locale] A locale that the checkout and the customer portal can show.
|
|
82
|
+
#
|
|
83
|
+
# @param id [String] Credit Entitlement Id
|
|
84
|
+
#
|
|
85
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
86
|
+
#
|
|
87
|
+
# @return [nil]
|
|
88
|
+
#
|
|
89
|
+
# @see Dodopayments::Models::CreditEntitlements::TranslationDeleteParams
|
|
90
|
+
def delete(locale, params)
|
|
91
|
+
parsed, options = Dodopayments::CreditEntitlements::TranslationDeleteParams.dump_request(params)
|
|
92
|
+
id =
|
|
93
|
+
parsed.delete(:id) do
|
|
94
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
95
|
+
end
|
|
96
|
+
@client.request(
|
|
97
|
+
method: :delete,
|
|
98
|
+
path: ["credit-entitlements/%1$s/translations/%2$s", id, locale],
|
|
99
|
+
model: NilClass,
|
|
100
|
+
options: options
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @api private
|
|
105
|
+
#
|
|
106
|
+
# @param client [Dodopayments::Client]
|
|
107
|
+
def initialize(client:)
|
|
108
|
+
@client = client
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
module Dodopayments
|
|
4
4
|
module Resources
|
|
5
5
|
class CreditEntitlements
|
|
6
|
+
# @return [Dodopayments::Resources::CreditEntitlements::Translations]
|
|
7
|
+
attr_reader :translations
|
|
8
|
+
|
|
6
9
|
# @return [Dodopayments::Resources::CreditEntitlements::Balances]
|
|
7
10
|
attr_reader :balances
|
|
8
11
|
|
|
@@ -101,6 +104,9 @@ module Dodopayments
|
|
|
101
104
|
)
|
|
102
105
|
end
|
|
103
106
|
|
|
107
|
+
# Some parameter documentations has been truncated, see
|
|
108
|
+
# {Dodopayments::Models::CreditEntitlementRetrieveParams} for more details.
|
|
109
|
+
#
|
|
104
110
|
# Returns the full details of a single credit entitlement including all
|
|
105
111
|
# configuration settings for expiration, rollover, and overage policies.
|
|
106
112
|
#
|
|
@@ -126,21 +132,26 @@ module Dodopayments
|
|
|
126
132
|
# - Deleted entitlements return a 404 error and must be retrieved via the list
|
|
127
133
|
# endpoint with `deleted=true`
|
|
128
134
|
#
|
|
129
|
-
# @overload retrieve(id, request_options: {})
|
|
135
|
+
# @overload retrieve(id, locale: nil, request_options: {})
|
|
130
136
|
#
|
|
131
137
|
# @param id [String] Credit Entitlement ID
|
|
132
138
|
#
|
|
139
|
+
# @param locale [String] Shows the translated name, description and unit of the catalog entities in this
|
|
140
|
+
#
|
|
133
141
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
134
142
|
#
|
|
135
143
|
# @return [Dodopayments::Models::CreditEntitlement]
|
|
136
144
|
#
|
|
137
145
|
# @see Dodopayments::Models::CreditEntitlementRetrieveParams
|
|
138
146
|
def retrieve(id, params = {})
|
|
147
|
+
parsed, options = Dodopayments::CreditEntitlementRetrieveParams.dump_request(params)
|
|
148
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
139
149
|
@client.request(
|
|
140
150
|
method: :get,
|
|
141
151
|
path: ["credit-entitlements/%1$s", id],
|
|
152
|
+
query: query,
|
|
142
153
|
model: Dodopayments::CreditEntitlement,
|
|
143
|
-
options:
|
|
154
|
+
options: options
|
|
144
155
|
)
|
|
145
156
|
end
|
|
146
157
|
|
|
@@ -249,6 +260,9 @@ module Dodopayments
|
|
|
249
260
|
)
|
|
250
261
|
end
|
|
251
262
|
|
|
263
|
+
# Some parameter documentations has been truncated, see
|
|
264
|
+
# {Dodopayments::Models::CreditEntitlementListParams} for more details.
|
|
265
|
+
#
|
|
252
266
|
# Returns a paginated list of credit entitlements, allowing filtering of deleted
|
|
253
267
|
# entitlements. By default, only non-deleted entitlements are returned.
|
|
254
268
|
#
|
|
@@ -276,10 +290,12 @@ module Dodopayments
|
|
|
276
290
|
# - The `deleted` parameter controls visibility of soft-deleted entitlements
|
|
277
291
|
# - Pagination uses offset-based pagination (offset = page_number \* page_size)
|
|
278
292
|
#
|
|
279
|
-
# @overload list(deleted: nil, page_number: nil, page_size: nil, request_options: {})
|
|
293
|
+
# @overload list(deleted: nil, locale: nil, page_number: nil, page_size: nil, request_options: {})
|
|
280
294
|
#
|
|
281
295
|
# @param deleted [Boolean] List deleted credit entitlements
|
|
282
296
|
#
|
|
297
|
+
# @param locale [String] Shows the translated name, description and unit of the catalog entities in this
|
|
298
|
+
#
|
|
283
299
|
# @param page_number [Integer] Page number default is 0
|
|
284
300
|
#
|
|
285
301
|
# @param page_size [Integer] Page size default is 10 max is 100
|
|
@@ -384,6 +400,7 @@ module Dodopayments
|
|
|
384
400
|
# @param client [Dodopayments::Client]
|
|
385
401
|
def initialize(client:)
|
|
386
402
|
@client = client
|
|
403
|
+
@translations = Dodopayments::Resources::CreditEntitlements::Translations.new(client: client)
|
|
387
404
|
@balances = Dodopayments::Resources::CreditEntitlements::Balances.new(client: client)
|
|
388
405
|
end
|
|
389
406
|
end
|
|
@@ -12,7 +12,10 @@ module Dodopayments
|
|
|
12
12
|
# @return [Dodopayments::Resources::Customers::Emails]
|
|
13
13
|
attr_reader :emails
|
|
14
14
|
|
|
15
|
-
#
|
|
15
|
+
# Some parameter documentations has been truncated, see
|
|
16
|
+
# {Dodopayments::Models::CustomerCreateParams} for more details.
|
|
17
|
+
#
|
|
18
|
+
# @overload create(email:, name:, metadata: nil, phone_number: nil, preferred_locale: nil, request_options: {})
|
|
16
19
|
#
|
|
17
20
|
# @param email [String]
|
|
18
21
|
#
|
|
@@ -22,6 +25,8 @@ module Dodopayments
|
|
|
22
25
|
#
|
|
23
26
|
# @param phone_number [String, nil]
|
|
24
27
|
#
|
|
28
|
+
# @param preferred_locale [Symbol, Dodopayments::Models::Locale, nil] The language of the customer emails, a code from `GET /locales`. With no value,
|
|
29
|
+
#
|
|
25
30
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
26
31
|
#
|
|
27
32
|
# @return [Dodopayments::Models::Customer]
|
|
@@ -56,7 +61,10 @@ module Dodopayments
|
|
|
56
61
|
)
|
|
57
62
|
end
|
|
58
63
|
|
|
59
|
-
#
|
|
64
|
+
# Some parameter documentations has been truncated, see
|
|
65
|
+
# {Dodopayments::Models::CustomerUpdateParams} for more details.
|
|
66
|
+
#
|
|
67
|
+
# @overload update(customer_id, email: nil, metadata: nil, name: nil, phone_number: nil, preferred_locale: nil, request_options: {})
|
|
60
68
|
#
|
|
61
69
|
# @param customer_id [String] Customer Id
|
|
62
70
|
#
|
|
@@ -68,6 +76,8 @@ module Dodopayments
|
|
|
68
76
|
#
|
|
69
77
|
# @param phone_number [String, nil]
|
|
70
78
|
#
|
|
79
|
+
# @param preferred_locale [Symbol, Dodopayments::Models::Locale, nil] The language of the customer emails, a code from `GET /locales`. A value replace
|
|
80
|
+
#
|
|
71
81
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
72
82
|
#
|
|
73
83
|
# @return [Dodopayments::Models::Customer]
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Entitlements
|
|
6
|
+
class Translations
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {Dodopayments::Models::Entitlements::TranslationUpdateParams} for more details.
|
|
9
|
+
#
|
|
10
|
+
# Creates or replaces the translation of one locale. The response is 201 for a new
|
|
11
|
+
# locale and 200 for a replaced locale.
|
|
12
|
+
#
|
|
13
|
+
# @overload update(locale, id:, activation_message: nil, description: nil, instructions: nil, name: nil, request_options: {})
|
|
14
|
+
#
|
|
15
|
+
# @param locale [Symbol, Dodopayments::Models::Locale] Path param: A locale that the checkout and the customer portal can show.
|
|
16
|
+
#
|
|
17
|
+
# @param id [String] Path param: Entitlement Id
|
|
18
|
+
#
|
|
19
|
+
# @param activation_message [String, nil] Body param: The translated activation message. Only a `license_key` entitlement
|
|
20
|
+
#
|
|
21
|
+
# @param description [String, nil] Body param: The translated description.
|
|
22
|
+
#
|
|
23
|
+
# @param instructions [String, nil] Body param: The translated delivery instructions. Only a `digital_files` entitle
|
|
24
|
+
#
|
|
25
|
+
# @param name [String, nil] Body param: The translated name.
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
28
|
+
#
|
|
29
|
+
# @return [Dodopayments::Models::Entitlements::EntitlementTranslation]
|
|
30
|
+
#
|
|
31
|
+
# @see Dodopayments::Models::Entitlements::TranslationUpdateParams
|
|
32
|
+
def update(locale, params)
|
|
33
|
+
parsed, options = Dodopayments::Entitlements::TranslationUpdateParams.dump_request(params)
|
|
34
|
+
id =
|
|
35
|
+
parsed.delete(:id) do
|
|
36
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
37
|
+
end
|
|
38
|
+
@client.request(
|
|
39
|
+
method: :put,
|
|
40
|
+
path: ["entitlements/%1$s/translations/%2$s", id, locale],
|
|
41
|
+
body: parsed,
|
|
42
|
+
model: Dodopayments::Entitlements::EntitlementTranslation,
|
|
43
|
+
options: options
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Some parameter documentations has been truncated, see
|
|
48
|
+
# {Dodopayments::Models::Entitlements::TranslationListParams} for more details.
|
|
49
|
+
#
|
|
50
|
+
# Lists the translations, for all the locales or for the locales of the filter.
|
|
51
|
+
#
|
|
52
|
+
# @overload list(id, locale: nil, request_options: {})
|
|
53
|
+
#
|
|
54
|
+
# @param id [String] Entitlement Id
|
|
55
|
+
#
|
|
56
|
+
# @param locale [Array<String>] Returns only these locales, for example `?locale=fr&locale=de`. With no value, t
|
|
57
|
+
#
|
|
58
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
59
|
+
#
|
|
60
|
+
# @return [Dodopayments::Models::Entitlements::EntitlementTranslationsListResponse]
|
|
61
|
+
#
|
|
62
|
+
# @see Dodopayments::Models::Entitlements::TranslationListParams
|
|
63
|
+
def list(id, params = {})
|
|
64
|
+
parsed, options = Dodopayments::Entitlements::TranslationListParams.dump_request(params)
|
|
65
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
66
|
+
@client.request(
|
|
67
|
+
method: :get,
|
|
68
|
+
path: ["entitlements/%1$s/translations", id],
|
|
69
|
+
query: query,
|
|
70
|
+
model: Dodopayments::Entitlements::EntitlementTranslationsListResponse,
|
|
71
|
+
options: options
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Some parameter documentations has been truncated, see
|
|
76
|
+
# {Dodopayments::Models::Entitlements::TranslationDeleteParams} for more details.
|
|
77
|
+
#
|
|
78
|
+
# Deletes the translation of one locale.
|
|
79
|
+
#
|
|
80
|
+
# @overload delete(locale, id:, request_options: {})
|
|
81
|
+
#
|
|
82
|
+
# @param locale [Symbol, Dodopayments::Models::Locale] A locale that the checkout and the customer portal can show.
|
|
83
|
+
#
|
|
84
|
+
# @param id [String] Entitlement Id
|
|
85
|
+
#
|
|
86
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
87
|
+
#
|
|
88
|
+
# @return [nil]
|
|
89
|
+
#
|
|
90
|
+
# @see Dodopayments::Models::Entitlements::TranslationDeleteParams
|
|
91
|
+
def delete(locale, params)
|
|
92
|
+
parsed, options = Dodopayments::Entitlements::TranslationDeleteParams.dump_request(params)
|
|
93
|
+
id =
|
|
94
|
+
parsed.delete(:id) do
|
|
95
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
96
|
+
end
|
|
97
|
+
@client.request(
|
|
98
|
+
method: :delete,
|
|
99
|
+
path: ["entitlements/%1$s/translations/%2$s", id, locale],
|
|
100
|
+
model: NilClass,
|
|
101
|
+
options: options
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @api private
|
|
106
|
+
#
|
|
107
|
+
# @param client [Dodopayments::Client]
|
|
108
|
+
def initialize(client:)
|
|
109
|
+
@client = client
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
module Dodopayments
|
|
4
4
|
module Resources
|
|
5
5
|
class Entitlements
|
|
6
|
+
# @return [Dodopayments::Resources::Entitlements::Translations]
|
|
7
|
+
attr_reader :translations
|
|
8
|
+
|
|
6
9
|
# @return [Dodopayments::Resources::Entitlements::Files]
|
|
7
10
|
attr_reader :files
|
|
8
11
|
|
|
@@ -39,23 +42,31 @@ module Dodopayments
|
|
|
39
42
|
)
|
|
40
43
|
end
|
|
41
44
|
|
|
45
|
+
# Some parameter documentations has been truncated, see
|
|
46
|
+
# {Dodopayments::Models::EntitlementRetrieveParams} for more details.
|
|
47
|
+
#
|
|
42
48
|
# GET /entitlements/{id}
|
|
43
49
|
#
|
|
44
|
-
# @overload retrieve(id, request_options: {})
|
|
50
|
+
# @overload retrieve(id, locale: nil, request_options: {})
|
|
45
51
|
#
|
|
46
52
|
# @param id [String] Entitlement ID
|
|
47
53
|
#
|
|
54
|
+
# @param locale [String] Shows the translated name, description and unit of the catalog entities in this
|
|
55
|
+
#
|
|
48
56
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
49
57
|
#
|
|
50
58
|
# @return [Dodopayments::Models::Entitlement]
|
|
51
59
|
#
|
|
52
60
|
# @see Dodopayments::Models::EntitlementRetrieveParams
|
|
53
61
|
def retrieve(id, params = {})
|
|
62
|
+
parsed, options = Dodopayments::EntitlementRetrieveParams.dump_request(params)
|
|
63
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
54
64
|
@client.request(
|
|
55
65
|
method: :get,
|
|
56
66
|
path: ["entitlements/%1$s", id],
|
|
67
|
+
query: query,
|
|
57
68
|
model: Dodopayments::Entitlement,
|
|
58
|
-
options:
|
|
69
|
+
options: options
|
|
59
70
|
)
|
|
60
71
|
end
|
|
61
72
|
|
|
@@ -92,12 +103,17 @@ module Dodopayments
|
|
|
92
103
|
)
|
|
93
104
|
end
|
|
94
105
|
|
|
106
|
+
# Some parameter documentations has been truncated, see
|
|
107
|
+
# {Dodopayments::Models::EntitlementListParams} for more details.
|
|
108
|
+
#
|
|
95
109
|
# GET /entitlements
|
|
96
110
|
#
|
|
97
|
-
# @overload list(integration_type: nil, page_number: nil, page_size: nil, request_options: {})
|
|
111
|
+
# @overload list(integration_type: nil, locale: nil, page_number: nil, page_size: nil, request_options: {})
|
|
98
112
|
#
|
|
99
113
|
# @param integration_type [Symbol, Dodopayments::Models::EntitlementListParams::IntegrationType] Filter by integration type
|
|
100
114
|
#
|
|
115
|
+
# @param locale [String] Shows the translated name, description and unit of the catalog entities in this
|
|
116
|
+
#
|
|
101
117
|
# @param page_number [Integer] Page number (default 0)
|
|
102
118
|
#
|
|
103
119
|
# @param page_size [Integer] Page size (default 10, max 100)
|
|
@@ -145,6 +161,7 @@ module Dodopayments
|
|
|
145
161
|
# @param client [Dodopayments::Client]
|
|
146
162
|
def initialize(client:)
|
|
147
163
|
@client = client
|
|
164
|
+
@translations = Dodopayments::Resources::Entitlements::Translations.new(client: client)
|
|
148
165
|
@files = Dodopayments::Resources::Entitlements::Files.new(client: client)
|
|
149
166
|
@grants = Dodopayments::Resources::Entitlements::Grants.new(client: client)
|
|
150
167
|
end
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Meters
|
|
6
|
+
class Translations
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {Dodopayments::Models::Meters::TranslationUpdateParams} for more details.
|
|
9
|
+
#
|
|
10
|
+
# Creates or replaces the translation of one locale. The response is 201 for a new
|
|
11
|
+
# locale and 200 for a replaced locale.
|
|
12
|
+
#
|
|
13
|
+
# @overload update(locale, id:, description: nil, name: nil, request_options: {})
|
|
14
|
+
#
|
|
15
|
+
# @param locale [Symbol, Dodopayments::Models::Locale] Path param: A locale that the checkout and the customer portal can show.
|
|
16
|
+
#
|
|
17
|
+
# @param id [String] Path param: Meter Id
|
|
18
|
+
#
|
|
19
|
+
# @param description [String, nil] Body param: The translated description.
|
|
20
|
+
#
|
|
21
|
+
# @param name [String, nil] Body param: The translated name.
|
|
22
|
+
#
|
|
23
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
24
|
+
#
|
|
25
|
+
# @return [Dodopayments::Models::Products::Translation]
|
|
26
|
+
#
|
|
27
|
+
# @see Dodopayments::Models::Meters::TranslationUpdateParams
|
|
28
|
+
def update(locale, params)
|
|
29
|
+
parsed, options = Dodopayments::Meters::TranslationUpdateParams.dump_request(params)
|
|
30
|
+
id =
|
|
31
|
+
parsed.delete(:id) do
|
|
32
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
33
|
+
end
|
|
34
|
+
@client.request(
|
|
35
|
+
method: :put,
|
|
36
|
+
path: ["meters/%1$s/translations/%2$s", id, locale],
|
|
37
|
+
body: parsed,
|
|
38
|
+
model: Dodopayments::Products::Translation,
|
|
39
|
+
options: options
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Some parameter documentations has been truncated, see
|
|
44
|
+
# {Dodopayments::Models::Meters::TranslationListParams} for more details.
|
|
45
|
+
#
|
|
46
|
+
# Lists the translations, for all the locales or for the locales of the filter.
|
|
47
|
+
#
|
|
48
|
+
# @overload list(id, locale: nil, request_options: {})
|
|
49
|
+
#
|
|
50
|
+
# @param id [String] Meter Id
|
|
51
|
+
#
|
|
52
|
+
# @param locale [Array<String>] Returns only these locales, for example `?locale=fr&locale=de`. With no value, t
|
|
53
|
+
#
|
|
54
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
55
|
+
#
|
|
56
|
+
# @return [Dodopayments::Models::Products::TranslationsListResponse]
|
|
57
|
+
#
|
|
58
|
+
# @see Dodopayments::Models::Meters::TranslationListParams
|
|
59
|
+
def list(id, params = {})
|
|
60
|
+
parsed, options = Dodopayments::Meters::TranslationListParams.dump_request(params)
|
|
61
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
62
|
+
@client.request(
|
|
63
|
+
method: :get,
|
|
64
|
+
path: ["meters/%1$s/translations", id],
|
|
65
|
+
query: query,
|
|
66
|
+
model: Dodopayments::Products::TranslationsListResponse,
|
|
67
|
+
options: options
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Some parameter documentations has been truncated, see
|
|
72
|
+
# {Dodopayments::Models::Meters::TranslationDeleteParams} for more details.
|
|
73
|
+
#
|
|
74
|
+
# Deletes the translation of one locale.
|
|
75
|
+
#
|
|
76
|
+
# @overload delete(locale, id:, request_options: {})
|
|
77
|
+
#
|
|
78
|
+
# @param locale [Symbol, Dodopayments::Models::Locale] A locale that the checkout and the customer portal can show.
|
|
79
|
+
#
|
|
80
|
+
# @param id [String] Meter Id
|
|
81
|
+
#
|
|
82
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
83
|
+
#
|
|
84
|
+
# @return [nil]
|
|
85
|
+
#
|
|
86
|
+
# @see Dodopayments::Models::Meters::TranslationDeleteParams
|
|
87
|
+
def delete(locale, params)
|
|
88
|
+
parsed, options = Dodopayments::Meters::TranslationDeleteParams.dump_request(params)
|
|
89
|
+
id =
|
|
90
|
+
parsed.delete(:id) do
|
|
91
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
92
|
+
end
|
|
93
|
+
@client.request(
|
|
94
|
+
method: :delete,
|
|
95
|
+
path: ["meters/%1$s/translations/%2$s", id, locale],
|
|
96
|
+
model: NilClass,
|
|
97
|
+
options: options
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# @api private
|
|
102
|
+
#
|
|
103
|
+
# @param client [Dodopayments::Client]
|
|
104
|
+
def initialize(client:)
|
|
105
|
+
@client = client
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|