moov_ruby 26.4.7 → 26.4.8

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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/lib/moov/account_terminal_applications.rb +16 -16
  3. data/lib/moov/accounts.rb +52 -54
  4. data/lib/moov/adjustments.rb +8 -8
  5. data/lib/moov/apple_pay.rb +20 -20
  6. data/lib/moov/authentication.rb +8 -8
  7. data/lib/moov/avatars.rb +4 -4
  8. data/lib/moov/bank_accounts.rb +36 -36
  9. data/lib/moov/branding.rb +12 -12
  10. data/lib/moov/capabilities.rb +20 -20
  11. data/lib/moov/card_issuing.rb +25 -25
  12. data/lib/moov/cards.rb +20 -20
  13. data/lib/moov/disputes.rb +44 -44
  14. data/lib/moov/end_to_end_encryption.rb +8 -8
  15. data/lib/moov/enriched_address.rb +4 -4
  16. data/lib/moov/enriched_profile.rb +4 -4
  17. data/lib/moov/fee_plans.rb +40 -40
  18. data/lib/moov/files.rb +12 -12
  19. data/lib/moov/google_pay.rb +4 -4
  20. data/lib/moov/images.rb +28 -28
  21. data/lib/moov/industries.rb +4 -4
  22. data/lib/moov/institutions.rb +8 -8
  23. data/lib/moov/invoices.rb +28 -28
  24. data/lib/moov/issuing_transactions.rb +20 -20
  25. data/lib/moov/models/components/addcapabilities.rb +5 -1
  26. data/lib/moov/models/components/billingaddress.rb +52 -0
  27. data/lib/moov/models/components/billingaddress.rbi +23 -0
  28. data/lib/moov/models/components/capability.rb +7 -1
  29. data/lib/moov/models/components/capabilityid.rb +7 -1
  30. data/lib/moov/models/components/createaccount.rb +5 -1
  31. data/lib/moov/models/components/createpaymentlink.rb +4 -4
  32. data/lib/moov/models/components/fullissuedcard.rb +22 -10
  33. data/lib/moov/models/components/fullissuedcard.rbi +10 -4
  34. data/lib/moov/models/components/issuedcard.rb +22 -10
  35. data/lib/moov/models/components/issuedcard.rbi +10 -4
  36. data/lib/moov/models/components/onboardinginvite.rb +1 -1
  37. data/lib/moov/models/components/onboardinginviterequest.rb +1 -1
  38. data/lib/moov/models/components/paymentlink.rb +3 -3
  39. data/lib/moov/models/components/requestcard.rb +17 -17
  40. data/lib/moov/models/components/requestcard.rbi +8 -8
  41. data/lib/moov/models/components/updateissuedcard.rb +13 -9
  42. data/lib/moov/models/components/updateissuedcard.rbi +6 -4
  43. data/lib/moov/models/components/webhookdataauthorizationexpiring.rb +44 -0
  44. data/lib/moov/models/components/webhookdataauthorizationexpiring.rbi +19 -0
  45. data/lib/moov/models/components/webhookdatacapabilityrequested.rb +7 -1
  46. data/lib/moov/models/components/webhookdatacapabilityupdated.rb +7 -1
  47. data/lib/moov/models/components/webhookdatasweepcreated.rb +6 -2
  48. data/lib/moov/models/components/webhookdatasweepcreated.rbi +2 -0
  49. data/lib/moov/models/components/webhookdatasweepupdated.rb +6 -2
  50. data/lib/moov/models/components/webhookdatasweepupdated.rbi +2 -0
  51. data/lib/moov/models/components/webhookevent.rb +2 -2
  52. data/lib/moov/models/components/webhookeventtype.rb +1 -0
  53. data/lib/moov/models/components.rb +2 -4
  54. data/lib/moov/models/errors/requestcarderror.rb +14 -14
  55. data/lib/moov/models/errors/requestcarderror.rbi +8 -8
  56. data/lib/moov/models/errors/updateissuedcarderror.rb +12 -8
  57. data/lib/moov/models/errors/updateissuedcarderror.rbi +6 -4
  58. data/lib/moov/models/operations/disablecapability_request.rb +7 -1
  59. data/lib/moov/models/operations/getcapability_request.rb +7 -1
  60. data/lib/moov/models/operations/listcancellations_request.rb +36 -0
  61. data/lib/moov/models/operations/listcancellations_request.rbi +15 -0
  62. data/lib/moov/models/operations/listcancellations_response.rb +48 -0
  63. data/lib/moov/models/operations/listcancellations_response.rbi +21 -0
  64. data/lib/moov/models/operations.rb +2 -0
  65. data/lib/moov/onboarding.rb +16 -16
  66. data/lib/moov/payment_links.rb +24 -24
  67. data/lib/moov/payment_methods.rb +8 -8
  68. data/lib/moov/ping.rb +4 -4
  69. data/lib/moov/products.rb +20 -20
  70. data/lib/moov/receipts.rb +8 -8
  71. data/lib/moov/representatives.rb +20 -20
  72. data/lib/moov/resolution_links.rb +16 -16
  73. data/lib/moov/scheduling.rb +24 -24
  74. data/lib/moov/sdkconfiguration.rb +3 -3
  75. data/lib/moov/statements.rb +8 -8
  76. data/lib/moov/support.rb +20 -20
  77. data/lib/moov/sweeps.rb +24 -24
  78. data/lib/moov/terminal_applications.rb +20 -20
  79. data/lib/moov/transfer_config.rb +12 -12
  80. data/lib/moov/transfers.rb +171 -48
  81. data/lib/moov/underwriting.rb +12 -12
  82. data/lib/moov/utils/retries.rb +4 -1
  83. data/lib/moov/wallet_transactions.rb +8 -8
  84. data/lib/moov/wallets.rb +16 -16
  85. data/lib/moov/webhooks.rb +32 -32
  86. metadata +10 -10
  87. data/lib/moov/models/components/authorizeduser.rb +0 -36
  88. data/lib/moov/models/components/authorizeduser.rbi +0 -15
  89. data/lib/moov/models/components/createauthorizeduser.rb +0 -40
  90. data/lib/moov/models/components/createauthorizeduser.rbi +0 -17
  91. data/lib/moov/models/components/createauthorizedusererror.rb +0 -40
  92. data/lib/moov/models/components/createauthorizedusererror.rbi +0 -17
  93. data/lib/moov/models/components/createauthorizeduserupdate.rb +0 -40
  94. data/lib/moov/models/components/createauthorizeduserupdate.rbi +0 -17
