straddle 0.4.0 → 0.5.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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +53 -0
  3. data/README.md +23 -1
  4. data/lib/straddle/client.rb +15 -1
  5. data/lib/straddle/internal/transport/base_client.rb +5 -0
  6. data/lib/straddle/internal/util.rb +22 -7
  7. data/lib/straddle/models/charge_create_params.rb +2 -0
  8. data/lib/straddle/models/charge_unmask_response.rb +142 -11
  9. data/lib/straddle/models/charge_v1.rb +140 -11
  10. data/lib/straddle/models/embed/account_list_params.rb +8 -1
  11. data/lib/straddle/models/embed/representative.rb +2 -2
  12. data/lib/straddle/models/embed/representative_create_params.rb +2 -2
  13. data/lib/straddle/models/embed/representative_paged.rb +2 -2
  14. data/lib/straddle/models/embed/representative_update_params.rb +2 -2
  15. data/lib/straddle/models/paykey_list_params.rb +17 -1
  16. data/lib/straddle/models/payment_list_params.rb +55 -1
  17. data/lib/straddle/models/payment_summary_paged_v1.rb +98 -1
  18. data/lib/straddle/models/payout_create_params.rb +2 -0
  19. data/lib/straddle/models/payout_unmask_response.rb +145 -11
  20. data/lib/straddle/models/payout_upload_authorization_document_params.rb +57 -0
  21. data/lib/straddle/models/payout_v1.rb +140 -11
  22. data/lib/straddle/models.rb +2 -0
  23. data/lib/straddle/resources/embed/accounts.rb +5 -2
  24. data/lib/straddle/resources/paykeys.rb +7 -1
  25. data/lib/straddle/resources/payments.rb +19 -1
  26. data/lib/straddle/resources/payouts.rb +49 -0
  27. data/lib/straddle/version.rb +1 -1
  28. data/lib/straddle.rb +1 -0
  29. data/rbi/straddle/internal/util.rbi +8 -0
  30. data/rbi/straddle/models/charge_create_params.rbi +10 -0
  31. data/rbi/straddle/models/charge_unmask_response.rbi +287 -34
  32. data/rbi/straddle/models/charge_v1.rbi +268 -39
  33. data/rbi/straddle/models/embed/account_list_params.rbi +9 -0
  34. data/rbi/straddle/models/embed/representative.rbi +2 -2
  35. data/rbi/straddle/models/embed/representative_create_params.rbi +2 -2
  36. data/rbi/straddle/models/embed/representative_paged.rbi +2 -2
  37. data/rbi/straddle/models/embed/representative_update_params.rbi +2 -2
  38. data/rbi/straddle/models/paykey_list_params.rbi +22 -0
  39. data/rbi/straddle/models/payment_list_params.rbi +75 -0
  40. data/rbi/straddle/models/payment_summary_paged_v1.rbi +198 -3
  41. data/rbi/straddle/models/payout_create_params.rbi +10 -0
  42. data/rbi/straddle/models/payout_unmask_response.rbi +287 -34
  43. data/rbi/straddle/models/payout_upload_authorization_document_params.rbi +88 -0
  44. data/rbi/straddle/models/payout_v1.rbi +268 -39
  45. data/rbi/straddle/models.rbi +3 -0
  46. data/rbi/straddle/resources/embed/accounts.rbi +3 -0
  47. data/rbi/straddle/resources/paykeys.rbi +6 -0
  48. data/rbi/straddle/resources/payments.rbi +20 -0
  49. data/rbi/straddle/resources/payouts.rbi +33 -0
  50. data/sig/straddle/internal/util.rbs +4 -0
  51. data/sig/straddle/models/charge_create_params.rbs +4 -0
  52. data/sig/straddle/models/charge_unmask_response.rbs +120 -11
  53. data/sig/straddle/models/charge_v1.rbs +120 -11
  54. data/sig/straddle/models/embed/account_list_params.rbs +7 -0
  55. data/sig/straddle/models/paykey_list_params.rbs +14 -0
  56. data/sig/straddle/models/payment_list_params.rbs +57 -2
  57. data/sig/straddle/models/payment_summary_paged_v1.rbs +78 -3
  58. data/sig/straddle/models/payout_create_params.rbs +4 -0
  59. data/sig/straddle/models/payout_unmask_response.rbs +120 -11
  60. data/sig/straddle/models/payout_upload_authorization_document_params.rbs +59 -0
  61. data/sig/straddle/models/payout_v1.rbs +120 -11
  62. data/sig/straddle/models.rbs +2 -0
  63. data/sig/straddle/resources/embed/accounts.rbs +1 -0
  64. data/sig/straddle/resources/paykeys.rbs +2 -0
  65. data/sig/straddle/resources/payments.rbs +6 -0
  66. data/sig/straddle/resources/payouts.rbs +10 -0
  67. metadata +5 -2
