dodopayments 1.73.0 → 1.74.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 +8 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/checkout_session_request.rb +86 -1
- data/lib/dodopayments/models/customer_list_params.rb +25 -1
- data/lib/dodopayments/models/discount_list_params.rb +33 -1
- data/lib/dodopayments/models/license_key_list_params.rb +17 -1
- data/lib/dodopayments/models/payment.rb +32 -1
- data/lib/dodopayments/models/payment_list_response.rb +28 -1
- data/lib/dodopayments/models/subscription.rb +32 -1
- data/lib/dodopayments/models/subscription_list_response.rb +9 -1
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/customers.rb +7 -1
- data/lib/dodopayments/resources/discounts.rb +9 -1
- data/lib/dodopayments/resources/license_keys.rb +5 -1
- data/lib/dodopayments/version.rb +1 -1
- data/rbi/dodopayments/models/checkout_session_request.rbi +175 -0
- data/rbi/dodopayments/models/customer_list_params.rbi +33 -0
- data/rbi/dodopayments/models/discount_list_params.rbi +44 -0
- data/rbi/dodopayments/models/license_key_list_params.rbi +22 -0
- data/rbi/dodopayments/models/payment.rbi +46 -0
- data/rbi/dodopayments/models/payment_list_response.rbi +16 -0
- data/rbi/dodopayments/models/subscription.rbi +50 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +8 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +16 -0
- data/rbi/dodopayments/resources/customers.rbi +9 -0
- data/rbi/dodopayments/resources/discounts.rbi +12 -0
- data/rbi/dodopayments/resources/license_keys.rbi +6 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +76 -0
- data/sig/dodopayments/models/customer_list_params.rbs +26 -1
- data/sig/dodopayments/models/discount_list_params.rbs +34 -1
- data/sig/dodopayments/models/license_key_list_params.rbs +14 -0
- data/sig/dodopayments/models/payment.rbs +17 -0
- data/sig/dodopayments/models/payment_list_response.rbs +10 -0
- data/sig/dodopayments/models/subscription.rbs +17 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +5 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/customers.rbs +3 -0
- data/sig/dodopayments/resources/discounts.rbs +4 -0
- data/sig/dodopayments/resources/license_keys.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: fddfc5463bfdb2c80d2f98a580ba1a41eaa68a20d1cb4e9e3c8507d3778fea52
|
|
4
|
+
data.tar.gz: 9ca12b9e7007d21f3d886877d0c85baa3e4e5e331ecaf5a151b687f34fec62f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0904785bd1cd4537e85092279c8399695e1c42e59317de80cff033b4cb70cb2269743c96ee25dfccedb9685bd680e9570f1cef856404250f66c4f19beb933a9
|
|
7
|
+
data.tar.gz: b6a7fc6ae6078abc1d471cad412b953e336248ca26e0a3c8b3f03c83d64cfa3e34ff347789f53fbaecebf471df9bfe1d43a2c89a5b0ffc6ad59817d34b656b73
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.74.0 (2026-01-21)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.73.0...v1.74.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.73.0...v1.74.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** updated openapi spec to v1.74.0 ([81bd146](https://github.com/dodopayments/dodopayments-ruby/commit/81bd146a912f98174fed1ef0ad741f585d78a322))
|
|
10
|
+
|
|
3
11
|
## 1.73.0 (2026-01-20)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v1.71.1...v1.73.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.71.1...v1.73.0)
|
data/README.md
CHANGED
|
@@ -41,6 +41,16 @@ module Dodopayments
|
|
|
41
41
|
# @return [Boolean, nil]
|
|
42
42
|
optional :confirm, Dodopayments::Internal::Type::Boolean
|
|
43
43
|
|
|
44
|
+
# @!attribute custom_fields
|
|
45
|
+
# Custom fields to collect from customer during checkout (max 5 fields)
|
|
46
|
+
#
|
|
47
|
+
# @return [Array<Dodopayments::Models::CheckoutSessionRequest::CustomField>, nil]
|
|
48
|
+
optional :custom_fields,
|
|
49
|
+
-> {
|
|
50
|
+
Dodopayments::Internal::Type::ArrayOf[Dodopayments::CheckoutSessionRequest::CustomField]
|
|
51
|
+
},
|
|
52
|
+
nil?: true
|
|
53
|
+
|
|
44
54
|
# @!attribute customer
|
|
45
55
|
# Customer details for the session
|
|
46
56
|
#
|
|
@@ -119,7 +129,7 @@ module Dodopayments
|
|
|
119
129
|
# @return [Dodopayments::Models::CheckoutSessionRequest::SubscriptionData, nil]
|
|
120
130
|
optional :subscription_data, -> { Dodopayments::CheckoutSessionRequest::SubscriptionData }, nil?: true
|
|
121
131
|
|
|
122
|
-
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: 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)
|
|
132
|
+
# @!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)
|
|
123
133
|
# Some parameter documentations has been truncated, see
|
|
124
134
|
# {Dodopayments::Models::CheckoutSessionRequest} for more details.
|
|
125
135
|
#
|
|
@@ -133,6 +143,8 @@ module Dodopayments
|
|
|
133
143
|
#
|
|
134
144
|
# @param confirm [Boolean] If confirm is true, all the details will be finalized. If required data is missi
|
|
135
145
|
#
|
|
146
|
+
# @param custom_fields [Array<Dodopayments::Models::CheckoutSessionRequest::CustomField>, nil] Custom fields to collect from customer during checkout (max 5 fields)
|
|
147
|
+
#
|
|
136
148
|
# @param customer [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer, nil] Customer details for the session
|
|
137
149
|
#
|
|
138
150
|
# @param customization [Dodopayments::Models::CheckoutSessionRequest::Customization] Customization for the checkout session page
|
|
@@ -248,6 +260,79 @@ module Dodopayments
|
|
|
248
260
|
# @param zipcode [String, nil] Postal code or ZIP code
|
|
249
261
|
end
|
|
250
262
|
|
|
263
|
+
class CustomField < Dodopayments::Internal::Type::BaseModel
|
|
264
|
+
# @!attribute field_type
|
|
265
|
+
# Type of field determining validation rules
|
|
266
|
+
#
|
|
267
|
+
# @return [Symbol, Dodopayments::Models::CheckoutSessionRequest::CustomField::FieldType]
|
|
268
|
+
required :field_type, enum: -> { Dodopayments::CheckoutSessionRequest::CustomField::FieldType }
|
|
269
|
+
|
|
270
|
+
# @!attribute key
|
|
271
|
+
# Unique identifier for this field (used as key in responses)
|
|
272
|
+
#
|
|
273
|
+
# @return [String]
|
|
274
|
+
required :key, String
|
|
275
|
+
|
|
276
|
+
# @!attribute label
|
|
277
|
+
# Display label shown to customer
|
|
278
|
+
#
|
|
279
|
+
# @return [String]
|
|
280
|
+
required :label, String
|
|
281
|
+
|
|
282
|
+
# @!attribute options
|
|
283
|
+
# Options for dropdown type (required for dropdown, ignored for others)
|
|
284
|
+
#
|
|
285
|
+
# @return [Array<String>, nil]
|
|
286
|
+
optional :options, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
|
|
287
|
+
|
|
288
|
+
# @!attribute placeholder
|
|
289
|
+
# Placeholder text for the input
|
|
290
|
+
#
|
|
291
|
+
# @return [String, nil]
|
|
292
|
+
optional :placeholder, String, nil?: true
|
|
293
|
+
|
|
294
|
+
# @!attribute required
|
|
295
|
+
# Whether this field is required
|
|
296
|
+
#
|
|
297
|
+
# @return [Boolean, nil]
|
|
298
|
+
optional :required, Dodopayments::Internal::Type::Boolean
|
|
299
|
+
|
|
300
|
+
# @!method initialize(field_type:, key:, label:, options: nil, placeholder: nil, required: nil)
|
|
301
|
+
# Definition of a custom field for checkout
|
|
302
|
+
#
|
|
303
|
+
# @param field_type [Symbol, Dodopayments::Models::CheckoutSessionRequest::CustomField::FieldType] Type of field determining validation rules
|
|
304
|
+
#
|
|
305
|
+
# @param key [String] Unique identifier for this field (used as key in responses)
|
|
306
|
+
#
|
|
307
|
+
# @param label [String] Display label shown to customer
|
|
308
|
+
#
|
|
309
|
+
# @param options [Array<String>, nil] Options for dropdown type (required for dropdown, ignored for others)
|
|
310
|
+
#
|
|
311
|
+
# @param placeholder [String, nil] Placeholder text for the input
|
|
312
|
+
#
|
|
313
|
+
# @param required [Boolean] Whether this field is required
|
|
314
|
+
|
|
315
|
+
# Type of field determining validation rules
|
|
316
|
+
#
|
|
317
|
+
# @see Dodopayments::Models::CheckoutSessionRequest::CustomField#field_type
|
|
318
|
+
module FieldType
|
|
319
|
+
extend Dodopayments::Internal::Type::Enum
|
|
320
|
+
|
|
321
|
+
TEXT = :text
|
|
322
|
+
NUMBER = :number
|
|
323
|
+
EMAIL = :email
|
|
324
|
+
URL = :url
|
|
325
|
+
PHONE = :phone
|
|
326
|
+
DATE = :date
|
|
327
|
+
DATETIME = :datetime
|
|
328
|
+
DROPDOWN = :dropdown
|
|
329
|
+
BOOLEAN = :boolean
|
|
330
|
+
|
|
331
|
+
# @!method self.values
|
|
332
|
+
# @return [Array<Symbol>]
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
|
|
251
336
|
# @see Dodopayments::Models::CheckoutSessionRequest#customization
|
|
252
337
|
class Customization < Dodopayments::Internal::Type::BaseModel
|
|
253
338
|
# @!attribute force_language
|
|
@@ -7,12 +7,30 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute created_at_gte
|
|
11
|
+
# Filter customers created on or after this timestamp
|
|
12
|
+
#
|
|
13
|
+
# @return [Time, nil]
|
|
14
|
+
optional :created_at_gte, Time
|
|
15
|
+
|
|
16
|
+
# @!attribute created_at_lte
|
|
17
|
+
# Filter customers created on or before this timestamp
|
|
18
|
+
#
|
|
19
|
+
# @return [Time, nil]
|
|
20
|
+
optional :created_at_lte, Time
|
|
21
|
+
|
|
10
22
|
# @!attribute email
|
|
11
23
|
# Filter by customer email
|
|
12
24
|
#
|
|
13
25
|
# @return [String, nil]
|
|
14
26
|
optional :email, String
|
|
15
27
|
|
|
28
|
+
# @!attribute name
|
|
29
|
+
# Filter by customer name (partial match, case-insensitive)
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :name, String
|
|
33
|
+
|
|
16
34
|
# @!attribute page_number
|
|
17
35
|
# Page number default is 0
|
|
18
36
|
#
|
|
@@ -25,9 +43,15 @@ module Dodopayments
|
|
|
25
43
|
# @return [Integer, nil]
|
|
26
44
|
optional :page_size, Integer
|
|
27
45
|
|
|
28
|
-
# @!method initialize(email: nil, page_number: nil, page_size: nil, request_options: {})
|
|
46
|
+
# @!method initialize(created_at_gte: nil, created_at_lte: nil, email: nil, name: nil, page_number: nil, page_size: nil, request_options: {})
|
|
47
|
+
# @param created_at_gte [Time] Filter customers created on or after this timestamp
|
|
48
|
+
#
|
|
49
|
+
# @param created_at_lte [Time] Filter customers created on or before this timestamp
|
|
50
|
+
#
|
|
29
51
|
# @param email [String] Filter by customer email
|
|
30
52
|
#
|
|
53
|
+
# @param name [String] Filter by customer name (partial match, case-insensitive)
|
|
54
|
+
#
|
|
31
55
|
# @param page_number [Integer] Page number default is 0
|
|
32
56
|
#
|
|
33
57
|
# @param page_size [Integer] Page size default is 10 max is 100
|
|
@@ -7,6 +7,24 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute active
|
|
11
|
+
# Filter by active status (true = not expired, false = expired)
|
|
12
|
+
#
|
|
13
|
+
# @return [Boolean, nil]
|
|
14
|
+
optional :active, Dodopayments::Internal::Type::Boolean
|
|
15
|
+
|
|
16
|
+
# @!attribute code
|
|
17
|
+
# Filter by discount code (partial match, case-insensitive)
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :code, String
|
|
21
|
+
|
|
22
|
+
# @!attribute discount_type
|
|
23
|
+
# Filter by discount type (percentage)
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, Dodopayments::Models::DiscountType, nil]
|
|
26
|
+
optional :discount_type, enum: -> { Dodopayments::DiscountType }
|
|
27
|
+
|
|
10
28
|
# @!attribute page_number
|
|
11
29
|
# Page number (default = 0).
|
|
12
30
|
#
|
|
@@ -19,11 +37,25 @@ module Dodopayments
|
|
|
19
37
|
# @return [Integer, nil]
|
|
20
38
|
optional :page_size, Integer
|
|
21
39
|
|
|
22
|
-
# @!
|
|
40
|
+
# @!attribute product_id
|
|
41
|
+
# Filter by product restriction (only discounts that apply to this product)
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :product_id, String
|
|
45
|
+
|
|
46
|
+
# @!method initialize(active: nil, code: nil, discount_type: nil, page_number: nil, page_size: nil, product_id: nil, request_options: {})
|
|
47
|
+
# @param active [Boolean] Filter by active status (true = not expired, false = expired)
|
|
48
|
+
#
|
|
49
|
+
# @param code [String] Filter by discount code (partial match, case-insensitive)
|
|
50
|
+
#
|
|
51
|
+
# @param discount_type [Symbol, Dodopayments::Models::DiscountType] Filter by discount type (percentage)
|
|
52
|
+
#
|
|
23
53
|
# @param page_number [Integer] Page number (default = 0).
|
|
24
54
|
#
|
|
25
55
|
# @param page_size [Integer] Page size (default = 10, max = 100).
|
|
26
56
|
#
|
|
57
|
+
# @param product_id [String] Filter by product restriction (only discounts that apply to this product)
|
|
58
|
+
#
|
|
27
59
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
28
60
|
end
|
|
29
61
|
end
|
|
@@ -7,6 +7,18 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute created_at_gte
|
|
11
|
+
# Filter license keys created on or after this timestamp
|
|
12
|
+
#
|
|
13
|
+
# @return [Time, nil]
|
|
14
|
+
optional :created_at_gte, Time
|
|
15
|
+
|
|
16
|
+
# @!attribute created_at_lte
|
|
17
|
+
# Filter license keys created on or before this timestamp
|
|
18
|
+
#
|
|
19
|
+
# @return [Time, nil]
|
|
20
|
+
optional :created_at_lte, Time
|
|
21
|
+
|
|
10
22
|
# @!attribute customer_id
|
|
11
23
|
# Filter by customer ID
|
|
12
24
|
#
|
|
@@ -37,7 +49,11 @@ module Dodopayments
|
|
|
37
49
|
# @return [Symbol, Dodopayments::Models::LicenseKeyListParams::Status, nil]
|
|
38
50
|
optional :status, enum: -> { Dodopayments::LicenseKeyListParams::Status }
|
|
39
51
|
|
|
40
|
-
# @!method initialize(customer_id: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, request_options: {})
|
|
52
|
+
# @!method initialize(created_at_gte: nil, created_at_lte: nil, customer_id: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, request_options: {})
|
|
53
|
+
# @param created_at_gte [Time] Filter license keys created on or after this timestamp
|
|
54
|
+
#
|
|
55
|
+
# @param created_at_lte [Time] Filter license keys created on or before this timestamp
|
|
56
|
+
#
|
|
41
57
|
# @param customer_id [String] Filter by customer ID
|
|
42
58
|
#
|
|
43
59
|
# @param page_number [Integer] Page number default is 0
|
|
@@ -130,6 +130,14 @@ module Dodopayments
|
|
|
130
130
|
# @return [String, nil]
|
|
131
131
|
optional :checkout_session_id, String, nil?: true
|
|
132
132
|
|
|
133
|
+
# @!attribute custom_field_responses
|
|
134
|
+
# Customer's responses to custom fields collected during checkout
|
|
135
|
+
#
|
|
136
|
+
# @return [Array<Dodopayments::Models::Payment::CustomFieldResponse>, nil]
|
|
137
|
+
optional :custom_field_responses,
|
|
138
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Payment::CustomFieldResponse] },
|
|
139
|
+
nil?: true
|
|
140
|
+
|
|
133
141
|
# @!attribute discount_id
|
|
134
142
|
# The discount id if discount is applied
|
|
135
143
|
#
|
|
@@ -218,7 +226,7 @@ module Dodopayments
|
|
|
218
226
|
# @return [Time, nil]
|
|
219
227
|
optional :updated_at, Time, nil?: true
|
|
220
228
|
|
|
221
|
-
# @!method initialize(billing:, brand_id:, business_id:, created_at:, currency:, customer:, digital_products_delivered:, disputes:, metadata:, payment_id:, refunds:, settlement_amount:, settlement_currency:, total_amount:, card_holder_name: nil, card_issuing_country: nil, card_last_four: nil, card_network: nil, card_type: nil, checkout_session_id: nil, discount_id: nil, error_code: nil, error_message: nil, invoice_id: nil, invoice_url: nil, payment_link: nil, payment_method: nil, payment_method_type: nil, product_cart: nil, settlement_tax: nil, status: nil, subscription_id: nil, tax: nil, updated_at: nil)
|
|
229
|
+
# @!method initialize(billing:, brand_id:, business_id:, created_at:, currency:, customer:, digital_products_delivered:, disputes:, metadata:, payment_id:, refunds:, settlement_amount:, settlement_currency:, total_amount:, card_holder_name: nil, card_issuing_country: nil, card_last_four: nil, card_network: nil, card_type: nil, checkout_session_id: nil, custom_field_responses: nil, discount_id: nil, error_code: nil, error_message: nil, invoice_id: nil, invoice_url: nil, payment_link: nil, payment_method: nil, payment_method_type: nil, product_cart: nil, settlement_tax: nil, status: nil, subscription_id: nil, tax: nil, updated_at: nil)
|
|
222
230
|
# Some parameter documentations has been truncated, see
|
|
223
231
|
# {Dodopayments::Models::Payment} for more details.
|
|
224
232
|
#
|
|
@@ -262,6 +270,8 @@ module Dodopayments
|
|
|
262
270
|
#
|
|
263
271
|
# @param checkout_session_id [String, nil] If payment is made using a checkout session,
|
|
264
272
|
#
|
|
273
|
+
# @param custom_field_responses [Array<Dodopayments::Models::Payment::CustomFieldResponse>, nil] Customer's responses to custom fields collected during checkout
|
|
274
|
+
#
|
|
265
275
|
# @param discount_id [String, nil] The discount id if discount is applied
|
|
266
276
|
#
|
|
267
277
|
# @param error_code [String, nil] An error code if the payment failed
|
|
@@ -365,6 +375,27 @@ module Dodopayments
|
|
|
365
375
|
# @param reason [String, nil] The reason provided for the refund, if any. Optional.
|
|
366
376
|
end
|
|
367
377
|
|
|
378
|
+
class CustomFieldResponse < Dodopayments::Internal::Type::BaseModel
|
|
379
|
+
# @!attribute key
|
|
380
|
+
# Key matching the custom field definition
|
|
381
|
+
#
|
|
382
|
+
# @return [String]
|
|
383
|
+
required :key, String
|
|
384
|
+
|
|
385
|
+
# @!attribute value
|
|
386
|
+
# Value provided by customer
|
|
387
|
+
#
|
|
388
|
+
# @return [String]
|
|
389
|
+
required :value, String
|
|
390
|
+
|
|
391
|
+
# @!method initialize(key:, value:)
|
|
392
|
+
# Customer's response to a custom field
|
|
393
|
+
#
|
|
394
|
+
# @param key [String] Key matching the custom field definition
|
|
395
|
+
#
|
|
396
|
+
# @param value [String] Value provided by customer
|
|
397
|
+
end
|
|
398
|
+
|
|
368
399
|
class ProductCart < Dodopayments::Internal::Type::BaseModel
|
|
369
400
|
# @!attribute product_id
|
|
370
401
|
#
|
|
@@ -44,6 +44,18 @@ module Dodopayments
|
|
|
44
44
|
# @return [Integer]
|
|
45
45
|
required :total_amount, Integer
|
|
46
46
|
|
|
47
|
+
# @!attribute invoice_id
|
|
48
|
+
# Invoice ID for this payment. Uses India-specific invoice ID if available.
|
|
49
|
+
#
|
|
50
|
+
# @return [String, nil]
|
|
51
|
+
optional :invoice_id, String, nil?: true
|
|
52
|
+
|
|
53
|
+
# @!attribute invoice_url
|
|
54
|
+
# URL to download the invoice PDF for this payment.
|
|
55
|
+
#
|
|
56
|
+
# @return [String, nil]
|
|
57
|
+
optional :invoice_url, String, nil?: true
|
|
58
|
+
|
|
47
59
|
# @!attribute payment_method
|
|
48
60
|
#
|
|
49
61
|
# @return [String, nil]
|
|
@@ -64,18 +76,33 @@ module Dodopayments
|
|
|
64
76
|
# @return [String, nil]
|
|
65
77
|
optional :subscription_id, String, nil?: true
|
|
66
78
|
|
|
67
|
-
# @!method initialize(brand_id:, created_at:, currency:, customer:, digital_products_delivered:, metadata:, payment_id:, total_amount:, payment_method: nil, payment_method_type: nil, status: nil, subscription_id: nil)
|
|
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)
|
|
68
80
|
# @param brand_id [String]
|
|
81
|
+
#
|
|
69
82
|
# @param created_at [Time]
|
|
83
|
+
#
|
|
70
84
|
# @param currency [Symbol, Dodopayments::Models::Currency]
|
|
85
|
+
#
|
|
71
86
|
# @param customer [Dodopayments::Models::CustomerLimitedDetails]
|
|
87
|
+
#
|
|
72
88
|
# @param digital_products_delivered [Boolean]
|
|
89
|
+
#
|
|
73
90
|
# @param metadata [Hash{Symbol=>String}]
|
|
91
|
+
#
|
|
74
92
|
# @param payment_id [String]
|
|
93
|
+
#
|
|
75
94
|
# @param total_amount [Integer]
|
|
95
|
+
#
|
|
96
|
+
# @param invoice_id [String, nil] Invoice ID for this payment. Uses India-specific invoice ID if available.
|
|
97
|
+
#
|
|
98
|
+
# @param invoice_url [String, nil] URL to download the invoice PDF for this payment.
|
|
99
|
+
#
|
|
76
100
|
# @param payment_method [String, nil]
|
|
101
|
+
#
|
|
77
102
|
# @param payment_method_type [String, nil]
|
|
103
|
+
#
|
|
78
104
|
# @param status [Symbol, Dodopayments::Models::IntentStatus, nil]
|
|
105
|
+
#
|
|
79
106
|
# @param subscription_id [String, nil]
|
|
80
107
|
end
|
|
81
108
|
end
|
|
@@ -144,6 +144,14 @@ module Dodopayments
|
|
|
144
144
|
# @return [Time, nil]
|
|
145
145
|
optional :cancelled_at, Time, nil?: true
|
|
146
146
|
|
|
147
|
+
# @!attribute custom_field_responses
|
|
148
|
+
# Customer's responses to custom fields collected during checkout
|
|
149
|
+
#
|
|
150
|
+
# @return [Array<Dodopayments::Models::Subscription::CustomFieldResponse>, nil]
|
|
151
|
+
optional :custom_field_responses,
|
|
152
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Subscription::CustomFieldResponse] },
|
|
153
|
+
nil?: true
|
|
154
|
+
|
|
147
155
|
# @!attribute discount_cycles_remaining
|
|
148
156
|
# Number of remaining discount cycles if discount is applied
|
|
149
157
|
#
|
|
@@ -174,7 +182,7 @@ module Dodopayments
|
|
|
174
182
|
# @return [String, nil]
|
|
175
183
|
optional :tax_id, String, nil?: true
|
|
176
184
|
|
|
177
|
-
# @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, 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:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil, expires_at: nil, payment_method_id: nil, tax_id: nil)
|
|
185
|
+
# @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, 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:, cancelled_at: nil, custom_field_responses: nil, discount_cycles_remaining: nil, discount_id: nil, expires_at: nil, payment_method_id: nil, tax_id: nil)
|
|
178
186
|
# Some parameter documentations has been truncated, see
|
|
179
187
|
# {Dodopayments::Models::Subscription} for more details.
|
|
180
188
|
#
|
|
@@ -226,6 +234,8 @@ module Dodopayments
|
|
|
226
234
|
#
|
|
227
235
|
# @param cancelled_at [Time, nil] Cancelled timestamp if the subscription is cancelled
|
|
228
236
|
#
|
|
237
|
+
# @param custom_field_responses [Array<Dodopayments::Models::Subscription::CustomFieldResponse>, nil] Customer's responses to custom fields collected during checkout
|
|
238
|
+
#
|
|
229
239
|
# @param discount_cycles_remaining [Integer, nil] Number of remaining discount cycles if discount is applied
|
|
230
240
|
#
|
|
231
241
|
# @param discount_id [String, nil] The discount id if discount is applied
|
|
@@ -283,6 +293,27 @@ module Dodopayments
|
|
|
283
293
|
# @param price_per_unit [String]
|
|
284
294
|
# @param description [String, nil]
|
|
285
295
|
end
|
|
296
|
+
|
|
297
|
+
class CustomFieldResponse < Dodopayments::Internal::Type::BaseModel
|
|
298
|
+
# @!attribute key
|
|
299
|
+
# Key matching the custom field definition
|
|
300
|
+
#
|
|
301
|
+
# @return [String]
|
|
302
|
+
required :key, String
|
|
303
|
+
|
|
304
|
+
# @!attribute value
|
|
305
|
+
# Value provided by customer
|
|
306
|
+
#
|
|
307
|
+
# @return [String]
|
|
308
|
+
required :value, String
|
|
309
|
+
|
|
310
|
+
# @!method initialize(key:, value:)
|
|
311
|
+
# Customer's response to a custom field
|
|
312
|
+
#
|
|
313
|
+
# @param key [String] Key matching the custom field definition
|
|
314
|
+
#
|
|
315
|
+
# @param value [String] Value provided by customer
|
|
316
|
+
end
|
|
286
317
|
end
|
|
287
318
|
end
|
|
288
319
|
end
|
|
@@ -150,13 +150,19 @@ module Dodopayments
|
|
|
150
150
|
# @return [String, nil]
|
|
151
151
|
optional :payment_method_id, String, nil?: true
|
|
152
152
|
|
|
153
|
+
# @!attribute product_name
|
|
154
|
+
# Name of the product associated with this subscription
|
|
155
|
+
#
|
|
156
|
+
# @return [String, nil]
|
|
157
|
+
optional :product_name, String, nil?: true
|
|
158
|
+
|
|
153
159
|
# @!attribute tax_id
|
|
154
160
|
# Tax identifier provided for this subscription (if applicable)
|
|
155
161
|
#
|
|
156
162
|
# @return [String, nil]
|
|
157
163
|
optional :tax_id, String, nil?: true
|
|
158
164
|
|
|
159
|
-
# @!method initialize(billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, 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:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil, payment_method_id: nil, tax_id: nil)
|
|
165
|
+
# @!method initialize(billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, 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:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil, payment_method_id: nil, product_name: nil, tax_id: nil)
|
|
160
166
|
# Some parameter documentations has been truncated, see
|
|
161
167
|
# {Dodopayments::Models::SubscriptionListResponse} for more details.
|
|
162
168
|
#
|
|
@@ -210,6 +216,8 @@ module Dodopayments
|
|
|
210
216
|
#
|
|
211
217
|
# @param payment_method_id [String, nil] Saved payment method id used for recurring charges
|
|
212
218
|
#
|
|
219
|
+
# @param product_name [String, nil] Name of the product associated with this subscription
|
|
220
|
+
#
|
|
213
221
|
# @param tax_id [String, nil] Tax identifier provided for this subscription (if applicable)
|
|
214
222
|
end
|
|
215
223
|
end
|
|
@@ -6,7 +6,7 @@ module Dodopayments
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {Dodopayments::Models::CheckoutSessionCreateParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
# @overload create(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: 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, request_options: {})
|
|
9
|
+
# @overload create(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, request_options: {})
|
|
10
10
|
#
|
|
11
11
|
# @param product_cart [Array<Dodopayments::Models::CheckoutSessionRequest::ProductCart>]
|
|
12
12
|
#
|
|
@@ -18,6 +18,8 @@ module Dodopayments
|
|
|
18
18
|
#
|
|
19
19
|
# @param confirm [Boolean] If confirm is true, all the details will be finalized. If required data is missi
|
|
20
20
|
#
|
|
21
|
+
# @param custom_fields [Array<Dodopayments::Models::CheckoutSessionRequest::CustomField>, nil] Custom fields to collect from customer during checkout (max 5 fields)
|
|
22
|
+
#
|
|
21
23
|
# @param customer [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer, nil] Customer details for the session
|
|
22
24
|
#
|
|
23
25
|
# @param customization [Dodopayments::Models::CheckoutSessionRequest::Customization] Customization for the checkout session page
|
|
@@ -80,7 +82,7 @@ module Dodopayments
|
|
|
80
82
|
# Some parameter documentations has been truncated, see
|
|
81
83
|
# {Dodopayments::Models::CheckoutSessionPreviewParams} for more details.
|
|
82
84
|
#
|
|
83
|
-
# @overload preview(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: 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, request_options: {})
|
|
85
|
+
# @overload preview(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, request_options: {})
|
|
84
86
|
#
|
|
85
87
|
# @param product_cart [Array<Dodopayments::Models::CheckoutSessionRequest::ProductCart>]
|
|
86
88
|
#
|
|
@@ -92,6 +94,8 @@ module Dodopayments
|
|
|
92
94
|
#
|
|
93
95
|
# @param confirm [Boolean] If confirm is true, all the details will be finalized. If required data is missi
|
|
94
96
|
#
|
|
97
|
+
# @param custom_fields [Array<Dodopayments::Models::CheckoutSessionRequest::CustomField>, nil] Custom fields to collect from customer during checkout (max 5 fields)
|
|
98
|
+
#
|
|
95
99
|
# @param customer [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer, nil] Customer details for the session
|
|
96
100
|
#
|
|
97
101
|
# @param customization [Dodopayments::Models::CheckoutSessionRequest::Customization] Customization for the checkout session page
|
|
@@ -79,10 +79,16 @@ module Dodopayments
|
|
|
79
79
|
)
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
-
# @overload list(email: nil, page_number: nil, page_size: nil, request_options: {})
|
|
82
|
+
# @overload list(created_at_gte: nil, created_at_lte: nil, email: nil, name: nil, page_number: nil, page_size: nil, request_options: {})
|
|
83
|
+
#
|
|
84
|
+
# @param created_at_gte [Time] Filter customers created on or after this timestamp
|
|
85
|
+
#
|
|
86
|
+
# @param created_at_lte [Time] Filter customers created on or before this timestamp
|
|
83
87
|
#
|
|
84
88
|
# @param email [String] Filter by customer email
|
|
85
89
|
#
|
|
90
|
+
# @param name [String] Filter by customer name (partial match, case-insensitive)
|
|
91
|
+
#
|
|
86
92
|
# @param page_number [Integer] Page number default is 0
|
|
87
93
|
#
|
|
88
94
|
# @param page_size [Integer] Page size default is 10 max is 100
|
|
@@ -106,12 +106,20 @@ module Dodopayments
|
|
|
106
106
|
|
|
107
107
|
# GET /discounts
|
|
108
108
|
#
|
|
109
|
-
# @overload list(page_number: nil, page_size: nil, request_options: {})
|
|
109
|
+
# @overload list(active: nil, code: nil, discount_type: nil, page_number: nil, page_size: nil, product_id: nil, request_options: {})
|
|
110
|
+
#
|
|
111
|
+
# @param active [Boolean] Filter by active status (true = not expired, false = expired)
|
|
112
|
+
#
|
|
113
|
+
# @param code [String] Filter by discount code (partial match, case-insensitive)
|
|
114
|
+
#
|
|
115
|
+
# @param discount_type [Symbol, Dodopayments::Models::DiscountType] Filter by discount type (percentage)
|
|
110
116
|
#
|
|
111
117
|
# @param page_number [Integer] Page number (default = 0).
|
|
112
118
|
#
|
|
113
119
|
# @param page_size [Integer] Page size (default = 10, max = 100).
|
|
114
120
|
#
|
|
121
|
+
# @param product_id [String] Filter by product restriction (only discounts that apply to this product)
|
|
122
|
+
#
|
|
115
123
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
116
124
|
#
|
|
117
125
|
# @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::Discount>]
|
|
@@ -50,7 +50,11 @@ module Dodopayments
|
|
|
50
50
|
)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
# @overload list(customer_id: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, request_options: {})
|
|
53
|
+
# @overload list(created_at_gte: nil, created_at_lte: nil, customer_id: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, request_options: {})
|
|
54
|
+
#
|
|
55
|
+
# @param created_at_gte [Time] Filter license keys created on or after this timestamp
|
|
56
|
+
#
|
|
57
|
+
# @param created_at_lte [Time] Filter license keys created on or before this timestamp
|
|
54
58
|
#
|
|
55
59
|
# @param customer_id [String] Filter by customer ID
|
|
56
60
|
#
|
data/lib/dodopayments/version.rb
CHANGED