dodopayments 2.30.0 → 2.31.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_flags.rb +4 -2
- data/lib/dodopayments/models/checkout_session_request.rb +14 -4
- data/lib/dodopayments/models/customers/email_policies.rb +3 -2
- data/lib/dodopayments/models/refund.rb +22 -1
- data/lib/dodopayments/models/refund_list_item.rb +22 -1
- data/lib/dodopayments/models/refund_network_reference_type.rb +19 -0
- data/lib/dodopayments/models/subscription.rb +10 -1
- data/lib/dodopayments/models/subscription_cancelled_by.rb +54 -0
- data/lib/dodopayments/models/subscription_list_response.rb +10 -1
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +18 -7
- data/lib/dodopayments/models.rb +4 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +4 -4
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +2 -0
- data/rbi/dodopayments/models/checkout_session_flags.rbi +8 -4
- data/rbi/dodopayments/models/checkout_session_request.rbi +25 -8
- data/rbi/dodopayments/models/customers/email_policies.rbi +4 -2
- data/rbi/dodopayments/models/refund.rbi +26 -0
- data/rbi/dodopayments/models/refund_list_item.rbi +26 -0
- data/rbi/dodopayments/models/refund_network_reference_type.rbi +41 -0
- data/rbi/dodopayments/models/subscription.rbi +18 -0
- data/rbi/dodopayments/models/subscription_cancelled_by.rbi +107 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +18 -0
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +24 -10
- data/rbi/dodopayments/models.rbi +4 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +24 -4
- data/sig/dodopayments/models/checkout_session_request.rbs +4 -6
- data/sig/dodopayments/models/refund.rbs +10 -0
- data/sig/dodopayments/models/refund_list_item.rbs +10 -0
- data/sig/dodopayments/models/refund_network_reference_type.rbs +20 -0
- data/sig/dodopayments/models/subscription.rbs +5 -0
- data/sig/dodopayments/models/subscription_cancelled_by.rbs +43 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +5 -0
- data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +5 -0
- data/sig/dodopayments/models.rbs +4 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -2
- metadata +8 -2
|
@@ -57,6 +57,20 @@ module Dodopayments
|
|
|
57
57
|
sig { returns(T.nilable(Dodopayments::Currency::TaggedSymbol)) }
|
|
58
58
|
attr_accessor :currency
|
|
59
59
|
|
|
60
|
+
# The reference number that the card network or the bank gives to the refund. The
|
|
61
|
+
# customer can give this number to their bank to trace the refund. It is null
|
|
62
|
+
# until the payment processor sends it.
|
|
63
|
+
sig { returns(T.nilable(String)) }
|
|
64
|
+
attr_accessor :network_reference
|
|
65
|
+
|
|
66
|
+
# The kind of `network_reference`: ARN, STAN or RRN.
|
|
67
|
+
sig do
|
|
68
|
+
returns(
|
|
69
|
+
T.nilable(Dodopayments::RefundNetworkReferenceType::TaggedSymbol)
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
attr_accessor :network_reference_type
|
|
73
|
+
|
|
60
74
|
# The reason provided for the refund, if any. Optional.
|
|
61
75
|
sig { returns(T.nilable(String)) }
|
|
62
76
|
attr_accessor :reason
|
|
@@ -74,6 +88,9 @@ module Dodopayments
|
|
|
74
88
|
status: Dodopayments::RefundStatus::OrSymbol,
|
|
75
89
|
amount: T.nilable(Integer),
|
|
76
90
|
currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
91
|
+
network_reference: T.nilable(String),
|
|
92
|
+
network_reference_type:
|
|
93
|
+
T.nilable(Dodopayments::RefundNetworkReferenceType::OrSymbol),
|
|
77
94
|
reason: T.nilable(String)
|
|
78
95
|
).returns(T.attached_class)
|
|
79
96
|
end
|
|
@@ -100,6 +117,12 @@ module Dodopayments
|
|
|
100
117
|
amount: nil,
|
|
101
118
|
# The currency of the refund, represented as an ISO 4217 currency code.
|
|
102
119
|
currency: nil,
|
|
120
|
+
# The reference number that the card network or the bank gives to the refund. The
|
|
121
|
+
# customer can give this number to their bank to trace the refund. It is null
|
|
122
|
+
# until the payment processor sends it.
|
|
123
|
+
network_reference: nil,
|
|
124
|
+
# The kind of `network_reference`: ARN, STAN or RRN.
|
|
125
|
+
network_reference_type: nil,
|
|
103
126
|
# The reason provided for the refund, if any. Optional.
|
|
104
127
|
reason: nil
|
|
105
128
|
)
|
|
@@ -119,6 +142,9 @@ module Dodopayments
|
|
|
119
142
|
status: Dodopayments::RefundStatus::TaggedSymbol,
|
|
120
143
|
amount: T.nilable(Integer),
|
|
121
144
|
currency: T.nilable(Dodopayments::Currency::TaggedSymbol),
|
|
145
|
+
network_reference: T.nilable(String),
|
|
146
|
+
network_reference_type:
|
|
147
|
+
T.nilable(Dodopayments::RefundNetworkReferenceType::TaggedSymbol),
|
|
122
148
|
reason: T.nilable(String)
|
|
123
149
|
}
|
|
124
150
|
)
|
|
@@ -40,6 +40,20 @@ module Dodopayments
|
|
|
40
40
|
sig { returns(T.nilable(Dodopayments::Currency::TaggedSymbol)) }
|
|
41
41
|
attr_accessor :currency
|
|
42
42
|
|
|
43
|
+
# The reference number that the card network or the bank gives to the refund. The
|
|
44
|
+
# customer can give this number to their bank to trace the refund. It is null
|
|
45
|
+
# until the payment processor sends it.
|
|
46
|
+
sig { returns(T.nilable(String)) }
|
|
47
|
+
attr_accessor :network_reference
|
|
48
|
+
|
|
49
|
+
# The kind of `network_reference`: ARN, STAN or RRN.
|
|
50
|
+
sig do
|
|
51
|
+
returns(
|
|
52
|
+
T.nilable(Dodopayments::RefundNetworkReferenceType::TaggedSymbol)
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
attr_accessor :network_reference_type
|
|
56
|
+
|
|
43
57
|
# The reason provided for the refund, if any. Optional.
|
|
44
58
|
sig { returns(T.nilable(String)) }
|
|
45
59
|
attr_accessor :reason
|
|
@@ -54,6 +68,9 @@ module Dodopayments
|
|
|
54
68
|
status: Dodopayments::RefundStatus::OrSymbol,
|
|
55
69
|
amount: T.nilable(Integer),
|
|
56
70
|
currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
71
|
+
network_reference: T.nilable(String),
|
|
72
|
+
network_reference_type:
|
|
73
|
+
T.nilable(Dodopayments::RefundNetworkReferenceType::OrSymbol),
|
|
57
74
|
reason: T.nilable(String)
|
|
58
75
|
).returns(T.attached_class)
|
|
59
76
|
end
|
|
@@ -74,6 +91,12 @@ module Dodopayments
|
|
|
74
91
|
amount: nil,
|
|
75
92
|
# The currency of the refund, represented as an ISO 4217 currency code.
|
|
76
93
|
currency: nil,
|
|
94
|
+
# The reference number that the card network or the bank gives to the refund. The
|
|
95
|
+
# customer can give this number to their bank to trace the refund. It is null
|
|
96
|
+
# until the payment processor sends it.
|
|
97
|
+
network_reference: nil,
|
|
98
|
+
# The kind of `network_reference`: ARN, STAN or RRN.
|
|
99
|
+
network_reference_type: nil,
|
|
77
100
|
# The reason provided for the refund, if any. Optional.
|
|
78
101
|
reason: nil
|
|
79
102
|
)
|
|
@@ -90,6 +113,9 @@ module Dodopayments
|
|
|
90
113
|
status: Dodopayments::RefundStatus::TaggedSymbol,
|
|
91
114
|
amount: T.nilable(Integer),
|
|
92
115
|
currency: T.nilable(Dodopayments::Currency::TaggedSymbol),
|
|
116
|
+
network_reference: T.nilable(String),
|
|
117
|
+
network_reference_type:
|
|
118
|
+
T.nilable(Dodopayments::RefundNetworkReferenceType::TaggedSymbol),
|
|
93
119
|
reason: T.nilable(String)
|
|
94
120
|
}
|
|
95
121
|
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# The kind of reference number that the card network or the bank gives to a
|
|
6
|
+
# refund.
|
|
7
|
+
module RefundNetworkReferenceType
|
|
8
|
+
extend Dodopayments::Internal::Type::Enum
|
|
9
|
+
|
|
10
|
+
TaggedSymbol =
|
|
11
|
+
T.type_alias { T.all(Symbol, Dodopayments::RefundNetworkReferenceType) }
|
|
12
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
13
|
+
|
|
14
|
+
ACQUIRER_REFERENCE_NUMBER =
|
|
15
|
+
T.let(
|
|
16
|
+
:acquirer_reference_number,
|
|
17
|
+
Dodopayments::RefundNetworkReferenceType::TaggedSymbol
|
|
18
|
+
)
|
|
19
|
+
SYSTEM_TRACE_AUDIT_NUMBER =
|
|
20
|
+
T.let(
|
|
21
|
+
:system_trace_audit_number,
|
|
22
|
+
Dodopayments::RefundNetworkReferenceType::TaggedSymbol
|
|
23
|
+
)
|
|
24
|
+
RETRIEVAL_REFERENCE_NUMBER =
|
|
25
|
+
T.let(
|
|
26
|
+
:retrieval_reference_number,
|
|
27
|
+
Dodopayments::RefundNetworkReferenceType::TaggedSymbol
|
|
28
|
+
)
|
|
29
|
+
OTHER =
|
|
30
|
+
T.let(:other, Dodopayments::RefundNetworkReferenceType::TaggedSymbol)
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
override.returns(
|
|
34
|
+
T::Array[Dodopayments::RefundNetworkReferenceType::TaggedSymbol]
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
def self.values
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -139,6 +139,18 @@ module Dodopayments
|
|
|
139
139
|
sig { returns(T.nilable(Time)) }
|
|
140
140
|
attr_accessor :cancelled_at
|
|
141
141
|
|
|
142
|
+
# The caller that cancelled the subscription or scheduled its cancel. `null` when
|
|
143
|
+
# no caller is known, for example when the system cancelled the subscription.
|
|
144
|
+
sig { returns(T.nilable(Dodopayments::SubscriptionCancelledBy)) }
|
|
145
|
+
attr_reader :cancelled_by
|
|
146
|
+
|
|
147
|
+
sig do
|
|
148
|
+
params(
|
|
149
|
+
cancelled_by: T.nilable(Dodopayments::SubscriptionCancelledBy::OrHash)
|
|
150
|
+
).void
|
|
151
|
+
end
|
|
152
|
+
attr_writer :cancelled_by
|
|
153
|
+
|
|
142
154
|
# Customer's responses to custom fields collected during checkout
|
|
143
155
|
sig { returns(T.nilable(T::Array[Dodopayments::CustomFieldResponse])) }
|
|
144
156
|
attr_accessor :custom_field_responses
|
|
@@ -229,6 +241,8 @@ module Dodopayments
|
|
|
229
241
|
cancellation_feedback:
|
|
230
242
|
T.nilable(Dodopayments::CancellationFeedback::OrSymbol),
|
|
231
243
|
cancelled_at: T.nilable(Time),
|
|
244
|
+
cancelled_by:
|
|
245
|
+
T.nilable(Dodopayments::SubscriptionCancelledBy::OrHash),
|
|
232
246
|
custom_field_responses:
|
|
233
247
|
T.nilable(T::Array[Dodopayments::CustomFieldResponse::OrHash]),
|
|
234
248
|
customer_business_name: T.nilable(String),
|
|
@@ -306,6 +320,9 @@ module Dodopayments
|
|
|
306
320
|
cancellation_feedback: nil,
|
|
307
321
|
# Cancelled timestamp if the subscription is cancelled
|
|
308
322
|
cancelled_at: nil,
|
|
323
|
+
# The caller that cancelled the subscription or scheduled its cancel. `null` when
|
|
324
|
+
# no caller is known, for example when the system cancelled the subscription.
|
|
325
|
+
cancelled_by: nil,
|
|
309
326
|
# Customer's responses to custom fields collected during checkout
|
|
310
327
|
custom_field_responses: nil,
|
|
311
328
|
# Business / legal name associated with the tax id (B2B). When set this is used on
|
|
@@ -372,6 +389,7 @@ module Dodopayments
|
|
|
372
389
|
cancellation_feedback:
|
|
373
390
|
T.nilable(Dodopayments::CancellationFeedback::TaggedSymbol),
|
|
374
391
|
cancelled_at: T.nilable(Time),
|
|
392
|
+
cancelled_by: T.nilable(Dodopayments::SubscriptionCancelledBy),
|
|
375
393
|
custom_field_responses:
|
|
376
394
|
T.nilable(T::Array[Dodopayments::CustomFieldResponse]),
|
|
377
395
|
customer_business_name: T.nilable(String),
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class SubscriptionCancelledBy < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Dodopayments::SubscriptionCancelledBy,
|
|
10
|
+
Dodopayments::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The kind of caller.
|
|
15
|
+
sig do
|
|
16
|
+
returns(Dodopayments::SubscriptionCancelledBy::ActorType::TaggedSymbol)
|
|
17
|
+
end
|
|
18
|
+
attr_accessor :actor_type
|
|
19
|
+
|
|
20
|
+
# Email of the customer or of the dashboard user. `null` for an API key or the
|
|
21
|
+
# Dodo Payments team.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_accessor :email
|
|
24
|
+
|
|
25
|
+
# Name of the customer or of the dashboard user. `null` for an API key or the Dodo
|
|
26
|
+
# Payments team.
|
|
27
|
+
sig { returns(T.nilable(String)) }
|
|
28
|
+
attr_accessor :name
|
|
29
|
+
|
|
30
|
+
# The caller that cancelled a subscription or scheduled its cancel.
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
actor_type:
|
|
34
|
+
Dodopayments::SubscriptionCancelledBy::ActorType::OrSymbol,
|
|
35
|
+
email: T.nilable(String),
|
|
36
|
+
name: T.nilable(String)
|
|
37
|
+
).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(
|
|
40
|
+
# The kind of caller.
|
|
41
|
+
actor_type:,
|
|
42
|
+
# Email of the customer or of the dashboard user. `null` for an API key or the
|
|
43
|
+
# Dodo Payments team.
|
|
44
|
+
email: nil,
|
|
45
|
+
# Name of the customer or of the dashboard user. `null` for an API key or the Dodo
|
|
46
|
+
# Payments team.
|
|
47
|
+
name: nil
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
sig do
|
|
52
|
+
override.returns(
|
|
53
|
+
{
|
|
54
|
+
actor_type:
|
|
55
|
+
Dodopayments::SubscriptionCancelledBy::ActorType::TaggedSymbol,
|
|
56
|
+
email: T.nilable(String),
|
|
57
|
+
name: T.nilable(String)
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
def to_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# The kind of caller.
|
|
65
|
+
module ActorType
|
|
66
|
+
extend Dodopayments::Internal::Type::Enum
|
|
67
|
+
|
|
68
|
+
TaggedSymbol =
|
|
69
|
+
T.type_alias do
|
|
70
|
+
T.all(Symbol, Dodopayments::SubscriptionCancelledBy::ActorType)
|
|
71
|
+
end
|
|
72
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
73
|
+
|
|
74
|
+
CUSTOMER =
|
|
75
|
+
T.let(
|
|
76
|
+
:customer,
|
|
77
|
+
Dodopayments::SubscriptionCancelledBy::ActorType::TaggedSymbol
|
|
78
|
+
)
|
|
79
|
+
MERCHANT_USER =
|
|
80
|
+
T.let(
|
|
81
|
+
:merchant_user,
|
|
82
|
+
Dodopayments::SubscriptionCancelledBy::ActorType::TaggedSymbol
|
|
83
|
+
)
|
|
84
|
+
API_KEY =
|
|
85
|
+
T.let(
|
|
86
|
+
:api_key,
|
|
87
|
+
Dodopayments::SubscriptionCancelledBy::ActorType::TaggedSymbol
|
|
88
|
+
)
|
|
89
|
+
DODO_TEAM =
|
|
90
|
+
T.let(
|
|
91
|
+
:dodo_team,
|
|
92
|
+
Dodopayments::SubscriptionCancelledBy::ActorType::TaggedSymbol
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
sig do
|
|
96
|
+
override.returns(
|
|
97
|
+
T::Array[
|
|
98
|
+
Dodopayments::SubscriptionCancelledBy::ActorType::TaggedSymbol
|
|
99
|
+
]
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
def self.values
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -118,6 +118,18 @@ module Dodopayments
|
|
|
118
118
|
sig { returns(T.nilable(Time)) }
|
|
119
119
|
attr_accessor :cancelled_at
|
|
120
120
|
|
|
121
|
+
# The caller that cancelled the subscription or scheduled its cancel. `null` when
|
|
122
|
+
# no caller is known, for example when the system cancelled the subscription.
|
|
123
|
+
sig { returns(T.nilable(Dodopayments::SubscriptionCancelledBy)) }
|
|
124
|
+
attr_reader :cancelled_by
|
|
125
|
+
|
|
126
|
+
sig do
|
|
127
|
+
params(
|
|
128
|
+
cancelled_by: T.nilable(Dodopayments::SubscriptionCancelledBy::OrHash)
|
|
129
|
+
).void
|
|
130
|
+
end
|
|
131
|
+
attr_writer :cancelled_by
|
|
132
|
+
|
|
121
133
|
# Business / legal name associated with the tax id (B2B). When set this is used on
|
|
122
134
|
# the invoice in place of the customer's personal name.
|
|
123
135
|
sig { returns(T.nilable(String)) }
|
|
@@ -194,6 +206,8 @@ module Dodopayments
|
|
|
194
206
|
tax_inclusive: T::Boolean,
|
|
195
207
|
trial_period_days: Integer,
|
|
196
208
|
cancelled_at: T.nilable(Time),
|
|
209
|
+
cancelled_by:
|
|
210
|
+
T.nilable(Dodopayments::SubscriptionCancelledBy::OrHash),
|
|
197
211
|
customer_business_name: T.nilable(String),
|
|
198
212
|
discount_cycles_remaining: T.nilable(Integer),
|
|
199
213
|
discount_id: T.nilable(String),
|
|
@@ -256,6 +270,9 @@ module Dodopayments
|
|
|
256
270
|
trial_period_days:,
|
|
257
271
|
# Cancelled timestamp if the subscription is cancelled
|
|
258
272
|
cancelled_at: nil,
|
|
273
|
+
# The caller that cancelled the subscription or scheduled its cancel. `null` when
|
|
274
|
+
# no caller is known, for example when the system cancelled the subscription.
|
|
275
|
+
cancelled_by: nil,
|
|
259
276
|
# Business / legal name associated with the tax id (B2B). When set this is used on
|
|
260
277
|
# the invoice in place of the customer's personal name.
|
|
261
278
|
customer_business_name: nil,
|
|
@@ -312,6 +329,7 @@ module Dodopayments
|
|
|
312
329
|
tax_inclusive: T::Boolean,
|
|
313
330
|
trial_period_days: Integer,
|
|
314
331
|
cancelled_at: T.nilable(Time),
|
|
332
|
+
cancelled_by: T.nilable(Dodopayments::SubscriptionCancelledBy),
|
|
315
333
|
customer_business_name: T.nilable(String),
|
|
316
334
|
discount_cycles_remaining: T.nilable(Integer),
|
|
317
335
|
discount_id: T.nilable(String),
|
|
@@ -477,14 +477,21 @@ module Dodopayments
|
|
|
477
477
|
sig { returns(Dodopayments::Currency::TaggedSymbol) }
|
|
478
478
|
attr_accessor :currency
|
|
479
479
|
|
|
480
|
-
# Net credit movement in the smallest
|
|
481
|
-
#
|
|
482
|
-
#
|
|
483
|
-
#
|
|
484
|
-
#
|
|
480
|
+
# Net credit movement in the smallest unit of `customer_credits_currency` (e.g.
|
|
481
|
+
# cents). Read `customer_credits_currency` for the currency. It can differ from
|
|
482
|
+
# `currency`. **Negative** – credits were deducted from the customer's balance to
|
|
483
|
+
# offset the charge (typical on upgrades). **Positive** – credits were added to
|
|
484
|
+
# the customer's balance, either from a downgrade proration refund or from
|
|
485
|
+
# topping-up the wallet to meet a gateway minimum-charge threshold. **Zero** – no
|
|
486
|
+
# credit movement occurred.
|
|
485
487
|
sig { returns(Integer) }
|
|
486
488
|
attr_accessor :customer_credits
|
|
487
489
|
|
|
490
|
+
# This field gives the currency of `customer_credits`. The credit wallet uses the
|
|
491
|
+
# subscription currency.
|
|
492
|
+
sig { returns(Dodopayments::Currency::TaggedSymbol) }
|
|
493
|
+
attr_accessor :customer_credits_currency
|
|
494
|
+
|
|
488
495
|
sig { returns(Integer) }
|
|
489
496
|
attr_accessor :settlement_amount
|
|
490
497
|
|
|
@@ -504,6 +511,7 @@ module Dodopayments
|
|
|
504
511
|
params(
|
|
505
512
|
currency: Dodopayments::Currency::OrSymbol,
|
|
506
513
|
customer_credits: Integer,
|
|
514
|
+
customer_credits_currency: Dodopayments::Currency::OrSymbol,
|
|
507
515
|
settlement_amount: Integer,
|
|
508
516
|
settlement_currency: Dodopayments::Currency::OrSymbol,
|
|
509
517
|
total_amount: Integer,
|
|
@@ -513,12 +521,17 @@ module Dodopayments
|
|
|
513
521
|
end
|
|
514
522
|
def self.new(
|
|
515
523
|
currency:,
|
|
516
|
-
# Net credit movement in the smallest
|
|
517
|
-
#
|
|
518
|
-
#
|
|
519
|
-
#
|
|
520
|
-
#
|
|
524
|
+
# Net credit movement in the smallest unit of `customer_credits_currency` (e.g.
|
|
525
|
+
# cents). Read `customer_credits_currency` for the currency. It can differ from
|
|
526
|
+
# `currency`. **Negative** – credits were deducted from the customer's balance to
|
|
527
|
+
# offset the charge (typical on upgrades). **Positive** – credits were added to
|
|
528
|
+
# the customer's balance, either from a downgrade proration refund or from
|
|
529
|
+
# topping-up the wallet to meet a gateway minimum-charge threshold. **Zero** – no
|
|
530
|
+
# credit movement occurred.
|
|
521
531
|
customer_credits:,
|
|
532
|
+
# This field gives the currency of `customer_credits`. The credit wallet uses the
|
|
533
|
+
# subscription currency.
|
|
534
|
+
customer_credits_currency:,
|
|
522
535
|
settlement_amount:,
|
|
523
536
|
settlement_currency:,
|
|
524
537
|
total_amount:,
|
|
@@ -532,6 +545,7 @@ module Dodopayments
|
|
|
532
545
|
{
|
|
533
546
|
currency: Dodopayments::Currency::TaggedSymbol,
|
|
534
547
|
customer_credits: Integer,
|
|
548
|
+
customer_credits_currency: Dodopayments::Currency::TaggedSymbol,
|
|
535
549
|
settlement_amount: Integer,
|
|
536
550
|
settlement_currency: Dodopayments::Currency::TaggedSymbol,
|
|
537
551
|
total_amount: Integer,
|
data/rbi/dodopayments/models.rbi
CHANGED
|
@@ -484,6 +484,8 @@ module Dodopayments
|
|
|
484
484
|
|
|
485
485
|
RefundListParams = Dodopayments::Models::RefundListParams
|
|
486
486
|
|
|
487
|
+
RefundNetworkReferenceType = Dodopayments::Models::RefundNetworkReferenceType
|
|
488
|
+
|
|
487
489
|
RefundRetrieveParams = Dodopayments::Models::RefundRetrieveParams
|
|
488
490
|
|
|
489
491
|
RefundStatus = Dodopayments::Models::RefundStatus
|
|
@@ -501,6 +503,8 @@ module Dodopayments
|
|
|
501
503
|
SubscriptionCancelChangePlanParams =
|
|
502
504
|
Dodopayments::Models::SubscriptionCancelChangePlanParams
|
|
503
505
|
|
|
506
|
+
SubscriptionCancelledBy = Dodopayments::Models::SubscriptionCancelledBy
|
|
507
|
+
|
|
504
508
|
SubscriptionCancelledWebhookEvent =
|
|
505
509
|
Dodopayments::Models::SubscriptionCancelledWebhookEvent
|
|
506
510
|
|
|
@@ -30,7 +30,7 @@ module Dodopayments
|
|
|
30
30
|
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
31
31
|
metadata:
|
|
32
32
|
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
|
|
33
|
-
minimal_address: T::Boolean,
|
|
33
|
+
minimal_address: T.nilable(T::Boolean),
|
|
34
34
|
payment_method_id: T.nilable(String),
|
|
35
35
|
product_collection_id: T.nilable(String),
|
|
36
36
|
return_url: T.nilable(String),
|
|
@@ -55,7 +55,14 @@ module Dodopayments
|
|
|
55
55
|
allowed_payment_method_types: nil,
|
|
56
56
|
# Billing address information for the session
|
|
57
57
|
billing_address: nil,
|
|
58
|
-
#
|
|
58
|
+
# The currency to charge the customer in.
|
|
59
|
+
#
|
|
60
|
+
# Adaptive pricing must be enabled for the business. The customer then pays in
|
|
61
|
+
# this currency. If you do not set it, the currency comes from the billing
|
|
62
|
+
# country.
|
|
63
|
+
#
|
|
64
|
+
# If adaptive pricing is disabled, the API discards this field. The currency then
|
|
65
|
+
# comes from the product price, or from the billing country.
|
|
59
66
|
billing_currency: nil,
|
|
60
67
|
# The URL to redirect the customer if they cancel or go back from the checkout. If
|
|
61
68
|
# not provided, the back button will not be displayed.
|
|
@@ -94,6 +101,9 @@ module Dodopayments
|
|
|
94
101
|
metadata: nil,
|
|
95
102
|
# If true, only zipcode is required when confirm is true; other address fields
|
|
96
103
|
# remain optional
|
|
104
|
+
#
|
|
105
|
+
# Default is true when `feature_flags.single_page` is true. Otherwise, default is
|
|
106
|
+
# false.
|
|
97
107
|
minimal_address: nil,
|
|
98
108
|
# Optional payment method ID to use for this checkout session. Only allowed when
|
|
99
109
|
# `confirm` is true. If provided, existing customer id must also be provided.
|
|
@@ -154,7 +164,7 @@ module Dodopayments
|
|
|
154
164
|
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
155
165
|
metadata:
|
|
156
166
|
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
|
|
157
|
-
minimal_address: T::Boolean,
|
|
167
|
+
minimal_address: T.nilable(T::Boolean),
|
|
158
168
|
payment_method_id: T.nilable(String),
|
|
159
169
|
product_collection_id: T.nilable(String),
|
|
160
170
|
return_url: T.nilable(String),
|
|
@@ -179,7 +189,14 @@ module Dodopayments
|
|
|
179
189
|
allowed_payment_method_types: nil,
|
|
180
190
|
# Billing address information for the session
|
|
181
191
|
billing_address: nil,
|
|
182
|
-
#
|
|
192
|
+
# The currency to charge the customer in.
|
|
193
|
+
#
|
|
194
|
+
# Adaptive pricing must be enabled for the business. The customer then pays in
|
|
195
|
+
# this currency. If you do not set it, the currency comes from the billing
|
|
196
|
+
# country.
|
|
197
|
+
#
|
|
198
|
+
# If adaptive pricing is disabled, the API discards this field. The currency then
|
|
199
|
+
# comes from the product price, or from the billing country.
|
|
183
200
|
billing_currency: nil,
|
|
184
201
|
# The URL to redirect the customer if they cancel or go back from the checkout. If
|
|
185
202
|
# not provided, the back button will not be displayed.
|
|
@@ -218,6 +235,9 @@ module Dodopayments
|
|
|
218
235
|
metadata: nil,
|
|
219
236
|
# If true, only zipcode is required when confirm is true; other address fields
|
|
220
237
|
# remain optional
|
|
238
|
+
#
|
|
239
|
+
# Default is true when `feature_flags.single_page` is true. Otherwise, default is
|
|
240
|
+
# false.
|
|
221
241
|
minimal_address: nil,
|
|
222
242
|
# Optional payment method ID to use for this checkout session. Only allowed when
|
|
223
243
|
# `confirm` is true. If provided, existing customer id must also be provided.
|
|
@@ -18,7 +18,7 @@ module Dodopayments
|
|
|
18
18
|
:force_3ds => bool?,
|
|
19
19
|
mandate_min_amount_inr_paise: Integer?,
|
|
20
20
|
metadata: Dodopayments::Models::metadata?,
|
|
21
|
-
minimal_address: bool
|
|
21
|
+
minimal_address: bool?,
|
|
22
22
|
payment_method_id: String?,
|
|
23
23
|
product_collection_id: String?,
|
|
24
24
|
return_url: String?,
|
|
@@ -71,9 +71,7 @@ module Dodopayments
|
|
|
71
71
|
|
|
72
72
|
attr_accessor metadata: Dodopayments::Models::metadata?
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def minimal_address=: (bool) -> bool
|
|
74
|
+
attr_accessor minimal_address: bool?
|
|
77
75
|
|
|
78
76
|
attr_accessor payment_method_id: String?
|
|
79
77
|
|
|
@@ -110,7 +108,7 @@ module Dodopayments
|
|
|
110
108
|
?force_3ds: bool?,
|
|
111
109
|
?mandate_min_amount_inr_paise: Integer?,
|
|
112
110
|
?metadata: Dodopayments::Models::metadata?,
|
|
113
|
-
?minimal_address: bool
|
|
111
|
+
?minimal_address: bool?,
|
|
114
112
|
?payment_method_id: String?,
|
|
115
113
|
?product_collection_id: String?,
|
|
116
114
|
?return_url: String?,
|
|
@@ -137,7 +135,7 @@ module Dodopayments
|
|
|
137
135
|
:force_3ds => bool?,
|
|
138
136
|
mandate_min_amount_inr_paise: Integer?,
|
|
139
137
|
metadata: Dodopayments::Models::metadata?,
|
|
140
|
-
minimal_address: bool
|
|
138
|
+
minimal_address: bool?,
|
|
141
139
|
payment_method_id: String?,
|
|
142
140
|
product_collection_id: String?,
|
|
143
141
|
return_url: String?,
|
|
@@ -13,6 +13,8 @@ module Dodopayments
|
|
|
13
13
|
status: Dodopayments::Models::refund_status,
|
|
14
14
|
amount: Integer?,
|
|
15
15
|
currency: Dodopayments::Models::currency?,
|
|
16
|
+
network_reference: String?,
|
|
17
|
+
network_reference_type: Dodopayments::Models::refund_network_reference_type?,
|
|
16
18
|
reason: String?
|
|
17
19
|
}
|
|
18
20
|
|
|
@@ -39,6 +41,10 @@ module Dodopayments
|
|
|
39
41
|
|
|
40
42
|
attr_accessor currency: Dodopayments::Models::currency?
|
|
41
43
|
|
|
44
|
+
attr_accessor network_reference: String?
|
|
45
|
+
|
|
46
|
+
attr_accessor network_reference_type: Dodopayments::Models::refund_network_reference_type?
|
|
47
|
+
|
|
42
48
|
attr_accessor reason: String?
|
|
43
49
|
|
|
44
50
|
def initialize: (
|
|
@@ -53,6 +59,8 @@ module Dodopayments
|
|
|
53
59
|
status: Dodopayments::Models::refund_status,
|
|
54
60
|
?amount: Integer?,
|
|
55
61
|
?currency: Dodopayments::Models::currency?,
|
|
62
|
+
?network_reference: String?,
|
|
63
|
+
?network_reference_type: Dodopayments::Models::refund_network_reference_type?,
|
|
56
64
|
?reason: String?
|
|
57
65
|
) -> void
|
|
58
66
|
|
|
@@ -68,6 +76,8 @@ module Dodopayments
|
|
|
68
76
|
status: Dodopayments::Models::refund_status,
|
|
69
77
|
amount: Integer?,
|
|
70
78
|
currency: Dodopayments::Models::currency?,
|
|
79
|
+
network_reference: String?,
|
|
80
|
+
network_reference_type: Dodopayments::Models::refund_network_reference_type?,
|
|
71
81
|
reason: String?
|
|
72
82
|
}
|
|
73
83
|
end
|
|
@@ -10,6 +10,8 @@ module Dodopayments
|
|
|
10
10
|
status: Dodopayments::Models::refund_status,
|
|
11
11
|
amount: Integer?,
|
|
12
12
|
currency: Dodopayments::Models::currency?,
|
|
13
|
+
network_reference: String?,
|
|
14
|
+
network_reference_type: Dodopayments::Models::refund_network_reference_type?,
|
|
13
15
|
reason: String?
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -30,6 +32,10 @@ module Dodopayments
|
|
|
30
32
|
|
|
31
33
|
attr_accessor currency: Dodopayments::Models::currency?
|
|
32
34
|
|
|
35
|
+
attr_accessor network_reference: String?
|
|
36
|
+
|
|
37
|
+
attr_accessor network_reference_type: Dodopayments::Models::refund_network_reference_type?
|
|
38
|
+
|
|
33
39
|
attr_accessor reason: String?
|
|
34
40
|
|
|
35
41
|
def initialize: (
|
|
@@ -41,6 +47,8 @@ module Dodopayments
|
|
|
41
47
|
status: Dodopayments::Models::refund_status,
|
|
42
48
|
?amount: Integer?,
|
|
43
49
|
?currency: Dodopayments::Models::currency?,
|
|
50
|
+
?network_reference: String?,
|
|
51
|
+
?network_reference_type: Dodopayments::Models::refund_network_reference_type?,
|
|
44
52
|
?reason: String?
|
|
45
53
|
) -> void
|
|
46
54
|
|
|
@@ -53,6 +61,8 @@ module Dodopayments
|
|
|
53
61
|
status: Dodopayments::Models::refund_status,
|
|
54
62
|
amount: Integer?,
|
|
55
63
|
currency: Dodopayments::Models::currency?,
|
|
64
|
+
network_reference: String?,
|
|
65
|
+
network_reference_type: Dodopayments::Models::refund_network_reference_type?,
|
|
56
66
|
reason: String?
|
|
57
67
|
}
|
|
58
68
|
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type refund_network_reference_type =
|
|
4
|
+
:acquirer_reference_number
|
|
5
|
+
| :system_trace_audit_number
|
|
6
|
+
| :retrieval_reference_number
|
|
7
|
+
| :other
|
|
8
|
+
|
|
9
|
+
module RefundNetworkReferenceType
|
|
10
|
+
extend Dodopayments::Internal::Type::Enum
|
|
11
|
+
|
|
12
|
+
ACQUIRER_REFERENCE_NUMBER: :acquirer_reference_number
|
|
13
|
+
SYSTEM_TRACE_AUDIT_NUMBER: :system_trace_audit_number
|
|
14
|
+
RETRIEVAL_REFERENCE_NUMBER: :retrieval_reference_number
|
|
15
|
+
OTHER: :other
|
|
16
|
+
|
|
17
|
+
def self?.values: -> ::Array[Dodopayments::Models::refund_network_reference_type]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -31,6 +31,7 @@ module Dodopayments
|
|
|
31
31
|
cancellation_comment: String?,
|
|
32
32
|
cancellation_feedback: Dodopayments::Models::cancellation_feedback?,
|
|
33
33
|
cancelled_at: Time?,
|
|
34
|
+
cancelled_by: Dodopayments::SubscriptionCancelledBy?,
|
|
34
35
|
custom_field_responses: ::Array[Dodopayments::CustomFieldResponse]?,
|
|
35
36
|
customer_business_name: String?,
|
|
36
37
|
discount_cycles_remaining: Integer?,
|
|
@@ -103,6 +104,8 @@ module Dodopayments
|
|
|
103
104
|
|
|
104
105
|
attr_accessor cancelled_at: Time?
|
|
105
106
|
|
|
107
|
+
attr_accessor cancelled_by: Dodopayments::SubscriptionCancelledBy?
|
|
108
|
+
|
|
106
109
|
attr_accessor custom_field_responses: ::Array[Dodopayments::CustomFieldResponse]?
|
|
107
110
|
|
|
108
111
|
attr_accessor customer_business_name: String?
|
|
@@ -155,6 +158,7 @@ module Dodopayments
|
|
|
155
158
|
?cancellation_comment: String?,
|
|
156
159
|
?cancellation_feedback: Dodopayments::Models::cancellation_feedback?,
|
|
157
160
|
?cancelled_at: Time?,
|
|
161
|
+
?cancelled_by: Dodopayments::SubscriptionCancelledBy?,
|
|
158
162
|
?custom_field_responses: ::Array[Dodopayments::CustomFieldResponse]?,
|
|
159
163
|
?customer_business_name: String?,
|
|
160
164
|
?discount_cycles_remaining: Integer?,
|
|
@@ -198,6 +202,7 @@ module Dodopayments
|
|
|
198
202
|
cancellation_comment: String?,
|
|
199
203
|
cancellation_feedback: Dodopayments::Models::cancellation_feedback?,
|
|
200
204
|
cancelled_at: Time?,
|
|
205
|
+
cancelled_by: Dodopayments::SubscriptionCancelledBy?,
|
|
201
206
|
custom_field_responses: ::Array[Dodopayments::CustomFieldResponse]?,
|
|
202
207
|
customer_business_name: String?,
|
|
203
208
|
discount_cycles_remaining: Integer?,
|