@@ -84,7 +84,7 @@ module Moov
84
84
 
85
85
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
86
86
  timeout ||= @sdk_configuration.timeout
87
-
87
+
88
88
 
89
89
  connection = @sdk_configuration.client
90
90
 
@@ -99,7 +99,7 @@ module Moov
99
99
  error = T.let(nil, T.nilable(StandardError))
100
100
  http_response = T.let(nil, T.nilable(Faraday::Response))
101
101
 
102
-
102
+
103
103
  begin
104
104
  http_response = T.must(connection).post(url) do |req|
105
105
  req.body = body
@@ -136,13 +136,13 @@ module Moov
136
136
  response: http_response
137
137
  )
138
138
  end
139
-
139
+
140
140
  if http_response.nil?
141
141
  raise error if !error.nil?
142
142
  raise 'no response'
143
143
  end
144
144
  end
145
-
145
+
146
146
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
147
147
  if Utils.match_status_code(http_response.status, ['200'])
148
148
  if Utils.match_content_type(content_type, 'application/json')
@@ -253,7 +253,7 @@ module Moov
253
253
 
254
254
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
255
255
  timeout ||= @sdk_configuration.timeout
256
-
256
+
257
257
 
258
258
  connection = @sdk_configuration.client
259
259
 
@@ -268,7 +268,7 @@ module Moov
268
268
  error = T.let(nil, T.nilable(StandardError))
269
269
  http_response = T.let(nil, T.nilable(Faraday::Response))
270
270
 
271
-
271
+
272
272
  begin
273
273
  http_response = T.must(connection).post(url) do |req|
274
274
  req.body = body
@@ -305,13 +305,13 @@ module Moov
305
305
  response: http_response
306
306
  )
307
307
  end
