dodopayments 2.34.0 → 2.35.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 +8 -0
- data/README.md +1 -1
- 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.rb +39 -0
- 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/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
- metadata +119 -2
|
@@ -37,6 +37,17 @@ module Dodopayments
|
|
|
37
37
|
# @return [String, nil]
|
|
38
38
|
optional :customer_id, String
|
|
39
39
|
|
|
40
|
+
# @!attribute locale
|
|
41
|
+
# Shows the translated name, description and unit of the catalog entities in this
|
|
42
|
+
# locale. The value must be a code from `GET /locales`, for example `fr`. A field
|
|
43
|
+
# with no translation, an unknown code, or no code shows the base text.
|
|
44
|
+
#
|
|
45
|
+
# Do not send a text from a localized response back in a create or update request.
|
|
46
|
+
# The base text then changes to the translated text.
|
|
47
|
+
#
|
|
48
|
+
# @return [String, nil]
|
|
49
|
+
optional :locale, String
|
|
50
|
+
|
|
40
51
|
# @!attribute page_number
|
|
41
52
|
# Page number default is 0
|
|
42
53
|
#
|
|
@@ -61,7 +72,7 @@ module Dodopayments
|
|
|
61
72
|
# @return [Symbol, Dodopayments::Models::SubscriptionListParams::Status, nil]
|
|
62
73
|
optional :status, enum: -> { Dodopayments::SubscriptionListParams::Status }
|
|
63
74
|
|
|
64
|
-
# @!method initialize(brand_id: nil, cancel_at_next_billing_date: nil, created_at_gte: nil, created_at_lte: nil, customer_id: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, request_options: {})
|
|
75
|
+
# @!method initialize(brand_id: nil, cancel_at_next_billing_date: nil, created_at_gte: nil, created_at_lte: nil, customer_id: nil, locale: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, request_options: {})
|
|
65
76
|
# Some parameter documentations has been truncated, see
|
|
66
77
|
# {Dodopayments::Models::SubscriptionListParams} for more details.
|
|
67
78
|
#
|
|
@@ -75,6 +86,8 @@ module Dodopayments
|
|
|
75
86
|
#
|
|
76
87
|
# @param customer_id [String] Filter by customer id
|
|
77
88
|
#
|
|
89
|
+
# @param locale [String] Shows the translated name, description and unit of the catalog entities in this
|
|
90
|
+
#
|
|
78
91
|
# @param page_number [Integer] Page number default is 0
|
|
79
92
|
#
|
|
80
93
|
# @param page_size [Integer] Page size default is 10 max is 100
|
|
@@ -12,8 +12,25 @@ module Dodopayments
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
required :subscription_id, String
|
|
14
14
|
|
|
15
|
-
# @!
|
|
15
|
+
# @!attribute locale
|
|
16
|
+
# Shows the translated name, description and unit of the catalog entities in this
|
|
17
|
+
# locale. The value must be a code from `GET /locales`, for example `fr`. A field
|
|
18
|
+
# with no translation, an unknown code, or no code shows the base text.
|
|
19
|
+
#
|
|
20
|
+
# Do not send a text from a localized response back in a create or update request.
|
|
21
|
+
# The base text then changes to the translated text.
|
|
22
|
+
#
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
optional :locale, String
|
|
25
|
+
|
|
26
|
+
# @!method initialize(subscription_id:, locale: nil, request_options: {})
|
|
27
|
+
# Some parameter documentations has been truncated, see
|
|
28
|
+
# {Dodopayments::Models::SubscriptionRetrieveParams} for more details.
|
|
29
|
+
#
|
|
16
30
|
# @param subscription_id [String]
|
|
31
|
+
#
|
|
32
|
+
# @param locale [String] Shows the translated name, description and unit of the catalog entities in this
|
|
33
|
+
#
|
|
17
34
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
18
35
|
end
|
|
19
36
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# How the cardholder completed the 3DS authentication.
|
|
6
|
+
module ThreeDSFlow
|
|
7
|
+
extend Dodopayments::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
CHALLENGE = :challenge
|
|
10
|
+
FRICTIONLESS = :frictionless
|
|
11
|
+
|
|
12
|
+
# @!method self.values
|
|
13
|
+
# @return [Array<Symbol>]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# The result of the 3DS authentication of a card payment, as the processor reports
|
|
6
|
+
# it.
|
|
7
|
+
module ThreeDSStatus
|
|
8
|
+
extend Dodopayments::Internal::Type::Enum
|
|
9
|
+
|
|
10
|
+
AUTHENTICATED = :authenticated
|
|
11
|
+
ATTEMPT_ACKNOWLEDGED = :attempt_acknowledged
|
|
12
|
+
EXEMPTED = :exempted
|
|
13
|
+
FAILED = :failed
|
|
14
|
+
NOT_SUPPORTED = :not_supported
|
|
15
|
+
PROCESSING_ERROR = :processing_error
|
|
16
|
+
|
|
17
|
+
# @!method self.values
|
|
18
|
+
# @return [Array<Symbol>]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -126,6 +126,11 @@ module Dodopayments
|
|
|
126
126
|
# - `apply_change` (default): Apply plan change immediately regardless of payment
|
|
127
127
|
# outcome
|
|
128
128
|
#
|
|
129
|
+
# With `effective_at: next_billing_date`, the plan change payment replaces the
|
|
130
|
+
# renewal payment. If that payment fails with `prevent_change`, the plan change is
|
|
131
|
+
# cancelled. The subscription then renews on the current plan, with the usual
|
|
132
|
+
# payment retries.
|
|
133
|
+
#
|
|
129
134
|
# If not specified, uses the business-level default setting.
|
|
130
135
|
#
|
|
131
136
|
# @return [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::OnPaymentFailure, nil]
|
|
@@ -218,6 +223,11 @@ module Dodopayments
|
|
|
218
223
|
# - `apply_change` (default): Apply plan change immediately regardless of payment
|
|
219
224
|
# outcome
|
|
220
225
|
#
|
|
226
|
+
# With `effective_at: next_billing_date`, the plan change payment replaces the
|
|
227
|
+
# renewal payment. If that payment fails with `prevent_change`, the plan change is
|
|
228
|
+
# cancelled. The subscription then renews on the current plan, with the usual
|
|
229
|
+
# payment retries.
|
|
230
|
+
#
|
|
221
231
|
# If not specified, uses the business-level default setting.
|
|
222
232
|
#
|
|
223
233
|
# @see Dodopayments::Models::UpdateSubscriptionPlanReq#on_payment_failure
|
data/lib/dodopayments/models.rb
CHANGED
|
@@ -49,12 +49,18 @@ module Dodopayments
|
|
|
49
49
|
|
|
50
50
|
AddonCreateParams = Dodopayments::Models::AddonCreateParams
|
|
51
51
|
|
|
52
|
+
AddonDeleteParams = Dodopayments::Models::AddonDeleteParams
|
|
53
|
+
|
|
52
54
|
AddonListParams = Dodopayments::Models::AddonListParams
|
|
53
55
|
|
|
54
56
|
AddonResponse = Dodopayments::Models::AddonResponse
|
|
55
57
|
|
|
56
58
|
AddonRetrieveParams = Dodopayments::Models::AddonRetrieveParams
|
|
57
59
|
|
|
60
|
+
Addons = Dodopayments::Models::Addons
|
|
61
|
+
|
|
62
|
+
AddonUnarchiveParams = Dodopayments::Models::AddonUnarchiveParams
|
|
63
|
+
|
|
58
64
|
AddonUpdateImagesParams = Dodopayments::Models::AddonUpdateImagesParams
|
|
59
65
|
|
|
60
66
|
AddonUpdateParams = Dodopayments::Models::AddonUpdateParams
|
|
@@ -321,6 +327,10 @@ module Dodopayments
|
|
|
321
327
|
|
|
322
328
|
LicenseValidateParams = Dodopayments::Models::LicenseValidateParams
|
|
323
329
|
|
|
330
|
+
Locale = Dodopayments::Models::Locale
|
|
331
|
+
|
|
332
|
+
LocaleInfo = Dodopayments::Models::LocaleInfo
|
|
333
|
+
|
|
324
334
|
ManualRetry = Dodopayments::Models::ManualRetry
|
|
325
335
|
|
|
326
336
|
ManualRetryState = Dodopayments::Models::ManualRetryState
|
|
@@ -348,8 +358,14 @@ module Dodopayments
|
|
|
348
358
|
|
|
349
359
|
MeterRetrieveParams = Dodopayments::Models::MeterRetrieveParams
|
|
350
360
|
|
|
361
|
+
Meters = Dodopayments::Models::Meters
|
|
362
|
+
|
|
351
363
|
MeterUnarchiveParams = Dodopayments::Models::MeterUnarchiveParams
|
|
352
364
|
|
|
365
|
+
MeterUpdateParams = Dodopayments::Models::MeterUpdateParams
|
|
366
|
+
|
|
367
|
+
MiscListLocalesParams = Dodopayments::Models::MiscListLocalesParams
|
|
368
|
+
|
|
353
369
|
MiscListSupportedCountriesParams = Dodopayments::Models::MiscListSupportedCountriesParams
|
|
354
370
|
|
|
355
371
|
ModerationCategory = Dodopayments::Models::ModerationCategory
|
|
@@ -537,6 +553,10 @@ module Dodopayments
|
|
|
537
553
|
|
|
538
554
|
ThemeModeConfig = Dodopayments::Models::ThemeModeConfig
|
|
539
555
|
|
|
556
|
+
ThreeDSFlow = Dodopayments::Models::ThreeDSFlow
|
|
557
|
+
|
|
558
|
+
ThreeDSStatus = Dodopayments::Models::ThreeDSStatus
|
|
559
|
+
|
|
540
560
|
TimeInterval = Dodopayments::Models::TimeInterval
|
|
541
561
|
|
|
542
562
|
UnsafeUnwrapWebhookEvent = Dodopayments::Models::UnsafeUnwrapWebhookEvent
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Addons
|
|
6
|
+
class Translations
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {Dodopayments::Models::Addons::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: Addon 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::Addons::TranslationUpdateParams
|
|
28
|
+
def update(locale, params)
|
|
29
|
+
parsed, options = Dodopayments::Addons::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: ["addons/%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::Addons::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] Addon 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::Addons::TranslationListParams
|
|
59
|
+
def list(id, params = {})
|
|
60
|
+
parsed, options = Dodopayments::Addons::TranslationListParams.dump_request(params)
|
|
61
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
62
|
+
@client.request(
|
|
63
|
+
method: :get,
|
|
64
|
+
path: ["addons/%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::Addons::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] Addon Id
|
|
81
|
+
#
|
|
82
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
83
|
+
#
|
|
84
|
+
# @return [nil]
|
|
85
|
+
#
|
|
86
|
+
# @see Dodopayments::Models::Addons::TranslationDeleteParams
|
|
87
|
+
def delete(locale, params)
|
|
88
|
+
parsed, options = Dodopayments::Addons::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: ["addons/%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
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
module Dodopayments
|
|
4
4
|
module Resources
|
|
5
5
|
class Addons
|
|
6
|
+
# @return [Dodopayments::Resources::Addons::Translations]
|
|
7
|
+
attr_reader :translations
|
|
8
|
+
|
|
6
9
|
# @overload create(currency:, name:, price:, tax_category:, description: nil, request_options: {})
|
|
7
10
|
#
|
|
8
11
|
# @param currency [Symbol, Dodopayments::Models::Currency] The currency of the Addon
|
|
@@ -31,21 +34,29 @@ module Dodopayments
|
|
|
31
34
|
)
|
|
32
35
|
end
|
|
33
36
|
|
|
34
|
-
#
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {Dodopayments::Models::AddonRetrieveParams} for more details.
|
|
39
|
+
#
|
|
40
|
+
# @overload retrieve(id, locale: nil, request_options: {})
|
|
35
41
|
#
|
|
36
42
|
# @param id [String] Addon Id
|
|
37
43
|
#
|
|
44
|
+
# @param locale [String] Shows the translated name, description and unit of the catalog entities in this
|
|
45
|
+
#
|
|
38
46
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
39
47
|
#
|
|
40
48
|
# @return [Dodopayments::Models::AddonResponse]
|
|
41
49
|
#
|
|
42
50
|
# @see Dodopayments::Models::AddonRetrieveParams
|
|
43
51
|
def retrieve(id, params = {})
|
|
52
|
+
parsed, options = Dodopayments::AddonRetrieveParams.dump_request(params)
|
|
53
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
44
54
|
@client.request(
|
|
45
55
|
method: :get,
|
|
46
56
|
path: ["addons/%1$s", id],
|
|
57
|
+
query: query,
|
|
47
58
|
model: Dodopayments::AddonResponse,
|
|
48
|
-
options:
|
|
59
|
+
options: options
|
|
49
60
|
)
|
|
50
61
|
end
|
|
51
62
|
|
|
@@ -84,7 +95,14 @@ module Dodopayments
|
|
|
84
95
|
)
|
|
85
96
|
end
|
|
86
97
|
|
|
87
|
-
#
|
|
98
|
+
# Some parameter documentations has been truncated, see
|
|
99
|
+
# {Dodopayments::Models::AddonListParams} for more details.
|
|
100
|
+
#
|
|
101
|
+
# @overload list(archived: nil, locale: nil, page_number: nil, page_size: nil, request_options: {})
|
|
102
|
+
#
|
|
103
|
+
# @param archived [Boolean] List archived addons. The default is false.
|
|
104
|
+
#
|
|
105
|
+
# @param locale [String] Shows the translated name, description and unit of the catalog entities in this
|
|
88
106
|
#
|
|
89
107
|
# @param page_number [Integer] Page number default is 0
|
|
90
108
|
#
|
|
@@ -108,6 +126,42 @@ module Dodopayments
|
|
|
108
126
|
)
|
|
109
127
|
end
|
|
110
128
|
|
|
129
|
+
# @overload delete(id, request_options: {})
|
|
130
|
+
#
|
|
131
|
+
# @param id [String] Addon Id
|
|
132
|
+
#
|
|
133
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
134
|
+
#
|
|
135
|
+
# @return [nil]
|
|
136
|
+
#
|
|
137
|
+
# @see Dodopayments::Models::AddonDeleteParams
|
|
138
|
+
def delete(id, params = {})
|
|
139
|
+
@client.request(
|
|
140
|
+
method: :delete,
|
|
141
|
+
path: ["addons/%1$s", id],
|
|
142
|
+
model: NilClass,
|
|
143
|
+
options: params[:request_options]
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @overload unarchive(id, request_options: {})
|
|
148
|
+
#
|
|
149
|
+
# @param id [String] Addon Id
|
|
150
|
+
#
|
|
151
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
152
|
+
#
|
|
153
|
+
# @return [nil]
|
|
154
|
+
#
|
|
155
|
+
# @see Dodopayments::Models::AddonUnarchiveParams
|
|
156
|
+
def unarchive(id, params = {})
|
|
157
|
+
@client.request(
|
|
158
|
+
method: :post,
|
|
159
|
+
path: ["addons/%1$s/unarchive", id],
|
|
160
|
+
model: NilClass,
|
|
161
|
+
options: params[:request_options]
|
|
162
|
+
)
|
|
163
|
+
end
|
|
164
|
+
|
|
111
165
|
# @overload update_images(id, request_options: {})
|
|
112
166
|
#
|
|
113
167
|
# @param id [String] Addon Id
|
|
@@ -131,6 +185,7 @@ module Dodopayments
|
|
|
131
185
|
# @param client [Dodopayments::Client]
|
|
132
186
|
def initialize(client:)
|
|
133
187
|
@client = client
|
|
188
|
+
@translations = Dodopayments::Resources::Addons::Translations.new(client: client)
|
|
134
189
|
end
|
|
135
190
|
end
|
|
136
191
|
end
|
|
@@ -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
|