@@ -35,6 +35,10 @@ module Straddle
35
35
  description: String?,
36
36
  external_id: String,
37
37
  funding_ids: ::Array[String],
38
+ has_refund: bool,
39
+ has_resubmit: bool,
40
+ is_refund: bool,
41
+ is_resubmit: bool,
38
42
  paykey: String,
39
43
  payment_date: Date,
40
44
  payment_type: Straddle::Models::PaymentSummaryPagedV1::Data::payment_type,
@@ -46,7 +50,8 @@ module Straddle
46
50
  effective_at: Time?,
47
51
  funding_id: String?,
48
52
  metadata: ::Hash[Symbol, String]?,
49
- paykey_details: Straddle::PaykeyDetailsV1
53
+ paykey_details: Straddle::PaykeyDetailsV1,
54
+ related_payments: ::Array[Straddle::PaymentSummaryPagedV1::Data::RelatedPayment]?
50
55
  }
51
56
 
52
57
  class Data < Straddle::Internal::Type::BaseModel
@@ -64,6 +69,14 @@ module Straddle
64
69
 
65
70
  attr_accessor funding_ids: ::Array[String]
66
71
 
72
+ attr_accessor has_refund: bool
73
+
74
+ attr_accessor has_resubmit: bool
75
+
76
+ attr_accessor is_refund: bool
77
+
78
+ attr_accessor is_resubmit: bool
79
+
67
80
  attr_accessor paykey: String
68
81
 
69
82
  attr_accessor payment_date: Date
@@ -96,6 +109,8 @@ module Straddle
96
109
  Straddle::PaykeyDetailsV1
97
110
  ) -> Straddle::PaykeyDetailsV1
98
111
 
112
+ attr_accessor related_payments: ::Array[Straddle::PaymentSummaryPagedV1::Data::RelatedPayment]?
113
+
99
114
  def initialize: (
100
115
  id: String,
101
116
  amount: Integer,
@@ -104,6 +119,10 @@ module Straddle
104
119
  description: String?,
105
120
  external_id: String,
106
121
  funding_ids: ::Array[String],
122
+ has_refund: bool,
123
+ has_resubmit: bool,
124
+ is_refund: bool,
125
+ is_resubmit: bool,
107
126
  paykey: String,
108
127
  payment_date: Date,
109
128
  payment_type: Straddle::Models::PaymentSummaryPagedV1::Data::payment_type,
@@ -115,7 +134,8 @@ module Straddle
115
134
  ?effective_at: Time?,
116
135
  ?funding_id: String?,
117
136
  ?metadata: ::Hash[Symbol, String]?,
118
- ?paykey_details: Straddle::PaykeyDetailsV1
137
+ ?paykey_details: Straddle::PaykeyDetailsV1,
138
+ ?related_payments: ::Array[Straddle::PaymentSummaryPagedV1::Data::RelatedPayment]?
119
139
  ) -> void
120
140
 
121
141
  def to_hash: -> {
@@ -126,6 +146,10 @@ module Straddle
126
146
  description: String?,
127
147
  external_id: String,
128
148
  funding_ids: ::Array[String],
149
+ has_refund: bool,
150
+ has_resubmit: bool,
151
+ is_refund: bool,
152
+ is_resubmit: bool,
129
153
  paykey: String,
130
154
  payment_date: Date,
131
155
  payment_type: Straddle::Models::PaymentSummaryPagedV1::Data::payment_type,
@@ -137,7 +161,8 @@ module Straddle
137
161
  effective_at: Time?,
138
162
  funding_id: String?,
139
163
  metadata: ::Hash[Symbol, String]?,
140
- paykey_details: Straddle::PaykeyDetailsV1
164
+ paykey_details: Straddle::PaykeyDetailsV1,
165
+ related_payments: ::Array[Straddle::PaymentSummaryPagedV1::Data::RelatedPayment]?
141
166
  }
142
167
 
143
168
  type payment_type = :charge | :payout
@@ -177,6 +202,56 @@ module Straddle
177
202
 
