dodopayments 2.13.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/balance_ledger_entry.rb +1 -0
- data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +1 -0
- 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/dispute_list_response.rb +27 -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 +17 -1
- data/lib/dodopayments/models/get_dispute.rb +35 -1
- data/lib/dodopayments/models/integration_config.rb +28 -1
- data/lib/dodopayments/models/integration_config_response.rb +28 -1
- data/lib/dodopayments/models/license_key.rb +10 -1
- data/lib/dodopayments/models/license_key_list_params.rb +1 -0
- data/lib/dodopayments/models/payment.rb +34 -6
- data/lib/dodopayments/models/payment_create_response.rb +3 -2
- data/lib/dodopayments/models/payment_list_response.rb +43 -1
- data/lib/dodopayments/models/payouts/breakup/detail_list_response.rb +7 -6
- data/lib/dodopayments/models/payouts/breakup_retrieve_response.rb +3 -3
- data/lib/dodopayments/models/product.rb +24 -1
- data/lib/dodopayments/models/product_create_params.rb +28 -5
- data/lib/dodopayments/models/product_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/subscription_update_payment_method_params.rb +21 -1
- data/lib/dodopayments/models/webhook_payload.rb +47 -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/balance_ledger_entry.rbi +5 -0
- data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +5 -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/dispute_list_response.rbi +60 -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 +18 -0
- data/rbi/dodopayments/models/get_dispute.rbi +52 -0
- data/rbi/dodopayments/models/integration_config.rbi +65 -3
- data/rbi/dodopayments/models/integration_config_response.rbi +64 -3
- data/rbi/dodopayments/models/license_key.rbi +9 -0
- data/rbi/dodopayments/models/license_key_list_params.rbi +5 -0
- data/rbi/dodopayments/models/payment.rbi +49 -6
- data/rbi/dodopayments/models/payment_create_response.rbi +4 -2
- data/rbi/dodopayments/models/payment_list_response.rbi +76 -0
- 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/subscription_update_payment_method_params.rbi +40 -5
- data/rbi/dodopayments/models/webhook_payload.rbi +24 -0
- 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/balance_ledger_entry.rbs +2 -0
- data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +2 -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/dispute_list_response.rbs +17 -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 +10 -0
- data/sig/dodopayments/models/get_dispute.rbs +22 -0
- data/sig/dodopayments/models/integration_config.rbs +19 -3
- data/sig/dodopayments/models/integration_config_response.rbs +19 -3
- data/sig/dodopayments/models/license_key.rbs +7 -1
- data/sig/dodopayments/models/license_key_list_params.rbs +2 -1
- data/sig/dodopayments/models/payment.rbs +17 -0
- data/sig/dodopayments/models/payment_list_response.rbs +27 -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/subscription_update_payment_method_params.rbs +19 -4
- data/sig/dodopayments/models/webhook_payload.rbs +15 -0
- data/sig/dodopayments/resources/products.rbs +2 -0
- metadata +2 -2
|
@@ -13,6 +13,10 @@ module Dodopayments
|
|
|
13
13
|
sig { returns(String) }
|
|
14
14
|
attr_accessor :amount
|
|
15
15
|
|
|
16
|
+
# Brand id this dispute belongs to
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :brand_id
|
|
19
|
+
|
|
16
20
|
# The unique identifier of the business involved in the dispute.
|
|
17
21
|
sig { returns(String) }
|
|
18
22
|
attr_accessor :business_id
|
|
@@ -50,6 +54,12 @@ module Dodopayments
|
|
|
50
54
|
sig { returns(String) }
|
|
51
55
|
attr_accessor :payment_id
|
|
52
56
|
|
|
57
|
+
# Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
|
|
58
|
+
# routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
|
|
59
|
+
# processed itself.
|
|
60
|
+
sig { returns(Dodopayments::GetDispute::PaymentProvider::TaggedSymbol) }
|
|
61
|
+
attr_accessor :payment_provider
|
|
62
|
+
|
|
53
63
|
# Whether the dispute was resolved by Rapid Dispute Resolution
|
|
54
64
|
sig { returns(T.nilable(T::Boolean)) }
|
|
55
65
|
attr_accessor :is_resolved_by_rdr
|
|
@@ -65,6 +75,7 @@ module Dodopayments
|
|
|
65
75
|
sig do
|
|
66
76
|
params(
|
|
67
77
|
amount: String,
|
|
78
|
+
brand_id: String,
|
|
68
79
|
business_id: String,
|
|
69
80
|
created_at: Time,
|
|
70
81
|
currency: String,
|
|
@@ -73,6 +84,7 @@ module Dodopayments
|
|
|
73
84
|
dispute_stage: Dodopayments::DisputeStage::OrSymbol,
|
|
74
85
|
dispute_status: Dodopayments::DisputeStatus::OrSymbol,
|
|
75
86
|
payment_id: String,
|
|
87
|
+
payment_provider: Dodopayments::GetDispute::PaymentProvider::OrSymbol,
|
|
76
88
|
is_resolved_by_rdr: T.nilable(T::Boolean),
|
|
77
89
|
reason: T.nilable(String),
|
|
78
90
|
remarks: T.nilable(String)
|
|
@@ -82,6 +94,8 @@ module Dodopayments
|
|
|
82
94
|
# The amount involved in the dispute, represented as a string to accommodate
|
|
83
95
|
# precision.
|
|
84
96
|
amount:,
|
|
97
|
+
# Brand id this dispute belongs to
|
|
98
|
+
brand_id:,
|
|
85
99
|
# The unique identifier of the business involved in the dispute.
|
|
86
100
|
business_id:,
|
|
87
101
|
# The timestamp of when the dispute was created, in UTC.
|
|
@@ -98,6 +112,10 @@ module Dodopayments
|
|
|
98
112
|
dispute_status:,
|
|
99
113
|
# The unique identifier of the payment associated with the dispute.
|
|
100
114
|
payment_id:,
|
|
115
|
+
# Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
|
|
116
|
+
# routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
|
|
117
|
+
# processed itself.
|
|
118
|
+
payment_provider:,
|
|
101
119
|
# Whether the dispute was resolved by Rapid Dispute Resolution
|
|
102
120
|
is_resolved_by_rdr: nil,
|
|
103
121
|
# Reason for the dispute
|
|
@@ -111,6 +129,7 @@ module Dodopayments
|
|
|
111
129
|
override.returns(
|
|
112
130
|
{
|
|
113
131
|
amount: String,
|
|
132
|
+
brand_id: String,
|
|
114
133
|
business_id: String,
|
|
115
134
|
created_at: Time,
|
|
116
135
|
currency: String,
|
|
@@ -119,6 +138,8 @@ module Dodopayments
|
|
|
119
138
|
dispute_stage: Dodopayments::DisputeStage::TaggedSymbol,
|
|
120
139
|
dispute_status: Dodopayments::DisputeStatus::TaggedSymbol,
|
|
121
140
|
payment_id: String,
|
|
141
|
+
payment_provider:
|
|
142
|
+
Dodopayments::GetDispute::PaymentProvider::TaggedSymbol,
|
|
122
143
|
is_resolved_by_rdr: T.nilable(T::Boolean),
|
|
123
144
|
reason: T.nilable(String),
|
|
124
145
|
remarks: T.nilable(String)
|
|
@@ -127,6 +148,37 @@ module Dodopayments
|
|
|
127
148
|
end
|
|
128
149
|
def to_hash
|
|
129
150
|
end
|
|
151
|
+
|
|
152
|
+
# Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
|
|
153
|
+
# routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
|
|
154
|
+
# processed itself.
|
|
155
|
+
module PaymentProvider
|
|
156
|
+
extend Dodopayments::Internal::Type::Enum
|
|
157
|
+
|
|
158
|
+
TaggedSymbol =
|
|
159
|
+
T.type_alias do
|
|
160
|
+
T.all(Symbol, Dodopayments::GetDispute::PaymentProvider)
|
|
161
|
+
end
|
|
162
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
163
|
+
|
|
164
|
+
STRIPE =
|
|
165
|
+
T.let(
|
|
166
|
+
:stripe,
|
|
167
|
+
Dodopayments::GetDispute::PaymentProvider::TaggedSymbol
|
|
168
|
+
)
|
|
169
|
+
ADYEN =
|
|
170
|
+
T.let(:adyen, Dodopayments::GetDispute::PaymentProvider::TaggedSymbol)
|
|
171
|
+
DODO =
|
|
172
|
+
T.let(:dodo, Dodopayments::GetDispute::PaymentProvider::TaggedSymbol)
|
|
173
|
+
|
|
174
|
+
sig do
|
|
175
|
+
override.returns(
|
|
176
|
+
T::Array[Dodopayments::GetDispute::PaymentProvider::TaggedSymbol]
|
|
177
|
+
)
|
|
178
|
+
end
|
|
179
|
+
def self.values
|
|
180
|
+
end
|
|
181
|
+
end
|
|
130
182
|
end
|
|
131
183
|
end
|
|
132
184
|
end
|
|
@@ -308,12 +308,28 @@ module Dodopayments
|
|
|
308
308
|
sig { returns(T.nilable(Dodopayments::TimeInterval::OrSymbol)) }
|
|
309
309
|
attr_accessor :duration_interval
|
|
310
310
|
|
|
311
|
+
# How license keys are fulfilled. `auto` (default) generates and delivers keys to
|
|
312
|
+
# customers automatically; `manual` creates pending grants that you fulfill with
|
|
313
|
+
# the supplied key via `POST /grants/{grant_id}/license-key`.
|
|
314
|
+
sig do
|
|
315
|
+
returns(
|
|
316
|
+
T.nilable(
|
|
317
|
+
Dodopayments::IntegrationConfig::LicenseKeyConfig::FulfillmentMode::OrSymbol
|
|
318
|
+
)
|
|
319
|
+
)
|
|
320
|
+
end
|
|
321
|
+
attr_accessor :fulfillment_mode
|
|
322
|
+
|
|
311
323
|
sig do
|
|
312
324
|
params(
|
|
313
325
|
activation_message: T.nilable(String),
|
|
314
326
|
activations_limit: T.nilable(Integer),
|
|
315
327
|
duration_count: T.nilable(Integer),
|
|
316
|
-
duration_interval: T.nilable(Dodopayments::TimeInterval::OrSymbol)
|
|
328
|
+
duration_interval: T.nilable(Dodopayments::TimeInterval::OrSymbol),
|
|
329
|
+
fulfillment_mode:
|
|
330
|
+
T.nilable(
|
|
331
|
+
Dodopayments::IntegrationConfig::LicenseKeyConfig::FulfillmentMode::OrSymbol
|
|
332
|
+
)
|
|
317
333
|
).returns(T.attached_class)
|
|
318
334
|
end
|
|
319
335
|
def self.new(
|
|
@@ -327,7 +343,11 @@ module Dodopayments
|
|
|
327
343
|
# keys.
|
|
328
344
|
duration_count: nil,
|
|
329
345
|
# Unit of `duration_count`.
|
|
330
|
-
duration_interval: nil
|
|
346
|
+
duration_interval: nil,
|
|
347
|
+
# How license keys are fulfilled. `auto` (default) generates and delivers keys to
|
|
348
|
+
# customers automatically; `manual` creates pending grants that you fulfill with
|
|
349
|
+
# the supplied key via `POST /grants/{grant_id}/license-key`.
|
|
350
|
+
fulfillment_mode: nil
|
|
331
351
|
)
|
|
332
352
|
end
|
|
333
353
|
|
|
@@ -337,12 +357,54 @@ module Dodopayments
|
|
|
337
357
|
activation_message: T.nilable(String),
|
|
338
358
|
activations_limit: T.nilable(Integer),
|
|
339
359
|
duration_count: T.nilable(Integer),
|
|
340
|
-
duration_interval:
|
|
360
|
+
duration_interval:
|
|
361
|
+
T.nilable(Dodopayments::TimeInterval::OrSymbol),
|
|
362
|
+
fulfillment_mode:
|
|
363
|
+
T.nilable(
|
|
364
|
+
Dodopayments::IntegrationConfig::LicenseKeyConfig::FulfillmentMode::OrSymbol
|
|
365
|
+
)
|
|
341
366
|
}
|
|
342
367
|
)
|
|
343
368
|
end
|
|
344
369
|
def to_hash
|
|
345
370
|
end
|
|
371
|
+
|
|
372
|
+
# How license keys are fulfilled. `auto` (default) generates and delivers keys to
|
|
373
|
+
# customers automatically; `manual` creates pending grants that you fulfill with
|
|
374
|
+
# the supplied key via `POST /grants/{grant_id}/license-key`.
|
|
375
|
+
module FulfillmentMode
|
|
376
|
+
extend Dodopayments::Internal::Type::Enum
|
|
377
|
+
|
|
378
|
+
TaggedSymbol =
|
|
379
|
+
T.type_alias do
|
|
380
|
+
T.all(
|
|
381
|
+
Symbol,
|
|
382
|
+
Dodopayments::IntegrationConfig::LicenseKeyConfig::FulfillmentMode
|
|
383
|
+
)
|
|
384
|
+
end
|
|
385
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
386
|
+
|
|
387
|
+
AUTO =
|
|
388
|
+
T.let(
|
|
389
|
+
:auto,
|
|
390
|
+
Dodopayments::IntegrationConfig::LicenseKeyConfig::FulfillmentMode::TaggedSymbol
|
|
391
|
+
)
|
|
392
|
+
MANUAL =
|
|
393
|
+
T.let(
|
|
394
|
+
:manual,
|
|
395
|
+
Dodopayments::IntegrationConfig::LicenseKeyConfig::FulfillmentMode::TaggedSymbol
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
sig do
|
|
399
|
+
override.returns(
|
|
400
|
+
T::Array[
|
|
401
|
+
Dodopayments::IntegrationConfig::LicenseKeyConfig::FulfillmentMode::TaggedSymbol
|
|
402
|
+
]
|
|
403
|
+
)
|
|
404
|
+
end
|
|
405
|
+
def self.values
|
|
406
|
+
end
|
|
407
|
+
end
|
|
346
408
|
end
|
|
347
409
|
|
|
348
410
|
sig do
|
|
@@ -425,12 +425,28 @@ module Dodopayments
|
|
|
425
425
|
sig { returns(T.nilable(Dodopayments::TimeInterval::TaggedSymbol)) }
|
|
426
426
|
attr_accessor :duration_interval
|
|
427
427
|
|
|
428
|
+
# How license keys are fulfilled. `auto` (default) generates and delivers keys to
|
|
429
|
+
# customers automatically; `manual` creates pending grants that you fulfill with
|
|
430
|
+
# the supplied key via `POST /grants/{grant_id}/license-key`.
|
|
431
|
+
sig do
|
|
432
|
+
returns(
|
|
433
|
+
T.nilable(
|
|
434
|
+
Dodopayments::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode::TaggedSymbol
|
|
435
|
+
)
|
|
436
|
+
)
|
|
437
|
+
end
|
|
438
|
+
attr_accessor :fulfillment_mode
|
|
439
|
+
|
|
428
440
|
sig do
|
|
429
441
|
params(
|
|
430
442
|
activation_message: T.nilable(String),
|
|
431
443
|
activations_limit: T.nilable(Integer),
|
|
432
444
|
duration_count: T.nilable(Integer),
|
|
433
|
-
duration_interval: T.nilable(Dodopayments::TimeInterval::OrSymbol)
|
|
445
|
+
duration_interval: T.nilable(Dodopayments::TimeInterval::OrSymbol),
|
|
446
|
+
fulfillment_mode:
|
|
447
|
+
T.nilable(
|
|
448
|
+
Dodopayments::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode::OrSymbol
|
|
449
|
+
)
|
|
434
450
|
).returns(T.attached_class)
|
|
435
451
|
end
|
|
436
452
|
def self.new(
|
|
@@ -444,7 +460,11 @@ module Dodopayments
|
|
|
444
460
|
# keys.
|
|
445
461
|
duration_count: nil,
|
|
446
462
|
# Unit of `duration_count`.
|
|
447
|
-
duration_interval: nil
|
|
463
|
+
duration_interval: nil,
|
|
464
|
+
# How license keys are fulfilled. `auto` (default) generates and delivers keys to
|
|
465
|
+
# customers automatically; `manual` creates pending grants that you fulfill with
|
|
466
|
+
# the supplied key via `POST /grants/{grant_id}/license-key`.
|
|
467
|
+
fulfillment_mode: nil
|
|
448
468
|
)
|
|
449
469
|
end
|
|
450
470
|
|
|
@@ -455,12 +475,53 @@ module Dodopayments
|
|
|
455
475
|
activations_limit: T.nilable(Integer),
|
|
456
476
|
duration_count: T.nilable(Integer),
|
|
457
477
|
duration_interval:
|
|
458
|
-
T.nilable(Dodopayments::TimeInterval::TaggedSymbol)
|
|
478
|
+
T.nilable(Dodopayments::TimeInterval::TaggedSymbol),
|
|
479
|
+
fulfillment_mode:
|
|
480
|
+
T.nilable(
|
|
481
|
+
Dodopayments::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode::TaggedSymbol
|
|
482
|
+
)
|
|
459
483
|
}
|
|
460
484
|
)
|
|
461
485
|
end
|
|
462
486
|
def to_hash
|
|
463
487
|
end
|
|
488
|
+
|
|
489
|
+
# How license keys are fulfilled. `auto` (default) generates and delivers keys to
|
|
490
|
+
# customers automatically; `manual` creates pending grants that you fulfill with
|
|
491
|
+
# the supplied key via `POST /grants/{grant_id}/license-key`.
|
|
492
|
+
module FulfillmentMode
|
|
493
|
+
extend Dodopayments::Internal::Type::Enum
|
|
494
|
+
|
|
495
|
+
TaggedSymbol =
|
|
496
|
+
T.type_alias do
|
|
497
|
+
T.all(
|
|
498
|
+
Symbol,
|
|
499
|
+
Dodopayments::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode
|
|
500
|
+
)
|
|
501
|
+
end
|
|
502
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
503
|
+
|
|
504
|
+
AUTO =
|
|
505
|
+
T.let(
|
|
506
|
+
:auto,
|
|
507
|
+
Dodopayments::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode::TaggedSymbol
|
|
508
|
+
)
|
|
509
|
+
MANUAL =
|
|
510
|
+
T.let(
|
|
511
|
+
:manual,
|
|
512
|
+
Dodopayments::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode::TaggedSymbol
|
|
513
|
+
)
|
|
514
|
+
|
|
515
|
+
sig do
|
|
516
|
+
override.returns(
|
|
517
|
+
T::Array[
|
|
518
|
+
Dodopayments::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode::TaggedSymbol
|
|
519
|
+
]
|
|
520
|
+
)
|
|
521
|
+
end
|
|
522
|
+
def self.values
|
|
523
|
+
end
|
|
524
|
+
end
|
|
464
525
|
end
|
|
465
526
|
|
|
466
527
|
sig do
|
|
@@ -12,6 +12,10 @@ module Dodopayments
|
|
|
12
12
|
sig { returns(String) }
|
|
13
13
|
attr_accessor :id
|
|
14
14
|
|
|
15
|
+
# Brand id this license key belongs to
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :brand_id
|
|
18
|
+
|
|
15
19
|
# The unique identifier of the business associated with the license key.
|
|
16
20
|
sig { returns(String) }
|
|
17
21
|
attr_accessor :business_id
|
|
@@ -65,6 +69,7 @@ module Dodopayments
|
|
|
65
69
|
sig do
|
|
66
70
|
params(
|
|
67
71
|
id: String,
|
|
72
|
+
brand_id: String,
|
|
68
73
|
business_id: String,
|
|
69
74
|
created_at: Time,
|
|
70
75
|
customer_id: String,
|
|
@@ -82,6 +87,8 @@ module Dodopayments
|
|
|
82
87
|
def self.new(
|
|
83
88
|
# The unique identifier of the license key.
|
|
84
89
|
id:,
|
|
90
|
+
# Brand id this license key belongs to
|
|
91
|
+
brand_id:,
|
|
85
92
|
# The unique identifier of the business associated with the license key.
|
|
86
93
|
business_id:,
|
|
87
94
|
# The timestamp indicating when the license key was created, in UTC.
|
|
@@ -115,6 +122,7 @@ module Dodopayments
|
|
|
115
122
|
override.returns(
|
|
116
123
|
{
|
|
117
124
|
id: String,
|
|
125
|
+
brand_id: String,
|
|
118
126
|
business_id: String,
|
|
119
127
|
created_at: Time,
|
|
120
128
|
customer_id: String,
|
|
@@ -144,6 +152,7 @@ module Dodopayments
|
|
|
144
152
|
|
|
145
153
|
AUTO = T.let(:auto, Dodopayments::LicenseKey::Source::TaggedSymbol)
|
|
146
154
|
IMPORT = T.let(:import, Dodopayments::LicenseKey::Source::TaggedSymbol)
|
|
155
|
+
MANUAL = T.let(:manual, Dodopayments::LicenseKey::Source::TaggedSymbol)
|
|
147
156
|
|
|
148
157
|
sig do
|
|
149
158
|
override.returns(
|
|
@@ -56,6 +56,12 @@ module Dodopayments
|
|
|
56
56
|
sig { returns(String) }
|
|
57
57
|
attr_accessor :payment_id
|
|
58
58
|
|
|
59
|
+
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
60
|
+
# merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
|
|
61
|
+
# itself.
|
|
62
|
+
sig { returns(Dodopayments::Payment::PaymentProvider::TaggedSymbol) }
|
|
63
|
+
attr_accessor :payment_provider
|
|
64
|
+
|
|
59
65
|
# List of refunds issued for this payment
|
|
60
66
|
sig { returns(T::Array[Dodopayments::RefundListItem]) }
|
|
61
67
|
attr_accessor :refunds
|
|
@@ -78,8 +84,9 @@ module Dodopayments
|
|
|
78
84
|
sig { returns(Dodopayments::Currency::TaggedSymbol) }
|
|
79
85
|
attr_accessor :settlement_currency
|
|
80
86
|
|
|
81
|
-
# Total amount charged to the customer including tax, in
|
|
82
|
-
# (e.g. cents
|
|
87
|
+
# Total amount charged to the customer including tax, in the currency's smallest
|
|
88
|
+
# unit (e.g. cents for USD, yen for JPY, fils for KWD — see the currency's decimal
|
|
89
|
+
# places)
|
|
83
90
|
sig { returns(Integer) }
|
|
84
91
|
attr_accessor :total_amount
|
|
85
92
|
|
|
@@ -173,7 +180,8 @@ module Dodopayments
|
|
|
173
180
|
sig { returns(T.nilable(String)) }
|
|
174
181
|
attr_accessor :subscription_id
|
|
175
182
|
|
|
176
|
-
# Amount of tax collected in
|
|
183
|
+
# Amount of tax collected in the currency's smallest unit (e.g. cents for USD, yen
|
|
184
|
+
# for JPY, fils for KWD)
|
|
177
185
|
sig { returns(T.nilable(Integer)) }
|
|
178
186
|
attr_accessor :tax
|
|
179
187
|
|
|
@@ -193,6 +201,7 @@ module Dodopayments
|
|
|
193
201
|
disputes: T::Array[Dodopayments::Dispute::OrHash],
|
|
194
202
|
metadata: T::Hash[Symbol, String],
|
|
195
203
|
payment_id: String,
|
|
204
|
+
payment_provider: Dodopayments::Payment::PaymentProvider::OrSymbol,
|
|
196
205
|
refunds: T::Array[Dodopayments::RefundListItem::OrHash],
|
|
197
206
|
retry_attempt: Integer,
|
|
198
207
|
settlement_amount: Integer,
|
|
@@ -246,6 +255,10 @@ module Dodopayments
|
|
|
246
255
|
metadata:,
|
|
247
256
|
# Unique identifier for the payment
|
|
248
257
|
payment_id:,
|
|
258
|
+
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
259
|
+
# merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
|
|
260
|
+
# itself.
|
|
261
|
+
payment_provider:,
|
|
249
262
|
# List of refunds issued for this payment
|
|
250
263
|
refunds:,
|
|
251
264
|
# Retry attempt number for subscription renewal payments. `0` for the original
|
|
@@ -260,8 +273,9 @@ module Dodopayments
|
|
|
260
273
|
# balance. This may differ from the customer's payment currency in adaptive
|
|
261
274
|
# pricing scenarios.
|
|
262
275
|
settlement_currency:,
|
|
263
|
-
# Total amount charged to the customer including tax, in
|
|
264
|
-
# (e.g. cents
|
|
276
|
+
# Total amount charged to the customer including tax, in the currency's smallest
|
|
277
|
+
# unit (e.g. cents for USD, yen for JPY, fils for KWD — see the currency's decimal
|
|
278
|
+
# places)
|
|
265
279
|
total_amount:,
|
|
266
280
|
# Cardholder name
|
|
267
281
|
card_holder_name: nil,
|
|
@@ -309,7 +323,8 @@ module Dodopayments
|
|
|
309
323
|
status: nil,
|
|
310
324
|
# Identifier of the subscription if payment is part of a subscription
|
|
311
325
|
subscription_id: nil,
|
|
312
|
-
# Amount of tax collected in
|
|
326
|
+
# Amount of tax collected in the currency's smallest unit (e.g. cents for USD, yen
|
|
327
|
+
# for JPY, fils for KWD)
|
|
313
328
|
tax: nil,
|
|
314
329
|
# Timestamp when the payment was last updated
|
|
315
330
|
updated_at: nil
|
|
@@ -329,6 +344,8 @@ module Dodopayments
|
|
|
329
344
|
disputes: T::Array[Dodopayments::Dispute],
|
|
330
345
|
metadata: T::Hash[Symbol, String],
|
|
331
346
|
payment_id: String,
|
|
347
|
+
payment_provider:
|
|
348
|
+
Dodopayments::Payment::PaymentProvider::TaggedSymbol,
|
|
332
349
|
refunds: T::Array[Dodopayments::RefundListItem],
|
|
333
350
|
retry_attempt: Integer,
|
|
334
351
|
settlement_amount: Integer,
|
|
@@ -367,6 +384,32 @@ module Dodopayments
|
|
|
367
384
|
def to_hash
|
|
368
385
|
end
|
|
369
386
|
|
|
387
|
+
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
388
|
+
# merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
|
|
389
|
+
# itself.
|
|
390
|
+
module PaymentProvider
|
|
391
|
+
extend Dodopayments::Internal::Type::Enum
|
|
392
|
+
|
|
393
|
+
TaggedSymbol =
|
|
394
|
+
T.type_alias { T.all(Symbol, Dodopayments::Payment::PaymentProvider) }
|
|
395
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
396
|
+
|
|
397
|
+
STRIPE =
|
|
398
|
+
T.let(:stripe, Dodopayments::Payment::PaymentProvider::TaggedSymbol)
|
|
399
|
+
ADYEN =
|
|
400
|
+
T.let(:adyen, Dodopayments::Payment::PaymentProvider::TaggedSymbol)
|
|
401
|
+
DODO =
|
|
402
|
+
T.let(:dodo, Dodopayments::Payment::PaymentProvider::TaggedSymbol)
|
|
403
|
+
|
|
404
|
+
sig do
|
|
405
|
+
override.returns(
|
|
406
|
+
T::Array[Dodopayments::Payment::PaymentProvider::TaggedSymbol]
|
|
407
|
+
)
|
|
408
|
+
end
|
|
409
|
+
def self.values
|
|
410
|
+
end
|
|
411
|
+
end
|
|
412
|
+
|
|
370
413
|
class ProductCart < Dodopayments::Internal::Type::BaseModel
|
|
371
414
|
OrHash =
|
|
372
415
|
T.type_alias do
|
|
@@ -33,7 +33,8 @@ module Dodopayments
|
|
|
33
33
|
sig { returns(String) }
|
|
34
34
|
attr_accessor :payment_id
|
|
35
35
|
|
|
36
|
-
# Total amount of the payment in
|
|
36
|
+
# Total amount of the payment in the currency's smallest unit (cents for USD, yen
|
|
37
|
+
# for JPY, fils for KWD)
|
|
37
38
|
sig { returns(Integer) }
|
|
38
39
|
attr_accessor :total_amount
|
|
39
40
|
|
|
@@ -83,7 +84,8 @@ module Dodopayments
|
|
|
83
84
|
metadata:,
|
|
84
85
|
# Unique identifier for the payment
|
|
85
86
|
payment_id:,
|
|
86
|
-
# Total amount of the payment in
|
|
87
|
+
# Total amount of the payment in the currency's smallest unit (cents for USD, yen
|
|
88
|
+
# for JPY, fils for KWD)
|
|
87
89
|
total_amount:,
|
|
88
90
|
# DEPRECATED: Use discount_ids instead. Returns the first discount's ID if
|
|
89
91
|
# present.
|
|
@@ -40,9 +40,27 @@ module Dodopayments
|
|
|
40
40
|
sig { returns(String) }
|
|
41
41
|
attr_accessor :payment_id
|
|
42
42
|
|
|
43
|
+
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
44
|
+
# merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
|
|
45
|
+
# itself.
|
|
46
|
+
sig do
|
|
47
|
+
returns(
|
|
48
|
+
Dodopayments::Models::PaymentListResponse::PaymentProvider::TaggedSymbol
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
attr_accessor :payment_provider
|
|
52
|
+
|
|
43
53
|
sig { returns(Integer) }
|
|
44
54
|
attr_accessor :total_amount
|
|
45
55
|
|
|
56
|
+
# The last four digits of the card
|
|
57
|
+
sig { returns(T.nilable(String)) }
|
|
58
|
+
attr_accessor :card_last_four
|
|
59
|
+
|
|
60
|
+
# Card network like VISA, MASTERCARD etc.
|
|
61
|
+
sig { returns(T.nilable(String)) }
|
|
62
|
+
attr_accessor :card_network
|
|
63
|
+
|
|
46
64
|
# The most recent dispute status for this payment. None if no disputes exist.
|
|
47
65
|
sig { returns(T.nilable(Dodopayments::DisputeStatus::TaggedSymbol)) }
|
|
48
66
|
attr_accessor :dispute_status
|
|
@@ -84,7 +102,11 @@ module Dodopayments
|
|
|
84
102
|
has_license_key: T::Boolean,
|
|
85
103
|
metadata: T::Hash[Symbol, String],
|
|
86
104
|
payment_id: String,
|
|
105
|
+
payment_provider:
|
|
106
|
+
Dodopayments::Models::PaymentListResponse::PaymentProvider::OrSymbol,
|
|
87
107
|
total_amount: Integer,
|
|
108
|
+
card_last_four: T.nilable(String),
|
|
109
|
+
card_network: T.nilable(String),
|
|
88
110
|
dispute_status: T.nilable(Dodopayments::DisputeStatus::OrSymbol),
|
|
89
111
|
invoice_id: T.nilable(String),
|
|
90
112
|
invoice_url: T.nilable(String),
|
|
@@ -104,7 +126,15 @@ module Dodopayments
|
|
|
104
126
|
has_license_key:,
|
|
105
127
|
metadata:,
|
|
106
128
|
payment_id:,
|
|
129
|
+
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
130
|
+
# merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
|
|
131
|
+
# itself.
|
|
132
|
+
payment_provider:,
|
|
107
133
|
total_amount:,
|
|
134
|
+
# The last four digits of the card
|
|
135
|
+
card_last_four: nil,
|
|
136
|
+
# Card network like VISA, MASTERCARD etc.
|
|
137
|
+
card_network: nil,
|
|
108
138
|
# The most recent dispute status for this payment. None if no disputes exist.
|
|
109
139
|
dispute_status: nil,
|
|
110
140
|
# Invoice ID for this payment. Uses India-specific invoice ID if available.
|
|
@@ -132,7 +162,11 @@ module Dodopayments
|
|
|
132
162
|
has_license_key: T::Boolean,
|
|
133
163
|
metadata: T::Hash[Symbol, String],
|
|
134
164
|
payment_id: String,
|
|
165
|
+
payment_provider:
|
|
166
|
+
Dodopayments::Models::PaymentListResponse::PaymentProvider::TaggedSymbol,
|
|
135
167
|
total_amount: Integer,
|
|
168
|
+
card_last_four: T.nilable(String),
|
|
169
|
+
card_network: T.nilable(String),
|
|
136
170
|
dispute_status:
|
|
137
171
|
T.nilable(Dodopayments::DisputeStatus::TaggedSymbol),
|
|
138
172
|
invoice_id: T.nilable(String),
|
|
@@ -148,6 +182,48 @@ module Dodopayments
|
|
|
148
182
|
end
|
|
149
183
|
def to_hash
|
|
150
184
|
end
|
|
185
|
+
|
|
186
|
+
# Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
|
|
187
|
+
# merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
|
|
188
|
+
# itself.
|
|
189
|
+
module PaymentProvider
|
|
190
|
+
extend Dodopayments::Internal::Type::Enum
|
|
191
|
+
|
|
192
|
+
TaggedSymbol =
|
|
193
|
+
T.type_alias do
|
|
194
|
+
T.all(
|
|
195
|
+
Symbol,
|
|
196
|
+
Dodopayments::Models::PaymentListResponse::PaymentProvider
|
|
197
|
+
)
|
|
198
|
+
end
|
|
199
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
200
|
+
|
|
201
|
+
STRIPE =
|
|
202
|
+
T.let(
|
|
203
|
+
:stripe,
|
|
204
|
+
Dodopayments::Models::PaymentListResponse::PaymentProvider::TaggedSymbol
|
|
205
|
+
)
|
|
206
|
+
ADYEN =
|
|
207
|
+
T.let(
|
|
208
|
+
:adyen,
|
|
209
|
+
Dodopayments::Models::PaymentListResponse::PaymentProvider::TaggedSymbol
|
|
210
|
+
)
|
|
211
|
+
DODO =
|
|
212
|
+
T.let(
|
|
213
|
+
:dodo,
|
|
214
|
+
Dodopayments::Models::PaymentListResponse::PaymentProvider::TaggedSymbol
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
sig do
|
|
218
|
+
override.returns(
|
|
219
|
+
T::Array[
|
|
220
|
+
Dodopayments::Models::PaymentListResponse::PaymentProvider::TaggedSymbol
|
|
221
|
+
]
|
|
222
|
+
)
|
|
223
|
+
end
|
|
224
|
+
def self.values
|
|
225
|
+
end
|
|
226
|
+
end
|
|
151
227
|
end
|
|
152
228
|
end
|
|
153
229
|
end
|
|
@@ -26,8 +26,8 @@ module Dodopayments
|
|
|
26
26
|
sig { returns(String) }
|
|
27
27
|
attr_accessor :event_type
|
|
28
28
|
|
|
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
|
sig { returns(Integer) }
|
|
32
32
|
attr_accessor :original_amount
|
|
33
33
|
|
|
@@ -35,8 +35,9 @@ module Dodopayments
|
|
|
35
35
|
sig { returns(String) }
|
|
36
36
|
attr_accessor :original_currency
|
|
37
37
|
|
|
38
|
-
# Amount in the payout's currency
|
|
39
|
-
# rounding to ensure sum matches
|
|
38
|
+
# Amount in the payout's currency, in that currency's smallest unit (cents for
|
|
39
|
+
# USD, yen for JPY, fils for KWD). Uses cumulative rounding to ensure sum matches
|
|
40
|
+
# payout total exactly.
|
|
40
41
|
sig { returns(Integer) }
|
|
41
42
|
attr_accessor :payout_currency_amount
|
|
42
43
|
|
|
@@ -75,13 +76,14 @@ module Dodopayments
|
|
|
75
76
|
# The type of balance ledger event (e.g., "payment", "refund", "dispute",
|
|
76
77
|
# "payment_fees").
|
|
77
78
|
event_type:,
|
|
78
|
-
# Original amount in the original currency
|
|
79
|
-
# cents).
|
|
79
|
+
# Original amount in the original currency, in that currency's smallest unit
|
|
80
|
+
# (cents for USD, yen for JPY, fils for KWD).
|
|
80
81
|
original_amount:,
|
|
81
82
|
# Original currency as ISO 4217 code (e.g., "USD", "EUR").
|
|
82
83
|
original_currency:,
|
|
83
|
-
# Amount in the payout's currency
|
|
84
|
-
# rounding to ensure sum matches
|
|
84
|
+
# Amount in the payout's currency, in that currency's smallest unit (cents for
|
|
85
|
+
# USD, yen for JPY, fils for KWD). Uses cumulative rounding to ensure sum matches
|
|
86
|
+
# payout total exactly.
|
|
85
87
|
payout_currency_amount:,
|
|
86
88
|
# USD equivalent of the original amount (in cents).
|
|
87
89
|
usd_equivalent_amount:,
|
|
@@ -17,8 +17,8 @@ module Dodopayments
|
|
|
17
17
|
sig { returns(String) }
|
|
18
18
|
attr_accessor :event_type
|
|
19
19
|
|
|
20
|
-
# Total amount for this event type in the payout's currency
|
|
21
|
-
# unit,
|
|
20
|
+
# Total amount for this event type in the payout's currency, in that currency's
|
|
21
|
+
# smallest unit (cents for USD, yen for JPY, fils for KWD).
|
|
22
22
|
sig { returns(Integer) }
|
|
23
23
|
attr_accessor :total
|
|
24
24
|
|
|
@@ -30,8 +30,8 @@ module Dodopayments
|
|
|
30
30
|
# The type of balance ledger event (e.g., "payment", "refund", "dispute",
|
|
31
31
|
# "payment_fees").
|
|
32
32
|
event_type:,
|
|
33
|
-
# Total amount for this event type in the payout's currency
|
|
34
|
-
# unit,
|
|
33
|
+
# Total amount for this event type in the payout's currency, in that currency's
|
|
34
|
+
# smallest unit (cents for USD, yen for JPY, fils for KWD).
|
|
35
35
|
total:
|
|
36
36
|
)
|
|
37
37
|
end
|