dodopayments 2.14.0 → 2.15.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 +4 -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/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 +7 -5
- data/lib/dodopayments/models/payment_create_response.rb +3 -2
- 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_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/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 +10 -6
- data/rbi/dodopayments/models/payment_create_response.rbi +4 -2
- 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_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_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
|
@@ -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
|
|
@@ -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
|
|
@@ -141,6 +141,12 @@ module Dodopayments
|
|
|
141
141
|
# @return [String]
|
|
142
142
|
required :available_balance, String
|
|
143
143
|
|
|
144
|
+
# @!attribute brand_id
|
|
145
|
+
# Brand id this credit entitlement belongs to
|
|
146
|
+
#
|
|
147
|
+
# @return [String]
|
|
148
|
+
required :brand_id, String
|
|
149
|
+
|
|
144
150
|
# @!attribute credit_entitlement_id
|
|
145
151
|
#
|
|
146
152
|
# @return [String]
|
|
@@ -181,15 +187,25 @@ module Dodopayments
|
|
|
181
187
|
# @return [Integer]
|
|
182
188
|
required :threshold_percent, Integer
|
|
183
189
|
|
|
184
|
-
# @!method initialize(available_balance:, credit_entitlement_id:, credit_entitlement_name:, customer_id:, subscription_credits_amount:, subscription_id:, threshold_amount:, threshold_percent:, payload_type: :CreditBalanceLow)
|
|
190
|
+
# @!method initialize(available_balance:, brand_id:, credit_entitlement_id:, credit_entitlement_name:, customer_id:, subscription_credits_amount:, subscription_id:, threshold_amount:, threshold_percent:, payload_type: :CreditBalanceLow)
|
|
185
191
|
# @param available_balance [String]
|
|
192
|
+
#
|
|
193
|
+
# @param brand_id [String] Brand id this credit entitlement belongs to
|
|
194
|
+
#
|
|
186
195
|
# @param credit_entitlement_id [String]
|
|
196
|
+
#
|
|
187
197
|
# @param credit_entitlement_name [String]
|
|
198
|
+
#
|
|
188
199
|
# @param customer_id [String]
|
|
200
|
+
#
|
|
189
201
|
# @param subscription_credits_amount [String]
|
|
202
|
+
#
|
|
190
203
|
# @param subscription_id [String]
|
|
204
|
+
#
|
|
191
205
|
# @param threshold_amount [String]
|
|
206
|
+
#
|
|
192
207
|
# @param threshold_percent [Integer]
|
|
208
|
+
#
|
|
193
209
|
# @param payload_type [Symbol, :CreditBalanceLow]
|
|
194
210
|
end
|
|
195
211
|
|
|
@@ -205,6 +221,12 @@ module Dodopayments
|
|
|
205
221
|
required :abandonment_reason,
|
|
206
222
|
enum: -> { Dodopayments::WebhookPayload::Data::AbandonedCheckout::AbandonmentReason }
|
|
207
223
|
|
|
224
|
+
# @!attribute brand_id
|
|
225
|
+
# Brand id this abandoned checkout belongs to
|
|
226
|
+
#
|
|
227
|
+
# @return [String]
|
|
228
|
+
required :brand_id, String
|
|
229
|
+
|
|
208
230
|
# @!attribute customer_id
|
|
209
231
|
#
|
|
210
232
|
# @return [String]
|
|
@@ -230,13 +252,21 @@ module Dodopayments
|
|
|
230
252
|
# @return [String, nil]
|
|
231
253
|
optional :recovered_payment_id, String, nil?: true
|
|
232
254
|
|
|
233
|
-
# @!method initialize(abandoned_at:, abandonment_reason:, customer_id:, payment_id:, status:, recovered_payment_id: nil, payload_type: :AbandonedCheckout)
|
|
255
|
+
# @!method initialize(abandoned_at:, abandonment_reason:, brand_id:, customer_id:, payment_id:, status:, recovered_payment_id: nil, payload_type: :AbandonedCheckout)
|
|
234
256
|
# @param abandoned_at [Time]
|
|
257
|
+
#
|
|
235
258
|
# @param abandonment_reason [Symbol, Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout::AbandonmentReason]
|
|
259
|
+
#
|
|
260
|
+
# @param brand_id [String] Brand id this abandoned checkout belongs to
|
|
261
|
+
#
|
|
236
262
|
# @param customer_id [String]
|
|
263
|
+
#
|
|
237
264
|
# @param payment_id [String]
|
|
265
|
+
#
|
|
238
266
|
# @param status [Symbol, Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout::Status]
|
|
267
|
+
#
|
|
239
268
|
# @param recovered_payment_id [String, nil]
|
|
269
|
+
#
|
|
240
270
|
# @param payload_type [Symbol, :AbandonedCheckout]
|
|
241
271
|
|
|
242
272
|
# @see Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout#abandonment_reason
|
|
@@ -266,6 +296,12 @@ module Dodopayments
|
|
|
266
296
|
end
|
|
267
297
|
|
|
268
298
|
class DunningAttempt < Dodopayments::Internal::Type::BaseModel
|
|
299
|
+
# @!attribute brand_id
|
|
300
|
+
# Brand id this dunning attempt belongs to
|
|
301
|
+
#
|
|
302
|
+
# @return [String]
|
|
303
|
+
required :brand_id, String
|
|
304
|
+
|
|
269
305
|
# @!attribute created_at
|
|
270
306
|
#
|
|
271
307
|
# @return [Time]
|
|
@@ -301,13 +337,21 @@ module Dodopayments
|
|
|
301
337
|
# @return [String, nil]
|
|
302
338
|
optional :payment_id, String, nil?: true
|
|
303
339
|
|
|
304
|
-
# @!method initialize(created_at:, customer_id:, status:, subscription_id:, trigger_state:, payment_id: nil, payload_type: :DunningAttempt)
|
|
340
|
+
# @!method initialize(brand_id:, created_at:, customer_id:, status:, subscription_id:, trigger_state:, payment_id: nil, payload_type: :DunningAttempt)
|
|
341
|
+
# @param brand_id [String] Brand id this dunning attempt belongs to
|
|
342
|
+
#
|
|
305
343
|
# @param created_at [Time]
|
|
344
|
+
#
|
|
306
345
|
# @param customer_id [String]
|
|
346
|
+
#
|
|
307
347
|
# @param status [Symbol, Dodopayments::Models::WebhookPayload::Data::DunningAttempt::Status]
|
|
348
|
+
#
|
|
308
349
|
# @param subscription_id [String]
|
|
350
|
+
#
|
|
309
351
|
# @param trigger_state [Symbol, Dodopayments::Models::WebhookPayload::Data::DunningAttempt::TriggerState]
|
|
352
|
+
#
|
|
310
353
|
# @param payment_id [String, nil]
|
|
354
|
+
#
|
|
311
355
|
# @param payload_type [Symbol, :DunningAttempt]
|
|
312
356
|
|
|
313
357
|
# @see Dodopayments::Models::WebhookPayload::Data::DunningAttempt#status
|
|
@@ -6,14 +6,12 @@ module Dodopayments
|
|
|
6
6
|
class Grants
|
|
7
7
|
# GET /entitlements/{id}/grants (public API)
|
|
8
8
|
#
|
|
9
|
-
# @overload list(id, customer_id: nil,
|
|
9
|
+
# @overload list(id, customer_id: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
|
|
10
10
|
#
|
|
11
11
|
# @param id [String] Entitlement ID
|
|
12
12
|
#
|
|
13
13
|
# @param customer_id [String] Filter by customer ID
|
|
14
14
|
#
|
|
15
|
-
# @param integration_type [Symbol, Dodopayments::Models::Entitlements::GrantListParams::IntegrationType] Filter by integration type
|
|
16
|
-
#
|
|
17
15
|
# @param page_number [Integer] Page number (default 0)
|
|
18
16
|
#
|
|
19
17
|
# @param page_size [Integer] Page size (default 10, max 100)
|
|
@@ -12,7 +12,7 @@ module Dodopayments
|
|
|
12
12
|
# Some parameter documentations has been truncated, see
|
|
13
13
|
# {Dodopayments::Models::ProductCreateParams} for more details.
|
|
14
14
|
#
|
|
15
|
-
# @overload create(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, request_options: {})
|
|
15
|
+
# @overload create(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: {})
|
|
16
16
|
#
|
|
17
17
|
# @param name [String] Name of the product
|
|
18
18
|
#
|
|
@@ -24,13 +24,13 @@ module Dodopayments
|
|
|
24
24
|
#
|
|
25
25
|
# @param brand_id [String, nil] Brand id for the product, if not provided will default to primary brand
|
|
26
26
|
#
|
|
27
|
-
# @param credit_entitlements [Array<Dodopayments::Models::AttachCreditEntitlement>, nil] Optional credit entitlements to attach (max
|
|
27
|
+
# @param credit_entitlements [Array<Dodopayments::Models::AttachCreditEntitlement>, nil] Optional credit entitlements to attach (max 5)
|
|
28
28
|
#
|
|
29
29
|
# @param description [String, nil] Optional description of the product
|
|
30
30
|
#
|
|
31
31
|
# @param digital_product_delivery [Dodopayments::Models::ProductCreateParams::DigitalProductDelivery, nil] Choose how you would like you digital product delivered
|
|
32
32
|
#
|
|
33
|
-
# @param entitlements [Array<Dodopayments::Models::AttachProductEntitlement>, nil] Optional entitlements to attach to this product (max
|
|
33
|
+
# @param entitlements [Array<Dodopayments::Models::AttachProductEntitlement>, nil] Optional entitlements to attach to this product (max 50)
|
|
34
34
|
#
|
|
35
35
|
# @param license_key_activation_message [String, nil] Optional message displayed during license key activation
|
|
36
36
|
#
|
|
@@ -42,6 +42,8 @@ module Dodopayments
|
|
|
42
42
|
#
|
|
43
43
|
# @param metadata [Hash{Symbol=>String}] Additional metadata for the product
|
|
44
44
|
#
|
|
45
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::ProductCreateParams::PricingMode, nil] Pricing mode for localized pricing. When set, rules from
|
|
46
|
+
#
|
|
45
47
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
46
48
|
#
|
|
47
49
|
# @return [Dodopayments::Models::Product]
|
|
@@ -79,7 +81,7 @@ module Dodopayments
|
|
|
79
81
|
# Some parameter documentations has been truncated, see
|
|
80
82
|
# {Dodopayments::Models::ProductUpdateParams} for more details.
|
|
81
83
|
#
|
|
82
|
-
# @overload update(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: {})
|
|
84
|
+
# @overload update(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: {})
|
|
83
85
|
#
|
|
84
86
|
# @param id [String]
|
|
85
87
|
#
|
|
@@ -111,6 +113,8 @@ module Dodopayments
|
|
|
111
113
|
#
|
|
112
114
|
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] Price details of the product.
|
|
113
115
|
#
|
|
116
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::ProductUpdateParams::PricingMode, nil] Update the pricing mode. Omit to leave unchanged; set to null to clear
|
|
117
|
+
#
|
|
114
118
|
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Tax category of the product.
|
|
115
119
|
#
|
|
116
120
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
data/lib/dodopayments/version.rb
CHANGED
|
@@ -90,6 +90,10 @@ module Dodopayments
|
|
|
90
90
|
end
|
|
91
91
|
attr_accessor :abandonment_reason
|
|
92
92
|
|
|
93
|
+
# Brand id this abandoned checkout belongs to
|
|
94
|
+
sig { returns(String) }
|
|
95
|
+
attr_accessor :brand_id
|
|
96
|
+
|
|
93
97
|
sig { returns(String) }
|
|
94
98
|
attr_accessor :customer_id
|
|
95
99
|
|
|
@@ -113,6 +117,7 @@ module Dodopayments
|
|
|
113
117
|
abandoned_at: Time,
|
|
114
118
|
abandonment_reason:
|
|
115
119
|
Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data::AbandonmentReason::OrSymbol,
|
|
120
|
+
brand_id: String,
|
|
116
121
|
customer_id: String,
|
|
117
122
|
payment_id: String,
|
|
118
123
|
status:
|
|
@@ -123,6 +128,8 @@ module Dodopayments
|
|
|
123
128
|
def self.new(
|
|
124
129
|
abandoned_at:,
|
|
125
130
|
abandonment_reason:,
|
|
131
|
+
# Brand id this abandoned checkout belongs to
|
|
132
|
+
brand_id:,
|
|
126
133
|
customer_id:,
|
|
127
134
|
payment_id:,
|
|
128
135
|
status:,
|
|
@@ -136,6 +143,7 @@ module Dodopayments
|
|
|
136
143
|
abandoned_at: Time,
|
|
137
144
|
abandonment_reason:
|
|
138
145
|
Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data::AbandonmentReason::TaggedSymbol,
|
|
146
|
+
brand_id: String,
|
|
139
147
|
customer_id: String,
|
|
140
148
|
payment_id: String,
|
|
141
149
|
status:
|