308
-
308
+
309
309
  if http_response.nil?
310
310
  raise error if !error.nil?
311
311
  raise 'no response'
312
312
  end
313
313
  end
314
-
314
+
315
315
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
316
316
  if Utils.match_status_code(http_response.status, ['200'])
317
317
  if Utils.match_content_type(content_type, 'application/json')
@@ -470,7 +470,7 @@ module Moov
470
470
 
471
471
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
472
472
  timeout ||= @sdk_configuration.timeout
473
-
473
+
474
474
 
475
475
  connection = @sdk_configuration.client
476
476
 
@@ -485,7 +485,7 @@ module Moov
485
485
  error = T.let(nil, T.nilable(StandardError))
486
486
  http_response = T.let(nil, T.nilable(Faraday::Response))
487
487
 
488
-
488
+
489
489
  begin
490
490
  http_response = T.must(connection).get(url) do |req|
491
491
  req.headers.merge!(headers)
@@ -522,13 +522,13 @@ module Moov
522
522
  response: http_response
523
523
  )
524
524
  end
525
-
525
+
526
526
  if http_response.nil?
527
527
  raise error if !error.nil?
528
528
  raise 'no response'
529
529
  end
530
530
  end
531
-
531
+
532
532
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
533
533
  if Utils.match_status_code(http_response.status, ['200'])
534
534
  if Utils.match_content_type(content_type, 'application/json')
@@ -624,7 +624,7 @@ module Moov
624
624
 
625
625
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
626
626
  timeout ||= @sdk_configuration.timeout
627
-
627
+
628
628
 
629
629
  connection = @sdk_configuration.client
630
630
 
@@ -639,7 +639,7 @@ module Moov
639
639
  error = T.let(nil, T.nilable(StandardError))
640
640
  http_response = T.let(nil, T.nilable(Faraday::Response))
641
641
 
642
-
642
+
643
643
  begin
644
644
  http_response = T.must(connection).post(url) do |req|
645
645
  req.body = body
@@ -676,13 +676,13 @@ module Moov
676
676
  response: http_response
677
677
  )
678
678
  end
679
-
679
+
680
680
  if http_response.nil?
681
681
  raise error if !error.nil?
682
682
  raise 'no response'
683
683
  end
684
684
  end
685
-
685
+
686
686
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
687
687
  if Utils.match_status_code(http_response.status, ['200'])
688
688
  if Utils.match_content_type(content_type, 'application/json')
@@ -751,7 +751,7 @@ module Moov
751
751
 
752
752
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
753
753
  timeout ||= @sdk_configuration.timeout
754
-
754
+
755
755
 
756
756
  connection = @sdk_configuration.client
757
757
 
@@ -766,7 +766,7 @@ module Moov
766
766
  error = T.let(nil, T.nilable(StandardError))
767
767
  http_response = T.let(nil, T.nilable(Faraday::Response))
768
768
 
769
-
769
+
770
770
  begin
771
771
  http_response = T.must(connection).get(url) do |req|
772
772
  req.headers.merge!(headers)
@@ -802,13 +802,13 @@ module Moov
802
802
  response: http_response
803
803
  )
804
804
  end
805
-
805
+
806
806
  if http_response.nil?
807
807
  raise error if !error.nil?
808
808
  raise 'no response'
809
809
  end
810
810
  end
811
-
811
+
812
812
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
813
813
  if Utils.match_status_code(http_response.status, ['200'])
814
814
  if Utils.match_content_type(content_type, 'application/json')
@@ -888,7 +888,7 @@ module Moov
888
888
 
889
889
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
890
890
  timeout ||= @sdk_configuration.timeout
891
-
891
+
892
892
 
893
893
  connection = @sdk_configuration.client
894
894
 
@@ -903,7 +903,7 @@ module Moov
903
903
  error = T.let(nil, T.nilable(StandardError))
904
904
  http_response = T.let(nil, T.nilable(Faraday::Response))
905
905
 
906
-
906
+
907
907
  begin
908
908
  http_response = T.must(connection).patch(url) do |req|
909
909
  req.body = body
@@ -940,13 +940,13 @@ module Moov
940
940
  response: http_response
941
941
  )
942
942
  end
