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
@@ -119,6 +119,18 @@ module Straddle
119
119
  sig { returns(T::Array[String]) }
120
120
  attr_accessor :funding_ids
121
121
 
122
+ # Has the charge been refunded by an associated payout.
123
+ sig { returns(T::Boolean) }
124
+ attr_accessor :has_refund
125
+
126
+ # Has the charge been resubmitted.
127
+ sig { returns(T::Boolean) }
128
+ attr_accessor :has_resubmit
129
+
130
+ # Is the charge a resubmit of an original charge.
131
+ sig { returns(T::Boolean) }
132
+ attr_accessor :is_resubmit
133
+
122
134
  # Value of the `paykey` used for the charge.
123
135
  sig { returns(String) }
124
136
  attr_accessor :paykey
@@ -160,6 +172,11 @@ module Straddle
160
172
  end
161
173
  attr_writer :customer_details
162
174
 
175
+ # Documents uploaded for this charge (e.g. proof of authorization), in the order
176
+ # they were uploaded.
177
+ sig { returns(T.nilable(T::Array[Straddle::ChargeV1::Data::Document])) }
178
+ attr_accessor :documents
179
+
163
180
  # Timestamp of when the charge was effective in the customer's bank account,
164
181
  # otherwise known as the date on which the customer is debited.
165
182
  sig { returns(T.nilable(Time)) }
@@ -199,14 +216,7 @@ module Straddle
199
216
 
200
217
  # Related payments.
201
218
  sig do
202
- returns(
203
- T.nilable(
204
- T::Hash[
205
- Symbol,
206
- Straddle::ChargeV1::Data::RelatedPayment::TaggedSymbol
207
- ]
208
- )
209
- )
219
+ returns(T.nilable(T::Array[Straddle::ChargeV1::Data::RelatedPayment]))
210
220
  end
211
221
  attr_accessor :related_payments
212
222
 
@@ -222,6 +232,9 @@ module Straddle
222
232
  device: Straddle::DeviceInfoV1::OrHash,
223
233
  external_id: String,
224
234
  funding_ids: T::Array[String],
235
+ has_refund: T::Boolean,
236
+ has_resubmit: T::Boolean,
237
+ is_resubmit: T::Boolean,
225
238
  paykey: String,
226
239
  payment_date: Date,
227
240
  status: Straddle::ChargeV1::Data::Status::OrSymbol,
@@ -231,6 +244,8 @@ module Straddle
231
244
  trace_ids: T::Hash[Symbol, String],
232
245
  updated_at: T.nilable(Time),
233
246
  customer_details: Straddle::CustomerDetailsV1::OrHash,
247
+ documents:
248
+ T.nilable(T::Array[Straddle::ChargeV1::Data::Document::OrHash]),
234
249
  effective_at: T.nilable(Time),
235
250
  metadata: T.nilable(T::Hash[Symbol, String]),
236
251
  paykey_details: Straddle::PaykeyDetailsV1::OrHash,
@@ -238,10 +253,7 @@ module Straddle
238
253
  processed_at: T.nilable(Time),
239
254
  related_payments:
240
255
  T.nilable(
241
- T::Hash[
242
- Symbol,
243
- Straddle::ChargeV1::Data::RelatedPayment::OrSymbol
244
- ]
256
+ T::Array[Straddle::ChargeV1::Data::RelatedPayment::OrHash]
245
257
  )
246
258
  ).returns(T.attached_class)
247
259
  end
@@ -270,6 +282,12 @@ module Straddle
270
282
  external_id:,
271
283
  # Funding Ids
272
284
  funding_ids:,
285
+ # Has the charge been refunded by an associated payout.
286
+ has_refund:,
287
+ # Has the charge been resubmitted.
288
+ has_resubmit:,
289
+ # Is the charge a resubmit of an original charge.
290
+ is_resubmit:,
273
291
  # Value of the `paykey` used for the charge.
274
292
  paykey:,
275
293
  # The desired date on which the payment should be occur. For charges, this means
@@ -287,6 +305,9 @@ module Straddle
287
305
  updated_at:,
288
306
  # Information about the customer associated with the charge.
289
307
  customer_details: nil,
308
+ # Documents uploaded for this charge (e.g. proof of authorization), in the order
309
+ # they were uploaded.
310
+ documents: nil,
290
311
  # Timestamp of when the charge was effective in the customer's bank account,
291
312
  # otherwise known as the date on which the customer is debited.