178
203
  def self?.values: -> ::Array[Straddle::Models::PaymentSummaryPagedV1::Data::status]
179
204
  end
205
+
206
+ type related_payment =
207
+ {
208
+ id: String,
209
+ payment_type: Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::payment_type,
210
+ relationship: Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::relationship
211
+ }
212
+
213
+ class RelatedPayment < Straddle::Internal::Type::BaseModel
214
+ attr_accessor id: String
215
+
216
+ attr_accessor payment_type: Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::payment_type
217
+
218
+ attr_accessor relationship: Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::relationship
219
+
220
+ def initialize: (
221
+ id: String,
222
+ payment_type: Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::payment_type,
223
+ relationship: Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::relationship
224
+ ) -> void
225
+
226
+ def to_hash: -> {
227
+ id: String,
228
+ payment_type: Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::payment_type,
229
+ relationship: Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::relationship
230
+ }
231
+
232
+ type payment_type = :charge | :payout
233
+
234
+ module PaymentType
235
+ extend Straddle::Internal::Type::Enum
236
+
237
+ CHARGE: :charge
238
+ PAYOUT: :payout
239
+
240
+ def self?.values: -> ::Array[Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::payment_type]
241
+ end
242
+
243
+ type relationship = :original | :resubmit | :refund
244
+
245
+ module Relationship
246
+ extend Straddle::Internal::Type::Enum
247
+
248
+ ORIGINAL: :original
249
+ RESUBMIT: :resubmit
250
+ REFUND: :refund
251
+
252
+ def self?.values: -> ::Array[Straddle::Models::PaymentSummaryPagedV1::Data::RelatedPayment::relationship]
253
+ end
254
+ end
180
255
  end
181
256
 
182
257
  type meta =
@@ -136,6 +136,8 @@ module Straddle
136
136
  | :reversed_customer_dispute
137
137
  | :failed_closed_bank_account
138
138
  | :reversed_closed_bank_account
139
+ | :failed_not_authorized
140
+ | :reversed_not_authorized
139
141
 
140
142
  module SandboxOutcome
141
143
  extend Straddle::Internal::Type::Enum
@@ -151,6 +153,8 @@ module Straddle
151
153
  REVERSED_CUSTOMER_DISPUTE: :reversed_customer_dispute
152
154
  FAILED_CLOSED_BANK_ACCOUNT: :failed_closed_bank_account
153
155
  REVERSED_CLOSED_BANK_ACCOUNT: :reversed_closed_bank_account
156
+ FAILED_NOT_AUTHORIZED: :failed_not_authorized
157
+ REVERSED_NOT_AUTHORIZED: :reversed_not_authorized
154
158
 
155
159
  def self?.values: -> ::Array[Straddle::Models::PayoutCreateParams::Config::sandbox_outcome]
156
160
  end
@@ -36,6 +36,9 @@ module Straddle
36
36
  device: Straddle::Models::PayoutUnmaskResponse::Data::Device,
37
37
  external_id: String,
38
38
  funding_ids: ::Array[String],
39
+ has_resubmit: bool,
40
+ is_refund: bool,
41
+ is_resubmit: bool,
39
42
  paykey: String,
40
43
  payment_date: Date,
41
44
  status: Straddle::Models::PayoutUnmaskResponse::Data::status,
@@ -44,12 +47,13 @@ module Straddle
44
47
  trace_ids: ::Hash[Symbol, String],
45
48
  created_at: Time?,
46
49
  customer_details: Straddle::CustomerDetailsV1,
50
+ documents: ::Array[Straddle::Models::PayoutUnmaskResponse::Data::Document]?,
47
51
  effective_at: Time?,
48
52
  metadata: ::Hash[Symbol, String]?,
49
53
  paykey_details: Straddle::PaykeyDetailsV1,
50
54
  payment_rail: Straddle::Models::PayoutUnmaskResponse::Data::payment_rail,
51
55
  processed_at: Time?,
52
- related_payments: ::Hash[Symbol, Straddle::Models::PayoutUnmaskResponse::Data::related_payment]?,
56
+ related_payments: ::Array[Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment]?,
53
57
  updated_at: Time?
54
58
  }
55
59
 
@@ -70,6 +74,12 @@ module Straddle
70
74
 
71
75
  attr_accessor funding_ids: ::Array[String]
72
76
 
77
+ attr_accessor has_resubmit: bool
78
+
79
+ attr_accessor is_refund: bool
80
+
81
+ attr_accessor is_resubmit: bool
82
+
73
83
  attr_accessor paykey: String