943
-
943
+
944
944
  if http_response.nil?
945
945
  raise error if !error.nil?
946
946
  raise 'no response'
947
947
  end
948
948
  end
949
-
949
+
950
950
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
951
951
  if Utils.match_status_code(http_response.status, ['200'])
952
952
  if Utils.match_content_type(content_type, 'application/json')
@@ -1027,7 +1027,7 @@ module Moov
1027
1027
 
1028
1028
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
1029
1029
  timeout ||= @sdk_configuration.timeout
1030
-
1030
+
1031
1031
 
1032
1032
  connection = @sdk_configuration.client
1033
1033
 
@@ -1042,7 +1042,7 @@ module Moov
1042
1042
  error = T.let(nil, T.nilable(StandardError))
1043
1043
  http_response = T.let(nil, T.nilable(Faraday::Response))
1044
1044
 
1045
-
1045
+
1046
1046
  begin
1047
1047
  http_response = T.must(connection).post(url) do |req|
1048
1048
  req.headers.merge!(headers)
@@ -1078,13 +1078,13 @@ module Moov
1078
1078
  response: http_response
1079
1079
  )
1080
1080
  end
1081
-
1081
+
1082
1082
  if http_response.nil?
1083
1083
  raise error if !error.nil?
1084
1084
  raise 'no response'
1085
1085
  end
1086
1086
  end
1087
-
1087
+
1088
1088
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
1089
1089
  if Utils.match_status_code(http_response.status, ['200', '202'])
1090
1090
  if Utils.match_content_type(content_type, 'application/json')
@@ -1138,6 +1138,129 @@ module Moov
1138
1138
  end
1139
1139
 
1140
1140
 
1141
+ sig { params(account_id: ::String, transfer_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::ListCancellationsResponse) }
1142
+ def list_cancellations(account_id:, transfer_id:, timeout_ms: nil, http_headers: nil)
1143
+ # list_cancellations - Get a list of cancellations for a transfer.
1144
+ #
1145
+ # To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
1146
+ # to specify the `/accounts/{accountID}/transfers.read` scope.
1147
+ request = Models::Operations::ListCancellationsRequest.new(
1148
+ account_id: account_id,
1149
+ transfer_id: transfer_id
1150
+ )
1151
+ url, params = @sdk_configuration.get_server_details
1152
+ base_url = Utils.template_url(url, params)
1153
+ url = Utils.generate_url(
1154
+ Models::Operations::ListCancellationsRequest,
1155
+ base_url,
1156
+ '/accounts/{accountID}/transfers/{transferID}/cancellations',
1157
+ request
1158
+ )
1159
+ headers = {}
1160
+ headers = T.cast(headers, T::Hash[String, String])
1161
+ headers['Accept'] = 'application/json'
1162
+ headers['user-agent'] = @sdk_configuration.user_agent
1163
+
1164
+ security = @sdk_configuration.security_source&.call
1165
+
1166
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
1167
+ timeout ||= @sdk_configuration.timeout
1168
+
1169
+
1170
+ connection = @sdk_configuration.client
1171
+
1172
+ hook_ctx = SDKHooks::HookContext.new(
1173
+ config: @sdk_configuration,
1174
+ base_url: base_url,
1175
+ oauth2_scopes: nil,
1176
+ operation_id: 'listCancellations',
1177
+ security_source: @sdk_configuration.security_source
1178
+ )
1179
+
1180
+ error = T.let(nil, T.nilable(StandardError))
1181
+ http_response = T.let(nil, T.nilable(Faraday::Response))
1182
+
1183
+
1184
+ begin
1185
+ http_response = T.must(connection).get(url) do |req|
1186
+ req.headers.merge!(headers)
1187
+ req.options.timeout = timeout unless timeout.nil?
1188
+ Utils.configure_request_security(req, security)
1189
+ http_headers&.each do |key, value|
1190
+ req.headers[key.to_s] = value
1191
+ end
1192
+
1193
+ @sdk_configuration.hooks.before_request(
1194
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
1195
+ hook_ctx: hook_ctx
1196
+ ),
1197
+ request: req
1198
+ )
1199
+ end
1200
+ rescue StandardError => e
1201
+ error = e
1202
+ ensure
1203
+ if http_response.nil? || Utils.error_status?(http_response.status)
1204
+ http_response = @sdk_configuration.hooks.after_error(
1205
+ error: error,
1206
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
1207
+ hook_ctx: hook_ctx
1208
+ ),
1209
+ response: http_response
1210
+ )
1211
+ else
1212
+ http_response = @sdk_configuration.hooks.after_success(
1213
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1214
+ hook_ctx: hook_ctx
1215
+ ),
1216
+ response: http_response
1217
+ )
1218
+ end
1219
+
1220
+ if http_response.nil?
1221
+ raise error if !error.nil?
1222
+ raise 'no response'
1223
+ end
1224
+ end
1225
+
1226
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
1227
+ if Utils.match_status_code(http_response.status, ['200'])
1228
+ if Utils.match_content_type(content_type, 'application/json')
1229
+ http_response = @sdk_configuration.hooks.after_success(
1230
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1231
+ hook_ctx: hook_ctx
1232
+ ),
1233
+ response: http_response
1234
+ )
1235
+ response_data = http_response.env.response_body
1236
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Array.new(Models::Components::Cancellation))
1237
+ response = Models::Operations::ListCancellationsResponse.new(
1238
+ status_code: http_response.status,
1239
+ content_type: content_type,
1240
+ raw_response: http_response,
1241
+ headers: http_response.headers,
1242
+ cancellations: T.unsafe(obj)
1243
+ )
1244
+
1245
+ return response
1246
+ else
1247
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
1248
+ end
1249
+ elsif Utils.match_status_code(http_response.status, ['401', '403', '429'])
1250
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
1251
+ elsif Utils.match_status_code(http_response.status, ['500', '504'])
1252
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
1253
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
1254
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
1255
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
1256
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
1257
+ else
1258
+ raise ::Moov::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
1259
+
1260
+ end
1261
+ end
1262
+
1263
+
1141
1264
  sig { params(account_id: ::String, transfer_id: ::String, cancellation_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::GetCancellationResponse) }