292
313
  effective_at: nil,
@@ -318,6 +339,9 @@ module Straddle
318
339
  device: Straddle::DeviceInfoV1,
319
340
  external_id: String,
320
341
  funding_ids: T::Array[String],
342
+ has_refund: T::Boolean,
343
+ has_resubmit: T::Boolean,
344
+ is_resubmit: T::Boolean,
321
345
  paykey: String,
322
346
  payment_date: Date,
323
347
  status: Straddle::ChargeV1::Data::Status::TaggedSymbol,
@@ -326,18 +350,15 @@ module Straddle
326
350
  trace_ids: T::Hash[Symbol, String],
327
351
  updated_at: T.nilable(Time),
328
352
  customer_details: Straddle::CustomerDetailsV1,
353
+ documents:
354
+ T.nilable(T::Array[Straddle::ChargeV1::Data::Document]),
329
355
  effective_at: T.nilable(Time),
330
356
  metadata: T.nilable(T::Hash[Symbol, String]),
331
357
  paykey_details: Straddle::PaykeyDetailsV1,
332
358
  payment_rail: Straddle::ChargeV1::Data::PaymentRail::TaggedSymbol,
333
359
  processed_at: T.nilable(Time),
334
360
  related_payments:
335
- T.nilable(
336
- T::Hash[
337
- Symbol,
338
- Straddle::ChargeV1::Data::RelatedPayment::TaggedSymbol
339
- ]
340
- )
361
+ T.nilable(T::Array[Straddle::ChargeV1::Data::RelatedPayment])
341
362
  }
342
363
  )
343
364
  end
@@ -527,6 +548,16 @@ module Straddle
527
548
  :reversed_closed_bank_account,
528
549
  Straddle::ChargeV1::Data::Config::SandboxOutcome::TaggedSymbol
529
550
  )
551
+ FAILED_NOT_AUTHORIZED =
552
+ T.let(
553
+ :failed_not_authorized,
554
+ Straddle::ChargeV1::Data::Config::SandboxOutcome::TaggedSymbol
555
+ )
556
+ REVERSED_NOT_AUTHORIZED =
557
+ T.let(
558
+ :reversed_not_authorized,
559
+ Straddle::ChargeV1::Data::Config::SandboxOutcome::TaggedSymbol
560
+ )
530
561
 
531
562
  sig do
