dodopayments 2.21.0 → 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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/models/payment.rb +5 -147
  5. data/lib/dodopayments/models/payment_list_params.rb +6 -2
  6. data/lib/dodopayments/models/payout_created_webhook_event.rb +188 -0
  7. data/lib/dodopayments/models/payout_failed_webhook_event.rb +188 -0
  8. data/lib/dodopayments/models/payout_in_progress_webhook_event.rb +188 -0
  9. data/lib/dodopayments/models/payout_on_hold_webhook_event.rb +188 -0
  10. data/lib/dodopayments/models/payout_success_webhook_event.rb +188 -0
  11. data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +11 -1
  12. data/lib/dodopayments/models/unwrap_webhook_event.rb +11 -1
  13. data/lib/dodopayments/models/webhook_event_type.rb +1 -1
  14. data/lib/dodopayments/models/webhook_payload.rb +160 -3
  15. data/lib/dodopayments/models.rb +10 -0
  16. data/lib/dodopayments/resources/payments.rb +4 -1
  17. data/lib/dodopayments/resources/webhooks.rb +2 -2
  18. data/lib/dodopayments/version.rb +1 -1
  19. data/lib/dodopayments.rb +5 -0
  20. data/rbi/dodopayments/models/payment.rbi +6 -349
  21. data/rbi/dodopayments/models/payment_list_params.rbi +4 -2
  22. data/rbi/dodopayments/models/payout_created_webhook_event.rbi +270 -0
  23. data/rbi/dodopayments/models/payout_failed_webhook_event.rbi +270 -0
  24. data/rbi/dodopayments/models/payout_in_progress_webhook_event.rbi +272 -0
  25. data/rbi/dodopayments/models/payout_on_hold_webhook_event.rbi +270 -0
  26. data/rbi/dodopayments/models/payout_success_webhook_event.rbi +270 -0
  27. data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +5 -0
  28. data/rbi/dodopayments/models/unwrap_webhook_event.rbi +5 -0
  29. data/rbi/dodopayments/models/webhook_event_type.rbi +2 -5
  30. data/rbi/dodopayments/models/webhook_payload.rbi +213 -0
  31. data/rbi/dodopayments/models.rbi +11 -0
  32. data/rbi/dodopayments/resources/payments.rbi +2 -1
  33. data/rbi/dodopayments/resources/webhooks.rbi +10 -0
  34. data/sig/dodopayments/models/payment.rbs +0 -135
  35. data/sig/dodopayments/models/payout_created_webhook_event.rbs +137 -0
  36. data/sig/dodopayments/models/payout_failed_webhook_event.rbs +137 -0
  37. data/sig/dodopayments/models/payout_in_progress_webhook_event.rbs +137 -0
  38. data/sig/dodopayments/models/payout_on_hold_webhook_event.rbs +137 -0
  39. data/sig/dodopayments/models/payout_success_webhook_event.rbs +137 -0
  40. data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +5 -0
  41. data/sig/dodopayments/models/unwrap_webhook_event.rbs +5 -0
  42. data/sig/dodopayments/models/webhook_event_type.rbs +2 -2
  43. data/sig/dodopayments/models/webhook_payload.rbs +108 -0
  44. data/sig/dodopayments/models.rbs +10 -0
  45. data/sig/dodopayments/resources/webhooks.rbs +10 -0
  46. metadata +17 -2
@@ -20,6 +20,7 @@ module Dodopayments
20
20
  Dodopayments::WebhookPayload::Data::Refund,
21
21
  Dodopayments::WebhookPayload::Data::Dispute,
22
22
  Dodopayments::WebhookPayload::Data::LicenseKey,
23
+ Dodopayments::WebhookPayload::Data::Payout,
23
24
  Dodopayments::WebhookPayload::Data::CreditLedgerEntry,
24
25
  Dodopayments::WebhookPayload::Data::CreditBalanceLow,
25
26
  Dodopayments::WebhookPayload::Data::AbandonedCheckout,
@@ -49,6 +50,7 @@ module Dodopayments
49
50
  Dodopayments::WebhookPayload::Data::Refund::OrHash,
50
51
  Dodopayments::WebhookPayload::Data::Dispute::OrHash,
51
52
  Dodopayments::WebhookPayload::Data::LicenseKey::OrHash,
53
+ Dodopayments::WebhookPayload::Data::Payout::OrHash,
52
54
  Dodopayments::WebhookPayload::Data::CreditLedgerEntry::OrHash,