74
84
 
75
85
  attr_accessor payment_date: Date
@@ -90,6 +100,8 @@ module Straddle
90
100
  Straddle::CustomerDetailsV1
91
101
  ) -> Straddle::CustomerDetailsV1
92
102
 
103
+ attr_accessor documents: ::Array[Straddle::Models::PayoutUnmaskResponse::Data::Document]?
104
+
93
105
  attr_accessor effective_at: Time?
94
106
 
95
107
  attr_accessor metadata: ::Hash[Symbol, String]?
@@ -108,7 +120,7 @@ module Straddle
108
120
 
109
121
  attr_accessor processed_at: Time?
110
122
 
111
- attr_accessor related_payments: ::Hash[Symbol, Straddle::Models::PayoutUnmaskResponse::Data::related_payment]?
123
+ attr_accessor related_payments: ::Array[Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment]?
112
124
 
113
125
  attr_accessor updated_at: Time?
114
126
 
@@ -121,6 +133,9 @@ module Straddle
121
133
  device: Straddle::Models::PayoutUnmaskResponse::Data::Device,
122
134
  external_id: String,
123
135
  funding_ids: ::Array[String],
136
+ has_resubmit: bool,
137
+ is_refund: bool,
138
+ is_resubmit: bool,
124
139
  paykey: String,
125
140
  payment_date: Date,
126
141
  status: Straddle::Models::PayoutUnmaskResponse::Data::status,
@@ -129,12 +144,13 @@ module Straddle
129
144
  trace_ids: ::Hash[Symbol, String],
130
145
  ?created_at: Time?,
131
146
  ?customer_details: Straddle::CustomerDetailsV1,
147
+ ?documents: ::Array[Straddle::Models::PayoutUnmaskResponse::Data::Document]?,
132
148
  ?effective_at: Time?,
133
149
  ?metadata: ::Hash[Symbol, String]?,
134
150
  ?paykey_details: Straddle::PaykeyDetailsV1,
135
151
  ?payment_rail: Straddle::Models::PayoutUnmaskResponse::Data::payment_rail,
136
152
  ?processed_at: Time?,
137
- ?related_payments: ::Hash[Symbol, Straddle::Models::PayoutUnmaskResponse::Data::related_payment]?,
153
+ ?related_payments: ::Array[Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment]?,
138
154
  ?updated_at: Time?
139
155
  ) -> void
140
156
 
@@ -147,6 +163,9 @@ module Straddle
147
163
  device: Straddle::Models::PayoutUnmaskResponse::Data::Device,
148
164
  external_id: String,
149
165
  funding_ids: ::Array[String],
166
+ has_resubmit: bool,
167
+ is_refund: bool,
168
+ is_resubmit: bool,
150
169
  paykey: String,
151
170
  payment_date: Date,
152
171
  status: Straddle::Models::PayoutUnmaskResponse::Data::status,
@@ -155,12 +174,13 @@ module Straddle
155
174
  trace_ids: ::Hash[Symbol, String],
156
175
  created_at: Time?,
157
176
  customer_details: Straddle::CustomerDetailsV1,
177
+ documents: ::Array[Straddle::Models::PayoutUnmaskResponse::Data::Document]?,
158
178
  effective_at: Time?,
159
179
  metadata: ::Hash[Symbol, String]?,
160
180
  paykey_details: Straddle::PaykeyDetailsV1,
161
181
  payment_rail: Straddle::Models::PayoutUnmaskResponse::Data::payment_rail,
162
182
  processed_at: Time?,
163
- related_payments: ::Hash[Symbol, Straddle::Models::PayoutUnmaskResponse::Data::related_payment]?,
183
+ related_payments: ::Array[Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment]?,
164
184
  updated_at: Time?
165
185
  }
166
186
 
@@ -206,6 +226,8 @@ module Straddle
206
226
  | :reversed_customer_dispute
207
227
  | :failed_closed_bank_account
208
228
  | :reversed_closed_bank_account
229
+ | :failed_not_authorized
230
+ | :reversed_not_authorized
209
231
 
210
232
  module SandboxOutcome
211
233
  extend Straddle::Internal::Type::Enum
@@ -221,6 +243,8 @@ module Straddle
221
243
  REVERSED_CUSTOMER_DISPUTE: :reversed_customer_dispute
222
244
  FAILED_CLOSED_BANK_ACCOUNT: :failed_closed_bank_account