532
563
  override.returns(
@@ -973,6 +1004,103 @@ module Straddle
973
1004
  end
974
1005
  end
975
1006
 
1007
+ class Document < Straddle::Internal::Type::BaseModel
1008
+ OrHash =
1009
+ T.type_alias do
1010
+ T.any(
1011
+ Straddle::ChargeV1::Data::Document,
1012
+ Straddle::Internal::AnyHash
1013
+ )
1014
+ end
1015
+
1016
+ # Unique identifier for this document.
1017
+ sig { returns(String) }
1018
+ attr_accessor :document_id
1019
+
1020
+ # The file name of this document as uploaded.
1021
+ sig { returns(String) }
1022
+ attr_accessor :document_name
1023
+
1024
+ # The size of this document in bytes.
1025
+ sig { returns(Integer) }
1026
+ attr_accessor :document_size
1027
+
1028
+ sig do
1029
+ returns(
1030
+ Straddle::ChargeV1::Data::Document::DocumentType::TaggedSymbol
1031
+ )
1032
+ end
1033
+ attr_accessor :document_type
1034
+
1035
+ # The UTC timestamp when this document was uploaded.
1036
+ sig { returns(Time) }
1037
+ attr_accessor :uploaded_at
1038
+
1039
+ sig do
1040
+ params(
1041
+ document_id: String,
1042
+ document_name: String,
1043
+ document_size: Integer,
1044
+ document_type:
1045
+ Straddle::ChargeV1::Data::Document::DocumentType::OrSymbol,
1046
+ uploaded_at: Time
1047
+ ).returns(T.attached_class)
1048
+ end
1049
+ def self.new(
1050
+ # Unique identifier for this document.
1051
+ document_id:,
1052
+ # The file name of this document as uploaded.
1053
+ document_name:,
1054
+ # The size of this document in bytes.
1055
+ document_size:,
1056
+ document_type:,
1057
+ # The UTC timestamp when this document was uploaded.
1058
+ uploaded_at:
1059
+ )
1060
+ end
1061
+
1062
+ sig do
1063
+ override.returns(
1064
+ {
1065
+ document_id: String,
1066
+ document_name: String,
1067
+ document_size: Integer,
1068
+ document_type:
1069
+ Straddle::ChargeV1::Data::Document::DocumentType::TaggedSymbol,
1070
+ uploaded_at: Time
1071
+ }
1072
+ )
1073
+ end
1074
+ def to_hash
1075
+ end
1076
+
1077
+ module DocumentType
1078
+ extend Straddle::Internal::Type::Enum
1079
+
1080
+ TaggedSymbol =
1081
+ T.type_alias do
1082
+ T.all(Symbol, Straddle::ChargeV1::Data::Document::DocumentType)
1083
+ end
1084
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1085
+
1086
+ PAYMENT_AUTHORIZATION =
1087
+ T.let(
1088
+ :payment_authorization,
1089
+ Straddle::ChargeV1::Data::Document::DocumentType::TaggedSymbol
1090
+ )
1091
+
1092
+ sig do
1093
+ override.returns(
1094
+ T::Array[
1095
+ Straddle::ChargeV1::Data::Document::DocumentType::TaggedSymbol
1096
+ ]
1097
+ )
1098
+ end
1099
+ def self.values
1100
+ end
1101
+ end
1102
+ end
1103
+
976
1104
  # The payment rail that the charge will be processed through.
977
1105
  module PaymentRail
978
1106
  extend Straddle::Internal::Type::Enum
@@ -994,37 +1122,138 @@ module Straddle
994
1122
  end
995
1123
  end
996
1124
 
997
- module RelatedPayment
998
- extend Straddle::Internal::Type::Enum
999
-
1000
- TaggedSymbol =
1125
+ class RelatedPayment < Straddle::Internal::Type::BaseModel
1126
+ OrHash =
1001
1127
  T.type_alias do
1002
- T.all(Symbol, Straddle::ChargeV1::Data::RelatedPayment)
1128
+ T.any(
1129
+ Straddle::ChargeV1::Data::RelatedPayment,
1130
+ Straddle::Internal::AnyHash
1131
+ )
1003
1132
  end
1004
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1005
1133
 
1006
- ORIGINAL =
1007
- T.let(
1008
- :original,
1009
- Straddle::ChargeV1::Data::RelatedPayment::TaggedSymbol
1010
- )
1011
- RESUBMIT =
1012
- T.let(
1013
- :resubmit,
1014
- Straddle::ChargeV1::Data::RelatedPayment::TaggedSymbol
1134
+ # The ID of the related payment.
1135
+ sig { returns(String) }
1136
+ attr_accessor :id
1137
+
1138
+ # The type of payment.
1139
+ sig do
1140
+ returns(
1141
+ Straddle::ChargeV1::Data::RelatedPayment::PaymentType::TaggedSymbol
1015
1142
  )
1016
- REFUND =
1017
- T.let(
1018
- :refund,
1019
- Straddle::ChargeV1::Data::RelatedPayment::TaggedSymbol
1143
+ end
1144
+ attr_accessor :payment_type
1145
+
1146
+ sig do
1147
+ returns(
1148
+ Straddle::ChargeV1::Data::RelatedPayment::Relationship::TaggedSymbol
1020
1149
  )
1150
+ end
1151
+ attr_accessor :relationship
1152
+
1153
+ sig do
1154
+ params(
1155
+ id: String,
1156
+ payment_type:
1157
+ Straddle::ChargeV1::Data::RelatedPayment::PaymentType::OrSymbol,
1158
+ relationship:
1159
+ Straddle::ChargeV1::Data::RelatedPayment::Relationship::OrSymbol
1160
+ ).returns(T.attached_class)
1161
+ end
1162
+ def self.new(
1163
+ # The ID of the related payment.
1164
+ id:,
1165
+ # The type of payment.
1166
+ payment_type:,
1167
+ relationship:
1168
+ )
1169
+ end
1021
1170
 
1022
1171
  sig do
1023
1172
  override.returns(
1024
- T::Array[Straddle::ChargeV1::Data::RelatedPayment::TaggedSymbol]
1173
+ {
1174
+ id: String,
1175
+ payment_type:
1176
+ Straddle::ChargeV1::Data::RelatedPayment::PaymentType::TaggedSymbol,
1177
+ relationship:
1178
+ Straddle::ChargeV1::Data::RelatedPayment::Relationship::TaggedSymbol
1179
+ }
1025
1180
  )
1026
1181
  end
1027
- def self.values
1182
+ def to_hash
1183
+ end
1184
+
1185
+ # The type of payment.
1186
+ module PaymentType
1187
+ extend Straddle::Internal::Type::Enum
1188
+
1189
+ TaggedSymbol =
1190
+ T.type_alias do
1191
+ T.all(
1192
+ Symbol,
1193
+ Straddle::ChargeV1::Data::RelatedPayment::PaymentType
1194
+ )
1195
+ end
1196
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1197
+
1198
+ CHARGE =
1199
+ T.let(
1200
+ :charge,
1201
+ Straddle::ChargeV1::Data::RelatedPayment::PaymentType::TaggedSymbol
1202
+ )
1203
+ PAYOUT =
1204
+ T.let(
1205
+ :payout,
1206
+ Straddle::ChargeV1::Data::RelatedPayment::PaymentType::TaggedSymbol
1207
+ )
1208
+
1209
+ sig do
1210
+ override.returns(
1211
+ T::Array[
1212
+ Straddle::ChargeV1::Data::RelatedPayment::PaymentType::TaggedSymbol
1213
+ ]
1214
+ )
1215
+ end
1216
+ def self.values
1217
+ end
1218
+ end
1219
+
1220
+ module Relationship
1221
+ extend Straddle::Internal::Type::Enum
1222
+
1223
+ TaggedSymbol =
1224
+ T.type_alias do
1225
+ T.all(
1226
+ Symbol,
1227
+ Straddle::ChargeV1::Data::RelatedPayment::Relationship
1228
+ )
1229
+ end
1230
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1231
+
1232
+ ORIGINAL =
1233
+ T.let(
1234
+ :original,
1235
+ Straddle::ChargeV1::Data::RelatedPayment::Relationship::TaggedSymbol
1236
+ )
1237
+ RESUBMIT =
1238
+ T.let(
1239
+ :resubmit,
1240
+ Straddle::ChargeV1::Data::RelatedPayment::Relationship::TaggedSymbol
1241
+ )
1242
+ REFUND =
1243
+ T.let(
1244
+ :refund,
1245
+ Straddle::ChargeV1::Data::RelatedPayment::Relationship::TaggedSymbol
1246
+ )
1247
+
1248
+ sig do
1249
+ override.returns(
1250
+ T::Array[
1251
+ Straddle::ChargeV1::Data::RelatedPayment::Relationship::TaggedSymbol
1252
+ ]
1253
+ )
1254
+ end
1255
+ def self.values
1256
+ end
1028
1257
  end
1029
1258
  end
1030
1259
  end
@@ -15,6 +15,12 @@ module Straddle
15
15
  )
16
16
  end
17
17
 
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :external_id
20
+
21
+ sig { params(external_id: String).void }
22
+ attr_writer :external_id
23
+
18
24
  # Results page number. Starts at page 1. Default value: 1
19
25
  sig { returns(T.nilable(Integer)) }
20
26
  attr_reader :page_number
@@ -95,6 +101,7 @@ module Straddle
95
101
 
96
102
  sig do
97
103
  params(
104
+ external_id: String,
98
105
  page_number: Integer,
99
106
  page_size: Integer,
100
107
  search_text: String,
@@ -108,6 +115,7 @@ module Straddle
108
115
  ).returns(T.attached_class)
109
116
  end
110
117
  def self.new(
118
+ external_id: nil,
111
119
  # Results page number. Starts at page 1. Default value: 1
112
120
  page_number: nil,
113
121
  # Page size. Default value: 100. Max value: 1000
@@ -128,6 +136,7 @@ module Straddle
128
136
  sig do
129
137
  override.returns(
130
138
  {
139
+ external_id: String,
131
140
  page_number: Integer,
132
141
  page_size: Integer,
133
142
  search_text: String,
@@ -276,7 +276,7 @@ module Straddle
276
276
  sig { returns(T::Boolean) }
277
277
  attr_accessor :control
278
278
 
279
- # Whether the representative owns any percentage of of the equity interests of the
279
+ # Whether the representative owns any percentage of the equity interests of the
280
280
  # legal entity.
281
281
  sig { returns(T::Boolean) }
282
282
  attr_accessor :owner
@@ -312,7 +312,7 @@ module Straddle
312
312
  # direct the organization. One representative must be identified under the control
313
313
  # prong for each legal entity.
314
314
  control:,
315
- # Whether the representative owns any percentage of of the equity interests of the
315
+ # Whether the representative owns any percentage of the equity interests of the
316
316
  # legal entity.
317
317
  owner:,
318
318
  # Whether the person is authorized as the primary representative of the account.
@@ -171,7 +171,7 @@ module Straddle
171
171
  sig { returns(T::Boolean) }
172
172
  attr_accessor :control
173
173
 
174
- # Whether the representative owns any percentage of of the equity interests of the
174
+ # Whether the representative owns any percentage of the equity interests of the
175
175
  # legal entity.
176
176
  sig { returns(T::Boolean) }
177
177
  attr_accessor :owner
@@ -207,7 +207,7 @@ module Straddle
207
207
  # direct the organization. One representative must be identified under the control
208
208
  # prong for each legal entity.
209
209
  control:,
210
- # Whether the representative owns any percentage of of the equity interests of the
210
+ # Whether the representative owns any percentage of the equity interests of the
211
211
  # legal entity.
212
212
  owner:,
213
213
  # Whether the person is authorized as the primary representative of the account.
@@ -287,7 +287,7 @@ module Straddle
287
287
  sig { returns(T::Boolean) }
288
288
  attr_accessor :control
289
289
 
290
- # Whether the representative owns any percentage of of the equity interests of the
290
+ # Whether the representative owns any percentage of the equity interests of the
291
291
  # legal entity.
292
292
  sig { returns(T::Boolean) }
293
293
  attr_accessor :owner
@@ -323,7 +323,7 @@ module Straddle
323
323
  # direct the organization. One representative must be identified under the control
324
324
  # prong for each legal entity.
325
325
  control:,
326
- # Whether the representative owns any percentage of of the equity interests of the
326
+ # Whether the representative owns any percentage of the equity interests of the
327
327
  # legal entity.
328
328
  owner:,
329
329
  # Whether the person is authorized as the primary representative of the account.
@@ -169,7 +169,7 @@ module Straddle
169
169
  sig { returns(T::Boolean) }
170
170
  attr_accessor :control
171
171
 
172
- # Whether the representative owns any percentage of of the equity interests of the
172
+ # Whether the representative owns any percentage of the equity interests of the
173
173
  # legal entity.
174
174
  sig { returns(T::Boolean) }
175
175
  attr_accessor :owner
@@ -205,7 +205,7 @@ module Straddle
205
205
  # direct the organization. One representative must be identified under the control
206
206
  # prong for each legal entity.
207
207
  control:,
208
- # Whether the representative owns any percentage of of the equity interests of the
208
+ # Whether the representative owns any percentage of the equity interests of the
209
209
  # legal entity.
210
210
  owner:,
211
211
  # Whether the person is authorized as the primary representative of the account.
@@ -11,6 +11,20 @@ module Straddle
11
11
  T.any(Straddle::PaykeyListParams, Straddle::Internal::AnyHash)
12
12
  end
13
13
 
14
+ # Start date for filtering by creation date.
15
+ sig { returns(T.nilable(Time)) }
16
+ attr_reader :created_from
17
+
18
+ sig { params(created_from: Time).void }
19
+ attr_writer :created_from
20
+
21
+ # End date for filtering by creation date.
22
+ sig { returns(T.nilable(Time)) }
23
+ attr_reader :created_to
24
+
25
+ sig { params(created_to: Time).void }
26
+ attr_writer :created_to
27
+
14
28
  # Filter paykeys by related customer ID.
15
29
  sig { returns(T.nilable(String)) }
16
30
  attr_reader :customer_id
@@ -115,6 +129,8 @@ module Straddle
115
129
 
116
130
  sig do
117
131
  params(
132
+ created_from: Time,
133
+ created_to: Time,
118
134
  customer_id: String,
119
135
  page_number: Integer,
120
136
  page_size: Integer,
@@ -131,6 +147,10 @@ module Straddle
131
147
  ).returns(T.attached_class)
132
148
  end
133
149
  def self.new(
150
+ # Start date for filtering by creation date.
151
+ created_from: nil,
152
+ # End date for filtering by creation date.
153
+ created_to: nil,
134
154
  # Filter paykeys by related customer ID.
135
155
  customer_id: nil,
136
156
  # Page number for paginated results. Starts at 1.
@@ -160,6 +180,8 @@ module Straddle
160
180
  sig do
161
181
  override.returns(
162
182
  {
183
+ created_from: Time,
184
+ created_to: Time,
163
185
  customer_id: String,
164
186
  page_number: Integer,
165
187
  page_size: Integer,