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
|
@@ -12,8 +12,25 @@ module Dodopayments
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
required :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(id:, locale: nil, request_options: {})
|
|
27
|
+
# Some parameter documentations has been truncated, see
|
|
28
|
+
# {Dodopayments::Models::ProductRetrieveParams} for more details.
|
|
29
|
+
#
|
|
16
30
|
# @param 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,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::Translations#update
|
|
7
|
+
class Translation < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute locale
|
|
9
|
+
# The locale of the translation.
|
|
10
|
+
#
|
|
11
|
+
# @return [Symbol, Dodopayments::Models::Locale]
|
|
12
|
+
required :locale, enum: -> { Dodopayments::Locale }
|
|
13
|
+
|
|
14
|
+
# @!attribute updated_at
|
|
15
|
+
# The time of the last change.
|
|
16
|
+
#
|
|
17
|
+
# @return [Time]
|
|
18
|
+
required :updated_at, Time
|
|
19
|
+
|
|
20
|
+
# @!attribute description
|
|
21
|
+
# The translated description. `null` shows that the description has no
|
|
22
|
+
# translation.
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :description, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute name
|
|
28
|
+
# The translated name. `null` shows that the name has no translation.
|
|
29
|
+
#
|
|
30
|
+
# @return [String, nil]
|
|
31
|
+
optional :name, String, nil?: true
|
|
32
|
+
|
|
33
|
+
# @!method initialize(locale:, updated_at:, description: nil, name: nil)
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {Dodopayments::Models::Products::Translation} for more details.
|
|
36
|
+
#
|
|
37
|
+
# The translation of a product, an add-on, a product collection or a meter in one
|
|
38
|
+
# locale.
|
|
39
|
+
#
|
|
40
|
+
# @param locale [Symbol, Dodopayments::Models::Locale] The locale of the translation.
|
|
41
|
+
#
|
|
42
|
+
# @param updated_at [Time] The time of the last change.
|
|
43
|
+
#
|
|
44
|
+
# @param description [String, nil] The translated description. `null` shows that the description has no translation
|
|
45
|
+
#
|
|
46
|
+
# @param name [String, nil] The translated name. `null` shows that the name has no translation.
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::Translations#delete
|
|
7
|
+
class TranslationDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute locale
|
|
17
|
+
# A locale that the checkout and the customer portal can show.
|
|
18
|
+
#
|
|
19
|
+
# The codes are a copy of the checkout locales. `GET /locales` lists them.
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, Dodopayments::Models::Locale]
|
|
22
|
+
required :locale, enum: -> { Dodopayments::Locale }
|
|
23
|
+
|
|
24
|
+
# @!method initialize(id:, locale:, request_options: {})
|
|
25
|
+
# Some parameter documentations has been truncated, see
|
|
26
|
+
# {Dodopayments::Models::Products::TranslationDeleteParams} for more details.
|
|
27
|
+
#
|
|
28
|
+
# @param id [String]
|
|
29
|
+
#
|
|
30
|
+
# @param locale [Symbol, Dodopayments::Models::Locale] A locale that the checkout and the customer portal can show.
|
|
31
|
+
#
|
|
32
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::Translations#list
|
|
7
|
+
class TranslationListParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute locale
|
|
17
|
+
# Returns only these locales, for example `?locale=fr&locale=de`. With no value,
|
|
18
|
+
# the response has all the locales.
|
|
19
|
+
#
|
|
20
|
+
# @return [Array<String>, nil]
|
|
21
|
+
optional :locale, Dodopayments::Internal::Type::ArrayOf[String]
|
|
22
|
+
|
|
23
|
+
# @!method initialize(id:, locale: nil, request_options: {})
|
|
24
|
+
# Some parameter documentations has been truncated, see
|
|
25
|
+
# {Dodopayments::Models::Products::TranslationListParams} for more details.
|
|
26
|
+
#
|
|
27
|
+
# @param id [String]
|
|
28
|
+
#
|
|
29
|
+
# @param locale [Array<String>] Returns only these locales, for example `?locale=fr&locale=de`. With no value, t
|
|
30
|
+
#
|
|
31
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::Translations#update
|
|
7
|
+
class TranslationUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute locale
|
|
17
|
+
# A locale that the checkout and the customer portal can show.
|
|
18
|
+
#
|
|
19
|
+
# The codes are a copy of the checkout locales. `GET /locales` lists them.
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, Dodopayments::Models::Locale]
|
|
22
|
+
required :locale, enum: -> { Dodopayments::Locale }
|
|
23
|
+
|
|
24
|
+
# @!attribute description
|
|
25
|
+
# The translated description.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :description, String, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute name
|
|
31
|
+
# The translated name.
|
|
32
|
+
#
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :name, String, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!method initialize(id:, locale:, description: nil, name: nil, request_options: {})
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {Dodopayments::Models::Products::TranslationUpdateParams} for more details.
|
|
39
|
+
#
|
|
40
|
+
# @param id [String]
|
|
41
|
+
#
|
|
42
|
+
# @param locale [Symbol, Dodopayments::Models::Locale] A locale that the checkout and the customer portal can show.
|
|
43
|
+
#
|
|
44
|
+
# @param description [String, nil] The translated description.
|
|
45
|
+
#
|
|
46
|
+
# @param name [String, nil] The translated name.
|
|
47
|
+
#
|
|
48
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::Translations#list
|
|
7
|
+
class TranslationsListResponse < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute items
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<Dodopayments::Models::Products::Translation>]
|
|
11
|
+
required :items, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Products::Translation] }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(items:)
|
|
14
|
+
# The translations of a product, an add-on, a product collection or a meter.
|
|
15
|
+
#
|
|
16
|
+
# @param items [Array<Dodopayments::Models::Products::Translation>]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -13,6 +13,13 @@ module Dodopayments
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :payment_id, String
|
|
15
15
|
|
|
16
|
+
# @!attribute currency
|
|
17
|
+
# The currency of every `items[].amount`. It must be the currency the customer
|
|
18
|
+
# paid in. Without it, the amounts are in the settlement currency.
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
|
21
|
+
optional :currency, enum: -> { Dodopayments::Currency }, nil?: true
|
|
22
|
+
|
|
16
23
|
# @!attribute items
|
|
17
24
|
# Partially Refund an Individual Item
|
|
18
25
|
#
|
|
@@ -33,9 +40,14 @@ module Dodopayments
|
|
|
33
40
|
# @return [String, nil]
|
|
34
41
|
optional :reason, String, nil?: true
|
|
35
42
|
|
|
36
|
-
# @!method initialize(payment_id:, items: nil, metadata: nil, reason: nil, request_options: {})
|
|
43
|
+
# @!method initialize(payment_id:, currency: nil, items: nil, metadata: nil, reason: nil, request_options: {})
|
|
44
|
+
# Some parameter documentations has been truncated, see
|
|
45
|
+
# {Dodopayments::Models::RefundCreateParams} for more details.
|
|
46
|
+
#
|
|
37
47
|
# @param payment_id [String] The unique identifier of the payment to be refunded.
|
|
38
48
|
#
|
|
49
|
+
# @param currency [Symbol, Dodopayments::Models::Currency, nil] The currency of every `items[].amount`. It must be the currency the customer pai
|
|
50
|
+
#
|
|
39
51
|
# @param items [Array<Dodopayments::Models::RefundCreateParams::Item>, nil] Partially Refund an Individual Item
|
|
40
52
|
#
|
|
41
53
|
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata associated with the refund.
|
|
@@ -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
|