53
55
  Dodopayments::WebhookPayload::Data::CreditBalanceLow::OrHash,
54
56
  Dodopayments::WebhookPayload::Data::AbandonedCheckout::OrHash,
@@ -82,6 +84,7 @@ module Dodopayments
82
84
  Dodopayments::WebhookPayload::Data::Refund,
83
85
  Dodopayments::WebhookPayload::Data::Dispute,
84
86
  Dodopayments::WebhookPayload::Data::LicenseKey,
87
+ Dodopayments::WebhookPayload::Data::Payout,
85
88
  Dodopayments::WebhookPayload::Data::CreditLedgerEntry,
86
89
  Dodopayments::WebhookPayload::Data::CreditBalanceLow,
87
90
  Dodopayments::WebhookPayload::Data::AbandonedCheckout,
@@ -108,6 +111,7 @@ module Dodopayments
108
111
  Dodopayments::WebhookPayload::Data::Refund,
109
112
  Dodopayments::WebhookPayload::Data::Dispute,
110
113
  Dodopayments::WebhookPayload::Data::LicenseKey,
114
+ Dodopayments::WebhookPayload::Data::Payout,
111
115
  Dodopayments::WebhookPayload::Data::CreditLedgerEntry,
112
116
  Dodopayments::WebhookPayload::Data::CreditBalanceLow,
113
117
  Dodopayments::WebhookPayload::Data::AbandonedCheckout,
@@ -222,6 +226,215 @@ module Dodopayments
222
226
  end
223
227
  end
224
228
 