223
245
  REVERSED_CLOSED_BANK_ACCOUNT: :reversed_closed_bank_account
246
+ FAILED_NOT_AUTHORIZED: :failed_not_authorized
247
+ REVERSED_NOT_AUTHORIZED: :reversed_not_authorized
224
248
 
225
249
  def self?.values: -> ::Array[Straddle::Models::PayoutUnmaskResponse::Data::Config::sandbox_outcome]
226
250
  end
@@ -414,6 +438,53 @@ module Straddle
414
438
  end
415
439
  end
416
440
 
441
+ type document =
442
+ {
443
+ document_id: String,
444
+ document_name: String,
445
+ document_size: Integer,
446
+ document_type: Straddle::Models::PayoutUnmaskResponse::Data::Document::document_type,
447
+ uploaded_at: Time
448
+ }
449
+
450
+ class Document < Straddle::Internal::Type::BaseModel
451
+ attr_accessor document_id: String
452
+
453
+ attr_accessor document_name: String
454
+
455
+ attr_accessor document_size: Integer
456
+
457
+ attr_accessor document_type: Straddle::Models::PayoutUnmaskResponse::Data::Document::document_type
458
+
459
+ attr_accessor uploaded_at: Time
460
+
461
+ def initialize: (
462
+ document_id: String,
463
+ document_name: String,
464
+ document_size: Integer,
465
+ document_type: Straddle::Models::PayoutUnmaskResponse::Data::Document::document_type,
466
+ uploaded_at: Time
467
+ ) -> void
468
+
469
+ def to_hash: -> {
470
+ document_id: String,
471
+ document_name: String,
472
+ document_size: Integer,
473
+ document_type: Straddle::Models::PayoutUnmaskResponse::Data::Document::document_type,
474
+ uploaded_at: Time
475
+ }
476
+
477
+ type document_type = :payment_authorization
478
+
479
+ module DocumentType
480
+ extend Straddle::Internal::Type::Enum
481
+
482
+ PAYMENT_AUTHORIZATION: :payment_authorization
483
+
484
+ def self?.values: -> ::Array[Straddle::Models::PayoutUnmaskResponse::Data::Document::document_type]
485
+ end
486
+ end
487
+
417
488
  type payment_rail = :ach
418
489
 
419
490
  module PaymentRail
@@ -424,16 +495,54 @@ module Straddle
424
495
  def self?.values: -> ::Array[Straddle::Models::PayoutUnmaskResponse::Data::payment_rail]
425
496
  end
426
497
 
427
- type related_payment = :original | :resubmit | :refund
498
+ type related_payment =
499
+ {
500
+ id: String,
501
+ payment_type: Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::payment_type,
502
+ relationship: Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::relationship
503
+ }
504
+
505
+ class RelatedPayment < Straddle::Internal::Type::BaseModel
506
+ attr_accessor id: String
428
507
 
429
- module RelatedPayment
430
- extend Straddle::Internal::Type::Enum
508
+ attr_accessor payment_type: Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::payment_type
431
509
 
432
- ORIGINAL: :original
433
- RESUBMIT: :resubmit
434
- REFUND: :refund
510
+ attr_accessor relationship: Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::relationship
511
+
512
+ def initialize: (
513
+ id: String,
514
+ payment_type: Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::payment_type,
515
+ relationship: Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::relationship
516
+ ) -> void
517
+
518
+ def to_hash: -> {
519
+ id: String,
520
+ payment_type: Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::payment_type,
521
+ relationship: Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::relationship
522
+ }
435
523
 
436
- def self?.values: -> ::Array[Straddle::Models::PayoutUnmaskResponse::Data::related_payment]
524
+ type payment_type = :charge | :payout
525
+
526
+ module PaymentType
527
+ extend Straddle::Internal::Type::Enum
528
+
529
+ CHARGE: :charge
530
+ PAYOUT: :payout
531
+
532
+ def self?.values: -> ::Array[Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::payment_type]
533
+ end
534
+
535
+ type relationship = :original | :resubmit | :refund
536
+
537
+ module Relationship
538
+ extend Straddle::Internal::Type::Enum
539
+
540
+ ORIGINAL: :original
541
+ RESUBMIT: :resubmit
542
+ REFUND: :refund
543
+
544
+ def self?.values: -> ::Array[Straddle::Models::PayoutUnmaskResponse::Data::RelatedPayment::relationship]
545
+ end
437
546
  end
438
547
  end
439
548
 
