dodopayments 2.14.0 → 2.16.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 +12 -3
- data/README.md +1 -1
- data/lib/dodopayments/models/abandoned_checkout_detected_webhook_event.rb +14 -1
- data/lib/dodopayments/models/abandoned_checkout_recovered_webhook_event.rb +14 -1
- data/lib/dodopayments/models/checkout_session_preview_response.rb +15 -1
- data/lib/dodopayments/models/credit_balance_low_webhook_event.rb +16 -1
- data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +24 -1
- data/lib/dodopayments/models/customer_retrieve_payment_methods_response.rb +2 -2
- data/lib/dodopayments/models/dispute_list_response.rb +2 -2
- data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +14 -1
- data/lib/dodopayments/models/dunning_started_webhook_event.rb +14 -1
- data/lib/dodopayments/models/entitlements/entitlement_grant.rb +9 -1
- data/lib/dodopayments/models/entitlements/grant_list_params.rb +1 -26
- data/lib/dodopayments/models/get_dispute.rb +35 -1
- data/lib/dodopayments/models/integration_config.rb +7 -7
- data/lib/dodopayments/models/integration_config_response.rb +7 -11
- data/lib/dodopayments/models/license_key.rb +9 -1
- data/lib/dodopayments/models/payment.rb +9 -9
- data/lib/dodopayments/models/payment_create_response.rb +3 -2
- data/lib/dodopayments/models/payment_list_response.rb +2 -4
- data/lib/dodopayments/models/payment_method_types.rb +1 -1
- data/lib/dodopayments/models/payouts/breakup/detail_list_response.rb +7 -6
- data/lib/dodopayments/models/payouts/breakup_retrieve_response.rb +3 -3
- data/lib/dodopayments/models/product.rb +24 -1
- data/lib/dodopayments/models/product_create_params.rb +28 -5
- data/lib/dodopayments/models/product_list_response.rb +24 -1
- data/lib/dodopayments/models/product_update_params.rb +24 -1
- data/lib/dodopayments/models/refund.rb +9 -1
- data/lib/dodopayments/models/subscription.rb +12 -4
- data/lib/dodopayments/models/subscription_list_response.rb +3 -3
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +16 -1
- data/lib/dodopayments/models/subscription_retrieve_usage_history_response.rb +7 -2
- data/lib/dodopayments/models/theme_config.rb +1 -1
- data/lib/dodopayments/models/webhook_payload.rb +47 -3
- data/lib/dodopayments/resources/entitlements/grants.rb +1 -3
- data/lib/dodopayments/resources/products.rb +8 -4
- data/lib/dodopayments/version.rb +1 -1
- data/rbi/dodopayments/models/abandoned_checkout_detected_webhook_event.rbi +8 -0
- data/rbi/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbi +8 -0
- data/rbi/dodopayments/models/checkout_session_preview_response.rbi +14 -0
- data/rbi/dodopayments/models/credit_balance_low_webhook_event.rbi +8 -0
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +8 -0
- data/rbi/dodopayments/models/customer_retrieve_payment_methods_response.rbi +2 -2
- data/rbi/dodopayments/models/dispute_list_response.rbi +3 -3
- data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +8 -0
- data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +8 -0
- data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +8 -0
- data/rbi/dodopayments/models/entitlements/grant_list_params.rbi +0 -89
- data/rbi/dodopayments/models/get_dispute.rbi +52 -0
- data/rbi/dodopayments/models/integration_config.rbi +9 -9
- data/rbi/dodopayments/models/integration_config_response.rbi +9 -15
- data/rbi/dodopayments/models/license_key.rbi +8 -0
- data/rbi/dodopayments/models/payment.rbi +13 -12
- data/rbi/dodopayments/models/payment_create_response.rbi +4 -2
- data/rbi/dodopayments/models/payment_list_response.rbi +3 -6
- data/rbi/dodopayments/models/payment_method_types.rbi +1 -1
- data/rbi/dodopayments/models/payouts/breakup/detail_list_response.rbi +10 -8
- data/rbi/dodopayments/models/payouts/breakup_retrieve_response.rbi +4 -4
- data/rbi/dodopayments/models/product.rbi +36 -0
- data/rbi/dodopayments/models/product_create_params.rbi +58 -4
- data/rbi/dodopayments/models/product_list_response.rbi +58 -0
- data/rbi/dodopayments/models/product_update_params.rbi +54 -0
- data/rbi/dodopayments/models/refund.rbi +8 -0
- data/rbi/dodopayments/models/subscription.rbi +12 -4
- data/rbi/dodopayments/models/subscription_list_response.rbi +4 -4
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +10 -0
- data/rbi/dodopayments/models/subscription_retrieve_usage_history_response.rbi +4 -2
- data/rbi/dodopayments/models/theme_config.rbi +1 -1
- data/rbi/dodopayments/models/webhook_payload.rbi +24 -0
- data/rbi/dodopayments/resources/entitlements/grants.rbi +0 -4
- data/rbi/dodopayments/resources/products.rbi +14 -2
- data/sig/dodopayments/models/abandoned_checkout_detected_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/checkout_session_preview_response.rbs +5 -0
- data/sig/dodopayments/models/credit_balance_low_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/credit_entitlements/credit_ledger_entry.rbs +5 -0
- data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/dunning_started_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +5 -0
- data/sig/dodopayments/models/entitlements/grant_list_params.rbs +0 -34
- data/sig/dodopayments/models/get_dispute.rbs +22 -0
- data/sig/dodopayments/models/license_key.rbs +5 -0
- data/sig/dodopayments/models/product.rbs +16 -0
- data/sig/dodopayments/models/product_create_params.rbs +17 -1
- data/sig/dodopayments/models/product_list_response.rbs +16 -0
- data/sig/dodopayments/models/product_update_params.rbs +16 -0
- data/sig/dodopayments/models/refund.rbs +5 -0
- data/sig/dodopayments/models/subscription.rbs +5 -0
- data/sig/dodopayments/models/theme_config.rbs +1 -1
- data/sig/dodopayments/models/webhook_payload.rbs +15 -0
- data/sig/dodopayments/resources/entitlements/grants.rbs +0 -1
- data/sig/dodopayments/resources/products.rbs +2 -0
- metadata +2 -2
|
@@ -66,8 +66,7 @@ module Dodopayments
|
|
|
66
66
|
|
|
67
67
|
# @!attribute payment_provider
|
|
68
68
|
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
69
|
-
# merchant's own
|
|
70
|
-
# itself.
|
|
69
|
+
# merchant's own payment connector); `dodo` for everything Dodo processed itself.
|
|
71
70
|
#
|
|
72
71
|
# @return [Symbol, Dodopayments::Models::Payment::PaymentProvider]
|
|
73
72
|
required :payment_provider, enum: -> { Dodopayments::Payment::PaymentProvider }
|
|
@@ -103,8 +102,9 @@ module Dodopayments
|
|
|
103
102
|
required :settlement_currency, enum: -> { Dodopayments::Currency }
|
|
104
103
|
|
|
105
104
|
# @!attribute total_amount
|
|
106
|
-
# Total amount charged to the customer including tax, in
|
|
107
|
-
# (e.g. cents
|
|
105
|
+
# Total amount charged to the customer including tax, in the currency's smallest
|
|
106
|
+
# unit (e.g. cents for USD, yen for JPY, fils for KWD — see the currency's decimal
|
|
107
|
+
# places)
|
|
108
108
|
#
|
|
109
109
|
# @return [Integer]
|
|
110
110
|
required :total_amount, Integer
|
|
@@ -248,7 +248,8 @@ module Dodopayments
|
|
|
248
248
|
optional :subscription_id, String, nil?: true
|
|
249
249
|
|
|
250
250
|
# @!attribute tax
|
|
251
|
-
# Amount of tax collected in
|
|
251
|
+
# Amount of tax collected in the currency's smallest unit (e.g. cents for USD, yen
|
|
252
|
+
# for JPY, fils for KWD)
|
|
252
253
|
#
|
|
253
254
|
# @return [Integer, nil]
|
|
254
255
|
optional :tax, Integer, nil?: true
|
|
@@ -293,7 +294,7 @@ module Dodopayments
|
|
|
293
294
|
#
|
|
294
295
|
# @param settlement_currency [Symbol, Dodopayments::Models::Currency] The currency in which the settlement_amount will be credited to your Dodo balanc
|
|
295
296
|
#
|
|
296
|
-
# @param total_amount [Integer] Total amount charged to the customer including tax, in
|
|
297
|
+
# @param total_amount [Integer] Total amount charged to the customer including tax, in the currency's smallest u
|
|
297
298
|
#
|
|
298
299
|
# @param card_holder_name [String, nil] Cardholder name
|
|
299
300
|
#
|
|
@@ -337,13 +338,12 @@ module Dodopayments
|
|
|
337
338
|
#
|
|
338
339
|
# @param subscription_id [String, nil] Identifier of the subscription if payment is part of a subscription
|
|
339
340
|
#
|
|
340
|
-
# @param tax [Integer, nil] Amount of tax collected in
|
|
341
|
+
# @param tax [Integer, nil] Amount of tax collected in the currency's smallest unit
|
|
341
342
|
#
|
|
342
343
|
# @param updated_at [Time, nil] Timestamp when the payment was last updated
|
|
343
344
|
|
|
344
345
|
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
345
|
-
# merchant's own
|
|
346
|
-
# itself.
|
|
346
|
+
# merchant's own payment connector); `dodo` for everything Dodo processed itself.
|
|
347
347
|
#
|
|
348
348
|
# @see Dodopayments::Models::Payment#payment_provider
|
|
349
349
|
module PaymentProvider
|
|
@@ -30,7 +30,8 @@ module Dodopayments
|
|
|
30
30
|
required :payment_id, String
|
|
31
31
|
|
|
32
32
|
# @!attribute total_amount
|
|
33
|
-
# Total amount of the payment in
|
|
33
|
+
# Total amount of the payment in the currency's smallest unit (cents for USD, yen
|
|
34
|
+
# for JPY, fils for KWD)
|
|
34
35
|
#
|
|
35
36
|
# @return [Integer]
|
|
36
37
|
required :total_amount, Integer
|
|
@@ -82,7 +83,7 @@ module Dodopayments
|
|
|
82
83
|
#
|
|
83
84
|
# @param payment_id [String] Unique identifier for the payment
|
|
84
85
|
#
|
|
85
|
-
# @param total_amount [Integer] Total amount of the payment in
|
|
86
|
+
# @param total_amount [Integer] Total amount of the payment in the currency's smallest unit
|
|
86
87
|
#
|
|
87
88
|
# @param discount_id [String, nil] DEPRECATED: Use discount_ids instead. Returns the first discount's ID if present
|
|
88
89
|
#
|
|
@@ -46,8 +46,7 @@ module Dodopayments
|
|
|
46
46
|
|
|
47
47
|
# @!attribute payment_provider
|
|
48
48
|
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
49
|
-
# merchant's own
|
|
50
|
-
# itself.
|
|
49
|
+
# merchant's own payment connector); `dodo` for everything Dodo processed itself.
|
|
51
50
|
#
|
|
52
51
|
# @return [Symbol, Dodopayments::Models::PaymentListResponse::PaymentProvider]
|
|
53
52
|
required :payment_provider, enum: -> { Dodopayments::Models::PaymentListResponse::PaymentProvider }
|
|
@@ -159,8 +158,7 @@ module Dodopayments
|
|
|
159
158
|
# @param subscription_id [String, nil]
|
|
160
159
|
|
|
161
160
|
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
162
|
-
# merchant's own
|
|
163
|
-
# itself.
|
|
161
|
+
# merchant's own payment connector); `dodo` for everything Dodo processed itself.
|
|
164
162
|
#
|
|
165
163
|
# @see Dodopayments::Models::PaymentListResponse#payment_provider
|
|
166
164
|
module PaymentProvider
|
|
@@ -26,8 +26,8 @@ module Dodopayments
|
|
|
26
26
|
required :event_type, String
|
|
27
27
|
|
|
28
28
|
# @!attribute original_amount
|
|
29
|
-
# Original amount in the original currency
|
|
30
|
-
# cents).
|
|
29
|
+
# Original amount in the original currency, in that currency's smallest unit
|
|
30
|
+
# (cents for USD, yen for JPY, fils for KWD).
|
|
31
31
|
#
|
|
32
32
|
# @return [Integer]
|
|
33
33
|
required :original_amount, Integer
|
|
@@ -39,8 +39,9 @@ module Dodopayments
|
|
|
39
39
|
required :original_currency, String
|
|
40
40
|
|
|
41
41
|
# @!attribute payout_currency_amount
|
|
42
|
-
# Amount in the payout's currency
|
|
43
|
-
# rounding to ensure sum matches
|
|
42
|
+
# Amount in the payout's currency, in that currency's smallest unit (cents for
|
|
43
|
+
# USD, yen for JPY, fils for KWD). Uses cumulative rounding to ensure sum matches
|
|
44
|
+
# payout total exactly.
|
|
44
45
|
#
|
|
45
46
|
# @return [Integer]
|
|
46
47
|
required :payout_currency_amount, Integer
|
|
@@ -76,11 +77,11 @@ module Dodopayments
|
|
|
76
77
|
#
|
|
77
78
|
# @param event_type [String] The type of balance ledger event (e.g., "payment", "refund", "dispute", "payment
|
|
78
79
|
#
|
|
79
|
-
# @param original_amount [Integer] Original amount in the original currency
|
|
80
|
+
# @param original_amount [Integer] Original amount in the original currency, in that currency's smallest unit
|
|
80
81
|
#
|
|
81
82
|
# @param original_currency [String] Original currency as ISO 4217 code (e.g., "USD", "EUR").
|
|
82
83
|
#
|
|
83
|
-
# @param payout_currency_amount [Integer] Amount in the payout's currency
|
|
84
|
+
# @param payout_currency_amount [Integer] Amount in the payout's currency, in that currency's smallest unit
|
|
84
85
|
#
|
|
85
86
|
# @param usd_equivalent_amount [Integer] USD equivalent of the original amount (in cents).
|
|
86
87
|
#
|
|
@@ -12,8 +12,8 @@ module Dodopayments
|
|
|
12
12
|
required :event_type, String
|
|
13
13
|
|
|
14
14
|
# @!attribute total
|
|
15
|
-
# Total amount for this event type in the payout's currency
|
|
16
|
-
# unit,
|
|
15
|
+
# Total amount for this event type in the payout's currency, in that currency's
|
|
16
|
+
# smallest unit (cents for USD, yen for JPY, fils for KWD).
|
|
17
17
|
#
|
|
18
18
|
# @return [Integer]
|
|
19
19
|
required :total, Integer
|
|
@@ -26,7 +26,7 @@ module Dodopayments
|
|
|
26
26
|
#
|
|
27
27
|
# @param event_type [String] The type of balance ledger event (e.g., "payment", "refund", "dispute", "payment
|
|
28
28
|
#
|
|
29
|
-
# @param total [Integer] Total amount for this event type in the payout's currency
|
|
29
|
+
# @param total [Integer] Total amount for this event type in the payout's currency, in that currency's sm
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# @type [Dodopayments::Internal::Type::Converter]
|
|
@@ -132,13 +132,20 @@ module Dodopayments
|
|
|
132
132
|
# @return [String, nil]
|
|
133
133
|
optional :name, String, nil?: true
|
|
134
134
|
|
|
135
|
+
# @!attribute pricing_mode
|
|
136
|
+
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
137
|
+
# apply).
|
|
138
|
+
#
|
|
139
|
+
# @return [Symbol, Dodopayments::Models::Product::PricingMode, nil]
|
|
140
|
+
optional :pricing_mode, enum: -> { Dodopayments::Product::PricingMode }, nil?: true
|
|
141
|
+
|
|
135
142
|
# @!attribute product_collection_id
|
|
136
143
|
# The product collection ID this product belongs to, if any
|
|
137
144
|
#
|
|
138
145
|
# @return [String, nil]
|
|
139
146
|
optional :product_collection_id, String, nil?: true
|
|
140
147
|
|
|
141
|
-
# @!method initialize(brand_id:, business_id:, created_at:, credit_entitlements:, entitlements:, is_recurring:, license_key_enabled:, metadata:, price:, product_id:, tax_category:, updated_at:, addons: nil, description: nil, digital_product_delivery: nil, image: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, name: nil, product_collection_id: nil)
|
|
148
|
+
# @!method initialize(brand_id:, business_id:, created_at:, credit_entitlements:, entitlements:, is_recurring:, license_key_enabled:, metadata:, price:, product_id:, tax_category:, updated_at:, addons: nil, description: nil, digital_product_delivery: nil, image: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, name: nil, pricing_mode: nil, product_collection_id: nil)
|
|
142
149
|
# Some parameter documentations has been truncated, see
|
|
143
150
|
# {Dodopayments::Models::Product} for more details.
|
|
144
151
|
#
|
|
@@ -182,7 +189,23 @@ module Dodopayments
|
|
|
182
189
|
#
|
|
183
190
|
# @param name [String, nil] Name of the product, optional.
|
|
184
191
|
#
|
|
192
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::Product::PricingMode, nil] Pricing mode for localized pricing. NULL means base-only (no localized rules app
|
|
193
|
+
#
|
|
185
194
|
# @param product_collection_id [String, nil] The product collection ID this product belongs to, if any
|
|
195
|
+
|
|
196
|
+
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
197
|
+
# apply).
|
|
198
|
+
#
|
|
199
|
+
# @see Dodopayments::Models::Product#pricing_mode
|
|
200
|
+
module PricingMode
|
|
201
|
+
extend Dodopayments::Internal::Type::Enum
|
|
202
|
+
|
|
203
|
+
BY_CURRENCY = :by_currency
|
|
204
|
+
BY_COUNTRY = :by_country
|
|
205
|
+
|
|
206
|
+
# @!method self.values
|
|
207
|
+
# @return [Array<Symbol>]
|
|
208
|
+
end
|
|
186
209
|
end
|
|
187
210
|
end
|
|
188
211
|
end
|
|
@@ -38,7 +38,7 @@ module Dodopayments
|
|
|
38
38
|
optional :brand_id, String, nil?: true
|
|
39
39
|
|
|
40
40
|
# @!attribute credit_entitlements
|
|
41
|
-
# Optional credit entitlements to attach (max
|
|
41
|
+
# Optional credit entitlements to attach (max 5)
|
|
42
42
|
#
|
|
43
43
|
# @return [Array<Dodopayments::Models::AttachCreditEntitlement>, nil]
|
|
44
44
|
optional :credit_entitlements,
|
|
@@ -62,7 +62,7 @@ module Dodopayments
|
|
|
62
62
|
nil?: true
|
|
63
63
|
|
|
64
64
|
# @!attribute entitlements
|
|
65
|
-
# Optional entitlements to attach to this product (max
|
|
65
|
+
# Optional entitlements to attach to this product (max 50)
|
|
66
66
|
#
|
|
67
67
|
# @return [Array<Dodopayments::Models::AttachProductEntitlement>, nil]
|
|
68
68
|
optional :entitlements,
|
|
@@ -120,7 +120,15 @@ module Dodopayments
|
|
|
120
120
|
# @return [Hash{Symbol=>String}, nil]
|
|
121
121
|
optional :metadata, Dodopayments::Internal::Type::HashOf[String]
|
|
122
122
|
|
|
123
|
-
# @!
|
|
123
|
+
# @!attribute pricing_mode
|
|
124
|
+
# Pricing mode for localized pricing. When set, rules from
|
|
125
|
+
# /products/{id}/localized-prices apply at checkout. NULL means base-only
|
|
126
|
+
# (existing behavior).
|
|
127
|
+
#
|
|
128
|
+
# @return [Symbol, Dodopayments::Models::ProductCreateParams::PricingMode, nil]
|
|
129
|
+
optional :pricing_mode, enum: -> { Dodopayments::ProductCreateParams::PricingMode }, nil?: true
|
|
130
|
+
|
|
131
|
+
# @!method initialize(name:, price:, tax_category:, addons: nil, brand_id: nil, credit_entitlements: nil, description: nil, digital_product_delivery: nil, entitlements: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, pricing_mode: nil, request_options: {})
|
|
124
132
|
# Some parameter documentations has been truncated, see
|
|
125
133
|
# {Dodopayments::Models::ProductCreateParams} for more details.
|
|
126
134
|
#
|
|
@@ -134,13 +142,13 @@ module Dodopayments
|
|
|
134
142
|
#
|
|
135
143
|
# @param brand_id [String, nil] Brand id for the product, if not provided will default to primary brand
|
|
136
144
|
#
|
|
137
|
-
# @param credit_entitlements [Array<Dodopayments::Models::AttachCreditEntitlement>, nil] Optional credit entitlements to attach (max
|
|
145
|
+
# @param credit_entitlements [Array<Dodopayments::Models::AttachCreditEntitlement>, nil] Optional credit entitlements to attach (max 5)
|
|
138
146
|
#
|
|
139
147
|
# @param description [String, nil] Optional description of the product
|
|
140
148
|
#
|
|
141
149
|
# @param digital_product_delivery [Dodopayments::Models::ProductCreateParams::DigitalProductDelivery, nil] Choose how you would like you digital product delivered
|
|
142
150
|
#
|
|
143
|
-
# @param entitlements [Array<Dodopayments::Models::AttachProductEntitlement>, nil] Optional entitlements to attach to this product (max
|
|
151
|
+
# @param entitlements [Array<Dodopayments::Models::AttachProductEntitlement>, nil] Optional entitlements to attach to this product (max 50)
|
|
144
152
|
#
|
|
145
153
|
# @param license_key_activation_message [String, nil] Optional message displayed during license key activation
|
|
146
154
|
#
|
|
@@ -152,6 +160,8 @@ module Dodopayments
|
|
|
152
160
|
#
|
|
153
161
|
# @param metadata [Hash{Symbol=>String}] Additional metadata for the product
|
|
154
162
|
#
|
|
163
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::ProductCreateParams::PricingMode, nil] Pricing mode for localized pricing. When set, rules from
|
|
164
|
+
#
|
|
155
165
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
156
166
|
|
|
157
167
|
class DigitalProductDelivery < Dodopayments::Internal::Type::BaseModel
|
|
@@ -176,6 +186,19 @@ module Dodopayments
|
|
|
176
186
|
#
|
|
177
187
|
# @param instructions [String, nil] Instructions to download and use the digital product
|
|
178
188
|
end
|
|
189
|
+
|
|
190
|
+
# Pricing mode for localized pricing. When set, rules from
|
|
191
|
+
# /products/{id}/localized-prices apply at checkout. NULL means base-only
|
|
192
|
+
# (existing behavior).
|
|
193
|
+
module PricingMode
|
|
194
|
+
extend Dodopayments::Internal::Type::Enum
|
|
195
|
+
|
|
196
|
+
BY_CURRENCY = :by_currency
|
|
197
|
+
BY_COUNTRY = :by_country
|
|
198
|
+
|
|
199
|
+
# @!method self.values
|
|
200
|
+
# @return [Array<Symbol>]
|
|
201
|
+
end
|
|
179
202
|
end
|
|
180
203
|
end
|
|
181
204
|
end
|
|
@@ -98,13 +98,20 @@ module Dodopayments
|
|
|
98
98
|
# @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil]
|
|
99
99
|
optional :price_detail, union: -> { Dodopayments::Price }, nil?: true
|
|
100
100
|
|
|
101
|
+
# @!attribute pricing_mode
|
|
102
|
+
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
103
|
+
# apply).
|
|
104
|
+
#
|
|
105
|
+
# @return [Symbol, Dodopayments::Models::ProductListResponse::PricingMode, nil]
|
|
106
|
+
optional :pricing_mode, enum: -> { Dodopayments::Models::ProductListResponse::PricingMode }, nil?: true
|
|
107
|
+
|
|
101
108
|
# @!attribute tax_inclusive
|
|
102
109
|
# Indicates if the price is tax inclusive
|
|
103
110
|
#
|
|
104
111
|
# @return [Boolean, nil]
|
|
105
112
|
optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
106
113
|
|
|
107
|
-
# @!method initialize(business_id:, created_at:, entitlements:, is_recurring:, metadata:, product_id:, tax_category:, updated_at:, currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, tax_inclusive: nil)
|
|
114
|
+
# @!method initialize(business_id:, created_at:, entitlements:, is_recurring:, metadata:, product_id:, tax_category:, updated_at:, currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, pricing_mode: nil, tax_inclusive: nil)
|
|
108
115
|
# Some parameter documentations has been truncated, see
|
|
109
116
|
# {Dodopayments::Models::ProductListResponse} for more details.
|
|
110
117
|
#
|
|
@@ -136,7 +143,23 @@ module Dodopayments
|
|
|
136
143
|
#
|
|
137
144
|
# @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] Details of the price
|
|
138
145
|
#
|
|
146
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::ProductListResponse::PricingMode, nil] Pricing mode for localized pricing. NULL means base-only (no localized rules app
|
|
147
|
+
#
|
|
139
148
|
# @param tax_inclusive [Boolean, nil] Indicates if the price is tax inclusive
|
|
149
|
+
|
|
150
|
+
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
151
|
+
# apply).
|
|
152
|
+
#
|
|
153
|
+
# @see Dodopayments::Models::ProductListResponse#pricing_mode
|
|
154
|
+
module PricingMode
|
|
155
|
+
extend Dodopayments::Internal::Type::Enum
|
|
156
|
+
|
|
157
|
+
BY_CURRENCY = :by_currency
|
|
158
|
+
BY_COUNTRY = :by_country
|
|
159
|
+
|
|
160
|
+
# @!method self.values
|
|
161
|
+
# @return [Array<Symbol>]
|
|
162
|
+
end
|
|
140
163
|
end
|
|
141
164
|
end
|
|
142
165
|
end
|
|
@@ -131,13 +131,21 @@ module Dodopayments
|
|
|
131
131
|
# @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil]
|
|
132
132
|
optional :price, union: -> { Dodopayments::Price }, nil?: true
|
|
133
133
|
|
|
134
|
+
# @!attribute pricing_mode
|
|
135
|
+
# Update the pricing mode. Omit to leave unchanged; set to null to clear (which
|
|
136
|
+
# archives all active localized rules for this product). Changing to a different
|
|
137
|
+
# non-null mode also archives any rules whose mode doesn't match the new mode.
|
|
138
|
+
#
|
|
139
|
+
# @return [Symbol, Dodopayments::Models::ProductUpdateParams::PricingMode, nil]
|
|
140
|
+
optional :pricing_mode, enum: -> { Dodopayments::ProductUpdateParams::PricingMode }, nil?: true
|
|
141
|
+
|
|
134
142
|
# @!attribute tax_category
|
|
135
143
|
# Tax category of the product.
|
|
136
144
|
#
|
|
137
145
|
# @return [Symbol, Dodopayments::Models::TaxCategory, nil]
|
|
138
146
|
optional :tax_category, enum: -> { Dodopayments::TaxCategory }, nil?: true
|
|
139
147
|
|
|
140
|
-
# @!method initialize(id:, addons: nil, brand_id: nil, credit_entitlements: nil, description: nil, digital_product_delivery: nil, entitlements: nil, image_id: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, name: nil, price: nil, tax_category: nil, request_options: {})
|
|
148
|
+
# @!method initialize(id:, addons: nil, brand_id: nil, credit_entitlements: nil, description: nil, digital_product_delivery: nil, entitlements: nil, image_id: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, name: nil, price: nil, pricing_mode: nil, tax_category: nil, request_options: {})
|
|
141
149
|
# Some parameter documentations has been truncated, see
|
|
142
150
|
# {Dodopayments::Models::ProductUpdateParams} for more details.
|
|
143
151
|
#
|
|
@@ -171,6 +179,8 @@ module Dodopayments
|
|
|
171
179
|
#
|
|
172
180
|
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] Price details of the product.
|
|
173
181
|
#
|
|
182
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::ProductUpdateParams::PricingMode, nil] Update the pricing mode. Omit to leave unchanged; set to null to clear
|
|
183
|
+
#
|
|
174
184
|
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Tax category of the product.
|
|
175
185
|
#
|
|
176
186
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -205,6 +215,19 @@ module Dodopayments
|
|
|
205
215
|
#
|
|
206
216
|
# @param instructions [String, nil] Instructions to download and use the digital product
|
|
207
217
|
end
|
|
218
|
+
|
|
219
|
+
# Update the pricing mode. Omit to leave unchanged; set to null to clear (which
|
|
220
|
+
# archives all active localized rules for this product). Changing to a different
|
|
221
|
+
# non-null mode also archives any rules whose mode doesn't match the new mode.
|
|
222
|
+
module PricingMode
|
|
223
|
+
extend Dodopayments::Internal::Type::Enum
|
|
224
|
+
|
|
225
|
+
BY_CURRENCY = :by_currency
|
|
226
|
+
BY_COUNTRY = :by_country
|
|
227
|
+
|
|
228
|
+
# @!method self.values
|
|
229
|
+
# @return [Array<Symbol>]
|
|
230
|
+
end
|
|
208
231
|
end
|
|
209
232
|
end
|
|
210
233
|
end
|
|
@@ -4,6 +4,12 @@ module Dodopayments
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see Dodopayments::Resources::Refunds#create
|
|
6
6
|
class Refund < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute brand_id
|
|
8
|
+
# Brand id this refund belongs to
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :brand_id, String
|
|
12
|
+
|
|
7
13
|
# @!attribute business_id
|
|
8
14
|
# The unique identifier of the business issuing the refund.
|
|
9
15
|
#
|
|
@@ -70,7 +76,9 @@ module Dodopayments
|
|
|
70
76
|
# @return [String, nil]
|
|
71
77
|
optional :reason, String, nil?: true
|
|
72
78
|
|
|
73
|
-
# @!method initialize(business_id:, created_at:, customer:, is_partial:, metadata:, payment_id:, refund_id:, status:, amount: nil, currency: nil, reason: nil)
|
|
79
|
+
# @!method initialize(brand_id:, business_id:, created_at:, customer:, is_partial:, metadata:, payment_id:, refund_id:, status:, amount: nil, currency: nil, reason: nil)
|
|
80
|
+
# @param brand_id [String] Brand id this refund belongs to
|
|
81
|
+
#
|
|
74
82
|
# @param business_id [String] The unique identifier of the business issuing the refund.
|
|
75
83
|
#
|
|
76
84
|
# @param created_at [Time] The timestamp of when the refund was created in UTC.
|
|
@@ -16,6 +16,12 @@ module Dodopayments
|
|
|
16
16
|
# @return [Dodopayments::Models::BillingAddress]
|
|
17
17
|
required :billing, -> { Dodopayments::BillingAddress }
|
|
18
18
|
|
|
19
|
+
# @!attribute brand_id
|
|
20
|
+
# Brand id this subscription belongs to
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :brand_id, String
|
|
24
|
+
|
|
19
25
|
# @!attribute cancel_at_next_billing_date
|
|
20
26
|
# Indicates if the subscription will cancel at the next billing date
|
|
21
27
|
#
|
|
@@ -110,8 +116,8 @@ module Dodopayments
|
|
|
110
116
|
required :quantity, Integer
|
|
111
117
|
|
|
112
118
|
# @!attribute recurring_pre_tax_amount
|
|
113
|
-
# Amount charged before tax for each recurring payment in
|
|
114
|
-
# (
|
|
119
|
+
# Amount charged before tax for each recurring payment in the currency's smallest
|
|
120
|
+
# unit (cents for USD, yen for JPY, fils for KWD)
|
|
115
121
|
#
|
|
116
122
|
# @return [Integer]
|
|
117
123
|
required :recurring_pre_tax_amount, Integer
|
|
@@ -229,7 +235,7 @@ module Dodopayments
|
|
|
229
235
|
# @return [String, nil]
|
|
230
236
|
optional :tax_id, String, nil?: true
|
|
231
237
|
|
|
232
|
-
# @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, credit_entitlement_cart:, currency:, customer:, metadata:, meter_credit_entitlement_cart:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancellation_comment: nil, cancellation_feedback: nil, cancelled_at: nil, custom_field_responses: nil, customer_business_name: nil, discount_cycles_remaining: nil, discount_id: nil, discounts: nil, expires_at: nil, payment_method_id: nil, scheduled_change: nil, tax_id: nil)
|
|
238
|
+
# @!method initialize(addons:, billing:, brand_id:, cancel_at_next_billing_date:, created_at:, credit_entitlement_cart:, currency:, customer:, metadata:, meter_credit_entitlement_cart:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancellation_comment: nil, cancellation_feedback: nil, cancelled_at: nil, custom_field_responses: nil, customer_business_name: nil, discount_cycles_remaining: nil, discount_id: nil, discounts: nil, expires_at: nil, payment_method_id: nil, scheduled_change: nil, tax_id: nil)
|
|
233
239
|
# Some parameter documentations has been truncated, see
|
|
234
240
|
# {Dodopayments::Models::Subscription} for more details.
|
|
235
241
|
#
|
|
@@ -239,6 +245,8 @@ module Dodopayments
|
|
|
239
245
|
#
|
|
240
246
|
# @param billing [Dodopayments::Models::BillingAddress] Billing address details for payments
|
|
241
247
|
#
|
|
248
|
+
# @param brand_id [String] Brand id this subscription belongs to
|
|
249
|
+
#
|
|
242
250
|
# @param cancel_at_next_billing_date [Boolean] Indicates if the subscription will cancel at the next billing date
|
|
243
251
|
#
|
|
244
252
|
# @param created_at [Time] Timestamp when the subscription was created
|
|
@@ -269,7 +277,7 @@ module Dodopayments
|
|
|
269
277
|
#
|
|
270
278
|
# @param quantity [Integer] Number of units/items included in the subscription
|
|
271
279
|
#
|
|
272
|
-
# @param recurring_pre_tax_amount [Integer] Amount charged before tax for each recurring payment in
|
|
280
|
+
# @param recurring_pre_tax_amount [Integer] Amount charged before tax for each recurring payment in the currency's smallest
|
|
273
281
|
#
|
|
274
282
|
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus] Current status of the subscription
|
|
275
283
|
#
|
|
@@ -91,8 +91,8 @@ module Dodopayments
|
|
|
91
91
|
required :quantity, Integer
|
|
92
92
|
|
|
93
93
|
# @!attribute recurring_pre_tax_amount
|
|
94
|
-
# Amount charged before tax for each recurring payment in
|
|
95
|
-
# (
|
|
94
|
+
# Amount charged before tax for each recurring payment in the currency's smallest
|
|
95
|
+
# unit (cents for USD, yen for JPY, fils for KWD)
|
|
96
96
|
#
|
|
97
97
|
# @return [Integer]
|
|
98
98
|
required :recurring_pre_tax_amount, Integer
|
|
@@ -216,7 +216,7 @@ module Dodopayments
|
|
|
216
216
|
#
|
|
217
217
|
# @param quantity [Integer] Number of units/items included in the subscription
|
|
218
218
|
#
|
|
219
|
-
# @param recurring_pre_tax_amount [Integer] Amount charged before tax for each recurring payment in
|
|
219
|
+
# @param recurring_pre_tax_amount [Integer] Amount charged before tax for each recurring payment in the currency's smallest
|
|
220
220
|
#
|
|
221
221
|
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus] Current status of the subscription
|
|
222
222
|
#
|
|
@@ -325,6 +325,11 @@ module Dodopayments
|
|
|
325
325
|
required :currency, enum: -> { Dodopayments::Currency }
|
|
326
326
|
|
|
327
327
|
# @!attribute customer_credits
|
|
328
|
+
# Net credit movement in the smallest currency unit (e.g. cents). **Negative** –
|
|
329
|
+
# credits were deducted from the customer's balance to offset the charge (typical
|
|
330
|
+
# on upgrades). **Positive** – credits were added to the customer's balance,
|
|
331
|
+
# either from a downgrade proration refund or from topping-up the wallet to meet a
|
|
332
|
+
# gateway minimum-charge threshold. **Zero** – no credit movement occurred.
|
|
328
333
|
#
|
|
329
334
|
# @return [Integer]
|
|
330
335
|
required :customer_credits, Integer
|
|
@@ -355,12 +360,22 @@ module Dodopayments
|
|
|
355
360
|
optional :tax, Integer, nil?: true
|
|
356
361
|
|
|
357
362
|
# @!method initialize(currency:, customer_credits:, settlement_amount:, settlement_currency:, total_amount:, settlement_tax: nil, tax: nil)
|
|
363
|
+
# Some parameter documentations has been truncated, see
|
|
364
|
+
# {Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary}
|
|
365
|
+
# for more details.
|
|
366
|
+
#
|
|
358
367
|
# @param currency [Symbol, Dodopayments::Models::Currency]
|
|
359
|
-
#
|
|
368
|
+
#
|
|
369
|
+
# @param customer_credits [Integer] Net credit movement in the smallest currency unit (e.g. cents).
|
|
370
|
+
#
|
|
360
371
|
# @param settlement_amount [Integer]
|
|
372
|
+
#
|
|
361
373
|
# @param settlement_currency [Symbol, Dodopayments::Models::Currency]
|
|
374
|
+
#
|
|
362
375
|
# @param total_amount [Integer]
|
|
376
|
+
#
|
|
363
377
|
# @param settlement_tax [Integer, nil]
|
|
378
|
+
#
|
|
364
379
|
# @param tax [Integer, nil]
|
|
365
380
|
end
|
|
366
381
|
end
|
|
@@ -74,12 +74,17 @@ module Dodopayments
|
|
|
74
74
|
required :price_per_unit, String
|
|
75
75
|
|
|
76
76
|
# @!attribute total_price
|
|
77
|
-
# Total price charged for this meter in
|
|
77
|
+
# Total price charged for this meter in the currency's smallest unit (cents for
|
|
78
|
+
# USD, yen for JPY, fils for KWD)
|
|
78
79
|
#
|
|
79
80
|
# @return [Integer]
|
|
80
81
|
required :total_price, Integer
|
|
81
82
|
|
|
82
83
|
# @!method initialize(id:, chargeable_units:, consumed_units:, currency:, free_threshold:, name:, price_per_unit:, total_price:)
|
|
84
|
+
# Some parameter documentations has been truncated, see
|
|
85
|
+
# {Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse::Meter} for more
|
|
86
|
+
# details.
|
|
87
|
+
#
|
|
83
88
|
# @param id [String] Meter identifier
|
|
84
89
|
#
|
|
85
90
|
# @param chargeable_units [String] Chargeable units (after free threshold) as string for precision
|
|
@@ -94,7 +99,7 @@ module Dodopayments
|
|
|
94
99
|
#
|
|
95
100
|
# @param price_per_unit [String] Price per unit in string format for precision
|
|
96
101
|
#
|
|
97
|
-
# @param total_price [Integer] Total price charged for this meter in
|
|
102
|
+
# @param total_price [Integer] Total price charged for this meter in the currency's smallest unit
|
|
98
103
|
end
|
|
99
104
|
end
|
|
100
105
|
end
|