229
+ class Payout < Dodopayments::Internal::Type::BaseModel
230
+ OrHash =
231
+ T.type_alias do
232
+ T.any(
233
+ Dodopayments::WebhookPayload::Data::Payout,
234
+ Dodopayments::Internal::AnyHash
235
+ )
236
+ end
237
+
238
+ # The total amount of the payout.
239
+ sig { returns(Integer) }
240
+ attr_accessor :amount
241
+
242
+ # The unique identifier of the business associated with the payout.
243
+ sig { returns(String) }
244
+ attr_accessor :business_id
245
+
246
+ # The total value of chargebacks associated with the payout.
247
+ sig { returns(Integer) }
248
+ attr_accessor :chargebacks
249
+
250
+ # The timestamp when the payout was created, in UTC.
251
+ sig { returns(Time) }
252
+ attr_accessor :created_at
253
+
254
+ # The currency of the payout, represented as an ISO 4217 currency code.
255
+ sig { returns(Dodopayments::Currency::OrSymbol) }
256
+ attr_accessor :currency
257
+
258
+ # The fee charged for processing the payout.
259
+ sig { returns(Integer) }
260
+ attr_accessor :fee
261
+
262
+ sig { returns(Symbol) }
263
+ attr_accessor :payload_type
264
+
265
+ # The payment method used for the payout (e.g., bank transfer, card, etc.).
266
+ sig { returns(String) }
267
+ attr_accessor :payment_method
268
+
269
+ # The unique identifier of the payout.
270
+ sig { returns(String) }
271
+ attr_accessor :payout_id
272
+
273
+ # The total value of refunds associated with the payout.
274
+ sig { returns(Integer) }
275
+ attr_accessor :refunds
276
+
277
+ # The current status of the payout.
278
+ sig do
279
+ returns(
280
+ Dodopayments::WebhookPayload::Data::Payout::Status::OrSymbol
281
+ )
282
+ end
283
+ attr_accessor :status
284
+
285
+ # The tax applied to the payout.
286
+ sig { returns(Integer) }
287
+ attr_accessor :tax
288
+
289
+ # The timestamp when the payout was last updated, in UTC.
290
+ sig { returns(Time) }
291
+ attr_accessor :updated_at
292
+
293
+ # The name of the payout recipient or purpose.
294
+ sig { returns(T.nilable(String)) }
295
+ attr_accessor :name
296
+
297
+ # The URL of the document associated with the payout.
298
+ sig { returns(T.nilable(String)) }
299
+ attr_accessor :payout_document_url
300
+
301
+ # Any additional remarks or notes associated with the payout.
302
+ sig { returns(T.nilable(String)) }
303
+ attr_accessor :remarks
304
+
305
+ sig do
306
+ params(
307
+ amount: Integer,
308
+ business_id: String,
309
+ chargebacks: Integer,
310
+ created_at: Time,
311
+ currency: Dodopayments::Currency::OrSymbol,
312
+ fee: Integer,
313
+ payment_method: String,
314
+ payout_id: String,
315
+ refunds: Integer,
316
+ status:
317
+ Dodopayments::WebhookPayload::Data::Payout::Status::OrSymbol,
318
+ tax: Integer,
319
+ updated_at: Time,
320
+ name: T.nilable(String),
321
+ payout_document_url: T.nilable(String),
322
+ remarks: T.nilable(String),
323
+ payload_type: Symbol
324
+ ).returns(T.attached_class)
325
+ end
326
+ def self.new(
327
+ # The total amount of the payout.
328
+ amount:,
329
+ # The unique identifier of the business associated with the payout.
330
+ business_id:,
331
+ # The total value of chargebacks associated with the payout.
332
+ chargebacks:,
333
+ # The timestamp when the payout was created, in UTC.
334
+ created_at:,
335
+ # The currency of the payout, represented as an ISO 4217 currency code.
336
+ currency:,
337
+ # The fee charged for processing the payout.
338
+ fee:,
339
+ # The payment method used for the payout (e.g., bank transfer, card, etc.).
340
+ payment_method:,
341
+ # The unique identifier of the payout.
342
+ payout_id:,
343
+ # The total value of refunds associated with the payout.
344
+ refunds:,
345
+ # The current status of the payout.
346
+ status:,
347
+ # The tax applied to the payout.
348
+ tax:,
349
+ # The timestamp when the payout was last updated, in UTC.
350
+ updated_at:,
351
+ # The name of the payout recipient or purpose.
352
+ name: nil,
353
+ # The URL of the document associated with the payout.
354
+ payout_document_url: nil,
355
+ # Any additional remarks or notes associated with the payout.
356
+ remarks: nil,
357
+ payload_type: :Payout
358
+ )
359
+ end
360
+
361
+ sig do
362
+ override.returns(
363
+ {
364
+ amount: Integer,
365
+ business_id: String,
366
+ chargebacks: Integer,
367
+ created_at: Time,
368
+ currency: Dodopayments::Currency::OrSymbol,
369
+ fee: Integer,
370
+ payload_type: Symbol,
371
+ payment_method: String,
372
+ payout_id: String,
373
+ refunds: Integer,
374
+ status:
375
+ Dodopayments::WebhookPayload::Data::Payout::Status::OrSymbol,
376
+ tax: Integer,
377
+ updated_at: Time,
378
+ name: T.nilable(String),
379
+ payout_document_url: T.nilable(String),
380
+ remarks: T.nilable(String)
381
+ }
382
+ )
383
+ end
384
+ def to_hash
385
+ end
386
+
387
+ # The current status of the payout.
388
+ module Status
389
+ extend Dodopayments::Internal::Type::Enum
390
+
391
+ TaggedSymbol =
392
+ T.type_alias do
393
+ T.all(
394
+ Symbol,
395
+ Dodopayments::WebhookPayload::Data::Payout::Status
396
+ )
397
+ end
398
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
399
+
400
+ NOT_INITIATED =
401
+ T.let(
402
+ :not_initiated,
403
+ Dodopayments::WebhookPayload::Data::Payout::Status::TaggedSymbol
404
+ )
405
+ IN_PROGRESS =
406
+ T.let(
407
+ :in_progress,
408
+ Dodopayments::WebhookPayload::Data::Payout::Status::TaggedSymbol
409
+ )
410
+ ON_HOLD =
411
+ T.let(
412
+ :on_hold,
413
+ Dodopayments::WebhookPayload::Data::Payout::Status::TaggedSymbol
414
+ )
415
+ FAILED =
416
+ T.let(
417
+ :failed,
418
+ Dodopayments::WebhookPayload::Data::Payout::Status::TaggedSymbol
419
+ )
420
+ SUCCESS =
421
+ T.let(
422
+ :success,
423
+ Dodopayments::WebhookPayload::Data::Payout::Status::TaggedSymbol
424
+ )
425
+
426
+ sig do
427
+ override.returns(
428
+ T::Array[
429
+ Dodopayments::WebhookPayload::Data::Payout::Status::TaggedSymbol
430
+ ]
431
+ )
432
+ end
433
+ def self.values
434
+ end
435
+ end
436
+ end
437
+
225
438
  class CreditLedgerEntry < Dodopayments::Models::CreditEntitlements::CreditLedgerEntry
226
439
  OrHash =
227
440
  T.type_alias do
@@ -381,10 +381,21 @@ module Dodopayments
381
381
  PaymentSucceededWebhookEvent =
382
382
  Dodopayments::Models::PaymentSucceededWebhookEvent