@@ -0,0 +1,59 @@
1
+ module Straddle
2
+ module Models
3
+ type payout_upload_authorization_document_params =
4
+ {
5
+ id: String,
6
+ file: Straddle::Internal::file_input,
7
+ correlation_id: String,
8
+ idempotency_key: String,
9
+ request_id: String,
10
+ straddle_account_id: String
11
+ }
12
+ & Straddle::Internal::Type::request_parameters
13
+
14
+ class PayoutUploadAuthorizationDocumentParams < Straddle::Internal::Type::BaseModel
15
+ extend Straddle::Internal::Type::RequestParameters::Converter
16
+ include Straddle::Internal::Type::RequestParameters
17
+
18
+ attr_accessor id: String
19
+
20
+ attr_accessor file: Straddle::Internal::file_input
21
+
22
+ attr_reader correlation_id: String?
23
+
24
+ def correlation_id=: (String) -> String
25
+
26
+ attr_reader idempotency_key: String?
27
+
28
+ def idempotency_key=: (String) -> String
29
+
30
+ attr_reader request_id: String?
31
+
32
+ def request_id=: (String) -> String
33
+
34
+ attr_reader straddle_account_id: String?
35
+
36
+ def straddle_account_id=: (String) -> String
37
+
38
+ def initialize: (
39
+ id: String,
40
+ file: Straddle::Internal::file_input,
41
+ ?correlation_id: String,
42
+ ?idempotency_key: String,
43
+ ?request_id: String,
44
+ ?straddle_account_id: String,
45
+ ?request_options: Straddle::request_opts
46
+ ) -> void
47
+
48
+ def to_hash: -> {
49
+ id: String,
50
+ file: Straddle::Internal::file_input,
51
+ correlation_id: String,
52
+ idempotency_key: String,
53
+ request_id: String,
54
+ straddle_account_id: String,
55
+ request_options: Straddle::RequestOptions
56
+ }
57
+ end
58
+ end
59
+ end
@@ -36,6 +36,9 @@ module Straddle
36
36
  device: Straddle::DeviceInfoV1,
37
37
  external_id: String,
38
38
  funding_ids: ::Array[String],
39
+ has_resubmit: bool,
40
+ is_refund: bool,
41
+ is_resubmit: bool,
39
42
  paykey: String,
40
43
  payment_date: Date,
41
44
  status: Straddle::Models::PayoutV1::Data::status,
@@ -44,12 +47,13 @@ module Straddle
44
47
  trace_ids: ::Hash[Symbol, String],
45
48
  created_at: Time?,
46
49
  customer_details: Straddle::CustomerDetailsV1,
50
+ documents: ::Array[Straddle::PayoutV1::Data::Document]?,
47
51
  effective_at: Time?,
48
52
  metadata: ::Hash[Symbol, String]?,
49
53
  paykey_details: Straddle::PaykeyDetailsV1,
50
54
  payment_rail: Straddle::Models::PayoutV1::Data::payment_rail,
51
55
  processed_at: Time?,
52
- related_payments: ::Hash[Symbol, Straddle::Models::PayoutV1::Data::related_payment]?,
56
+ related_payments: ::Array[Straddle::PayoutV1::Data::RelatedPayment]?,
53
57
  updated_at: Time?
54
58
  }
55
59
 
@@ -70,6 +74,12 @@ module Straddle
70
74
 
71
75
  attr_accessor funding_ids: ::Array[String]
72
76
 
77
+ attr_accessor has_resubmit: bool
78
+
79
+ attr_accessor is_refund: bool
80
+
81
+ attr_accessor is_resubmit: bool
82
+
73
83
  attr_accessor paykey: String
74
84
 
75
85
  attr_accessor payment_date: Date
@@ -90,6 +100,8 @@ module Straddle
90
100
  Straddle::CustomerDetailsV1
91
101
  ) -> Straddle::CustomerDetailsV1
92
102
 
103
+ attr_accessor documents: ::Array[Straddle::PayoutV1::Data::Document]?
104
+
93
105
  attr_accessor effective_at: Time?
94
106
 
95
107
  attr_accessor metadata: ::Hash[Symbol, String]?
@@ -108,7 +120,7 @@ module Straddle
108
120
 
109
121
  attr_accessor processed_at: Time?
110
122
 
111
- attr_accessor related_payments: ::Hash[Symbol, Straddle::Models::PayoutV1::Data::related_payment]?
123
+ attr_accessor related_payments: ::Array[Straddle::PayoutV1::Data::RelatedPayment]?
112
124
 