1142
1265
  def get_cancellation(account_id:, transfer_id:, cancellation_id:, timeout_ms: nil, http_headers: nil)
1143
1266
  # get_cancellation - Get details of a cancellation for a transfer.
@@ -1166,7 +1289,7 @@ module Moov
1166
1289
 
1167
1290
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
1168
1291
  timeout ||= @sdk_configuration.timeout
1169
-
1292
+
1170
1293
 
1171
1294
  connection = @sdk_configuration.client
1172
1295
 
@@ -1181,7 +1304,7 @@ module Moov
1181
1304
  error = T.let(nil, T.nilable(StandardError))
1182
1305
  http_response = T.let(nil, T.nilable(Faraday::Response))
1183
1306
 
1184
-
1307
+
1185
1308
  begin
1186
1309
  http_response = T.must(connection).get(url) do |req|
1187
1310
  req.headers.merge!(headers)
@@ -1217,13 +1340,13 @@ module Moov
1217
1340
  response: http_response
1218
1341
  )
1219
1342
  end
1220
-
1343
+
1221
1344
  if http_response.nil?
1222
1345
  raise error if !error.nil?
1223
1346
  raise 'no response'
1224
1347
  end
1225
1348
  end
1226
-
1349
+
1227
1350
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
1228
1351
  if Utils.match_status_code(http_response.status, ['200'])
1229
1352
  if Utils.match_content_type(content_type, 'application/json')
@@ -1298,7 +1421,7 @@ module Moov
1298
1421
 
1299
1422
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
1300
1423
  timeout ||= @sdk_configuration.timeout
1301
-
1424
+
1302
1425
 
1303
1426
  connection = @sdk_configuration.client
1304
1427
 
@@ -1313,7 +1436,7 @@ module Moov
1313
1436
  error = T.let(nil, T.nilable(StandardError))
1314
1437
  http_response = T.let(nil, T.nilable(Faraday::Response))
1315
1438
 
1316
-
1439
+
1317
1440
  begin
1318
1441
  http_response = T.must(connection).post(url) do |req|
1319
1442
  req.body = body