383
383
 
384
+ PayoutCreatedWebhookEvent = Dodopayments::Models::PayoutCreatedWebhookEvent
385
+
386
+ PayoutFailedWebhookEvent = Dodopayments::Models::PayoutFailedWebhookEvent
387
+
388
+ PayoutInProgressWebhookEvent =
389
+ Dodopayments::Models::PayoutInProgressWebhookEvent
390
+
384
391
  PayoutListParams = Dodopayments::Models::PayoutListParams
385
392
 
393
+ PayoutOnHoldWebhookEvent = Dodopayments::Models::PayoutOnHoldWebhookEvent
394
+
386
395
  Payouts = Dodopayments::Models::Payouts
387
396
 
397
+ PayoutSuccessWebhookEvent = Dodopayments::Models::PayoutSuccessWebhookEvent
398
+
388
399
  Price = Dodopayments::Models::Price
389
400
 
390
401
  Product = Dodopayments::Models::Product
@@ -137,7 +137,8 @@ module Dodopayments
137
137
  currency: nil,
138
138
  # Filter by customer id
139
139
  customer_id: nil,
140
- # Page number default is 0
140
+ # Page number default is 0. Capped to bound OFFSET-based deep pagination, which
141
+ # forces Postgres to scan and discard every preceding row.
141
142
  page_number: nil,
142
143
  # Page size default is 10 max is 100
143
144
  page_size: nil,
@@ -173,6 +173,11 @@ module Dodopayments
173
173
  Dodopayments::PaymentFailedWebhookEvent,
174
174
  Dodopayments::PaymentProcessingWebhookEvent,
175
175
  Dodopayments::PaymentSucceededWebhookEvent,
176
+ Dodopayments::PayoutCreatedWebhookEvent,
177
+ Dodopayments::PayoutFailedWebhookEvent,
178
+ Dodopayments::PayoutInProgressWebhookEvent,
179
+ Dodopayments::PayoutOnHoldWebhookEvent,
180
+ Dodopayments::PayoutSuccessWebhookEvent,
176
181
  Dodopayments::RefundFailedWebhookEvent,
177
182
  Dodopayments::RefundSucceededWebhookEvent,
178
183
  Dodopayments::SubscriptionActiveWebhookEvent,
@@ -229,6 +234,11 @@ module Dodopayments
229
234
  Dodopayments::PaymentFailedWebhookEvent,
230
235
  Dodopayments::PaymentProcessingWebhookEvent,
231
236
  Dodopayments::PaymentSucceededWebhookEvent,
237
+ Dodopayments::PayoutCreatedWebhookEvent,
238
+ Dodopayments::PayoutFailedWebhookEvent,
239
+ Dodopayments::PayoutInProgressWebhookEvent,
240
+ Dodopayments::PayoutOnHoldWebhookEvent,
241
+ Dodopayments::PayoutSuccessWebhookEvent,
232
242
  Dodopayments::RefundFailedWebhookEvent,
233
243
  Dodopayments::RefundSucceededWebhookEvent,
234
244
  Dodopayments::SubscriptionActiveWebhookEvent,
@@ -30,7 +30,6 @@ module Dodopayments
30
30
  discounts: ::Array[Dodopayments::DiscountDetail]?,
31
31
  error_code: String?,
32
32
  error_message: String?,
33
- failure_details: Dodopayments::Payment::FailureDetails?,
34
33
  invoice_id: String?,
35
34
  invoice_url: String?,
36
35
  payment_link: String?,
@@ -103,8 +102,6 @@ module Dodopayments
103
102
 
104
103
  attr_accessor error_message: String?
105
104
 
106
- attr_accessor failure_details: Dodopayments::Payment::FailureDetails?
107
-
108
105
  attr_accessor invoice_id: String?
109
106
 
110
107
  attr_accessor invoice_url: String?
@@ -160,7 +157,6 @@ module Dodopayments
160
157
  ?discounts: ::Array[Dodopayments::DiscountDetail]?,
161
158
  ?error_code: String?,
162
159
  ?error_message: String?,
163
- ?failure_details: Dodopayments::Payment::FailureDetails?,
164
160
  ?invoice_id: String?,
165
161
  ?invoice_url: String?,
166
162
  ?payment_link: String?,
@@ -205,7 +201,6 @@ module Dodopayments
205
201
  discounts: ::Array[Dodopayments::DiscountDetail]?,
206
202
  error_code: String?,
207
203
  error_message: String?,