113
125
  attr_accessor updated_at: Time?
114
126
 
@@ -121,6 +133,9 @@ module Straddle
121
133
  device: Straddle::DeviceInfoV1,
122
134
  external_id: String,
123
135
  funding_ids: ::Array[String],
136
+ has_resubmit: bool,
137
+ is_refund: bool,
138
+ is_resubmit: bool,
124
139
  paykey: String,
125
140
  payment_date: Date,
126
141
  status: Straddle::Models::PayoutV1::Data::status,
@@ -129,12 +144,13 @@ module Straddle
129
144
  trace_ids: ::Hash[Symbol, String],
130
145
  ?created_at: Time?,
131
146
  ?customer_details: Straddle::CustomerDetailsV1,
147
+ ?documents: ::Array[Straddle::PayoutV1::Data::Document]?,
132
148
  ?effective_at: Time?,
133
149
  ?metadata: ::Hash[Symbol, String]?,
134
150
  ?paykey_details: Straddle::PaykeyDetailsV1,
135
151
  ?payment_rail: Straddle::Models::PayoutV1::Data::payment_rail,
136
152
  ?processed_at: Time?,
137
- ?related_payments: ::Hash[Symbol, Straddle::Models::PayoutV1::Data::related_payment]?,
153
+ ?related_payments: ::Array[Straddle::PayoutV1::Data::RelatedPayment]?,
138
154
  ?updated_at: Time?
139
155
  ) -> void
140
156
 
@@ -147,6 +163,9 @@ module Straddle
147
163
  device: Straddle::DeviceInfoV1,
148
164
  external_id: String,
149
165
  funding_ids: ::Array[String],
166
+ has_resubmit: bool,
167
+ is_refund: bool,
168
+ is_resubmit: bool,
150
169
  paykey: String,
151
170
  payment_date: Date,
152
171
  status: Straddle::Models::PayoutV1::Data::status,
@@ -155,12 +174,13 @@ module Straddle
155
174
  trace_ids: ::Hash[Symbol, String],
156
175
  created_at: Time?,
157
176
  customer_details: Straddle::CustomerDetailsV1,
177
+ documents: ::Array[Straddle::PayoutV1::Data::Document]?,
158
178
  effective_at: Time?,
159
179
  metadata: ::Hash[Symbol, String]?,
160
180
  paykey_details: Straddle::PaykeyDetailsV1,
161
181
  payment_rail: Straddle::Models::PayoutV1::Data::payment_rail,
162
182
  processed_at: Time?,
163
- related_payments: ::Hash[Symbol, Straddle::Models::PayoutV1::Data::related_payment]?,
183
+ related_payments: ::Array[Straddle::PayoutV1::Data::RelatedPayment]?,
164
184
  updated_at: Time?
165
185
  }
166
186
 
@@ -206,6 +226,8 @@ module Straddle
206
226
  | :reversed_customer_dispute
207
227
  | :failed_closed_bank_account
208
228
  | :reversed_closed_bank_account
229
+ | :failed_not_authorized
230
+ | :reversed_not_authorized
209
231
 
210
232
  module SandboxOutcome
211
233
  extend Straddle::Internal::Type::Enum
@@ -221,6 +243,8 @@ module Straddle
221
243
  REVERSED_CUSTOMER_DISPUTE: :reversed_customer_dispute
222
244
  FAILED_CLOSED_BANK_ACCOUNT: :failed_closed_bank_account
223
245
  REVERSED_CLOSED_BANK_ACCOUNT: :reversed_closed_bank_account
246
+ FAILED_NOT_AUTHORIZED: :failed_not_authorized
247
+ REVERSED_NOT_AUTHORIZED: :reversed_not_authorized
224
248
 
225
249
  def self?.values: -> ::Array[Straddle::Models::PayoutV1::Data::Config::sandbox_outcome]
226
250
  end
@@ -404,6 +428,53 @@ module Straddle
404
428
  end
405
429
  end
406
430
 
