dodopayments 2.20.1 → 2.22.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 +16 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/checkout_session_preview_response.rb +30 -4
- data/lib/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rb +4 -2
- data/lib/dodopayments/models/discount.rb +95 -3
- data/lib/dodopayments/models/discount_create_params.rb +110 -3
- data/lib/dodopayments/models/discount_list_params.rb +7 -2
- data/lib/dodopayments/models/discount_type.rb +1 -0
- data/lib/dodopayments/models/discount_update_params.rb +108 -3
- data/lib/dodopayments/models/payment.rb +4 -2
- data/lib/dodopayments/models/payment_list_params.rb +169 -3
- data/lib/dodopayments/models/payment_method_types.rb +0 -1
- data/lib/dodopayments/models/payout_created_webhook_event.rb +188 -0
- data/lib/dodopayments/models/payout_failed_webhook_event.rb +188 -0
- data/lib/dodopayments/models/payout_in_progress_webhook_event.rb +188 -0
- data/lib/dodopayments/models/payout_on_hold_webhook_event.rb +188 -0
- data/lib/dodopayments/models/payout_success_webhook_event.rb +188 -0
- data/lib/dodopayments/models/price.rb +19 -1
- data/lib/dodopayments/models/subscription.rb +11 -1
- data/lib/dodopayments/models/subscription_create_response.rb +10 -1
- data/lib/dodopayments/models/subscription_list_response.rb +11 -1
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +11 -1
- data/lib/dodopayments/models/unwrap_webhook_event.rb +11 -1
- data/lib/dodopayments/models/webhook_event_type.rb +1 -1
- data/lib/dodopayments/models/webhook_payload.rb +160 -3
- data/lib/dodopayments/models.rb +10 -0
- data/lib/dodopayments/resources/credit_entitlements/balances.rb +1 -1
- data/lib/dodopayments/resources/discounts.rb +24 -5
- data/lib/dodopayments/resources/payments.rb +7 -2
- data/lib/dodopayments/resources/webhooks.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +5 -0
- data/rbi/dodopayments/models/checkout_session_preview_response.rbi +33 -5
- data/rbi/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rbi +6 -2
- data/rbi/dodopayments/models/discount.rbi +151 -2
- data/rbi/dodopayments/models/discount_create_params.rbi +197 -2
- data/rbi/dodopayments/models/discount_list_params.rbi +6 -2
- data/rbi/dodopayments/models/discount_type.rbi +1 -0
- data/rbi/dodopayments/models/discount_update_params.rbi +193 -2
- data/rbi/dodopayments/models/payment.rbi +6 -2
- data/rbi/dodopayments/models/payment_list_params.rbi +331 -2
- data/rbi/dodopayments/models/payment_method_types.rbi +0 -1
- data/rbi/dodopayments/models/payout_created_webhook_event.rbi +270 -0
- data/rbi/dodopayments/models/payout_failed_webhook_event.rbi +270 -0
- data/rbi/dodopayments/models/payout_in_progress_webhook_event.rbi +272 -0
- data/rbi/dodopayments/models/payout_on_hold_webhook_event.rbi +270 -0
- data/rbi/dodopayments/models/payout_success_webhook_event.rbi +270 -0
- data/rbi/dodopayments/models/price.rbi +20 -0
- data/rbi/dodopayments/models/subscription.rbi +15 -3
- data/rbi/dodopayments/models/subscription_create_response.rbi +13 -3
- data/rbi/dodopayments/models/subscription_list_response.rbi +15 -3
- data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/unwrap_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/webhook_event_type.rbi +2 -5
- data/rbi/dodopayments/models/webhook_payload.rbi +213 -0
- data/rbi/dodopayments/models.rbi +11 -0
- data/rbi/dodopayments/resources/credit_entitlements/balances.rbi +3 -1
- data/rbi/dodopayments/resources/discounts.rbi +57 -3
- data/rbi/dodopayments/resources/payments.rbi +5 -1
- data/rbi/dodopayments/resources/webhooks.rbi +10 -0
- data/sig/dodopayments/models/checkout_session_preview_response.rbs +13 -3
- data/sig/dodopayments/models/discount.rbs +69 -0
- data/sig/dodopayments/models/discount_create_params.rbs +69 -0
- data/sig/dodopayments/models/discount_type.rbs +2 -1
- data/sig/dodopayments/models/discount_update_params.rbs +69 -0
- data/sig/dodopayments/models/payment_list_params.rbs +308 -0
- data/sig/dodopayments/models/payment_method_types.rbs +0 -2
- data/sig/dodopayments/models/payout_created_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/payout_failed_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/payout_in_progress_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/payout_on_hold_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/payout_success_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/price.rbs +10 -0
- data/sig/dodopayments/models/subscription.rbs +8 -3
- data/sig/dodopayments/models/subscription_create_response.rbs +8 -3
- data/sig/dodopayments/models/subscription_list_response.rbs +8 -3
- data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/unwrap_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -2
- data/sig/dodopayments/models/webhook_payload.rbs +108 -0
- data/sig/dodopayments/models.rbs +10 -0
- data/sig/dodopayments/resources/discounts.rbs +8 -0
- data/sig/dodopayments/resources/payments.rbs +1 -0
- data/sig/dodopayments/resources/webhooks.rbs +10 -0
- metadata +17 -2
|
@@ -184,7 +184,9 @@ module Dodopayments
|
|
|
184
184
|
optional :error_code, String, nil?: true
|
|
185
185
|
|
|
186
186
|
# @!attribute error_message
|
|
187
|
-
# An error message if the payment failed
|
|
187
|
+
# An error message if the payment failed. When `error_code` is a recognised
|
|
188
|
+
# unified code, this is the merchant-facing headline + recommended action (Payment
|
|
189
|
+
# Details copy) rather than the raw connector text.
|
|
188
190
|
#
|
|
189
191
|
# @return [String, nil]
|
|
190
192
|
optional :error_message, String, nil?: true
|
|
@@ -331,7 +333,7 @@ module Dodopayments
|
|
|
331
333
|
#
|
|
332
334
|
# @param error_code [String, nil] An error code if the payment failed
|
|
333
335
|
#
|
|
334
|
-
# @param error_message [String, nil] An error message if the payment failed
|
|
336
|
+
# @param error_message [String, nil] An error message if the payment failed. When `error_code` is a recognised
|
|
335
337
|
#
|
|
336
338
|
# @param invoice_id [String, nil] Invoice ID for this payment. Uses India-specific invoice ID if available.
|
|
337
339
|
#
|
|
@@ -25,6 +25,12 @@ module Dodopayments
|
|
|
25
25
|
# @return [Time, nil]
|
|
26
26
|
optional :created_at_lte, Time
|
|
27
27
|
|
|
28
|
+
# @!attribute currency
|
|
29
|
+
# Filter by currency
|
|
30
|
+
#
|
|
31
|
+
# @return [Symbol, Dodopayments::Models::PaymentListParams::Currency, nil]
|
|
32
|
+
optional :currency, enum: -> { Dodopayments::PaymentListParams::Currency }
|
|
33
|
+
|
|
28
34
|
# @!attribute customer_id
|
|
29
35
|
# Filter by customer id
|
|
30
36
|
#
|
|
@@ -32,7 +38,8 @@ module Dodopayments
|
|
|
32
38
|
optional :customer_id, String
|
|
33
39
|
|
|
34
40
|
# @!attribute page_number
|
|
35
|
-
# Page number default is 0
|
|
41
|
+
# Page number default is 0. Capped to bound OFFSET-based deep pagination, which
|
|
42
|
+
# forces Postgres to scan and discard every preceding row.
|
|
36
43
|
#
|
|
37
44
|
# @return [Integer, nil]
|
|
38
45
|
optional :page_number, Integer
|
|
@@ -61,16 +68,21 @@ module Dodopayments
|
|
|
61
68
|
# @return [String, nil]
|
|
62
69
|
optional :subscription_id, String
|
|
63
70
|
|
|
64
|
-
# @!method initialize(brand_id: nil, created_at_gte: nil, created_at_lte: nil, customer_id: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, subscription_id: nil, request_options: {})
|
|
71
|
+
# @!method initialize(brand_id: nil, created_at_gte: nil, created_at_lte: nil, currency: nil, customer_id: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, subscription_id: nil, request_options: {})
|
|
72
|
+
# Some parameter documentations has been truncated, see
|
|
73
|
+
# {Dodopayments::Models::PaymentListParams} for more details.
|
|
74
|
+
#
|
|
65
75
|
# @param brand_id [String] filter by Brand id
|
|
66
76
|
#
|
|
67
77
|
# @param created_at_gte [Time] Get events after this created time
|
|
68
78
|
#
|
|
69
79
|
# @param created_at_lte [Time] Get events created before this time
|
|
70
80
|
#
|
|
81
|
+
# @param currency [Symbol, Dodopayments::Models::PaymentListParams::Currency] Filter by currency
|
|
82
|
+
#
|
|
71
83
|
# @param customer_id [String] Filter by customer id
|
|
72
84
|
#
|
|
73
|
-
# @param page_number [Integer] Page number default is 0
|
|
85
|
+
# @param page_number [Integer] Page number default is 0. Capped to bound OFFSET-based deep pagination,
|
|
74
86
|
#
|
|
75
87
|
# @param page_size [Integer] Page size default is 10 max is 100
|
|
76
88
|
#
|
|
@@ -82,6 +94,160 @@ module Dodopayments
|
|
|
82
94
|
#
|
|
83
95
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
84
96
|
|
|
97
|
+
# Filter by currency
|
|
98
|
+
module Currency
|
|
99
|
+
extend Dodopayments::Internal::Type::Enum
|
|
100
|
+
|
|
101
|
+
AED = :AED
|
|
102
|
+
ALL = :ALL
|
|
103
|
+
AMD = :AMD
|
|
104
|
+
ANG = :ANG
|
|
105
|
+
AOA = :AOA
|
|
106
|
+
ARS = :ARS
|
|
107
|
+
AUD = :AUD
|
|
108
|
+
AWG = :AWG
|
|
109
|
+
AZN = :AZN
|
|
110
|
+
BAM = :BAM
|
|
111
|
+
BBD = :BBD
|
|
112
|
+
BDT = :BDT
|
|
113
|
+
BGN = :BGN
|
|
114
|
+
BHD = :BHD
|
|
115
|
+
BIF = :BIF
|
|
116
|
+
BMD = :BMD
|
|
117
|
+
BND = :BND
|
|
118
|
+
BOB = :BOB
|
|
119
|
+
BRL = :BRL
|
|
120
|
+
BSD = :BSD
|
|
121
|
+
BWP = :BWP
|
|
122
|
+
BYN = :BYN
|
|
123
|
+
BZD = :BZD
|
|
124
|
+
CAD = :CAD
|
|
125
|
+
CHF = :CHF
|
|
126
|
+
CLP = :CLP
|
|
127
|
+
CNY = :CNY
|
|
128
|
+
COP = :COP
|
|
129
|
+
CRC = :CRC
|
|
130
|
+
CUP = :CUP
|
|
131
|
+
CVE = :CVE
|
|
132
|
+
CZK = :CZK
|
|
133
|
+
DJF = :DJF
|
|
134
|
+
DKK = :DKK
|
|
135
|
+
DOP = :DOP
|
|
136
|
+
DZD = :DZD
|
|
137
|
+
EGP = :EGP
|
|
138
|
+
ETB = :ETB
|
|
139
|
+
EUR = :EUR
|
|
140
|
+
FJD = :FJD
|
|
141
|
+
FKP = :FKP
|
|
142
|
+
GBP = :GBP
|
|
143
|
+
GEL = :GEL
|
|
144
|
+
GHS = :GHS
|
|
145
|
+
GIP = :GIP
|
|
146
|
+
GMD = :GMD
|
|
147
|
+
GNF = :GNF
|
|
148
|
+
GTQ = :GTQ
|
|
149
|
+
GYD = :GYD
|
|
150
|
+
HKD = :HKD
|
|
151
|
+
HNL = :HNL
|
|
152
|
+
HRK = :HRK
|
|
153
|
+
HTG = :HTG
|
|
154
|
+
HUF = :HUF
|
|
155
|
+
IDR = :IDR
|
|
156
|
+
ILS = :ILS
|
|
157
|
+
INR = :INR
|
|
158
|
+
IQD = :IQD
|
|
159
|
+
JMD = :JMD
|
|
160
|
+
JOD = :JOD
|
|
161
|
+
JPY = :JPY
|
|
162
|
+
KES = :KES
|
|
163
|
+
KGS = :KGS
|
|
164
|
+
KHR = :KHR
|
|
165
|
+
KMF = :KMF
|
|
166
|
+
KRW = :KRW
|
|
167
|
+
KWD = :KWD
|
|
168
|
+
KYD = :KYD
|
|
169
|
+
KZT = :KZT
|
|
170
|
+
LAK = :LAK
|
|
171
|
+
LBP = :LBP
|
|
172
|
+
LKR = :LKR
|
|
173
|
+
LRD = :LRD
|
|
174
|
+
LSL = :LSL
|
|
175
|
+
LYD = :LYD
|
|
176
|
+
MAD = :MAD
|
|
177
|
+
MDL = :MDL
|
|
178
|
+
MGA = :MGA
|
|
179
|
+
MKD = :MKD
|
|
180
|
+
MMK = :MMK
|
|
181
|
+
MNT = :MNT
|
|
182
|
+
MOP = :MOP
|
|
183
|
+
MRU = :MRU
|
|
184
|
+
MUR = :MUR
|
|
185
|
+
MVR = :MVR
|
|
186
|
+
MWK = :MWK
|
|
187
|
+
MXN = :MXN
|
|
188
|
+
MYR = :MYR
|
|
189
|
+
MZN = :MZN
|
|
190
|
+
NAD = :NAD
|
|
191
|
+
NGN = :NGN
|
|
192
|
+
NIO = :NIO
|
|
193
|
+
NOK = :NOK
|
|
194
|
+
NPR = :NPR
|
|
195
|
+
NZD = :NZD
|
|
196
|
+
OMR = :OMR
|
|
197
|
+
PAB = :PAB
|
|
198
|
+
PEN = :PEN
|
|
199
|
+
PGK = :PGK
|
|
200
|
+
PHP = :PHP
|
|
201
|
+
PKR = :PKR
|
|
202
|
+
PLN = :PLN
|
|
203
|
+
PYG = :PYG
|
|
204
|
+
QAR = :QAR
|
|
205
|
+
RON = :RON
|
|
206
|
+
RSD = :RSD
|
|
207
|
+
RUB = :RUB
|
|
208
|
+
RWF = :RWF
|
|
209
|
+
SAR = :SAR
|
|
210
|
+
SBD = :SBD
|
|
211
|
+
SCR = :SCR
|
|
212
|
+
SEK = :SEK
|
|
213
|
+
SGD = :SGD
|
|
214
|
+
SHP = :SHP
|
|
215
|
+
SLE = :SLE
|
|
216
|
+
SLL = :SLL
|
|
217
|
+
SOS = :SOS
|
|
218
|
+
SRD = :SRD
|
|
219
|
+
SSP = :SSP
|
|
220
|
+
STN = :STN
|
|
221
|
+
SVC = :SVC
|
|
222
|
+
SZL = :SZL
|
|
223
|
+
THB = :THB
|
|
224
|
+
TND = :TND
|
|
225
|
+
TOP = :TOP
|
|
226
|
+
TRY = :TRY
|
|
227
|
+
TTD = :TTD
|
|
228
|
+
TWD = :TWD
|
|
229
|
+
TZS = :TZS
|
|
230
|
+
UAH = :UAH
|
|
231
|
+
UGX = :UGX
|
|
232
|
+
USD = :USD
|
|
233
|
+
UYU = :UYU
|
|
234
|
+
UZS = :UZS
|
|
235
|
+
VES = :VES
|
|
236
|
+
VND = :VND
|
|
237
|
+
VUV = :VUV
|
|
238
|
+
WST = :WST
|
|
239
|
+
XAF = :XAF
|
|
240
|
+
XCD = :XCD
|
|
241
|
+
XOF = :XOF
|
|
242
|
+
XPF = :XPF
|
|
243
|
+
YER = :YER
|
|
244
|
+
ZAR = :ZAR
|
|
245
|
+
ZMW = :ZMW
|
|
246
|
+
|
|
247
|
+
# @!method self.values
|
|
248
|
+
# @return [Array<Symbol>]
|
|
249
|
+
end
|
|
250
|
+
|
|
85
251
|
# Filter by status
|
|
86
252
|
module Status
|
|
87
253
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class PayoutCreatedWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute business_id
|
|
7
|
+
# The business identifier
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :business_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
#
|
|
14
|
+
# @return [Dodopayments::Models::PayoutCreatedWebhookEvent::Data]
|
|
15
|
+
required :data, -> { Dodopayments::PayoutCreatedWebhookEvent::Data }
|
|
16
|
+
|
|
17
|
+
# @!attribute timestamp
|
|
18
|
+
# The timestamp of when the event occurred
|
|
19
|
+
#
|
|
20
|
+
# @return [Time]
|
|
21
|
+
required :timestamp, Time
|
|
22
|
+
|
|
23
|
+
# @!attribute type
|
|
24
|
+
# The event type
|
|
25
|
+
#
|
|
26
|
+
# @return [Symbol, :"payout.created"]
|
|
27
|
+
required :type, const: :"payout.created"
|
|
28
|
+
|
|
29
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"payout.created")
|
|
30
|
+
# @param business_id [String] The business identifier
|
|
31
|
+
#
|
|
32
|
+
# @param data [Dodopayments::Models::PayoutCreatedWebhookEvent::Data]
|
|
33
|
+
#
|
|
34
|
+
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
|
+
#
|
|
36
|
+
# @param type [Symbol, :"payout.created"] The event type
|
|
37
|
+
|
|
38
|
+
# @see Dodopayments::Models::PayoutCreatedWebhookEvent#data
|
|
39
|
+
class Data < Dodopayments::Internal::Type::BaseModel
|
|
40
|
+
# @!attribute amount
|
|
41
|
+
# The total amount of the payout.
|
|
42
|
+
#
|
|
43
|
+
# @return [Integer]
|
|
44
|
+
required :amount, Integer
|
|
45
|
+
|
|
46
|
+
# @!attribute business_id
|
|
47
|
+
# The unique identifier of the business associated with the payout.
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
required :business_id, String
|
|
51
|
+
|
|
52
|
+
# @!attribute chargebacks
|
|
53
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
54
|
+
# release.
|
|
55
|
+
#
|
|
56
|
+
# The total value of chargebacks associated with the payout.
|
|
57
|
+
#
|
|
58
|
+
# @return [Integer]
|
|
59
|
+
required :chargebacks, Integer
|
|
60
|
+
|
|
61
|
+
# @!attribute created_at
|
|
62
|
+
# The timestamp when the payout was created, in UTC.
|
|
63
|
+
#
|
|
64
|
+
# @return [Time]
|
|
65
|
+
required :created_at, Time
|
|
66
|
+
|
|
67
|
+
# @!attribute currency
|
|
68
|
+
# The currency of the payout, represented as an ISO 4217 currency code.
|
|
69
|
+
#
|
|
70
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
71
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
72
|
+
|
|
73
|
+
# @!attribute fee
|
|
74
|
+
# The fee charged for processing the payout.
|
|
75
|
+
#
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
required :fee, Integer
|
|
78
|
+
|
|
79
|
+
# @!attribute payment_method
|
|
80
|
+
# The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :payment_method, String
|
|
84
|
+
|
|
85
|
+
# @!attribute payout_id
|
|
86
|
+
# The unique identifier of the payout.
|
|
87
|
+
#
|
|
88
|
+
# @return [String]
|
|
89
|
+
required :payout_id, String
|
|
90
|
+
|
|
91
|
+
# @!attribute refunds
|
|
92
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
93
|
+
# release.
|
|
94
|
+
#
|
|
95
|
+
# The total value of refunds associated with the payout.
|
|
96
|
+
#
|
|
97
|
+
# @return [Integer]
|
|
98
|
+
required :refunds, Integer
|
|
99
|
+
|
|
100
|
+
# @!attribute status
|
|
101
|
+
# The current status of the payout.
|
|
102
|
+
#
|
|
103
|
+
# @return [Symbol, Dodopayments::Models::PayoutCreatedWebhookEvent::Data::Status]
|
|
104
|
+
required :status, enum: -> { Dodopayments::PayoutCreatedWebhookEvent::Data::Status }
|
|
105
|
+
|
|
106
|
+
# @!attribute tax
|
|
107
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
108
|
+
# release.
|
|
109
|
+
#
|
|
110
|
+
# The tax applied to the payout.
|
|
111
|
+
#
|
|
112
|
+
# @return [Integer]
|
|
113
|
+
required :tax, Integer
|
|
114
|
+
|
|
115
|
+
# @!attribute updated_at
|
|
116
|
+
# The timestamp when the payout was last updated, in UTC.
|
|
117
|
+
#
|
|
118
|
+
# @return [Time]
|
|
119
|
+
required :updated_at, Time
|
|
120
|
+
|
|
121
|
+
# @!attribute name
|
|
122
|
+
# The name of the payout recipient or purpose.
|
|
123
|
+
#
|
|
124
|
+
# @return [String, nil]
|
|
125
|
+
optional :name, String, nil?: true
|
|
126
|
+
|
|
127
|
+
# @!attribute payout_document_url
|
|
128
|
+
# The URL of the document associated with the payout.
|
|
129
|
+
#
|
|
130
|
+
# @return [String, nil]
|
|
131
|
+
optional :payout_document_url, String, nil?: true
|
|
132
|
+
|
|
133
|
+
# @!attribute remarks
|
|
134
|
+
# Any additional remarks or notes associated with the payout.
|
|
135
|
+
#
|
|
136
|
+
# @return [String, nil]
|
|
137
|
+
optional :remarks, String, nil?: true
|
|
138
|
+
|
|
139
|
+
# @!method initialize(amount:, business_id:, chargebacks:, created_at:, currency:, fee:, payment_method:, payout_id:, refunds:, status:, tax:, updated_at:, name: nil, payout_document_url: nil, remarks: nil)
|
|
140
|
+
# @param amount [Integer] The total amount of the payout.
|
|
141
|
+
#
|
|
142
|
+
# @param business_id [String] The unique identifier of the business associated with the payout.
|
|
143
|
+
#
|
|
144
|
+
# @param chargebacks [Integer] The total value of chargebacks associated with the payout.
|
|
145
|
+
#
|
|
146
|
+
# @param created_at [Time] The timestamp when the payout was created, in UTC.
|
|
147
|
+
#
|
|
148
|
+
# @param currency [Symbol, Dodopayments::Models::Currency] The currency of the payout, represented as an ISO 4217 currency code.
|
|
149
|
+
#
|
|
150
|
+
# @param fee [Integer] The fee charged for processing the payout.
|
|
151
|
+
#
|
|
152
|
+
# @param payment_method [String] The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
153
|
+
#
|
|
154
|
+
# @param payout_id [String] The unique identifier of the payout.
|
|
155
|
+
#
|
|
156
|
+
# @param refunds [Integer] The total value of refunds associated with the payout.
|
|
157
|
+
#
|
|
158
|
+
# @param status [Symbol, Dodopayments::Models::PayoutCreatedWebhookEvent::Data::Status] The current status of the payout.
|
|
159
|
+
#
|
|
160
|
+
# @param tax [Integer] The tax applied to the payout.
|
|
161
|
+
#
|
|
162
|
+
# @param updated_at [Time] The timestamp when the payout was last updated, in UTC.
|
|
163
|
+
#
|
|
164
|
+
# @param name [String, nil] The name of the payout recipient or purpose.
|
|
165
|
+
#
|
|
166
|
+
# @param payout_document_url [String, nil] The URL of the document associated with the payout.
|
|
167
|
+
#
|
|
168
|
+
# @param remarks [String, nil] Any additional remarks or notes associated with the payout.
|
|
169
|
+
|
|
170
|
+
# The current status of the payout.
|
|
171
|
+
#
|
|
172
|
+
# @see Dodopayments::Models::PayoutCreatedWebhookEvent::Data#status
|
|
173
|
+
module Status
|
|
174
|
+
extend Dodopayments::Internal::Type::Enum
|
|
175
|
+
|
|
176
|
+
NOT_INITIATED = :not_initiated
|
|
177
|
+
IN_PROGRESS = :in_progress
|
|
178
|
+
ON_HOLD = :on_hold
|
|
179
|
+
FAILED = :failed
|
|
180
|
+
SUCCESS = :success
|
|
181
|
+
|
|
182
|
+
# @!method self.values
|
|
183
|
+
# @return [Array<Symbol>]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class PayoutFailedWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute business_id
|
|
7
|
+
# The business identifier
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :business_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
#
|
|
14
|
+
# @return [Dodopayments::Models::PayoutFailedWebhookEvent::Data]
|
|
15
|
+
required :data, -> { Dodopayments::PayoutFailedWebhookEvent::Data }
|
|
16
|
+
|
|
17
|
+
# @!attribute timestamp
|
|
18
|
+
# The timestamp of when the event occurred
|
|
19
|
+
#
|
|
20
|
+
# @return [Time]
|
|
21
|
+
required :timestamp, Time
|
|
22
|
+
|
|
23
|
+
# @!attribute type
|
|
24
|
+
# The event type
|
|
25
|
+
#
|
|
26
|
+
# @return [Symbol, :"payout.failed"]
|
|
27
|
+
required :type, const: :"payout.failed"
|
|
28
|
+
|
|
29
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"payout.failed")
|
|
30
|
+
# @param business_id [String] The business identifier
|
|
31
|
+
#
|
|
32
|
+
# @param data [Dodopayments::Models::PayoutFailedWebhookEvent::Data]
|
|
33
|
+
#
|
|
34
|
+
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
|
+
#
|
|
36
|
+
# @param type [Symbol, :"payout.failed"] The event type
|
|
37
|
+
|
|
38
|
+
# @see Dodopayments::Models::PayoutFailedWebhookEvent#data
|
|
39
|
+
class Data < Dodopayments::Internal::Type::BaseModel
|
|
40
|
+
# @!attribute amount
|
|
41
|
+
# The total amount of the payout.
|
|
42
|
+
#
|
|
43
|
+
# @return [Integer]
|
|
44
|
+
required :amount, Integer
|
|
45
|
+
|
|
46
|
+
# @!attribute business_id
|
|
47
|
+
# The unique identifier of the business associated with the payout.
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
required :business_id, String
|
|
51
|
+
|
|
52
|
+
# @!attribute chargebacks
|
|
53
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
54
|
+
# release.
|
|
55
|
+
#
|
|
56
|
+
# The total value of chargebacks associated with the payout.
|
|
57
|
+
#
|
|
58
|
+
# @return [Integer]
|
|
59
|
+
required :chargebacks, Integer
|
|
60
|
+
|
|
61
|
+
# @!attribute created_at
|
|
62
|
+
# The timestamp when the payout was created, in UTC.
|
|
63
|
+
#
|
|
64
|
+
# @return [Time]
|
|
65
|
+
required :created_at, Time
|
|
66
|
+
|
|
67
|
+
# @!attribute currency
|
|
68
|
+
# The currency of the payout, represented as an ISO 4217 currency code.
|
|
69
|
+
#
|
|
70
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
71
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
72
|
+
|
|
73
|
+
# @!attribute fee
|
|
74
|
+
# The fee charged for processing the payout.
|
|
75
|
+
#
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
required :fee, Integer
|
|
78
|
+
|
|
79
|
+
# @!attribute payment_method
|
|
80
|
+
# The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :payment_method, String
|
|
84
|
+
|
|
85
|
+
# @!attribute payout_id
|
|
86
|
+
# The unique identifier of the payout.
|
|
87
|
+
#
|
|
88
|
+
# @return [String]
|
|
89
|
+
required :payout_id, String
|
|
90
|
+
|
|
91
|
+
# @!attribute refunds
|
|
92
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
93
|
+
# release.
|
|
94
|
+
#
|
|
95
|
+
# The total value of refunds associated with the payout.
|
|
96
|
+
#
|
|
97
|
+
# @return [Integer]
|
|
98
|
+
required :refunds, Integer
|
|
99
|
+
|
|
100
|
+
# @!attribute status
|
|
101
|
+
# The current status of the payout.
|
|
102
|
+
#
|
|
103
|
+
# @return [Symbol, Dodopayments::Models::PayoutFailedWebhookEvent::Data::Status]
|
|
104
|
+
required :status, enum: -> { Dodopayments::PayoutFailedWebhookEvent::Data::Status }
|
|
105
|
+
|
|
106
|
+
# @!attribute tax
|
|
107
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
108
|
+
# release.
|
|
109
|
+
#
|
|
110
|
+
# The tax applied to the payout.
|
|
111
|
+
#
|
|
112
|
+
# @return [Integer]
|
|
113
|
+
required :tax, Integer
|
|
114
|
+
|
|
115
|
+
# @!attribute updated_at
|
|
116
|
+
# The timestamp when the payout was last updated, in UTC.
|
|
117
|
+
#
|
|
118
|
+
# @return [Time]
|
|
119
|
+
required :updated_at, Time
|
|
120
|
+
|
|
121
|
+
# @!attribute name
|
|
122
|
+
# The name of the payout recipient or purpose.
|
|
123
|
+
#
|
|
124
|
+
# @return [String, nil]
|
|
125
|
+
optional :name, String, nil?: true
|
|
126
|
+
|
|
127
|
+
# @!attribute payout_document_url
|
|
128
|
+
# The URL of the document associated with the payout.
|
|
129
|
+
#
|
|
130
|
+
# @return [String, nil]
|
|
131
|
+
optional :payout_document_url, String, nil?: true
|
|
132
|
+
|
|
133
|
+
# @!attribute remarks
|
|
134
|
+
# Any additional remarks or notes associated with the payout.
|
|
135
|
+
#
|
|
136
|
+
# @return [String, nil]
|
|
137
|
+
optional :remarks, String, nil?: true
|
|
138
|
+
|
|
139
|
+
# @!method initialize(amount:, business_id:, chargebacks:, created_at:, currency:, fee:, payment_method:, payout_id:, refunds:, status:, tax:, updated_at:, name: nil, payout_document_url: nil, remarks: nil)
|
|
140
|
+
# @param amount [Integer] The total amount of the payout.
|
|
141
|
+
#
|
|
142
|
+
# @param business_id [String] The unique identifier of the business associated with the payout.
|
|
143
|
+
#
|
|
144
|
+
# @param chargebacks [Integer] The total value of chargebacks associated with the payout.
|
|
145
|
+
#
|
|
146
|
+
# @param created_at [Time] The timestamp when the payout was created, in UTC.
|
|
147
|
+
#
|
|
148
|
+
# @param currency [Symbol, Dodopayments::Models::Currency] The currency of the payout, represented as an ISO 4217 currency code.
|
|
149
|
+
#
|
|
150
|
+
# @param fee [Integer] The fee charged for processing the payout.
|
|
151
|
+
#
|
|
152
|
+
# @param payment_method [String] The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
153
|
+
#
|
|
154
|
+
# @param payout_id [String] The unique identifier of the payout.
|
|
155
|
+
#
|
|
156
|
+
# @param refunds [Integer] The total value of refunds associated with the payout.
|
|
157
|
+
#
|
|
158
|
+
# @param status [Symbol, Dodopayments::Models::PayoutFailedWebhookEvent::Data::Status] The current status of the payout.
|
|
159
|
+
#
|
|
160
|
+
# @param tax [Integer] The tax applied to the payout.
|
|
161
|
+
#
|
|
162
|
+
# @param updated_at [Time] The timestamp when the payout was last updated, in UTC.
|
|
163
|
+
#
|
|
164
|
+
# @param name [String, nil] The name of the payout recipient or purpose.
|
|
165
|
+
#
|
|
166
|
+
# @param payout_document_url [String, nil] The URL of the document associated with the payout.
|
|
167
|
+
#
|
|
168
|
+
# @param remarks [String, nil] Any additional remarks or notes associated with the payout.
|
|
169
|
+
|
|
170
|
+
# The current status of the payout.
|
|
171
|
+
#
|
|
172
|
+
# @see Dodopayments::Models::PayoutFailedWebhookEvent::Data#status
|
|
173
|
+
module Status
|
|
174
|
+
extend Dodopayments::Internal::Type::Enum
|
|
175
|
+
|
|
176
|
+
NOT_INITIATED = :not_initiated
|
|
177
|
+
IN_PROGRESS = :in_progress
|
|
178
|
+
ON_HOLD = :on_hold
|
|
179
|
+
FAILED = :failed
|
|
180
|
+
SUCCESS = :success
|
|
181
|
+
|
|
182
|
+
# @!method self.values
|
|
183
|
+
# @return [Array<Symbol>]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|