@@ -1350,13 +1473,13 @@ module Moov
1350
1473
  response: http_response
1351
1474
  )
1352
1475
  end
1353
-
1476
+
1354
1477
  if http_response.nil?
1355
1478
  raise error if !error.nil?
1356
1479
  raise 'no response'
1357
1480
  end
1358
1481
  end
1359
-
1482
+
1360
1483
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
1361
1484
  if Utils.match_status_code(http_response.status, ['200'])
1362
1485
  if Utils.match_content_type(content_type, 'application/json')
@@ -1489,7 +1612,7 @@ module Moov
1489
1612
 
1490
1613
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
1491
1614
  timeout ||= @sdk_configuration.timeout
1492
-
1615
+
1493
1616
 
1494
1617
  connection = @sdk_configuration.client
1495
1618
 
@@ -1504,7 +1627,7 @@ module Moov
1504
1627
  error = T.let(nil, T.nilable(StandardError))
1505
1628
  http_response = T.let(nil, T.nilable(Faraday::Response))
1506
1629
 
1507
-
1630
+
1508
1631
  begin
1509
1632
  http_response = T.must(connection).get(url) do |req|
1510
1633
  req.headers.merge!(headers)
@@ -1540,13 +1663,13 @@ module Moov
1540
1663
  response: http_response
1541
1664
  )
1542
1665
  end
1543
-
1666
+
1544
1667
  if http_response.nil?
1545
1668
  raise error if !error.nil?
1546
1669
  raise 'no response'
1547
1670
  end
1548
1671
  end
1549
-
1672
+
1550
1673
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
1551
1674
  if Utils.match_status_code(http_response.status, ['200'])
1552
1675
  if Utils.match_content_type(content_type, 'application/json')
@@ -1613,7 +1736,7 @@ module Moov
1613
1736
 
1614
1737
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
1615
1738
  timeout ||= @sdk_configuration.timeout
1616
-
1739
+
1617
1740
 
1618
1741
  connection = @sdk_configuration.client
1619
1742
 
@@ -1628,7 +1751,7 @@ module Moov
1628
1751
  error = T.let(nil, T.nilable(StandardError))
1629
1752
  http_response = T.let(nil, T.nilable(Faraday::Response))
1630
1753
 
1631
-
1754
+
1632
1755
  begin
1633
1756
  http_response = T.must(connection).get(url) do |req|
1634
1757
  req.headers.merge!(headers)
@@ -1664,13 +1787,13 @@ module Moov
1664
1787
  response: http_response
1665
1788
  )
1666
1789
  end
1667
-
1790
+
1668
1791
  if http_response.nil?
1669
1792
  raise error if !error.nil?
1670
1793
  raise 'no response'
1671
1794
  end
1672
1795
  end
1673
-
1796
+
1674
1797
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
1675
1798
  if Utils.match_status_code(http_response.status, ['200'])
1676
1799
  if Utils.match_content_type(content_type, 'application/json')
@@ -1750,7 +1873,7 @@ module Moov
1750
1873
 
1751
1874
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
1752
1875
  timeout ||= @sdk_configuration.timeout
1753
-
1876
+
1754
1877
 
1755
1878
  connection = @sdk_configuration.client
1756
1879
 
@@ -1765,7 +1888,7 @@ module Moov
1765
1888
  error = T.let(nil, T.nilable(StandardError))
1766
1889
  http_response = T.let(nil, T.nilable(Faraday::Response))
1767
1890
 
1768
-
1891
+
1769
1892
  begin
1770
1893
  http_response = T.must(connection).post(url) do |req|
1771
1894
  req.body = body
@@ -1802,13 +1925,13 @@ module Moov
1802
1925
  response: http_response
1803
1926
  )
1804
1927
  end
1805
-
1928
+
1806
1929
  if http_response.nil?
1807
1930
  raise error if !error.nil?
1808
1931
  raise 'no response'
1809
1932
  end
1810
1933
  end
1811
-
1934
+
1812
1935
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
1813
1936
  if Utils.match_status_code(http_response.status, ['200', '202'])
1814
1937
  if Utils.match_content_type(content_type, 'application/json')
@@ -69,7 +69,7 @@ module Moov
69
69
 
