dodopayments 2.33.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 +16 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/type/enum.rb +11 -11
- 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/charge_type.rb +33 -0
- data/lib/dodopayments/models/checkout_session_preview_params.rb +17 -1
- data/lib/dodopayments/models/checkout_session_preview_response.rb +12 -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/invoices/payment_retrieve_params.rb +14 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +14 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_refund_params.rb +14 -1
- 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 +85 -8
- data/lib/dodopayments/models/payment_list_response.rb +91 -6
- 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/price.rb +56 -20
- 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/group_update_params.rb +2 -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/subscription_service_period.rb +12 -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 +22 -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/invoices/payments.rb +30 -6
- 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 +40 -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/charge_type.rbi +37 -0
- data/rbi/dodopayments/models/checkout_session_preview_params.rbi +29 -5
- data/rbi/dodopayments/models/checkout_session_preview_response.rbi +14 -0
- 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/invoices/payment_retrieve_params.rbi +17 -1
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +21 -2
- data/rbi/dodopayments/models/invoices/payment_retrieve_refund_params.rbi +21 -2
- 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 +103 -8
- data/rbi/dodopayments/models/payment_list_response.rbi +112 -9
- 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/price.rbi +96 -24
- 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/group_update_params.rbi +4 -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/subscription_service_period.rbi +24 -4
- 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 +22 -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/invoices/payments.rbi +12 -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/groups.rbi +2 -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/charge_type.rbs +16 -0
- data/sig/dodopayments/models/checkout_session_preview_params.rbs +13 -3
- data/sig/dodopayments/models/checkout_session_preview_response.rbs +5 -0
- 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/invoices/payment_retrieve_params.rbs +7 -1
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +8 -1
- data/sig/dodopayments/models/invoices/payment_retrieve_refund_params.rbs +8 -1
- 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 +35 -0
- data/sig/dodopayments/models/payment_list_response.rbs +43 -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/subscription_service_period.rbs +10 -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 +22 -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/invoices/payments.rbs +3 -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 +122 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Meters
|
|
6
|
+
class TranslationListParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Dodopayments::Meters::TranslationListParams,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Returns only these locales, for example `?locale=fr&locale=de`. With no value,
|
|
22
|
+
# the response has all the locales.
|
|
23
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
24
|
+
attr_reader :locale
|
|
25
|
+
|
|
26
|
+
sig { params(locale: T::Array[String]).void }
|
|
27
|
+
attr_writer :locale
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
id: String,
|
|
32
|
+
locale: T::Array[String],
|
|
33
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
34
|
+
).returns(T.attached_class)
|
|
35
|
+
end
|
|
36
|
+
def self.new(
|
|
37
|
+
id:,
|
|
38
|
+
# Returns only these locales, for example `?locale=fr&locale=de`. With no value,
|
|
39
|
+
# the response has all the locales.
|
|
40
|
+
locale: nil,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
override.returns(
|
|
47
|
+
{
|
|
48
|
+
id: String,
|
|
49
|
+
locale: T::Array[String],
|
|
50
|
+
request_options: Dodopayments::RequestOptions
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
def to_hash
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Meters
|
|
6
|
+
class TranslationUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Dodopayments::Meters::TranslationUpdateParams,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# A locale that the checkout and the customer portal can show.
|
|
22
|
+
#
|
|
23
|
+
# The codes are a copy of the checkout locales. `GET /locales` lists them.
|
|
24
|
+
sig { returns(Dodopayments::Locale::OrSymbol) }
|
|
25
|
+
attr_accessor :locale
|
|
26
|
+
|
|
27
|
+
# The translated description.
|
|
28
|
+
sig { returns(T.nilable(String)) }
|
|
29
|
+
attr_accessor :description
|
|
30
|
+
|
|
31
|
+
# The translated name.
|
|
32
|
+
sig { returns(T.nilable(String)) }
|
|
33
|
+
attr_accessor :name
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
id: String,
|
|
38
|
+
locale: Dodopayments::Locale::OrSymbol,
|
|
39
|
+
description: T.nilable(String),
|
|
40
|
+
name: T.nilable(String),
|
|
41
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
id:,
|
|
46
|
+
# A locale that the checkout and the customer portal can show.
|
|
47
|
+
#
|
|
48
|
+
# The codes are a copy of the checkout locales. `GET /locales` lists them.
|
|
49
|
+
locale:,
|
|
50
|
+
# The translated description.
|
|
51
|
+
description: nil,
|
|
52
|
+
# The translated name.
|
|
53
|
+
name: nil,
|
|
54
|
+
request_options: {}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
override.returns(
|
|
60
|
+
{
|
|
61
|
+
id: String,
|
|
62
|
+
locale: Dodopayments::Locale::OrSymbol,
|
|
63
|
+
description: T.nilable(String),
|
|
64
|
+
name: T.nilable(String),
|
|
65
|
+
request_options: Dodopayments::RequestOptions
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
def to_hash
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class MiscListLocalesParams < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Dodopayments::MiscListLocalesParams,
|
|
13
|
+
Dodopayments::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(request_options: Dodopayments::RequestOptions::OrHash).returns(
|
|
19
|
+
T.attached_class
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.new(request_options: {})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
override.returns({ request_options: Dodopayments::RequestOptions })
|
|
27
|
+
end
|
|
28
|
+
def to_hash
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -48,6 +48,12 @@ module Dodopayments
|
|
|
48
48
|
sig { returns(T::Array[Dodopayments::Dispute]) }
|
|
49
49
|
attr_accessor :disputes
|
|
50
50
|
|
|
51
|
+
# True when this payment also bills metered usage or credit overage. The usage is
|
|
52
|
+
# for the billing cycle before the service period, not for the service period. The
|
|
53
|
+
# value is set for each payment status. It is false when `charge_type` is null.
|
|
54
|
+
sig { returns(T::Boolean) }
|
|
55
|
+
attr_accessor :includes_usage
|
|
56
|
+
|
|
51
57
|
# True when one payment starts more than one subscription. Read this field to find
|
|
52
58
|
# the payment type. Do not read the length of `subscription_ids`. Do not read
|
|
53
59
|
# `subscription_id` for null.
|
|
@@ -86,7 +92,10 @@ module Dodopayments
|
|
|
86
92
|
# the same as `subscription_ids`. For a plan change charge, the period starts at
|
|
87
93
|
# the plan change and ends at the next billing date. The list is empty unless the
|
|
88
94
|
# payment status is `succeeded`. The list is also empty for a one-time payment, an
|
|
89
|
-
# on-demand charge, or a payment method update.
|
|
95
|
+
# on-demand charge, or a payment method update. The list is set for `new`,
|
|
96
|
+
# `renewal` and `plan_change` charges that succeeded. It can be empty for some
|
|
97
|
+
# zero-amount payments. A `renewal` with no entry for its subscription bills usage
|
|
98
|
+
# only. That payment does not extend the service period.
|
|
90
99
|
sig { returns(T::Array[Dodopayments::SubscriptionServicePeriod]) }
|
|
91
100
|
attr_accessor :service_periods
|
|
92
101
|
|
|
@@ -114,6 +123,18 @@ module Dodopayments
|
|
|
114
123
|
sig { returns(Integer) }
|
|
115
124
|
attr_accessor :total_amount
|
|
116
125
|
|
|
126
|
+
# Expiry month of the card, as two digits from `01` to `12`. For Apple Pay and
|
|
127
|
+
# Google Pay, this is the expiry of the wallet token, which can differ from the
|
|
128
|
+
# expiry of the physical card.
|
|
129
|
+
sig { returns(T.nilable(String)) }
|
|
130
|
+
attr_accessor :card_exp_month
|
|
131
|
+
|
|
132
|
+
# Expiry year of the card, as four digits, for example `2029`. For Apple Pay and
|
|
133
|
+
# Google Pay, this is the expiry of the wallet token, which can differ from the
|
|
134
|
+
# expiry of the physical card.
|
|
135
|
+
sig { returns(T.nilable(String)) }
|
|
136
|
+
attr_accessor :card_exp_year
|
|
137
|
+
|
|
117
138
|
# Cardholder name
|
|
118
139
|
sig { returns(T.nilable(String)) }
|
|
119
140
|
attr_accessor :card_holder_name
|
|
@@ -126,14 +147,22 @@ module Dodopayments
|
|
|
126
147
|
sig { returns(T.nilable(String)) }
|
|
127
148
|
attr_accessor :card_last_four
|
|
128
149
|
|
|
129
|
-
# Card network
|
|
150
|
+
# Card network, in lowercase, for example `visa`, `mastercard` or `amex`. Older
|
|
151
|
+
# payments can carry other casing.
|
|
130
152
|
sig { returns(T.nilable(String)) }
|
|
131
153
|
attr_accessor :card_network
|
|
132
154
|
|
|
133
|
-
# The type of card
|
|
155
|
+
# The type of card, in lowercase: `credit`, `debit` or `prepaid`. Older payments
|
|
156
|
+
# can carry other casing.
|
|
134
157
|
sig { returns(T.nilable(String)) }
|
|
135
158
|
attr_accessor :card_type
|
|
136
159
|
|
|
160
|
+
# The type of subscription charge that this payment is for. Refer to `ChargeType`.
|
|
161
|
+
# The value is set for each payment status, not only for `succeeded`. The value is
|
|
162
|
+
# null when this payment charges no subscription.
|
|
163
|
+
sig { returns(T.nilable(Dodopayments::ChargeType::TaggedSymbol)) }
|
|
164
|
+
attr_accessor :charge_type
|
|
165
|
+
|
|
137
166
|
# If payment is made using a checkout session, this field is set to the id of the
|
|
138
167
|
# session.
|
|
139
168
|
sig { returns(T.nilable(String)) }
|
|
@@ -165,7 +194,9 @@ module Dodopayments
|
|
|
165
194
|
sig { returns(T.nilable(String)) }
|
|
166
195
|
attr_accessor :invoice_id
|
|
167
196
|
|
|
168
|
-
#
|
|
197
|
+
# DEPRECATED: Use `GET /invoices/payments/{payment_id}` with an API key. URL to
|
|
198
|
+
# download the invoice PDF for this payment. The URL has no signed token. If the
|
|
199
|
+
# business asks for a credential on its invoice links, the URL needs an API key.
|
|
169
200
|
sig { returns(T.nilable(String)) }
|
|
170
201
|
attr_accessor :invoice_url
|
|
171
202
|
|
|
@@ -217,6 +248,22 @@ module Dodopayments
|
|
|
217
248
|
sig { returns(T.nilable(Integer)) }
|
|
218
249
|
attr_accessor :tax
|
|
219
250
|
|
|
251
|
+
# How the cardholder completed the 3DS authentication. The value is null when the
|
|
252
|
+
# processor does not report it.
|
|
253
|
+
sig { returns(T.nilable(Dodopayments::ThreeDSFlow::TaggedSymbol)) }
|
|
254
|
+
attr_accessor :three_ds_flow
|
|
255
|
+
|
|
256
|
+
# The result of the 3DS authentication, as the processor reports it. The value is
|
|
257
|
+
# null when the processor reports no 3DS data, for example when the payment did
|
|
258
|
+
# not use 3DS.
|
|
259
|
+
sig { returns(T.nilable(Dodopayments::ThreeDSStatus::TaggedSymbol)) }
|
|
260
|
+
attr_accessor :three_ds_status
|
|
261
|
+
|
|
262
|
+
# The 3DS protocol version, for example `2.2.0`. The value is null when the
|
|
263
|
+
# processor does not report it.
|
|
264
|
+
sig { returns(T.nilable(String)) }
|
|
265
|
+
attr_accessor :three_ds_version
|
|
266
|
+
|
|
220
267
|
# Timestamp when the payment was last updated
|
|
221
268
|
sig { returns(T.nilable(Time)) }
|
|
222
269
|
attr_accessor :updated_at
|
|
@@ -231,6 +278,7 @@ module Dodopayments
|
|
|
231
278
|
customer: Dodopayments::CustomerLimitedDetails::OrHash,
|
|
232
279
|
digital_products_delivered: T::Boolean,
|
|
233
280
|
disputes: T::Array[Dodopayments::Dispute::OrHash],
|
|
281
|
+
includes_usage: T::Boolean,
|
|
234
282
|
is_multi_subscription: T::Boolean,
|
|
235
283
|
is_update_payment_method: T::Boolean,
|
|
236
284
|
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
@@ -244,11 +292,14 @@ module Dodopayments
|
|
|
244
292
|
settlement_currency: Dodopayments::Currency::OrSymbol,
|
|
245
293
|
subscription_ids: T::Array[String],
|
|
246
294
|
total_amount: Integer,
|
|
295
|
+
card_exp_month: T.nilable(String),
|
|
296
|
+
card_exp_year: T.nilable(String),
|
|
247
297
|
card_holder_name: T.nilable(String),
|
|
248
298
|
card_issuing_country: T.nilable(Dodopayments::CountryCode::OrSymbol),
|
|
249
299
|
card_last_four: T.nilable(String),
|
|
250
300
|
card_network: T.nilable(String),
|
|
251
301
|
card_type: T.nilable(String),
|
|
302
|
+
charge_type: T.nilable(Dodopayments::ChargeType::OrSymbol),
|
|
252
303
|
checkout_session_id: T.nilable(String),
|
|
253
304
|
custom_field_responses:
|
|
254
305
|
T.nilable(T::Array[Dodopayments::CustomFieldResponse::OrHash]),
|
|
@@ -269,6 +320,9 @@ module Dodopayments
|
|
|
269
320
|
status: T.nilable(Dodopayments::IntentStatus::OrSymbol),
|
|
270
321
|
subscription_id: T.nilable(String),
|
|
271
322
|
tax: T.nilable(Integer),
|
|
323
|
+
three_ds_flow: T.nilable(Dodopayments::ThreeDSFlow::OrSymbol),
|
|
324
|
+
three_ds_status: T.nilable(Dodopayments::ThreeDSStatus::OrSymbol),
|
|
325
|
+
three_ds_version: T.nilable(String),
|
|
272
326
|
updated_at: T.nilable(Time)
|
|
273
327
|
).returns(T.attached_class)
|
|
274
328
|
end
|
|
@@ -289,6 +343,10 @@ module Dodopayments
|
|
|
289
343
|
digital_products_delivered:,
|
|
290
344
|
# List of disputes associated with this payment
|
|
291
345
|
disputes:,
|
|
346
|
+
# True when this payment also bills metered usage or credit overage. The usage is
|
|
347
|
+
# for the billing cycle before the service period, not for the service period. The
|
|
348
|
+
# value is set for each payment status. It is false when `charge_type` is null.
|
|
349
|
+
includes_usage:,
|
|
292
350
|
# True when one payment starts more than one subscription. Read this field to find
|
|
293
351
|
# the payment type. Do not read the length of `subscription_ids`. Do not read
|
|
294
352
|
# `subscription_id` for null.
|
|
@@ -313,7 +371,10 @@ module Dodopayments
|
|
|
313
371
|
# the same as `subscription_ids`. For a plan change charge, the period starts at
|
|
314
372
|
# the plan change and ends at the next billing date. The list is empty unless the
|
|
315
373
|
# payment status is `succeeded`. The list is also empty for a one-time payment, an
|
|
316
|
-
# on-demand charge, or a payment method update.
|
|
374
|
+
# on-demand charge, or a payment method update. The list is set for `new`,
|
|
375
|
+
# `renewal` and `plan_change` charges that succeeded. It can be empty for some
|
|
376
|
+
# zero-amount payments. A `renewal` with no entry for its subscription bills usage
|
|
377
|
+
# only. That payment does not extend the service period.
|
|
317
378
|
service_periods:,
|
|
318
379
|
# The amount that will be credited to your Dodo balance after currency conversion
|
|
319
380
|
# and processing. Especially relevant for adaptive pricing where the customer's
|
|
@@ -331,16 +392,30 @@ module Dodopayments
|
|
|
331
392
|
# unit (e.g. cents for USD, yen for JPY, fils for KWD — see the currency's decimal
|
|
332
393
|
# places)
|
|
333
394
|
total_amount:,
|
|
395
|
+
# Expiry month of the card, as two digits from `01` to `12`. For Apple Pay and
|
|
396
|
+
# Google Pay, this is the expiry of the wallet token, which can differ from the
|
|
397
|
+
# expiry of the physical card.
|
|
398
|
+
card_exp_month: nil,
|
|
399
|
+
# Expiry year of the card, as four digits, for example `2029`. For Apple Pay and
|
|
400
|
+
# Google Pay, this is the expiry of the wallet token, which can differ from the
|
|
401
|
+
# expiry of the physical card.
|
|
402
|
+
card_exp_year: nil,
|
|
334
403
|
# Cardholder name
|
|
335
404
|
card_holder_name: nil,
|
|
336
405
|
# ISO2 country code of the card
|
|
337
406
|
card_issuing_country: nil,
|
|
338
407
|
# The last four digits of the card
|
|
339
408
|
card_last_four: nil,
|
|
340
|
-
# Card network
|
|
409
|
+
# Card network, in lowercase, for example `visa`, `mastercard` or `amex`. Older
|
|
410
|
+
# payments can carry other casing.
|
|
341
411
|
card_network: nil,
|
|
342
|
-
# The type of card
|
|
412
|
+
# The type of card, in lowercase: `credit`, `debit` or `prepaid`. Older payments
|
|
413
|
+
# can carry other casing.
|
|
343
414
|
card_type: nil,
|
|
415
|
+
# The type of subscription charge that this payment is for. Refer to `ChargeType`.
|
|
416
|
+
# The value is set for each payment status, not only for `succeeded`. The value is
|
|
417
|
+
# null when this payment charges no subscription.
|
|
418
|
+
charge_type: nil,
|
|
344
419
|
# If payment is made using a checkout session, this field is set to the id of the
|
|
345
420
|
# session.
|
|
346
421
|
checkout_session_id: nil,
|
|
@@ -358,7 +433,9 @@ module Dodopayments
|
|
|
358
433
|
error_message: nil,
|
|
359
434
|
# Invoice ID for this payment. Uses India-specific invoice ID if available.
|
|
360
435
|
invoice_id: nil,
|
|
361
|
-
#
|
|
436
|
+
# DEPRECATED: Use `GET /invoices/payments/{payment_id}` with an API key. URL to
|
|
437
|
+
# download the invoice PDF for this payment. The URL has no signed token. If the
|
|
438
|
+
# business asks for a credential on its invoice links, the URL needs an API key.
|
|
362
439
|
invoice_url: nil,
|
|
363
440
|
# Checkout URL
|
|
364
441
|
payment_link: nil,
|
|
@@ -386,6 +463,16 @@ module Dodopayments
|
|
|
386
463
|
# Amount of tax collected in the currency's smallest unit (e.g. cents for USD, yen
|
|
387
464
|
# for JPY, fils for KWD)
|
|
388
465
|
tax: nil,
|
|
466
|
+
# How the cardholder completed the 3DS authentication. The value is null when the
|
|
467
|
+
# processor does not report it.
|
|
468
|
+
three_ds_flow: nil,
|
|
469
|
+
# The result of the 3DS authentication, as the processor reports it. The value is
|
|
470
|
+
# null when the processor reports no 3DS data, for example when the payment did
|
|
471
|
+
# not use 3DS.
|
|
472
|
+
three_ds_status: nil,
|
|
473
|
+
# The 3DS protocol version, for example `2.2.0`. The value is null when the
|
|
474
|
+
# processor does not report it.
|
|
475
|
+
three_ds_version: nil,
|
|
389
476
|
# Timestamp when the payment was last updated
|
|
390
477
|
updated_at: nil
|
|
391
478
|
)
|
|
@@ -402,6 +489,7 @@ module Dodopayments
|
|
|
402
489
|
customer: Dodopayments::CustomerLimitedDetails,
|
|
403
490
|
digital_products_delivered: T::Boolean,
|
|
404
491
|
disputes: T::Array[Dodopayments::Dispute],
|
|
492
|
+
includes_usage: T::Boolean,
|
|
405
493
|
is_multi_subscription: T::Boolean,
|
|
406
494
|
is_update_payment_method: T::Boolean,
|
|
407
495
|
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
@@ -415,12 +503,15 @@ module Dodopayments
|
|
|
415
503
|
settlement_currency: Dodopayments::Currency::TaggedSymbol,
|
|
416
504
|
subscription_ids: T::Array[String],
|
|
417
505
|
total_amount: Integer,
|
|
506
|
+
card_exp_month: T.nilable(String),
|
|
507
|
+
card_exp_year: T.nilable(String),
|
|
418
508
|
card_holder_name: T.nilable(String),
|
|
419
509
|
card_issuing_country:
|
|
420
510
|
T.nilable(Dodopayments::CountryCode::TaggedSymbol),
|
|
421
511
|
card_last_four: T.nilable(String),
|
|
422
512
|
card_network: T.nilable(String),
|
|
423
513
|
card_type: T.nilable(String),
|
|
514
|
+
charge_type: T.nilable(Dodopayments::ChargeType::TaggedSymbol),
|
|
424
515
|
checkout_session_id: T.nilable(String),
|
|
425
516
|
custom_field_responses:
|
|
426
517
|
T.nilable(T::Array[Dodopayments::CustomFieldResponse]),
|
|
@@ -442,6 +533,10 @@ module Dodopayments
|
|
|
442
533
|
status: T.nilable(Dodopayments::IntentStatus::TaggedSymbol),
|
|
443
534
|
subscription_id: T.nilable(String),
|
|
444
535
|
tax: T.nilable(Integer),
|
|
536
|
+
three_ds_flow: T.nilable(Dodopayments::ThreeDSFlow::TaggedSymbol),
|
|
537
|
+
three_ds_status:
|
|
538
|
+
T.nilable(Dodopayments::ThreeDSStatus::TaggedSymbol),
|
|
539
|
+
three_ds_version: T.nilable(String),
|
|
445
540
|
updated_at: T.nilable(Time)
|
|
446
541
|
}
|
|
447
542
|
)
|
|
@@ -34,6 +34,12 @@ module Dodopayments
|
|
|
34
34
|
sig { returns(T::Boolean) }
|
|
35
35
|
attr_accessor :has_license_key
|
|
36
36
|
|
|
37
|
+
# True when this payment also bills metered usage or credit overage. The usage is
|
|
38
|
+
# for the billing cycle before the service period, not for the service period. The
|
|
39
|
+
# value is set for each payment status. It is false when `charge_type` is null.
|
|
40
|
+
sig { returns(T::Boolean) }
|
|
41
|
+
attr_accessor :includes_usage
|
|
42
|
+
|
|
37
43
|
# True when one payment starts more than one subscription. Read this field to find
|
|
38
44
|
# the payment type. Do not read the length of `subscription_ids`. Do not read
|
|
39
45
|
# `subscription_id` for null.
|
|
@@ -66,7 +72,10 @@ module Dodopayments
|
|
|
66
72
|
# the same as `subscription_ids`. For a plan change charge, the period starts at
|
|
67
73
|
# the plan change and ends at the next billing date. The list is empty unless the
|
|
68
74
|
# payment status is `succeeded`. The list is also empty for a one-time payment, an
|
|
69
|
-
# on-demand charge, or a payment method update.
|
|
75
|
+
# on-demand charge, or a payment method update. The list is set for `new`,
|
|
76
|
+
# `renewal` and `plan_change` charges that succeeded. It can be empty for some
|
|
77
|
+
# zero-amount payments. A `renewal` with no entry for its subscription bills usage
|
|
78
|
+
# only. That payment does not extend the service period.
|
|
70
79
|
sig { returns(T::Array[Dodopayments::SubscriptionServicePeriod]) }
|
|
71
80
|
attr_accessor :service_periods
|
|
72
81
|
|
|
@@ -79,14 +88,38 @@ module Dodopayments
|
|
|
79
88
|
sig { returns(Integer) }
|
|
80
89
|
attr_accessor :total_amount
|
|
81
90
|
|
|
91
|
+
# Expiry month of the card, as two digits from `01` to `12`. For Apple Pay and
|
|
92
|
+
# Google Pay, this is the expiry of the wallet token, which can differ from the
|
|
93
|
+
# expiry of the physical card.
|
|
94
|
+
sig { returns(T.nilable(String)) }
|
|
95
|
+
attr_accessor :card_exp_month
|
|
96
|
+
|
|
97
|
+
# Expiry year of the card, as four digits, for example `2029`. For Apple Pay and
|
|
98
|
+
# Google Pay, this is the expiry of the wallet token, which can differ from the
|
|
99
|
+
# expiry of the physical card.
|
|
100
|
+
sig { returns(T.nilable(String)) }
|
|
101
|
+
attr_accessor :card_exp_year
|
|
102
|
+
|
|
82
103
|
# The last four digits of the card
|
|
83
104
|
sig { returns(T.nilable(String)) }
|
|
84
105
|
attr_accessor :card_last_four
|
|
85
106
|
|
|
86
|
-
# Card network
|
|
107
|
+
# Card network, in lowercase, for example `visa`, `mastercard` or `amex`. Older
|
|
108
|
+
# payments can carry other casing.
|
|
87
109
|
sig { returns(T.nilable(String)) }
|
|
88
110
|
attr_accessor :card_network
|
|
89
111
|
|
|
112
|
+
# The type of card, in lowercase: `credit`, `debit` or `prepaid`. Older payments
|
|
113
|
+
# can carry other casing.
|
|
114
|
+
sig { returns(T.nilable(String)) }
|
|
115
|
+
attr_accessor :card_type
|
|
116
|
+
|
|
117
|
+
# The type of subscription charge that this payment is for. Refer to `ChargeType`.
|
|
118
|
+
# The value is set for each payment status, not only for `succeeded`. The value is
|
|
119
|
+
# null when this payment charges no subscription.
|
|
120
|
+
sig { returns(T.nilable(Dodopayments::ChargeType::TaggedSymbol)) }
|
|
121
|
+
attr_accessor :charge_type
|
|
122
|
+
|
|
90
123
|
# The ID of the checkout session for this payment. The value is null when the
|
|
91
124
|
# payment does not use a checkout session.
|
|
92
125
|
sig { returns(T.nilable(String)) }
|
|
@@ -100,7 +133,9 @@ module Dodopayments
|
|
|
100
133
|
sig { returns(T.nilable(String)) }
|
|
101
134
|
attr_accessor :invoice_id
|
|
102
135
|
|
|
103
|
-
#
|
|
136
|
+
# DEPRECATED: Use `GET /invoices/payments/{payment_id}` with an API key. URL to
|
|
137
|
+
# download the invoice PDF for this payment. The URL has no signed token. If the
|
|
138
|
+
# business asks for a credential on its invoice links, the URL needs an API key.
|
|
104
139
|
sig { returns(T.nilable(String)) }
|
|
105
140
|
attr_accessor :invoice_url
|
|
106
141
|
|
|
@@ -123,6 +158,22 @@ module Dodopayments
|
|
|
123
158
|
sig { returns(T.nilable(String)) }
|
|
124
159
|
attr_accessor :subscription_id
|
|
125
160
|
|
|
161
|
+
# How the cardholder completed the 3DS authentication. The value is null when the
|
|
162
|
+
# processor does not report it.
|
|
163
|
+
sig { returns(T.nilable(Dodopayments::ThreeDSFlow::TaggedSymbol)) }
|
|
164
|
+
attr_accessor :three_ds_flow
|
|
165
|
+
|
|
166
|
+
# The result of the 3DS authentication, as the processor reports it. The value is
|
|
167
|
+
# null when the processor reports no 3DS data, for example when the payment did
|
|
168
|
+
# not use 3DS.
|
|
169
|
+
sig { returns(T.nilable(Dodopayments::ThreeDSStatus::TaggedSymbol)) }
|
|
170
|
+
attr_accessor :three_ds_status
|
|
171
|
+
|
|
172
|
+
# The 3DS protocol version, for example `2.2.0`. The value is null when the
|
|
173
|
+
# processor does not report it.
|
|
174
|
+
sig { returns(T.nilable(String)) }
|
|
175
|
+
attr_accessor :three_ds_version
|
|
176
|
+
|
|
126
177
|
sig do
|
|
127
178
|
params(
|
|
128
179
|
brand_id: String,
|
|
@@ -131,6 +182,7 @@ module Dodopayments
|
|
|
131
182
|
customer: Dodopayments::CustomerLimitedDetails::OrHash,
|
|
132
183
|
digital_products_delivered: T::Boolean,
|
|
133
184
|
has_license_key: T::Boolean,
|
|
185
|
+
includes_usage: T::Boolean,
|
|
134
186
|
is_multi_subscription: T::Boolean,
|
|
135
187
|
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
136
188
|
payment_id: String,
|
|
@@ -141,8 +193,12 @@ module Dodopayments
|
|
|
141
193
|
T::Array[Dodopayments::SubscriptionServicePeriod::OrHash],
|
|
142
194
|
subscription_ids: T::Array[String],
|
|
143
195
|
total_amount: Integer,
|
|
196
|
+
card_exp_month: T.nilable(String),
|
|
197
|
+
card_exp_year: T.nilable(String),
|
|
144
198
|
card_last_four: T.nilable(String),
|
|
145
199
|
card_network: T.nilable(String),
|
|
200
|
+
card_type: T.nilable(String),
|
|
201
|
+
charge_type: T.nilable(Dodopayments::ChargeType::OrSymbol),
|
|
146
202
|
checkout_session_id: T.nilable(String),
|
|
147
203
|
dispute_status: T.nilable(Dodopayments::DisputeStatus::OrSymbol),
|
|
148
204
|
invoice_id: T.nilable(String),
|
|
@@ -151,7 +207,10 @@ module Dodopayments
|
|
|
151
207
|
payment_method_type: T.nilable(String),
|
|
152
208
|
refund_status: T.nilable(Dodopayments::PaymentRefundStatus::OrSymbol),
|
|
153
209
|
status: T.nilable(Dodopayments::IntentStatus::OrSymbol),
|
|
154
|
-
subscription_id: T.nilable(String)
|
|
210
|
+
subscription_id: T.nilable(String),
|
|
211
|
+
three_ds_flow: T.nilable(Dodopayments::ThreeDSFlow::OrSymbol),
|
|
212
|
+
three_ds_status: T.nilable(Dodopayments::ThreeDSStatus::OrSymbol),
|
|
213
|
+
three_ds_version: T.nilable(String)
|
|
155
214
|
).returns(T.attached_class)
|
|
156
215
|
end
|
|
157
216
|
def self.new(
|
|
@@ -161,6 +220,10 @@ module Dodopayments
|
|
|
161
220
|
customer:,
|
|
162
221
|
digital_products_delivered:,
|
|
163
222
|
has_license_key:,
|
|
223
|
+
# True when this payment also bills metered usage or credit overage. The usage is
|
|
224
|
+
# for the billing cycle before the service period, not for the service period. The
|
|
225
|
+
# value is set for each payment status. It is false when `charge_type` is null.
|
|
226
|
+
includes_usage:,
|
|
164
227
|
# True when one payment starts more than one subscription. Read this field to find
|
|
165
228
|
# the payment type. Do not read the length of `subscription_ids`. Do not read
|
|
166
229
|
# `subscription_id` for null.
|
|
@@ -179,17 +242,36 @@ module Dodopayments
|
|
|
179
242
|
# the same as `subscription_ids`. For a plan change charge, the period starts at
|
|
180
243
|
# the plan change and ends at the next billing date. The list is empty unless the
|
|
181
244
|
# payment status is `succeeded`. The list is also empty for a one-time payment, an
|
|
182
|
-
# on-demand charge, or a payment method update.
|
|
245
|
+
# on-demand charge, or a payment method update. The list is set for `new`,
|
|
246
|
+
# `renewal` and `plan_change` charges that succeeded. It can be empty for some
|
|
247
|
+
# zero-amount payments. A `renewal` with no entry for its subscription bills usage
|
|
248
|
+
# only. That payment does not extend the service period.
|
|
183
249
|
service_periods:,
|
|
184
250
|
# Every subscription that this payment starts or charges, in a stable order. It is
|
|
185
251
|
# empty for a one-time payment. It holds the value of `subscription_id` when the
|
|
186
252
|
# payment names one subscription.
|
|
187
253
|
subscription_ids:,
|
|
188
254
|
total_amount:,
|
|
255
|
+
# Expiry month of the card, as two digits from `01` to `12`. For Apple Pay and
|
|
256
|
+
# Google Pay, this is the expiry of the wallet token, which can differ from the
|
|
257
|
+
# expiry of the physical card.
|
|
258
|
+
card_exp_month: nil,
|
|
259
|
+
# Expiry year of the card, as four digits, for example `2029`. For Apple Pay and
|
|
260
|
+
# Google Pay, this is the expiry of the wallet token, which can differ from the
|
|
261
|
+
# expiry of the physical card.
|
|
262
|
+
card_exp_year: nil,
|
|
189
263
|
# The last four digits of the card
|
|
190
264
|
card_last_four: nil,
|
|
191
|
-
# Card network
|
|
265
|
+
# Card network, in lowercase, for example `visa`, `mastercard` or `amex`. Older
|
|
266
|
+
# payments can carry other casing.
|
|
192
267
|
card_network: nil,
|
|
268
|
+
# The type of card, in lowercase: `credit`, `debit` or `prepaid`. Older payments
|
|
269
|
+
# can carry other casing.
|
|
270
|
+
card_type: nil,
|
|
271
|
+
# The type of subscription charge that this payment is for. Refer to `ChargeType`.
|
|
272
|
+
# The value is set for each payment status, not only for `succeeded`. The value is
|
|
273
|
+
# null when this payment charges no subscription.
|
|
274
|
+
charge_type: nil,
|
|
193
275
|
# The ID of the checkout session for this payment. The value is null when the
|
|
194
276
|
# payment does not use a checkout session.
|
|
195
277
|
checkout_session_id: nil,
|
|
@@ -197,7 +279,9 @@ module Dodopayments
|
|
|
197
279
|
dispute_status: nil,
|
|
198
280
|
# Invoice ID for this payment. Uses India-specific invoice ID if available.
|
|
199
281
|
invoice_id: nil,
|
|
200
|
-
#
|
|
282
|
+
# DEPRECATED: Use `GET /invoices/payments/{payment_id}` with an API key. URL to
|
|
283
|
+
# download the invoice PDF for this payment. The URL has no signed token. If the
|
|
284
|
+
# business asks for a credential on its invoice links, the URL needs an API key.
|
|
201
285
|
invoice_url: nil,
|
|
202
286
|
payment_method: nil,
|
|
203
287
|
payment_method_type: nil,
|
|
@@ -205,7 +289,17 @@ module Dodopayments
|
|
|
205
289
|
# exist.
|
|
206
290
|
refund_status: nil,
|
|
207
291
|
status: nil,
|
|
208
|
-
subscription_id: nil
|
|
292
|
+
subscription_id: nil,
|
|
293
|
+
# How the cardholder completed the 3DS authentication. The value is null when the
|
|
294
|
+
# processor does not report it.
|
|
295
|
+
three_ds_flow: nil,
|
|
296
|
+
# The result of the 3DS authentication, as the processor reports it. The value is
|
|
297
|
+
# null when the processor reports no 3DS data, for example when the payment did
|
|
298
|
+
# not use 3DS.
|
|
299
|
+
three_ds_status: nil,
|
|
300
|
+
# The 3DS protocol version, for example `2.2.0`. The value is null when the
|
|
301
|
+
# processor does not report it.
|
|
302
|
+
three_ds_version: nil
|
|
209
303
|
)
|
|
210
304
|
end
|
|
211
305
|
|
|
@@ -218,6 +312,7 @@ module Dodopayments
|
|
|
218
312
|
customer: Dodopayments::CustomerLimitedDetails,
|
|
219
313
|
digital_products_delivered: T::Boolean,
|
|
220
314
|
has_license_key: T::Boolean,
|
|
315
|
+
includes_usage: T::Boolean,
|
|
221
316
|
is_multi_subscription: T::Boolean,
|
|
222
317
|
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
223
318
|
payment_id: String,
|
|
@@ -227,8 +322,12 @@ module Dodopayments
|
|
|
227
322
|
service_periods: T::Array[Dodopayments::SubscriptionServicePeriod],
|
|
228
323
|
subscription_ids: T::Array[String],
|
|
229
324
|
total_amount: Integer,
|
|
325
|
+
card_exp_month: T.nilable(String),
|
|
326
|
+
card_exp_year: T.nilable(String),
|
|
230
327
|
card_last_four: T.nilable(String),
|
|
231
328
|
card_network: T.nilable(String),
|
|
329
|
+
card_type: T.nilable(String),
|
|
330
|
+
charge_type: T.nilable(Dodopayments::ChargeType::TaggedSymbol),
|
|
232
331
|
checkout_session_id: T.nilable(String),
|
|
233
332
|
dispute_status:
|
|
234
333
|
T.nilable(Dodopayments::DisputeStatus::TaggedSymbol),
|
|
@@ -239,7 +338,11 @@ module Dodopayments
|
|
|
239
338
|
refund_status:
|
|
240
339
|
T.nilable(Dodopayments::PaymentRefundStatus::TaggedSymbol),
|
|
241
340
|
status: T.nilable(Dodopayments::IntentStatus::TaggedSymbol),
|
|
242
|
-
subscription_id: T.nilable(String)
|
|
341
|
+
subscription_id: T.nilable(String),
|
|
342
|
+
three_ds_flow: T.nilable(Dodopayments::ThreeDSFlow::TaggedSymbol),
|
|
343
|
+
three_ds_status:
|
|
344
|
+
T.nilable(Dodopayments::ThreeDSStatus::TaggedSymbol),
|
|
345
|
+
three_ds_version: T.nilable(String)
|
|
243
346
|
}
|
|
244
347
|
)
|
|
245
348
|
end
|