208
- failure_details: Dodopayments::Payment::FailureDetails?,
209
204
  invoice_id: String?,
210
205
  invoice_url: String?,
211
206
  payment_link: String?,
@@ -233,136 +228,6 @@ module Dodopayments
233
228
  def self?.values: -> ::Array[Dodopayments::Models::Payment::payment_provider]
234
229
  end
235
230
 
236
- type failure_details =
237
- {
238
- code: String,
239
- customer_cta: Dodopayments::Models::Payment::FailureDetails::customer_cta,
240
- customer_fixable: bool,
241
- customer_message: String,
242
- customer_template: Dodopayments::Models::Payment::FailureDetails::customer_template,
243
- decline_type: Dodopayments::Models::Payment::FailureDetails::decline_type,
244
- merchant_message: String
245
- }
246
-
247
- class FailureDetails < Dodopayments::Internal::Type::BaseModel
248
- attr_accessor code: String
249
-
250
- attr_accessor customer_cta: Dodopayments::Models::Payment::FailureDetails::customer_cta
251
-
252
- attr_accessor customer_fixable: bool
253
-
254
- attr_accessor customer_message: String
255
-
256
- attr_accessor customer_template: Dodopayments::Models::Payment::FailureDetails::customer_template
257
-
258
- attr_accessor decline_type: Dodopayments::Models::Payment::FailureDetails::decline_type
259
-
260
- attr_accessor merchant_message: String
261
-
262
- def initialize: (
263
- code: String,
264
- customer_cta: Dodopayments::Models::Payment::FailureDetails::customer_cta,
265
- customer_fixable: bool,
266
- customer_message: String,
267
- customer_template: Dodopayments::Models::Payment::FailureDetails::customer_template,
268
- decline_type: Dodopayments::Models::Payment::FailureDetails::decline_type,
269
- merchant_message: String
270
- ) -> void
271
-
272
- def to_hash: -> {
273
- code: String,
274
- customer_cta: Dodopayments::Models::Payment::FailureDetails::customer_cta,
275
- customer_fixable: bool,
276
- customer_message: String,
277
- customer_template: Dodopayments::Models::Payment::FailureDetails::customer_template,
278
- decline_type: Dodopayments::Models::Payment::FailureDetails::decline_type,
279
- merchant_message: String
280
- }
281
-
282
- type customer_cta =
283
- :edit_and_retry
284
- | :use_another_method
285
- | :try_again
286
- | :try_later
287
- | :retry_and_verify
288
- | :restart
289
- | :update_method
290
-
291
- module CustomerCta
292
- extend Dodopayments::Internal::Type::Enum
293
-
294
- EDIT_AND_RETRY: :edit_and_retry
295
- USE_ANOTHER_METHOD: :use_another_method
296
- TRY_AGAIN: :try_again
297
- TRY_LATER: :try_later
298
- RETRY_AND_VERIFY: :retry_and_verify
299
- RESTART: :restart
300
- UPDATE_METHOD: :update_method
301
-
302
- def self?.values: -> ::Array[Dodopayments::Models::Payment::FailureDetails::customer_cta]
303
- end
304
-
305
- type customer_template =
306
- :C1
307
- | :C2
308
- | :C3
309
- | :C4
310
- | :C5
311
- | :C6
312
- | :C7
313
- | :C8
314
- | :C9
315
- | :C10
316
- | :C11
317
- | :C12
318
- | :C13
319
- | :C14
320
- | :C15
321
- | :C16
322
- | :C17
323
- | :C18
324
- | :C19
325
- | :C20
326
-
327
- module CustomerTemplate
328
- extend Dodopayments::Internal::Type::Enum
329
-
330
- C1: :C1
331
- C2: :C2
332
- C3: :C3
333
- C4: :C4
334
- C5: :C5
335
- C6: :C6
336
- C7: :C7
337
- C8: :C8
338
- C9: :C9
339
- C10: :C10
340
- C11: :C11
341
- C12: :C12
342
- C13: :C13
343
- C14: :C14
344
- C15: :C15
345
- C16: :C16
346
- C17: :C17
347
- C18: :C18
348
- C19: :C19
349
- C20: :C20
350
-
351
- def self?.values: -> ::Array[Dodopayments::Models::Payment::FailureDetails::customer_template]
352
- end
353
-
354
- type decline_type = :soft | :hard
355
-
356
- module DeclineType
357
- extend Dodopayments::Internal::Type::Enum
358
-
359
- SOFT: :soft
360
- HARD: :hard
361
-
362
- def self?.values: -> ::Array[Dodopayments::Models::Payment::FailureDetails::decline_type]
363
- end
364
- end
365
-
366
231
  type product_cart = { product_id: String, quantity: Integer }
