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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +53 -0
- data/README.md +23 -1
- data/lib/straddle/client.rb +15 -1
- data/lib/straddle/internal/transport/base_client.rb +5 -0
- data/lib/straddle/internal/util.rb +22 -7
- data/lib/straddle/models/charge_create_params.rb +2 -0
- data/lib/straddle/models/charge_unmask_response.rb +142 -11
- data/lib/straddle/models/charge_v1.rb +140 -11
- data/lib/straddle/models/embed/account_list_params.rb +8 -1
- data/lib/straddle/models/embed/representative.rb +2 -2
- data/lib/straddle/models/embed/representative_create_params.rb +2 -2
- data/lib/straddle/models/embed/representative_paged.rb +2 -2
- data/lib/straddle/models/embed/representative_update_params.rb +2 -2
- data/lib/straddle/models/paykey_list_params.rb +17 -1
- data/lib/straddle/models/payment_list_params.rb +55 -1
- data/lib/straddle/models/payment_summary_paged_v1.rb +98 -1
- data/lib/straddle/models/payout_create_params.rb +2 -0
- data/lib/straddle/models/payout_unmask_response.rb +145 -11
- data/lib/straddle/models/payout_upload_authorization_document_params.rb +57 -0
- data/lib/straddle/models/payout_v1.rb +140 -11
- data/lib/straddle/models.rb +2 -0
- data/lib/straddle/resources/embed/accounts.rb +5 -2
- data/lib/straddle/resources/paykeys.rb +7 -1
- data/lib/straddle/resources/payments.rb +19 -1
- data/lib/straddle/resources/payouts.rb +49 -0
- data/lib/straddle/version.rb +1 -1
- data/lib/straddle.rb +1 -0
- data/rbi/straddle/internal/util.rbi +8 -0
- data/rbi/straddle/models/charge_create_params.rbi +10 -0
- data/rbi/straddle/models/charge_unmask_response.rbi +287 -34
- data/rbi/straddle/models/charge_v1.rbi +268 -39
- data/rbi/straddle/models/embed/account_list_params.rbi +9 -0
- data/rbi/straddle/models/embed/representative.rbi +2 -2
- data/rbi/straddle/models/embed/representative_create_params.rbi +2 -2
- data/rbi/straddle/models/embed/representative_paged.rbi +2 -2
- data/rbi/straddle/models/embed/representative_update_params.rbi +2 -2
- data/rbi/straddle/models/paykey_list_params.rbi +22 -0
- data/rbi/straddle/models/payment_list_params.rbi +75 -0
- data/rbi/straddle/models/payment_summary_paged_v1.rbi +198 -3
- data/rbi/straddle/models/payout_create_params.rbi +10 -0
- data/rbi/straddle/models/payout_unmask_response.rbi +287 -34
- data/rbi/straddle/models/payout_upload_authorization_document_params.rbi +88 -0
- data/rbi/straddle/models/payout_v1.rbi +268 -39
- data/rbi/straddle/models.rbi +3 -0
- data/rbi/straddle/resources/embed/accounts.rbi +3 -0
- data/rbi/straddle/resources/paykeys.rbi +6 -0
- data/rbi/straddle/resources/payments.rbi +20 -0
- data/rbi/straddle/resources/payouts.rbi +33 -0
- data/sig/straddle/internal/util.rbs +4 -0
- data/sig/straddle/models/charge_create_params.rbs +4 -0
- data/sig/straddle/models/charge_unmask_response.rbs +120 -11
- data/sig/straddle/models/charge_v1.rbs +120 -11
- data/sig/straddle/models/embed/account_list_params.rbs +7 -0
- data/sig/straddle/models/paykey_list_params.rbs +14 -0
- data/sig/straddle/models/payment_list_params.rbs +57 -2
- data/sig/straddle/models/payment_summary_paged_v1.rbs +78 -3
- data/sig/straddle/models/payout_create_params.rbs +4 -0
- data/sig/straddle/models/payout_unmask_response.rbs +120 -11
- data/sig/straddle/models/payout_upload_authorization_document_params.rbs +59 -0
- data/sig/straddle/models/payout_v1.rbs +120 -11
- data/sig/straddle/models.rbs +2 -0
- data/sig/straddle/resources/embed/accounts.rbs +1 -0
- data/sig/straddle/resources/paykeys.rbs +2 -0
- data/sig/straddle/resources/payments.rbs +6 -0
- data/sig/straddle/resources/payouts.rbs +10 -0
- metadata +5 -2
|
@@ -108,6 +108,18 @@ module Straddle
|
|
|
108
108
|
sig { returns(T::Array[String]) }
|
|
109
109
|
attr_accessor :funding_ids
|
|
110
110
|
|
|
111
|
+
# Has the payout been resubmitted.
|
|
112
|
+
sig { returns(T::Boolean) }
|
|
113
|
+
attr_accessor :has_resubmit
|
|
114
|
+
|
|
115
|
+
# Is the payout a refund of an original charge.
|
|
116
|
+
sig { returns(T::Boolean) }
|
|
117
|
+
attr_accessor :is_refund
|
|
118
|
+
|
|
119
|
+
# Is the payout a resubmit of an original payout.
|
|
120
|
+
sig { returns(T::Boolean) }
|
|
121
|
+
attr_accessor :is_resubmit
|
|
122
|
+
|
|
111
123
|
# Value of the `paykey` used for the payout.
|
|
112
124
|
sig { returns(String) }
|
|
113
125
|
attr_accessor :paykey
|
|
@@ -149,6 +161,11 @@ module Straddle
|
|
|
149
161
|
end
|
|
150
162
|
attr_writer :customer_details
|
|
151
163
|
|
|
164
|
+
# Documents uploaded for this payout (e.g. proof of authorization), in the order
|
|
165
|
+
# they were uploaded.
|
|
166
|
+
sig { returns(T.nilable(T::Array[Straddle::PayoutV1::Data::Document])) }
|
|
167
|
+
attr_accessor :documents
|
|
168
|
+
|
|
152
169
|
# The actual date on which the payment occurred. For payouts, this is the date the
|
|
153
170
|
# funds were sent from your bank account.
|
|
154
171
|
sig { returns(T.nilable(Time)) }
|
|
@@ -188,14 +205,7 @@ module Straddle
|
|
|
188
205
|
|
|
189
206
|
# Related payments.
|
|
190
207
|
sig do
|
|
191
|
-
returns(
|
|
192
|
-
T.nilable(
|
|
193
|
-
T::Hash[
|
|
194
|
-
Symbol,
|
|
195
|
-
Straddle::PayoutV1::Data::RelatedPayment::TaggedSymbol
|
|
196
|
-
]
|
|
197
|
-
)
|
|
198
|
-
)
|
|
208
|
+
returns(T.nilable(T::Array[Straddle::PayoutV1::Data::RelatedPayment]))
|
|
199
209
|
end
|
|
200
210
|
attr_accessor :related_payments
|
|
201
211
|
|
|
@@ -213,6 +223,9 @@ module Straddle
|
|
|
213
223
|
device: Straddle::DeviceInfoV1::OrHash,
|
|
214
224
|
external_id: String,
|
|
215
225
|
funding_ids: T::Array[String],
|
|
226
|
+
has_resubmit: T::Boolean,
|
|
227
|
+
is_refund: T::Boolean,
|
|
228
|
+
is_resubmit: T::Boolean,
|
|
216
229
|
paykey: String,
|
|
217
230
|
payment_date: Date,
|
|
218
231
|
status: Straddle::PayoutV1::Data::Status::OrSymbol,
|
|
@@ -222,6 +235,8 @@ module Straddle
|
|
|
222
235
|
trace_ids: T::Hash[Symbol, String],
|
|
223
236
|
created_at: T.nilable(Time),
|
|
224
237
|
customer_details: Straddle::CustomerDetailsV1::OrHash,
|
|
238
|
+
documents:
|
|
239
|
+
T.nilable(T::Array[Straddle::PayoutV1::Data::Document::OrHash]),
|
|
225
240
|
effective_at: T.nilable(Time),
|
|
226
241
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
227
242
|
paykey_details: Straddle::PaykeyDetailsV1::OrHash,
|
|
@@ -229,10 +244,7 @@ module Straddle
|
|
|
229
244
|
processed_at: T.nilable(Time),
|
|
230
245
|
related_payments:
|
|
231
246
|
T.nilable(
|
|
232
|
-
T::
|
|
233
|
-
Symbol,
|
|
234
|
-
Straddle::PayoutV1::Data::RelatedPayment::OrSymbol
|
|
235
|
-
]
|
|
247
|
+
T::Array[Straddle::PayoutV1::Data::RelatedPayment::OrHash]
|
|
236
248
|
),
|
|
237
249
|
updated_at: T.nilable(Time)
|
|
238
250
|
).returns(T.attached_class)
|
|
@@ -255,6 +267,12 @@ module Straddle
|
|
|
255
267
|
external_id:,
|
|
256
268
|
# Funding Ids
|
|
257
269
|
funding_ids:,
|
|
270
|
+
# Has the payout been resubmitted.
|
|
271
|
+
has_resubmit:,
|
|
272
|
+
# Is the payout a refund of an original charge.
|
|
273
|
+
is_refund:,
|
|
274
|
+
# Is the payout a resubmit of an original payout.
|
|
275
|
+
is_resubmit:,
|
|
258
276
|
# Value of the `paykey` used for the payout.
|
|
259
277
|
paykey:,
|
|
260
278
|
# The desired date on which the payment should be occur. For payouts, this means
|
|
@@ -272,6 +290,9 @@ module Straddle
|
|
|
272
290
|
created_at: nil,
|
|
273
291
|
# Information about the customer associated with the payout.
|
|
274
292
|
customer_details: nil,
|
|
293
|
+
# Documents uploaded for this payout (e.g. proof of authorization), in the order
|
|
294
|
+
# they were uploaded.
|
|
295
|
+
documents: nil,
|
|
275
296
|
# The actual date on which the payment occurred. For payouts, this is the date the
|
|
276
297
|
# funds were sent from your bank account.
|
|
277
298
|
effective_at: nil,
|
|
@@ -303,6 +324,9 @@ module Straddle
|
|
|
303
324
|
device: Straddle::DeviceInfoV1,
|
|
304
325
|
external_id: String,
|
|
305
326
|
funding_ids: T::Array[String],
|
|
327
|
+
has_resubmit: T::Boolean,
|
|
328
|
+
is_refund: T::Boolean,
|
|
329
|
+
is_resubmit: T::Boolean,
|
|
306
330
|
paykey: String,
|
|
307
331
|
payment_date: Date,
|
|
308
332
|
status: Straddle::PayoutV1::Data::Status::TaggedSymbol,
|
|
@@ -311,18 +335,15 @@ module Straddle
|
|
|
311
335
|
trace_ids: T::Hash[Symbol, String],
|
|
312
336
|
created_at: T.nilable(Time),
|
|
313
337
|
customer_details: Straddle::CustomerDetailsV1,
|
|
338
|
+
documents:
|
|
339
|
+
T.nilable(T::Array[Straddle::PayoutV1::Data::Document]),
|
|
314
340
|
effective_at: T.nilable(Time),
|
|
315
341
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
316
342
|
paykey_details: Straddle::PaykeyDetailsV1,
|
|
317
343
|
payment_rail: Straddle::PayoutV1::Data::PaymentRail::TaggedSymbol,
|
|
318
344
|
processed_at: T.nilable(Time),
|
|
319
345
|
related_payments:
|
|
320
|
-
T.nilable(
|
|
321
|
-
T::Hash[
|
|
322
|
-
Symbol,
|
|
323
|
-
Straddle::PayoutV1::Data::RelatedPayment::TaggedSymbol
|
|
324
|
-
]
|
|
325
|
-
),
|
|
346
|
+
T.nilable(T::Array[Straddle::PayoutV1::Data::RelatedPayment]),
|
|
326
347
|
updated_at: T.nilable(Time)
|
|
327
348
|
}
|
|
328
349
|
)
|
|
@@ -462,6 +483,16 @@ module Straddle
|
|
|
462
483
|
:reversed_closed_bank_account,
|
|
463
484
|
Straddle::PayoutV1::Data::Config::SandboxOutcome::TaggedSymbol
|
|
464
485
|
)
|
|
486
|
+
FAILED_NOT_AUTHORIZED =
|
|
487
|
+
T.let(
|
|
488
|
+
:failed_not_authorized,
|
|
489
|
+
Straddle::PayoutV1::Data::Config::SandboxOutcome::TaggedSymbol
|
|
490
|
+
)
|
|
491
|
+
REVERSED_NOT_AUTHORIZED =
|
|
492
|
+
T.let(
|
|
493
|
+
:reversed_not_authorized,
|
|
494
|
+
Straddle::PayoutV1::Data::Config::SandboxOutcome::TaggedSymbol
|
|
495
|
+
)
|
|
465
496
|
|
|
466
497
|
sig do
|
|
467
498
|
override.returns(
|
|
@@ -877,6 +908,103 @@ module Straddle
|
|
|
877
908
|
end
|
|
878
909
|
end
|
|
879
910
|
|
|
911
|
+
class Document < Straddle::Internal::Type::BaseModel
|
|
912
|
+
OrHash =
|
|
913
|
+
T.type_alias do
|
|
914
|
+
T.any(
|
|
915
|
+
Straddle::PayoutV1::Data::Document,
|
|
916
|
+
Straddle::Internal::AnyHash
|
|
917
|
+
)
|
|
918
|
+
end
|
|
919
|
+
|
|
920
|
+
# Unique identifier for this document.
|
|
921
|
+
sig { returns(String) }
|
|
922
|
+
attr_accessor :document_id
|
|
923
|
+
|
|
924
|
+
# The file name of this document as uploaded.
|
|
925
|
+
sig { returns(String) }
|
|
926
|
+
attr_accessor :document_name
|
|
927
|
+
|
|
928
|
+
# The size of this document in bytes.
|
|
929
|
+
sig { returns(Integer) }
|
|
930
|
+
attr_accessor :document_size
|
|
931
|
+
|
|
932
|
+
sig do
|
|
933
|
+
returns(
|
|
934
|
+
Straddle::PayoutV1::Data::Document::DocumentType::TaggedSymbol
|
|
935
|
+
)
|
|
936
|
+
end
|
|
937
|
+
attr_accessor :document_type
|
|
938
|
+
|
|
939
|
+
# The UTC timestamp when this document was uploaded.
|
|
940
|
+
sig { returns(Time) }
|
|
941
|
+
attr_accessor :uploaded_at
|
|
942
|
+
|
|
943
|
+
sig do
|
|
944
|
+
params(
|
|
945
|
+
document_id: String,
|
|
946
|
+
document_name: String,
|
|
947
|
+
document_size: Integer,
|
|
948
|
+
document_type:
|
|
949
|
+
Straddle::PayoutV1::Data::Document::DocumentType::OrSymbol,
|
|
950
|
+
uploaded_at: Time
|
|
951
|
+
).returns(T.attached_class)
|
|
952
|
+
end
|
|
953
|
+
def self.new(
|
|
954
|
+
# Unique identifier for this document.
|
|
955
|
+
document_id:,
|
|
956
|
+
# The file name of this document as uploaded.
|
|
957
|
+
document_name:,
|
|
958
|
+
# The size of this document in bytes.
|
|
959
|
+
document_size:,
|
|
960
|
+
document_type:,
|
|
961
|
+
# The UTC timestamp when this document was uploaded.
|
|
962
|
+
uploaded_at:
|
|
963
|
+
)
|
|
964
|
+
end
|
|
965
|
+
|
|
966
|
+
sig do
|
|
967
|
+
override.returns(
|
|
968
|
+
{
|
|
969
|
+
document_id: String,
|
|
970
|
+
document_name: String,
|
|
971
|
+
document_size: Integer,
|
|
972
|
+
document_type:
|
|
973
|
+
Straddle::PayoutV1::Data::Document::DocumentType::TaggedSymbol,
|
|
974
|
+
uploaded_at: Time
|
|
975
|
+
}
|
|
976
|
+
)
|
|
977
|
+
end
|
|
978
|
+
def to_hash
|
|
979
|
+
end
|
|
980
|
+
|
|
981
|
+
module DocumentType
|
|
982
|
+
extend Straddle::Internal::Type::Enum
|
|
983
|
+
|
|
984
|
+
TaggedSymbol =
|
|
985
|
+
T.type_alias do
|
|
986
|
+
T.all(Symbol, Straddle::PayoutV1::Data::Document::DocumentType)
|
|
987
|
+
end
|
|
988
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
989
|
+
|
|
990
|
+
PAYMENT_AUTHORIZATION =
|
|
991
|
+
T.let(
|
|
992
|
+
:payment_authorization,
|
|
993
|
+
Straddle::PayoutV1::Data::Document::DocumentType::TaggedSymbol
|
|
994
|
+
)
|
|
995
|
+
|
|
996
|
+
sig do
|
|
997
|
+
override.returns(
|
|
998
|
+
T::Array[
|
|
999
|
+
Straddle::PayoutV1::Data::Document::DocumentType::TaggedSymbol
|
|
1000
|
+
]
|
|
1001
|
+
)
|
|
1002
|
+
end
|
|
1003
|
+
def self.values
|
|
1004
|
+
end
|
|
1005
|
+
end
|
|
1006
|
+
end
|
|
1007
|
+
|
|
880
1008
|
# The payment rail used for the payout.
|
|
881
1009
|
module PaymentRail
|
|
882
1010
|
extend Straddle::Internal::Type::Enum
|
|
@@ -898,37 +1026,138 @@ module Straddle
|
|
|
898
1026
|
end
|
|
899
1027
|
end
|
|
900
1028
|
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
TaggedSymbol =
|
|
1029
|
+
class RelatedPayment < Straddle::Internal::Type::BaseModel
|
|
1030
|
+
OrHash =
|
|
905
1031
|
T.type_alias do
|
|
906
|
-
T.
|
|
1032
|
+
T.any(
|
|
1033
|
+
Straddle::PayoutV1::Data::RelatedPayment,
|
|
1034
|
+
Straddle::Internal::AnyHash
|
|
1035
|
+
)
|
|
907
1036
|
end
|
|
908
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
909
1037
|
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
Straddle::PayoutV1::Data::RelatedPayment::TaggedSymbol
|
|
1038
|
+
# The ID of the related payment.
|
|
1039
|
+
sig { returns(String) }
|
|
1040
|
+
attr_accessor :id
|
|
1041
|
+
|
|
1042
|
+
# The type of payment.
|
|
1043
|
+
sig do
|
|
1044
|
+
returns(
|
|
1045
|
+
Straddle::PayoutV1::Data::RelatedPayment::PaymentType::TaggedSymbol
|
|
919
1046
|
)
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
1047
|
+
end
|
|
1048
|
+
attr_accessor :payment_type
|
|
1049
|
+
|
|
1050
|
+
sig do
|
|
1051
|
+
returns(
|
|
1052
|
+
Straddle::PayoutV1::Data::RelatedPayment::Relationship::TaggedSymbol
|
|
924
1053
|
)
|
|
1054
|
+
end
|
|
1055
|
+
attr_accessor :relationship
|
|
1056
|
+
|
|
1057
|
+
sig do
|
|
1058
|
+
params(
|
|
1059
|
+
id: String,
|
|
1060
|
+
payment_type:
|
|
1061
|
+
Straddle::PayoutV1::Data::RelatedPayment::PaymentType::OrSymbol,
|
|
1062
|
+
relationship:
|
|
1063
|
+
Straddle::PayoutV1::Data::RelatedPayment::Relationship::OrSymbol
|
|
1064
|
+
).returns(T.attached_class)
|
|
1065
|
+
end
|
|
1066
|
+
def self.new(
|
|
1067
|
+
# The ID of the related payment.
|
|
1068
|
+
id:,
|
|
1069
|
+
# The type of payment.
|
|
1070
|
+
payment_type:,
|
|
1071
|
+
relationship:
|
|
1072
|
+
)
|
|
1073
|
+
end
|
|
925
1074
|
|
|
926
1075
|
sig do
|
|
927
1076
|
override.returns(
|
|
928
|
-
|
|
1077
|
+
{
|
|
1078
|
+
id: String,
|
|
1079
|
+
payment_type:
|
|
1080
|
+
Straddle::PayoutV1::Data::RelatedPayment::PaymentType::TaggedSymbol,
|
|
1081
|
+
relationship:
|
|
1082
|
+
Straddle::PayoutV1::Data::RelatedPayment::Relationship::TaggedSymbol
|
|
1083
|
+
}
|
|
929
1084
|
)
|
|
930
1085
|
end
|
|
931
|
-
def
|
|
1086
|
+
def to_hash
|
|
1087
|
+
end
|
|
1088
|
+
|
|
1089
|
+
# The type of payment.
|
|
1090
|
+
module PaymentType
|
|
1091
|
+
extend Straddle::Internal::Type::Enum
|
|
1092
|
+
|
|
1093
|
+
TaggedSymbol =
|
|
1094
|
+
T.type_alias do
|
|
1095
|
+
T.all(
|
|
1096
|
+
Symbol,
|
|
1097
|
+
Straddle::PayoutV1::Data::RelatedPayment::PaymentType
|
|
1098
|
+
)
|
|
1099
|
+
end
|
|
1100
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1101
|
+
|
|
1102
|
+
CHARGE =
|
|
1103
|
+
T.let(
|
|
1104
|
+
:charge,
|
|
1105
|
+
Straddle::PayoutV1::Data::RelatedPayment::PaymentType::TaggedSymbol
|
|
1106
|
+
)
|
|
1107
|
+
PAYOUT =
|
|
1108
|
+
T.let(
|
|
1109
|
+
:payout,
|
|
1110
|
+
Straddle::PayoutV1::Data::RelatedPayment::PaymentType::TaggedSymbol
|
|
1111
|
+
)
|
|
1112
|
+
|
|
1113
|
+
sig do
|
|
1114
|
+
override.returns(
|
|
1115
|
+
T::Array[
|
|
1116
|
+
Straddle::PayoutV1::Data::RelatedPayment::PaymentType::TaggedSymbol
|
|
1117
|
+
]
|
|
1118
|
+
)
|
|
1119
|
+
end
|
|
1120
|
+
def self.values
|
|
1121
|
+
end
|
|
1122
|
+
end
|
|
1123
|
+
|
|
1124
|
+
module Relationship
|
|
1125
|
+
extend Straddle::Internal::Type::Enum
|
|
1126
|
+
|
|
1127
|
+
TaggedSymbol =
|
|
1128
|
+
T.type_alias do
|
|
1129
|
+
T.all(
|
|
1130
|
+
Symbol,
|
|
1131
|
+
Straddle::PayoutV1::Data::RelatedPayment::Relationship
|
|
1132
|
+
)
|
|
1133
|
+
end
|
|
1134
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1135
|
+
|
|
1136
|
+
ORIGINAL =
|
|
1137
|
+
T.let(
|
|
1138
|
+
:original,
|
|
1139
|
+
Straddle::PayoutV1::Data::RelatedPayment::Relationship::TaggedSymbol
|
|
1140
|
+
)
|
|
1141
|
+
RESUBMIT =
|
|
1142
|
+
T.let(
|
|
1143
|
+
:resubmit,
|
|
1144
|
+
Straddle::PayoutV1::Data::RelatedPayment::Relationship::TaggedSymbol
|
|
1145
|
+
)
|
|
1146
|
+
REFUND =
|
|
1147
|
+
T.let(
|
|
1148
|
+
:refund,
|
|
1149
|
+
Straddle::PayoutV1::Data::RelatedPayment::Relationship::TaggedSymbol
|
|
1150
|
+
)
|
|
1151
|
+
|
|
1152
|
+
sig do
|
|
1153
|
+
override.returns(
|
|
1154
|
+
T::Array[
|
|
1155
|
+
Straddle::PayoutV1::Data::RelatedPayment::Relationship::TaggedSymbol
|
|
1156
|
+
]
|
|
1157
|
+
)
|
|
1158
|
+
end
|
|
1159
|
+
def self.values
|
|
1160
|
+
end
|
|
932
1161
|
end
|
|
933
1162
|
end
|
|
934
1163
|
end
|
data/rbi/straddle/models.rbi
CHANGED
|
@@ -103,6 +103,9 @@ module Straddle
|
|
|
103
103
|
|
|
104
104
|
PayoutUpdateParams = Straddle::Models::PayoutUpdateParams
|
|
105
105
|
|
|
106
|
+
PayoutUploadAuthorizationDocumentParams =
|
|
107
|
+
Straddle::Models::PayoutUploadAuthorizationDocumentParams
|
|
108
|
+
|
|
106
109
|
PayoutV1 = Straddle::Models::PayoutV1
|
|
107
110
|
|
|
108
111
|
ReportCreateTotalCustomersByStatusParams =
|
|
@@ -107,6 +107,7 @@ module Straddle
|
|
|
107
107
|
# filtering options.
|
|
108
108
|
sig do
|
|
109
109
|
params(
|
|
110
|
+
external_id: String,
|
|
110
111
|
page_number: Integer,
|
|
111
112
|
page_size: Integer,
|
|
112
113
|
search_text: String,
|
|
@@ -124,6 +125,8 @@ module Straddle
|
|
|
124
125
|
)
|
|
125
126
|
end
|
|
126
127
|
def list(
|
|
128
|
+
# Query param
|
|
129
|
+
external_id: nil,
|
|
127
130
|
# Query param: Results page number. Starts at page 1. Default value: 1
|
|
128
131
|
page_number: nil,
|
|
129
132
|
# Query param: Page size. Default value: 100. Max value: 1000
|
|
@@ -20,6 +20,8 @@ module Straddle
|
|
|
20
20
|
# supports advanced sorting and filtering options.
|
|
21
21
|
sig do
|
|
22
22
|
params(
|
|
23
|
+
created_from: Time,
|
|
24
|
+
created_to: Time,
|
|
23
25
|
customer_id: String,
|
|
24
26
|
page_number: Integer,
|
|
25
27
|
page_size: Integer,
|
|
@@ -40,6 +42,10 @@ module Straddle
|
|
|
40
42
|
)
|
|
41
43
|
end
|
|
42
44
|
def list(
|
|
45
|
+
# Query param: Start date for filtering by creation date.
|
|
46
|
+
created_from: nil,
|
|
47
|
+
# Query param: End date for filtering by creation date.
|
|
48
|
+
created_to: nil,
|
|
43
49
|
# Query param: Filter paykeys by related customer ID.
|
|
44
50
|
customer_id: nil,
|
|
45
51
|
# Query param: Page number for paginated results. Starts at 1.
|
|
@@ -16,15 +16,21 @@ module Straddle
|
|
|
16
16
|
Straddle::PaymentListParams::DefaultSortOrder::OrSymbol,
|
|
17
17
|
external_id: String,
|
|
18
18
|
funding_id: String,
|
|
19
|
+
has_refund: T::Boolean,
|
|
20
|
+
has_resubmit: T::Boolean,
|
|
19
21
|
include_metadata: T::Boolean,
|
|
22
|
+
is_refund: T::Boolean,
|
|
23
|
+
is_resubmit: T::Boolean,
|
|
20
24
|
max_amount: Integer,
|
|
21
25
|
max_created_at: Time,
|
|
22
26
|
max_effective_at: Time,
|
|
23
27
|
max_payment_date: Date,
|
|
28
|
+
max_updated_at: Time,
|
|
24
29
|
min_amount: Integer,
|
|
25
30
|
min_created_at: Time,
|
|
26
31
|
min_effective_at: Time,
|
|
27
32
|
min_payment_date: Date,
|
|
33
|
+
min_updated_at: Time,
|
|
28
34
|
page_number: Integer,
|
|
29
35
|
page_size: Integer,
|
|
30
36
|
paykey: String,
|
|
@@ -64,8 +70,18 @@ module Straddle
|
|
|
64
70
|
external_id: nil,
|
|
65
71
|
# Query param: Search using the `funding_id` of a `charge` or `payout`.
|
|
66
72
|
funding_id: nil,
|
|
73
|
+
# Query param: Has the payment been refunded by an associated payout (only
|
|
74
|
+
# applicable to charges).
|
|
75
|
+
has_refund: nil,
|
|
76
|
+
# Query param: Has the payment been resubmitted.
|
|
77
|
+
has_resubmit: nil,
|
|
67
78
|
# Query param: Include the metadata for payments in the returned data.
|
|
68
79
|
include_metadata: nil,
|
|
80
|
+
# Query param: Is the payment a refund of an original charge (only applicable to
|
|
81
|
+
# payouts).
|
|
82
|
+
is_refund: nil,
|
|
83
|
+
# Query param: Is the payment a resubmit of an original payment.
|
|
84
|
+
is_resubmit: nil,
|
|
69
85
|
# Query param: Search using a maximum `amount` of a `charge` or `payout`.
|
|
70
86
|
max_amount: nil,
|
|
71
87
|
# Query param: Search using the latest `created_at` date of a `charge` or
|
|
@@ -75,6 +91,8 @@ module Straddle
|
|
|
75
91
|
max_effective_at: nil,
|
|
76
92
|
# Query param: Search using the latest `payment_date` of a `charge` or `payout`.
|
|
77
93
|
max_payment_date: nil,
|
|
94
|
+
# Query param: Filter to payments last updated on or before this timestamp.
|
|
95
|
+
max_updated_at: nil,
|
|
78
96
|
# Query param: Search using the minimum `amount of a `charge`or`payout`.
|
|
79
97
|
min_amount: nil,
|
|
80
98
|
# Query param: Search using the earliest `created_at` date of a `charge` or
|
|
@@ -85,6 +103,8 @@ module Straddle
|
|
|
85
103
|
min_effective_at: nil,
|
|
86
104
|
# Query param: Search using the earliest ` `of a `charge` or `payout`.
|
|
87
105
|
min_payment_date: nil,
|
|
106
|
+
# Query param: Filter to payments last updated on or after this timestamp.
|
|
107
|
+
min_updated_at: nil,
|
|
88
108
|
# Query param: Results page number. Starts at page 1.
|
|
89
109
|
page_number: nil,
|
|
90
110
|
# Query param: Results page size. Max value: 1000
|
|
@@ -247,6 +247,39 @@ module Straddle
|
|
|
247
247
|
)
|
|
248
248
|
end
|
|
249
249
|
|
|
250
|
+
# Uploads a document as proof of authorization for a payout. Uploading again adds
|
|
251
|
+
# another entry to documents rather than replacing the previous one.
|
|
252
|
+
sig do
|
|
253
|
+
params(
|
|
254
|
+
id: String,
|
|
255
|
+
file: Straddle::Internal::FileInput,
|
|
256
|
+
correlation_id: String,
|
|
257
|
+
idempotency_key: String,
|
|
258
|
+
request_id: String,
|
|
259
|
+
straddle_account_id: String,
|
|
260
|
+
request_options: Straddle::RequestOptions::OrHash
|
|
261
|
+
).returns(Straddle::PayoutV1)
|
|
262
|
+
end
|
|
263
|
+
def upload_authorization_document(
|
|
264
|
+
# Path param
|
|
265
|
+
id,
|
|
266
|
+
# Body param: The document file to upload as proof of authorization for this
|
|
267
|
+
# payout.
|
|
268
|
+
file:,
|
|
269
|
+
# Header param: Optional client generated identifier to trace and debug a series
|
|
270
|
+
# of requests.
|
|
271
|
+
correlation_id: nil,
|
|
272
|
+
# Header param: Optional client generated value to use for idempotent requests.
|
|
273
|
+
idempotency_key: nil,
|
|
274
|
+
# Header param: Optional client generated identifier to trace and debug a request.
|
|
275
|
+
request_id: nil,
|
|
276
|
+
# Header param: For use by platforms to specify an account id and set scope of a
|
|
277
|
+
# request.
|
|
278
|
+
straddle_account_id: nil,
|
|
279
|
+
request_options: {}
|
|
280
|
+
)
|
|
281
|
+
end
|
|
282
|
+
|
|
250
283
|
# @api private
|
|
251
284
|
sig { params(client: Straddle::Client).returns(T.attached_class) }
|
|
252
285
|
def self.new(client:)
|
|
@@ -45,8 +45,12 @@ module Straddle
|
|
|
45
45
|
-> top?
|
|
46
46
|
} -> top?
|
|
47
47
|
|
|
48
|
+
RFC_3986_NOT_PCHARS: Regexp
|
|
49
|
+
|
|
48
50
|
def self?.uri_origin: (URI::Generic uri) -> String
|
|
49
51
|
|
|
52
|
+
def self?.encode_path: (String | Integer path) -> String
|
|
53
|
+
|
|
50
54
|
def self?.interpolate_path: (String | ::Array[String] path) -> String
|
|
51
55
|
|
|
52
56
|
def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
|
|
@@ -154,6 +154,8 @@ module Straddle
|
|
|
154
154
|
| :reversed_customer_dispute
|
|
155
155
|
| :failed_closed_bank_account
|
|
156
156
|
| :reversed_closed_bank_account
|
|
157
|
+
| :failed_not_authorized
|
|
158
|
+
| :reversed_not_authorized
|
|
157
159
|
|
|
158
160
|
module SandboxOutcome
|
|
159
161
|
extend Straddle::Internal::Type::Enum
|
|
@@ -169,6 +171,8 @@ module Straddle
|
|
|
169
171
|
REVERSED_CUSTOMER_DISPUTE: :reversed_customer_dispute
|
|
170
172
|
FAILED_CLOSED_BANK_ACCOUNT: :failed_closed_bank_account
|
|
171
173
|
REVERSED_CLOSED_BANK_ACCOUNT: :reversed_closed_bank_account
|
|
174
|
+
FAILED_NOT_AUTHORIZED: :failed_not_authorized
|
|
175
|
+
REVERSED_NOT_AUTHORIZED: :reversed_not_authorized
|
|
172
176
|
|
|
173
177
|
def self?.values: -> ::Array[Straddle::Models::ChargeCreateParams::Config::sandbox_outcome]
|
|
174
178
|
end
|