dodopayments 1.81.1 → 1.84.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 +13 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/add_meter_to_price.rb +18 -1
- data/lib/dodopayments/models/checkout_session_flags.rb +8 -1
- data/lib/dodopayments/models/checkout_session_preview_response.rb +57 -2
- data/lib/dodopayments/models/checkout_session_request.rb +10 -1
- data/lib/dodopayments/models/customer_update_params.rb +8 -1
- data/lib/dodopayments/models/payment_list_params.rb +9 -1
- data/lib/dodopayments/models/payment_list_response.rb +8 -1
- data/lib/dodopayments/models/product.rb +204 -1
- data/lib/dodopayments/models/product_create_params.rb +185 -1
- data/lib/dodopayments/models/product_update_params.rb +186 -1
- data/lib/dodopayments/models/subscription.rb +183 -1
- data/lib/dodopayments/models/subscription_list_params.rb +9 -1
- data/lib/dodopayments/models/subscription_update_params.rb +89 -1
- data/lib/dodopayments/models/theme_config.rb +13 -8
- data/lib/dodopayments/models/webhook_event_type.rb +8 -0
- data/lib/dodopayments/models/webhook_payload.rb +210 -3
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/customers.rb +3 -1
- data/lib/dodopayments/resources/payments.rb +3 -1
- data/lib/dodopayments/resources/products.rb +6 -2
- data/lib/dodopayments/resources/subscriptions.rb +6 -2
- data/lib/dodopayments/version.rb +1 -1
- data/rbi/dodopayments/models/add_meter_to_price.rbi +18 -0
- data/rbi/dodopayments/models/checkout_session_flags.rbi +9 -0
- data/rbi/dodopayments/models/checkout_session_preview_response.rbi +89 -0
- data/rbi/dodopayments/models/checkout_session_request.rbi +13 -3
- data/rbi/dodopayments/models/customer_update_params.rbi +6 -0
- data/rbi/dodopayments/models/payment_list_params.rbi +11 -0
- data/rbi/dodopayments/models/payment_list_response.rbi +6 -0
- data/rbi/dodopayments/models/product.rbi +257 -0
- data/rbi/dodopayments/models/product_create_params.rbi +251 -0
- data/rbi/dodopayments/models/product_update_params.rbi +253 -0
- data/rbi/dodopayments/models/subscription.rbi +225 -0
- data/rbi/dodopayments/models/subscription_list_params.rbi +11 -0
- data/rbi/dodopayments/models/subscription_update_params.rbi +127 -0
- data/rbi/dodopayments/models/theme_config.rbi +12 -8
- data/rbi/dodopayments/models/webhook_event_type.rbi +31 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +367 -4
- data/rbi/dodopayments/resources/checkout_sessions.rbi +8 -0
- data/rbi/dodopayments/resources/customers.rbi +2 -0
- data/rbi/dodopayments/resources/payments.rbi +3 -0
- data/rbi/dodopayments/resources/products.rbi +17 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +11 -0
- data/sig/dodopayments/models/add_meter_to_price.rbs +10 -0
- data/sig/dodopayments/models/checkout_session_flags.rbs +7 -0
- data/sig/dodopayments/models/checkout_session_preview_response.rbs +42 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +8 -3
- data/sig/dodopayments/models/customer_update_params.rbs +5 -0
- data/sig/dodopayments/models/payment_list_params.rbs +7 -0
- data/sig/dodopayments/models/payment_list_response.rbs +5 -0
- data/sig/dodopayments/models/product.rbs +138 -0
- data/sig/dodopayments/models/product_create_params.rbs +123 -0
- data/sig/dodopayments/models/product_update_params.rbs +123 -0
- data/sig/dodopayments/models/subscription.rbs +144 -0
- data/sig/dodopayments/models/subscription_list_params.rbs +7 -0
- data/sig/dodopayments/models/subscription_update_params.rbs +77 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +16 -0
- data/sig/dodopayments/models/webhook_payload.rbs +203 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/customers.rbs +1 -0
- data/sig/dodopayments/resources/payments.rbs +1 -0
- data/sig/dodopayments/resources/products.rbs +2 -0
- data/sig/dodopayments/resources/subscriptions.rbs +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '09c3a3f5b6ec355c27adb82a29968a5a1f77a9b5c64ecdd557eb5c435a964182'
|
|
4
|
+
data.tar.gz: ad01a317caf09f01e0dccebbe453d927ff5677b0a0a349731193c630942a68c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1578c6bddac804c5b7de88a8f0842ce83ce5239472dc0029b189c2b805dbdbdbd32d3aa9c4d608b4052cf8c0ccfde6e1e1538fdbd3c3a3809b323bd67600d54f
|
|
7
|
+
data.tar.gz: b984224d1b7862a61e38f368c436ee6309e02b9ae80bd79c2da2469af3150b0b44bf2594a16224264ba32ea41ea083993e988960c127e18ab163b35a8c75d625
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.84.0 (2026-02-20)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.81.1...v1.84.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.81.1...v1.84.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** updated openapi spec to v1.84.0 ([8090496](https://github.com/dodopayments/dodopayments-ruby/commit/8090496dbdf1f5f637069e829e212308f9ecfae7))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* update mock server docs ([c8d153d](https://github.com/dodopayments/dodopayments-ruby/commit/c8d153dffd723e3a43c5b04e534599a316ceee84))
|
|
15
|
+
|
|
3
16
|
## 1.81.1 (2026-02-07)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v1.81.0...v1.81.1](https://github.com/dodopayments/dodopayments-ruby/compare/v1.81.0...v1.81.1)
|
data/README.md
CHANGED
|
@@ -15,6 +15,12 @@ module Dodopayments
|
|
|
15
15
|
# @return [String]
|
|
16
16
|
required :price_per_unit, String
|
|
17
17
|
|
|
18
|
+
# @!attribute credit_entitlement_id
|
|
19
|
+
# Optional credit entitlement ID to link this meter to for credit-based billing
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :credit_entitlement_id, String, nil?: true
|
|
23
|
+
|
|
18
24
|
# @!attribute description
|
|
19
25
|
# Meter description. Will ignored on Request, but will be shown in response
|
|
20
26
|
#
|
|
@@ -32,13 +38,20 @@ module Dodopayments
|
|
|
32
38
|
# @return [String, nil]
|
|
33
39
|
optional :measurement_unit, String, nil?: true
|
|
34
40
|
|
|
41
|
+
# @!attribute meter_units_per_credit
|
|
42
|
+
# Number of meter units that equal one credit. Required when credit_entitlement_id
|
|
43
|
+
# is set.
|
|
44
|
+
#
|
|
45
|
+
# @return [String, nil]
|
|
46
|
+
optional :meter_units_per_credit, String, nil?: true
|
|
47
|
+
|
|
35
48
|
# @!attribute name
|
|
36
49
|
# Meter name. Will ignored on Request, but will be shown in response
|
|
37
50
|
#
|
|
38
51
|
# @return [String, nil]
|
|
39
52
|
optional :name, String, nil?: true
|
|
40
53
|
|
|
41
|
-
# @!method initialize(meter_id:, price_per_unit:, description: nil, free_threshold: nil, measurement_unit: nil, name: nil)
|
|
54
|
+
# @!method initialize(meter_id:, price_per_unit:, credit_entitlement_id: nil, description: nil, free_threshold: nil, measurement_unit: nil, meter_units_per_credit: nil, name: nil)
|
|
42
55
|
# Some parameter documentations has been truncated, see
|
|
43
56
|
# {Dodopayments::Models::AddMeterToPrice} for more details.
|
|
44
57
|
#
|
|
@@ -46,12 +59,16 @@ module Dodopayments
|
|
|
46
59
|
#
|
|
47
60
|
# @param price_per_unit [String] The price per unit in lowest denomination. Must be greater than zero. Supports u
|
|
48
61
|
#
|
|
62
|
+
# @param credit_entitlement_id [String, nil] Optional credit entitlement ID to link this meter to for credit-based billing
|
|
63
|
+
#
|
|
49
64
|
# @param description [String, nil] Meter description. Will ignored on Request, but will be shown in response
|
|
50
65
|
#
|
|
51
66
|
# @param free_threshold [Integer, nil]
|
|
52
67
|
#
|
|
53
68
|
# @param measurement_unit [String, nil] Meter measurement unit. Will ignored on Request, but will be shown in response
|
|
54
69
|
#
|
|
70
|
+
# @param meter_units_per_credit [String, nil] Number of meter units that equal one credit. Required when credit_entitlement_id
|
|
71
|
+
#
|
|
55
72
|
# @param name [String, nil] Meter name. Will ignored on Request, but will be shown in response
|
|
56
73
|
end
|
|
57
74
|
end
|
|
@@ -41,6 +41,11 @@ module Dodopayments
|
|
|
41
41
|
# @return [Boolean, nil]
|
|
42
42
|
optional :allow_customer_editing_street, Dodopayments::Internal::Type::Boolean
|
|
43
43
|
|
|
44
|
+
# @!attribute allow_customer_editing_tax_id
|
|
45
|
+
#
|
|
46
|
+
# @return [Boolean, nil]
|
|
47
|
+
optional :allow_customer_editing_tax_id, Dodopayments::Internal::Type::Boolean
|
|
48
|
+
|
|
44
49
|
# @!attribute allow_customer_editing_zipcode
|
|
45
50
|
#
|
|
46
51
|
# @return [Boolean, nil]
|
|
@@ -87,7 +92,7 @@ module Dodopayments
|
|
|
87
92
|
# @return [Boolean, nil]
|
|
88
93
|
optional :redirect_immediately, Dodopayments::Internal::Type::Boolean
|
|
89
94
|
|
|
90
|
-
# @!method initialize(allow_currency_selection: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil)
|
|
95
|
+
# @!method initialize(allow_currency_selection: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil)
|
|
91
96
|
# Some parameter documentations has been truncated, see
|
|
92
97
|
# {Dodopayments::Models::CheckoutSessionFlags} for more details.
|
|
93
98
|
#
|
|
@@ -105,6 +110,8 @@ module Dodopayments
|
|
|
105
110
|
#
|
|
106
111
|
# @param allow_customer_editing_street [Boolean]
|
|
107
112
|
#
|
|
113
|
+
# @param allow_customer_editing_tax_id [Boolean]
|
|
114
|
+
#
|
|
108
115
|
# @param allow_customer_editing_zipcode [Boolean]
|
|
109
116
|
#
|
|
110
117
|
# @param allow_discount_code [Boolean] If the customer is allowed to apply discount code, set it to true.
|
|
@@ -43,13 +43,19 @@ module Dodopayments
|
|
|
43
43
|
-> { Dodopayments::Models::CheckoutSessionPreviewResponse::RecurringBreakup },
|
|
44
44
|
nil?: true
|
|
45
45
|
|
|
46
|
+
# @!attribute tax_id_err_msg
|
|
47
|
+
# Error message if tax ID validation failed
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :tax_id_err_msg, String, nil?: true
|
|
51
|
+
|
|
46
52
|
# @!attribute total_tax
|
|
47
53
|
# Total tax
|
|
48
54
|
#
|
|
49
55
|
# @return [Integer, nil]
|
|
50
56
|
optional :total_tax, Integer, nil?: true
|
|
51
57
|
|
|
52
|
-
# @!method initialize(billing_country:, currency:, current_breakup:, product_cart:, total_price:, recurring_breakup: nil, total_tax: nil)
|
|
58
|
+
# @!method initialize(billing_country:, currency:, current_breakup:, product_cart:, total_price:, recurring_breakup: nil, tax_id_err_msg: nil, total_tax: nil)
|
|
53
59
|
# Data returned by the calculate checkout session API
|
|
54
60
|
#
|
|
55
61
|
# @param billing_country [Symbol, Dodopayments::Models::CountryCode] Billing country
|
|
@@ -64,6 +70,8 @@ module Dodopayments
|
|
|
64
70
|
#
|
|
65
71
|
# @param recurring_breakup [Dodopayments::Models::CheckoutSessionPreviewResponse::RecurringBreakup, nil] Breakup of recurring payments (None for one-time only)
|
|
66
72
|
#
|
|
73
|
+
# @param tax_id_err_msg [String, nil] Error message if tax ID validation failed
|
|
74
|
+
#
|
|
67
75
|
# @param total_tax [Integer, nil] Total tax
|
|
68
76
|
|
|
69
77
|
# @see Dodopayments::Models::CheckoutSessionPreviewResponse#current_breakup
|
|
@@ -105,6 +113,13 @@ module Dodopayments
|
|
|
105
113
|
end
|
|
106
114
|
|
|
107
115
|
class ProductCart < Dodopayments::Internal::Type::BaseModel
|
|
116
|
+
# @!attribute credit_entitlements
|
|
117
|
+
# Credit entitlements that will be granted upon purchase
|
|
118
|
+
#
|
|
119
|
+
# @return [Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::CreditEntitlement>]
|
|
120
|
+
required :credit_entitlements,
|
|
121
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::CreditEntitlement] }
|
|
122
|
+
|
|
108
123
|
# @!attribute currency
|
|
109
124
|
# the currency in which the calculatiosn were made
|
|
110
125
|
#
|
|
@@ -212,7 +227,9 @@ module Dodopayments
|
|
|
212
227
|
# @return [Integer, nil]
|
|
213
228
|
optional :tax, Integer, nil?: true
|
|
214
229
|
|
|
215
|
-
# @!method initialize(currency:, discounted_price:, is_subscription:, is_usage_based:, meters:, og_currency:, og_price:, product_id:, quantity:, tax_category:, tax_inclusive:, tax_rate:, addons: nil, description: nil, discount_amount: nil, discount_cycle: nil, name: nil, tax: nil)
|
|
230
|
+
# @!method initialize(credit_entitlements:, currency:, discounted_price:, is_subscription:, is_usage_based:, meters:, og_currency:, og_price:, product_id:, quantity:, tax_category:, tax_inclusive:, tax_rate:, addons: nil, description: nil, discount_amount: nil, discount_cycle: nil, name: nil, tax: nil)
|
|
231
|
+
# @param credit_entitlements [Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::CreditEntitlement>] Credit entitlements that will be granted upon purchase
|
|
232
|
+
#
|
|
216
233
|
# @param currency [Symbol, Dodopayments::Models::Currency] the currency in which the calculatiosn were made
|
|
217
234
|
#
|
|
218
235
|
# @param discounted_price [Integer] discounted price
|
|
@@ -249,6 +266,44 @@ module Dodopayments
|
|
|
249
266
|
#
|
|
250
267
|
# @param tax [Integer, nil] total tax
|
|
251
268
|
|
|
269
|
+
class CreditEntitlement < Dodopayments::Internal::Type::BaseModel
|
|
270
|
+
# @!attribute credit_entitlement_id
|
|
271
|
+
# ID of the credit entitlement
|
|
272
|
+
#
|
|
273
|
+
# @return [String]
|
|
274
|
+
required :credit_entitlement_id, String
|
|
275
|
+
|
|
276
|
+
# @!attribute credit_entitlement_name
|
|
277
|
+
# Name of the credit entitlement
|
|
278
|
+
#
|
|
279
|
+
# @return [String]
|
|
280
|
+
required :credit_entitlement_name, String
|
|
281
|
+
|
|
282
|
+
# @!attribute credit_entitlement_unit
|
|
283
|
+
# Unit label (e.g. "API Calls", "Tokens")
|
|
284
|
+
#
|
|
285
|
+
# @return [String]
|
|
286
|
+
required :credit_entitlement_unit, String
|
|
287
|
+
|
|
288
|
+
# @!attribute credits_amount
|
|
289
|
+
# Number of credits granted
|
|
290
|
+
#
|
|
291
|
+
# @return [String]
|
|
292
|
+
required :credits_amount, String
|
|
293
|
+
|
|
294
|
+
# @!method initialize(credit_entitlement_id:, credit_entitlement_name:, credit_entitlement_unit:, credits_amount:)
|
|
295
|
+
# Minimal credit entitlement info shown at checkout — what credits the customer
|
|
296
|
+
# will receive
|
|
297
|
+
#
|
|
298
|
+
# @param credit_entitlement_id [String] ID of the credit entitlement
|
|
299
|
+
#
|
|
300
|
+
# @param credit_entitlement_name [String] Name of the credit entitlement
|
|
301
|
+
#
|
|
302
|
+
# @param credit_entitlement_unit [String] Unit label (e.g. "API Calls", "Tokens")
|
|
303
|
+
#
|
|
304
|
+
# @param credits_amount [String] Number of credits granted
|
|
305
|
+
end
|
|
306
|
+
|
|
252
307
|
class Meter < Dodopayments::Internal::Type::BaseModel
|
|
253
308
|
# @!attribute measurement_unit
|
|
254
309
|
#
|
|
@@ -126,7 +126,14 @@ module Dodopayments
|
|
|
126
126
|
# @return [Dodopayments::Models::SubscriptionData, nil]
|
|
127
127
|
optional :subscription_data, -> { Dodopayments::SubscriptionData }, nil?: true
|
|
128
128
|
|
|
129
|
-
# @!
|
|
129
|
+
# @!attribute tax_id
|
|
130
|
+
# Tax ID for the customer (e.g. VAT number). Requires billing_address with
|
|
131
|
+
# country.
|
|
132
|
+
#
|
|
133
|
+
# @return [String, nil]
|
|
134
|
+
optional :tax_id, String, nil?: true
|
|
135
|
+
|
|
136
|
+
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil)
|
|
130
137
|
# Some parameter documentations has been truncated, see
|
|
131
138
|
# {Dodopayments::Models::CheckoutSessionRequest} for more details.
|
|
132
139
|
#
|
|
@@ -167,6 +174,8 @@ module Dodopayments
|
|
|
167
174
|
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer False by default
|
|
168
175
|
#
|
|
169
176
|
# @param subscription_data [Dodopayments::Models::SubscriptionData, nil]
|
|
177
|
+
#
|
|
178
|
+
# @param tax_id [String, nil] Tax ID for the customer (e.g. VAT number). Requires billing_address with country
|
|
170
179
|
end
|
|
171
180
|
end
|
|
172
181
|
end
|
|
@@ -7,6 +7,11 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute email
|
|
11
|
+
#
|
|
12
|
+
# @return [String, nil]
|
|
13
|
+
optional :email, String, nil?: true
|
|
14
|
+
|
|
10
15
|
# @!attribute metadata
|
|
11
16
|
# Additional metadata for the customer
|
|
12
17
|
#
|
|
@@ -23,7 +28,9 @@ module Dodopayments
|
|
|
23
28
|
# @return [String, nil]
|
|
24
29
|
optional :phone_number, String, nil?: true
|
|
25
30
|
|
|
26
|
-
# @!method initialize(metadata: nil, name: nil, phone_number: nil, request_options: {})
|
|
31
|
+
# @!method initialize(email: nil, metadata: nil, name: nil, phone_number: nil, request_options: {})
|
|
32
|
+
# @param email [String, nil]
|
|
33
|
+
#
|
|
27
34
|
# @param metadata [Hash{Symbol=>String}, nil] Additional metadata for the customer
|
|
28
35
|
#
|
|
29
36
|
# @param name [String, nil]
|
|
@@ -43,6 +43,12 @@ module Dodopayments
|
|
|
43
43
|
# @return [Integer, nil]
|
|
44
44
|
optional :page_size, Integer
|
|
45
45
|
|
|
46
|
+
# @!attribute product_id
|
|
47
|
+
# Filter by product id
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :product_id, String
|
|
51
|
+
|
|
46
52
|
# @!attribute status
|
|
47
53
|
# Filter by status
|
|
48
54
|
#
|
|
@@ -55,7 +61,7 @@ module Dodopayments
|
|
|
55
61
|
# @return [String, nil]
|
|
56
62
|
optional :subscription_id, String
|
|
57
63
|
|
|
58
|
-
# @!method initialize(brand_id: nil, created_at_gte: nil, created_at_lte: nil, customer_id: nil, page_number: nil, page_size: nil, status: nil, subscription_id: nil, request_options: {})
|
|
64
|
+
# @!method initialize(brand_id: nil, created_at_gte: nil, created_at_lte: nil, customer_id: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, subscription_id: nil, request_options: {})
|
|
59
65
|
# @param brand_id [String] filter by Brand id
|
|
60
66
|
#
|
|
61
67
|
# @param created_at_gte [Time] Get events after this created time
|
|
@@ -68,6 +74,8 @@ module Dodopayments
|
|
|
68
74
|
#
|
|
69
75
|
# @param page_size [Integer] Page size default is 10 max is 100
|
|
70
76
|
#
|
|
77
|
+
# @param product_id [String] Filter by product id
|
|
78
|
+
#
|
|
71
79
|
# @param status [Symbol, Dodopayments::Models::PaymentListParams::Status] Filter by status
|
|
72
80
|
#
|
|
73
81
|
# @param subscription_id [String] Filter by subscription id
|
|
@@ -29,6 +29,11 @@ module Dodopayments
|
|
|
29
29
|
# @return [Boolean]
|
|
30
30
|
required :digital_products_delivered, Dodopayments::Internal::Type::Boolean
|
|
31
31
|
|
|
32
|
+
# @!attribute has_license_key
|
|
33
|
+
#
|
|
34
|
+
# @return [Boolean]
|
|
35
|
+
required :has_license_key, Dodopayments::Internal::Type::Boolean
|
|
36
|
+
|
|
32
37
|
# @!attribute metadata
|
|
33
38
|
#
|
|
34
39
|
# @return [Hash{Symbol=>String}]
|
|
@@ -76,7 +81,7 @@ module Dodopayments
|
|
|
76
81
|
# @return [String, nil]
|
|
77
82
|
optional :subscription_id, String, nil?: true
|
|
78
83
|
|
|
79
|
-
# @!method initialize(brand_id:, created_at:, currency:, customer:, digital_products_delivered:, metadata:, payment_id:, total_amount:, invoice_id: nil, invoice_url: nil, payment_method: nil, payment_method_type: nil, status: nil, subscription_id: nil)
|
|
84
|
+
# @!method initialize(brand_id:, created_at:, currency:, customer:, digital_products_delivered:, has_license_key:, metadata:, payment_id:, total_amount:, invoice_id: nil, invoice_url: nil, payment_method: nil, payment_method_type: nil, status: nil, subscription_id: nil)
|
|
80
85
|
# @param brand_id [String]
|
|
81
86
|
#
|
|
82
87
|
# @param created_at [Time]
|
|
@@ -87,6 +92,8 @@ module Dodopayments
|
|
|
87
92
|
#
|
|
88
93
|
# @param digital_products_delivered [Boolean]
|
|
89
94
|
#
|
|
95
|
+
# @param has_license_key [Boolean]
|
|
96
|
+
#
|
|
90
97
|
# @param metadata [Hash{Symbol=>String}]
|
|
91
98
|
#
|
|
92
99
|
# @param payment_id [String]
|
|
@@ -21,6 +21,13 @@ module Dodopayments
|
|
|
21
21
|
# @return [Time]
|
|
22
22
|
required :created_at, Time
|
|
23
23
|
|
|
24
|
+
# @!attribute credit_entitlements
|
|
25
|
+
# Attached credit entitlements with settings
|
|
26
|
+
#
|
|
27
|
+
# @return [Array<Dodopayments::Models::Product::CreditEntitlement>]
|
|
28
|
+
required :credit_entitlements,
|
|
29
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Product::CreditEntitlement] }
|
|
30
|
+
|
|
24
31
|
# @!attribute is_recurring
|
|
25
32
|
# Indicates if the product is recurring (e.g., subscriptions).
|
|
26
33
|
#
|
|
@@ -116,13 +123,15 @@ module Dodopayments
|
|
|
116
123
|
# @return [String, nil]
|
|
117
124
|
optional :product_collection_id, String, nil?: true
|
|
118
125
|
|
|
119
|
-
# @!method initialize(brand_id:, business_id:, created_at:, 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)
|
|
126
|
+
# @!method initialize(brand_id:, business_id:, created_at:, credit_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)
|
|
120
127
|
# @param brand_id [String]
|
|
121
128
|
#
|
|
122
129
|
# @param business_id [String] Unique identifier for the business to which the product belongs.
|
|
123
130
|
#
|
|
124
131
|
# @param created_at [Time] Timestamp when the product was created.
|
|
125
132
|
#
|
|
133
|
+
# @param credit_entitlements [Array<Dodopayments::Models::Product::CreditEntitlement>] Attached credit entitlements with settings
|
|
134
|
+
#
|
|
126
135
|
# @param is_recurring [Boolean] Indicates if the product is recurring (e.g., subscriptions).
|
|
127
136
|
#
|
|
128
137
|
# @param license_key_enabled [Boolean] Indicates whether the product requires a license key.
|
|
@@ -155,6 +164,200 @@ module Dodopayments
|
|
|
155
164
|
#
|
|
156
165
|
# @param product_collection_id [String, nil] The product collection ID this product belongs to, if any
|
|
157
166
|
|
|
167
|
+
class CreditEntitlement < Dodopayments::Internal::Type::BaseModel
|
|
168
|
+
# @!attribute id
|
|
169
|
+
# Unique ID of this mapping
|
|
170
|
+
#
|
|
171
|
+
# @return [String]
|
|
172
|
+
required :id, String
|
|
173
|
+
|
|
174
|
+
# @!attribute credit_entitlement_id
|
|
175
|
+
# ID of the credit entitlement
|
|
176
|
+
#
|
|
177
|
+
# @return [String]
|
|
178
|
+
required :credit_entitlement_id, String
|
|
179
|
+
|
|
180
|
+
# @!attribute credit_entitlement_name
|
|
181
|
+
# Name of the credit entitlement
|
|
182
|
+
#
|
|
183
|
+
# @return [String]
|
|
184
|
+
required :credit_entitlement_name, String
|
|
185
|
+
|
|
186
|
+
# @!attribute credit_entitlement_unit
|
|
187
|
+
# Unit label for the credit entitlement
|
|
188
|
+
#
|
|
189
|
+
# @return [String]
|
|
190
|
+
required :credit_entitlement_unit, String
|
|
191
|
+
|
|
192
|
+
# @!attribute credits_amount
|
|
193
|
+
# Number of credits granted
|
|
194
|
+
#
|
|
195
|
+
# @return [String]
|
|
196
|
+
required :credits_amount, String
|
|
197
|
+
|
|
198
|
+
# @!attribute credits_reduce_overage
|
|
199
|
+
# Whether new credit grants reduce existing overage
|
|
200
|
+
#
|
|
201
|
+
# @return [Boolean]
|
|
202
|
+
required :credits_reduce_overage, Dodopayments::Internal::Type::Boolean
|
|
203
|
+
|
|
204
|
+
# @!attribute overage_charge_at_billing
|
|
205
|
+
# Whether overage is charged at billing
|
|
206
|
+
#
|
|
207
|
+
# @return [Boolean]
|
|
208
|
+
required :overage_charge_at_billing, Dodopayments::Internal::Type::Boolean
|
|
209
|
+
|
|
210
|
+
# @!attribute overage_enabled
|
|
211
|
+
# Whether overage is enabled
|
|
212
|
+
#
|
|
213
|
+
# @return [Boolean]
|
|
214
|
+
required :overage_enabled, Dodopayments::Internal::Type::Boolean
|
|
215
|
+
|
|
216
|
+
# @!attribute preserve_overage_at_reset
|
|
217
|
+
# Whether to preserve overage balance when credits reset
|
|
218
|
+
#
|
|
219
|
+
# @return [Boolean]
|
|
220
|
+
required :preserve_overage_at_reset, Dodopayments::Internal::Type::Boolean
|
|
221
|
+
|
|
222
|
+
# @!attribute proration_behavior
|
|
223
|
+
# Proration behavior for credit grants during plan changes
|
|
224
|
+
#
|
|
225
|
+
# @return [Symbol, Dodopayments::Models::Product::CreditEntitlement::ProrationBehavior]
|
|
226
|
+
required :proration_behavior, enum: -> { Dodopayments::Product::CreditEntitlement::ProrationBehavior }
|
|
227
|
+
|
|
228
|
+
# @!attribute rollover_enabled
|
|
229
|
+
# Whether rollover is enabled
|
|
230
|
+
#
|
|
231
|
+
# @return [Boolean]
|
|
232
|
+
required :rollover_enabled, Dodopayments::Internal::Type::Boolean
|
|
233
|
+
|
|
234
|
+
# @!attribute trial_credits_expire_after_trial
|
|
235
|
+
# Whether trial credits expire after trial
|
|
236
|
+
#
|
|
237
|
+
# @return [Boolean]
|
|
238
|
+
required :trial_credits_expire_after_trial, Dodopayments::Internal::Type::Boolean
|
|
239
|
+
|
|
240
|
+
# @!attribute currency
|
|
241
|
+
# Currency
|
|
242
|
+
#
|
|
243
|
+
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
|
244
|
+
optional :currency, enum: -> { Dodopayments::Currency }, nil?: true
|
|
245
|
+
|
|
246
|
+
# @!attribute expires_after_days
|
|
247
|
+
# Days until credits expire
|
|
248
|
+
#
|
|
249
|
+
# @return [Integer, nil]
|
|
250
|
+
optional :expires_after_days, Integer, nil?: true
|
|
251
|
+
|
|
252
|
+
# @!attribute low_balance_threshold_percent
|
|
253
|
+
# Low balance threshold percentage
|
|
254
|
+
#
|
|
255
|
+
# @return [Integer, nil]
|
|
256
|
+
optional :low_balance_threshold_percent, Integer, nil?: true
|
|
257
|
+
|
|
258
|
+
# @!attribute max_rollover_count
|
|
259
|
+
# Maximum rollover cycles
|
|
260
|
+
#
|
|
261
|
+
# @return [Integer, nil]
|
|
262
|
+
optional :max_rollover_count, Integer, nil?: true
|
|
263
|
+
|
|
264
|
+
# @!attribute overage_limit
|
|
265
|
+
# Overage limit
|
|
266
|
+
#
|
|
267
|
+
# @return [String, nil]
|
|
268
|
+
optional :overage_limit, String, nil?: true
|
|
269
|
+
|
|
270
|
+
# @!attribute price_per_unit
|
|
271
|
+
# Price per unit
|
|
272
|
+
#
|
|
273
|
+
# @return [String, nil]
|
|
274
|
+
optional :price_per_unit, String, nil?: true
|
|
275
|
+
|
|
276
|
+
# @!attribute rollover_percentage
|
|
277
|
+
# Rollover percentage
|
|
278
|
+
#
|
|
279
|
+
# @return [Integer, nil]
|
|
280
|
+
optional :rollover_percentage, Integer, nil?: true
|
|
281
|
+
|
|
282
|
+
# @!attribute rollover_timeframe_count
|
|
283
|
+
# Rollover timeframe count
|
|
284
|
+
#
|
|
285
|
+
# @return [Integer, nil]
|
|
286
|
+
optional :rollover_timeframe_count, Integer, nil?: true
|
|
287
|
+
|
|
288
|
+
# @!attribute rollover_timeframe_interval
|
|
289
|
+
# Rollover timeframe interval
|
|
290
|
+
#
|
|
291
|
+
# @return [Symbol, Dodopayments::Models::TimeInterval, nil]
|
|
292
|
+
optional :rollover_timeframe_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
|
|
293
|
+
|
|
294
|
+
# @!attribute trial_credits
|
|
295
|
+
# Trial credits
|
|
296
|
+
#
|
|
297
|
+
# @return [String, nil]
|
|
298
|
+
optional :trial_credits, String, nil?: true
|
|
299
|
+
|
|
300
|
+
# @!method initialize(id:, credit_entitlement_id:, credit_entitlement_name:, credit_entitlement_unit:, credits_amount:, credits_reduce_overage:, overage_charge_at_billing:, overage_enabled:, preserve_overage_at_reset:, proration_behavior:, rollover_enabled:, trial_credits_expire_after_trial:, currency: nil, expires_after_days: nil, low_balance_threshold_percent: nil, max_rollover_count: nil, overage_limit: nil, price_per_unit: nil, rollover_percentage: nil, rollover_timeframe_count: nil, rollover_timeframe_interval: nil, trial_credits: nil)
|
|
301
|
+
# Response struct for credit entitlement mapping
|
|
302
|
+
#
|
|
303
|
+
# @param id [String] Unique ID of this mapping
|
|
304
|
+
#
|
|
305
|
+
# @param credit_entitlement_id [String] ID of the credit entitlement
|
|
306
|
+
#
|
|
307
|
+
# @param credit_entitlement_name [String] Name of the credit entitlement
|
|
308
|
+
#
|
|
309
|
+
# @param credit_entitlement_unit [String] Unit label for the credit entitlement
|
|
310
|
+
#
|
|
311
|
+
# @param credits_amount [String] Number of credits granted
|
|
312
|
+
#
|
|
313
|
+
# @param credits_reduce_overage [Boolean] Whether new credit grants reduce existing overage
|
|
314
|
+
#
|
|
315
|
+
# @param overage_charge_at_billing [Boolean] Whether overage is charged at billing
|
|
316
|
+
#
|
|
317
|
+
# @param overage_enabled [Boolean] Whether overage is enabled
|
|
318
|
+
#
|
|
319
|
+
# @param preserve_overage_at_reset [Boolean] Whether to preserve overage balance when credits reset
|
|
320
|
+
#
|
|
321
|
+
# @param proration_behavior [Symbol, Dodopayments::Models::Product::CreditEntitlement::ProrationBehavior] Proration behavior for credit grants during plan changes
|
|
322
|
+
#
|
|
323
|
+
# @param rollover_enabled [Boolean] Whether rollover is enabled
|
|
324
|
+
#
|
|
325
|
+
# @param trial_credits_expire_after_trial [Boolean] Whether trial credits expire after trial
|
|
326
|
+
#
|
|
327
|
+
# @param currency [Symbol, Dodopayments::Models::Currency, nil] Currency
|
|
328
|
+
#
|
|
329
|
+
# @param expires_after_days [Integer, nil] Days until credits expire
|
|
330
|
+
#
|
|
331
|
+
# @param low_balance_threshold_percent [Integer, nil] Low balance threshold percentage
|
|
332
|
+
#
|
|
333
|
+
# @param max_rollover_count [Integer, nil] Maximum rollover cycles
|
|
334
|
+
#
|
|
335
|
+
# @param overage_limit [String, nil] Overage limit
|
|
336
|
+
#
|
|
337
|
+
# @param price_per_unit [String, nil] Price per unit
|
|
338
|
+
#
|
|
339
|
+
# @param rollover_percentage [Integer, nil] Rollover percentage
|
|
340
|
+
#
|
|
341
|
+
# @param rollover_timeframe_count [Integer, nil] Rollover timeframe count
|
|
342
|
+
#
|
|
343
|
+
# @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Rollover timeframe interval
|
|
344
|
+
#
|
|
345
|
+
# @param trial_credits [String, nil] Trial credits
|
|
346
|
+
|
|
347
|
+
# Proration behavior for credit grants during plan changes
|
|
348
|
+
#
|
|
349
|
+
# @see Dodopayments::Models::Product::CreditEntitlement#proration_behavior
|
|
350
|
+
module ProrationBehavior
|
|
351
|
+
extend Dodopayments::Internal::Type::Enum
|
|
352
|
+
|
|
353
|
+
PRORATE = :prorate
|
|
354
|
+
NO_PRORATE = :no_prorate
|
|
355
|
+
|
|
356
|
+
# @!method self.values
|
|
357
|
+
# @return [Array<Symbol>]
|
|
358
|
+
end
|
|
359
|
+
end
|
|
360
|
+
|
|
158
361
|
# @see Dodopayments::Models::Product#digital_product_delivery
|
|
159
362
|
class DigitalProductDelivery < Dodopayments::Internal::Type::BaseModel
|
|
160
363
|
# @!attribute external_url
|