367
232
 
368
233
  class ProductCart < Dodopayments::Internal::Type::BaseModel
@@ -0,0 +1,137 @@
1
+ module Dodopayments
2
+ module Models
3
+ type payout_created_webhook_event =
4
+ {
5
+ business_id: String,
6
+ data: Dodopayments::PayoutCreatedWebhookEvent::Data,
7
+ timestamp: Time,
8
+ type: :"payout.created"
9
+ }
10
+
11
+ class PayoutCreatedWebhookEvent < Dodopayments::Internal::Type::BaseModel
12
+ attr_accessor business_id: String
13
+
14
+ attr_accessor data: Dodopayments::PayoutCreatedWebhookEvent::Data
15
+
16
+ attr_accessor timestamp: Time
17
+
18
+ attr_accessor type: :"payout.created"
19
+
20
+ def initialize: (
21
+ business_id: String,
22
+ data: Dodopayments::PayoutCreatedWebhookEvent::Data,
23
+ timestamp: Time,
24
+ ?type: :"payout.created"
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ business_id: String,
29
+ data: Dodopayments::PayoutCreatedWebhookEvent::Data,
30
+ timestamp: Time,
31
+ type: :"payout.created"
32
+ }
33
+
34
+ type data =
35
+ {
36
+ amount: Integer,
37
+ business_id: String,
38
+ chargebacks: Integer,
39
+ created_at: Time,
40
+ currency: Dodopayments::Models::currency,
41
+ fee: Integer,
42
+ payment_method: String,
43
+ payout_id: String,
44
+ refunds: Integer,
45
+ status: Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status,
46
+ tax: Integer,
47
+ updated_at: Time,
48
+ name: String?,
49
+ payout_document_url: String?,
50
+ remarks: String?
51
+ }
52
+
53
+ class Data < Dodopayments::Internal::Type::BaseModel
54
+ attr_accessor amount: Integer
55
+
56
+ attr_accessor business_id: String
57
+
58
+ attr_accessor chargebacks: Integer
59
+
60
+ attr_accessor created_at: Time
61
+
62
+ attr_accessor currency: Dodopayments::Models::currency
63
+
64
+ attr_accessor fee: Integer
65
+
66
+ attr_accessor payment_method: String
67
+
68
+ attr_accessor payout_id: String
69
+
70
+ attr_accessor refunds: Integer
71
+
72
+ attr_accessor status: Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status
73
+
74
+ attr_accessor tax: Integer
75
+
76
+ attr_accessor updated_at: Time
77
+
78
+ attr_accessor name: String?
79
+
80
+ attr_accessor payout_document_url: String?
81
+
82
+ attr_accessor remarks: String?
83
+
84
+ def initialize: (
85
+ amount: Integer,
86
+ business_id: String,
87
+ chargebacks: Integer,
88
+ created_at: Time,
89
+ currency: Dodopayments::Models::currency,
90
+ fee: Integer,
91
+ payment_method: String,
92
+ payout_id: String,
93
+ refunds: Integer,
94
+ status: Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status,
95
+ tax: Integer,
96
+ updated_at: Time,
97
+ ?name: String?,
98
+ ?payout_document_url: String?,
99
+ ?remarks: String?
100
+ ) -> void
101
+
102
+ def to_hash: -> {
103
+ amount: Integer,
104
+ business_id: String,
105
+ chargebacks: Integer,
106
+ created_at: Time,
107
+ currency: Dodopayments::Models::currency,
108
+ fee: Integer,
109
+ payment_method: String,
110
+ payout_id: String,
111
+ refunds: Integer,
112
+ status: Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status,
113
+ tax: Integer,
114
+ updated_at: Time,
115
+ name: String?,
116
+ payout_document_url: String?,
117
+ remarks: String?
118
+ }
119
+
120
+ type status =
121
+ :not_initiated | :in_progress | :on_hold | :failed | :success
122
+
123
+ module Status
124
+ extend Dodopayments::Internal::Type::Enum
125
+
126
+ NOT_INITIATED: :not_initiated
127
+ IN_PROGRESS: :in_progress
128
+ ON_HOLD: :on_hold
129
+ FAILED: :failed
130
+ SUCCESS: :success
131
+
132
+ def self?.values: -> ::Array[Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status]
133
+ end
134
+ end
135
+ end
136
+ end
137
+ end