431
+ type document =
432
+ {
433
+ document_id: String,
434
+ document_name: String,
435
+ document_size: Integer,
436
+ document_type: Straddle::Models::PayoutV1::Data::Document::document_type,
437
+ uploaded_at: Time
438
+ }
439
+
440
+ class Document < Straddle::Internal::Type::BaseModel
441
+ attr_accessor document_id: String
442
+
443
+ attr_accessor document_name: String
444
+
445
+ attr_accessor document_size: Integer
446
+
447
+ attr_accessor document_type: Straddle::Models::PayoutV1::Data::Document::document_type
448
+
449
+ attr_accessor uploaded_at: Time
450
+
451
+ def initialize: (
452
+ document_id: String,
453
+ document_name: String,
454
+ document_size: Integer,
455
+ document_type: Straddle::Models::PayoutV1::Data::Document::document_type,
456
+ uploaded_at: Time
457
+ ) -> void
458
+
459
+ def to_hash: -> {
460
+ document_id: String,
461
+ document_name: String,
462
+ document_size: Integer,
463
+ document_type: Straddle::Models::PayoutV1::Data::Document::document_type,
464
+ uploaded_at: Time
465
+ }
466
+
467
+ type document_type = :payment_authorization
468
+
469
+ module DocumentType
470
+ extend Straddle::Internal::Type::Enum
471
+
472
+ PAYMENT_AUTHORIZATION: :payment_authorization
473
+
474
+ def self?.values: -> ::Array[Straddle::Models::PayoutV1::Data::Document::document_type]
475
+ end
476
+ end
477
+
407
478
  type payment_rail = :ach
408
479
 
409
480
  module PaymentRail
@@ -414,16 +485,54 @@ module Straddle
414
485
  def self?.values: -> ::Array[Straddle::Models::PayoutV1::Data::payment_rail]
415
486
  end
416
487
 
417
- type related_payment = :original | :resubmit | :refund
488
+ type related_payment =
489
+ {
490
+ id: String,
491
+ payment_type: Straddle::Models::PayoutV1::Data::RelatedPayment::payment_type,
492
+ relationship: Straddle::Models::PayoutV1::Data::RelatedPayment::relationship
493
+ }
494
+
495
+ class RelatedPayment < Straddle::Internal::Type::BaseModel
496
+ attr_accessor id: String
418
497
 
419
- module RelatedPayment
420
- extend Straddle::Internal::Type::Enum
498
+ attr_accessor payment_type: Straddle::Models::PayoutV1::Data::RelatedPayment::payment_type
421
499
 
422
- ORIGINAL: :original
423
- RESUBMIT: :resubmit
424
- REFUND: :refund
500
+ attr_accessor relationship: Straddle::Models::PayoutV1::Data::RelatedPayment::relationship
501
+
502
+ def initialize: (
503
+ id: String,
504
+ payment_type: Straddle::Models::PayoutV1::Data::RelatedPayment::payment_type,
505
+ relationship: Straddle::Models::PayoutV1::Data::RelatedPayment::relationship
506
+ ) -> void
507
+
508
+ def to_hash: -> {
509
+ id: String,
510
+ payment_type: Straddle::Models::PayoutV1::Data::RelatedPayment::payment_type,
511
+ relationship: Straddle::Models::PayoutV1::Data::RelatedPayment::relationship
512
+ }
425
513
 
426
- def self?.values: -> ::Array[Straddle::Models::PayoutV1::Data::related_payment]
514
+ type payment_type = :charge | :payout
515
+
516
+ module PaymentType
517
+ extend Straddle::Internal::Type::Enum
518
+
519
+ CHARGE: :charge
520
+ PAYOUT: :payout
521
+
522
+ def self?.values: -> ::Array[Straddle::Models::PayoutV1::Data::RelatedPayment::payment_type]
523
+ end
524
+
525
+ type relationship = :original | :resubmit | :refund
526
+
527
+ module Relationship
528
+ extend Straddle::Internal::Type::Enum
529
+
530
+ ORIGINAL: :original
531
+ RESUBMIT: :resubmit
532
+ REFUND: :refund
533
+
534
+ def self?.values: -> ::Array[Straddle::Models::PayoutV1::Data::RelatedPayment::relationship]
535
+ end
427
536
  end
428
537
  end
429
538
 
@@ -101,6 +101,8 @@ module Straddle
101
101
 
102
102
  class PayoutUpdateParams = Straddle::Models::PayoutUpdateParams
103
103
 
104
+ class PayoutUploadAuthorizationDocumentParams = Straddle::Models::PayoutUploadAuthorizationDocumentParams
105
+
104
106
  class PayoutV1 = Straddle::Models::PayoutV1
105
107
 
106
108
  class ReportCreateTotalCustomersByStatusParams = Straddle::Models::ReportCreateTotalCustomersByStatusParams