70
70
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
71
71
  timeout ||= @sdk_configuration.timeout
72
-
72
+
73
73
 
74
74
  connection = @sdk_configuration.client
75
75
 
@@ -84,7 +84,7 @@ module Moov
84
84
  error = T.let(nil, T.nilable(StandardError))
85
85
  http_response = T.let(nil, T.nilable(Faraday::Response))
86
86
 
87
-
87
+
88
88
  begin
89
89
  http_response = T.must(connection).get(url) do |req|
90
90
  req.headers.merge!(headers)
@@ -120,13 +120,13 @@ module Moov
120
120
  response: http_response
121
121
  )
122
122
  end
123
-
123
+
124
124
  if http_response.nil?
125
125
  raise error if !error.nil?
126
126
  raise 'no response'
127
127
  end
128
128
  end
129
-
129
+
130
130
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
131
131
  if Utils.match_status_code(http_response.status, ['200'])
132
132
  if Utils.match_content_type(content_type, 'application/json')
@@ -205,7 +205,7 @@ module Moov
205
205
 
206
206
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
207
207
  timeout ||= @sdk_configuration.timeout
208
-
208
+
209
209
 
210
210
  connection = @sdk_configuration.client
211
211
 
@@ -220,7 +220,7 @@ module Moov
220
220
  error = T.let(nil, T.nilable(StandardError))
221
221
  http_response = T.let(nil, T.nilable(Faraday::Response))
222
222
 
223
-
223
+
224
224
  begin
225
225
  http_response = T.must(connection).post(url) do |req|
226
226
  req.body = body
@@ -257,13 +257,13 @@ module Moov
257
257
  response: http_response
258
258
  )
259
259
  end
260
-
260
+
261
261
  if http_response.nil?
262
262
  raise error if !error.nil?
263
263
  raise 'no response'
264
264
  end
265
265
  end
266
-
266
+
267
267
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
268
268
  if Utils.match_status_code(http_response.status, ['200'])
269
269
  if Utils.match_content_type(content_type, 'application/json')
@@ -372,7 +372,7 @@ module Moov
372
372
 
373
373
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
374
374
  timeout ||= @sdk_configuration.timeout
375
-
375
+
376
376
 
377
377
  connection = @sdk_configuration.client
378
378
 
@@ -387,7 +387,7 @@ module Moov
387
387
  error = T.let(nil, T.nilable(StandardError))
388
388
  http_response = T.let(nil, T.nilable(Faraday::Response))
389
389
 
390
-
390
+
391
391
  begin
392
392
  http_response = T.must(connection).put(url) do |req|
393
393
  req.body = body
@@ -424,13 +424,13 @@ module Moov
424
424
  response: http_response
425
425
  )
426
426
  end
427
-
427
+
428
428
  if http_response.nil?
429
429
  raise error if !error.nil?
430
430
  raise 'no response'
431
431
  end
432
432
  end
433
-
433
+
434
434
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
435
435
  if Utils.match_status_code(http_response.status, ['200'])
436
436
  if Utils.match_content_type(content_type, 'application/json')
@@ -80,12 +80,15 @@ module Moov
80
80
  if @strategy == 'backoff' && @backoff
81
81
  retry_options[:backoff_factor] = @backoff.exponent unless @backoff.exponent.nil?
82
82
  retry_options[:interval] = (@backoff.initial_interval.to_f / 1000) unless @backoff.initial_interval.nil?
83
- retry_options[:max_interval] = @backoff.max_interval unless @backoff.max_interval.nil?
83
+ retry_options[:max_interval] = (@backoff.max_interval.to_f / 1000) unless @backoff.max_interval.nil?
84
84
 
85
85
  unless @backoff.max_elapsed_time.nil?
86
86
  stop_time = initial_time + (@backoff.max_elapsed_time.to_f / 1000)
87
87
  retry_options[:retry_if] = ->(_env, _exc) { Time.now < stop_time }
88
88
  end
89
+
90
+ retry_options[:rate_limit_retry_header] = 'retry-after-ms'
91
+ retry_options[:header_parser_block] = ->(value) { value.to_f / 1000 }
89
92
  end
90
93
 
91
94
  retry_options