trolley 1.0.2 → 1.1.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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trolley/Client.rb +6 -1
  3. data/lib/trolley/Gateway.rb +7 -1
  4. data/lib/trolley/InvoicePayment.rb +6 -1
  5. data/lib/trolley/OfflinePayment.rb +2 -1
  6. data/lib/trolley/Payment.rb +4 -1
  7. data/lib/trolley/Recipient.rb +0 -2
  8. data/lib/trolley/RecipientAccount.rb +4 -1
  9. data/lib/trolley/RecipientLog.rb +12 -0
  10. data/lib/trolley/gateways/BalanceGateway.rb +18 -1
  11. data/lib/trolley/gateways/PaymentGateway.rb +5 -0
  12. data/lib/trolley/gateways/RecipientGateway.rb +5 -1
  13. data/lib/trolley/gateways/VerificationGateway.rb +40 -0
  14. data/lib/trolley/utils/PaginatedArray.rb +8 -3
  15. data/lib/trolley/utils/ResponseMapper.rb +2 -1
  16. data/lib/trolley.rb +3 -1
  17. data/test/fixtures/BalanceTest/test_find.yml +71 -0
  18. data/test/fixtures/BalanceTest/test_find_with_term.yml +71 -0
  19. data/test/fixtures/BatchTest/test_create.yml +150 -0
  20. data/test/fixtures/BatchTest/test_create_with_payments.yml +541 -0
  21. data/test/fixtures/BatchTest/test_delete_multiple.yml +209 -0
  22. data/test/fixtures/BatchTest/test_payments.yml +434 -0
  23. data/test/fixtures/BatchTest/test_processing.yml +578 -0
  24. data/test/fixtures/BatchTest/test_summary.yml +440 -0
  25. data/test/fixtures/BatchTest/test_update.yml +356 -0
  26. data/test/fixtures/InvoicePaymentTest/test_create.yml +489 -0
  27. data/test/fixtures/InvoicePaymentTest/test_delete.yml +634 -0
  28. data/test/fixtures/InvoicePaymentTest/test_find.yml +420 -0
  29. data/test/fixtures/InvoicePaymentTest/test_update.yml +634 -0
  30. data/test/fixtures/InvoiceTest/test_create.yml +293 -0
  31. data/test/fixtures/InvoiceTest/test_create_line.yml +353 -0
  32. data/test/fixtures/InvoiceTest/test_delete.yml +433 -0
  33. data/test/fixtures/InvoiceTest/test_delete_line.yml +353 -0
  34. data/test/fixtures/InvoiceTest/test_find.yml +284 -0
  35. data/test/fixtures/InvoiceTest/test_search.yml +293 -0
  36. data/test/fixtures/InvoiceTest/test_support_error_arrays.yml +71 -0
  37. data/test/fixtures/InvoiceTest/test_update.yml +428 -0
  38. data/test/fixtures/InvoiceTest/test_update_line.yml +422 -0
  39. data/test/fixtures/OfflinePaymentTest/test_create.yml +213 -0
  40. data/test/fixtures/OfflinePaymentTest/test_delete.yml +281 -0
  41. data/test/fixtures/OfflinePaymentTest/test_search.yml +281 -0
  42. data/test/fixtures/OfflinePaymentTest/test_update.yml +281 -0
  43. data/test/fixtures/PaymentTest/test_crud.yml +510 -0
  44. data/test/fixtures/PaymentTest/test_search.yml +366 -0
  45. data/test/fixtures/RecipientAccountTest/test_basic_crud.yml +351 -0
  46. data/test/fixtures/RecipientTest/test_account.yml +499 -0
  47. data/test/fixtures/RecipientTest/test_create.yml +72 -0
  48. data/test/fixtures/RecipientTest/test_delete_multiple.yml +347 -0
  49. data/test/fixtures/RecipientTest/test_find_logs.yml +278 -0
  50. data/test/fixtures/RecipientTest/test_find_payments.yml +512 -0
  51. data/test/fixtures/RecipientTest/test_lifecycle.yml +347 -0
  52. data/test/integration/BalanceTest.rb +22 -0
  53. data/test/integration/BatchTest.rb +157 -0
  54. data/test/integration/InvoicePaymentTest.rb +109 -0
  55. data/test/integration/InvoiceTest.rb +156 -0
  56. data/test/integration/OfflinePaymentTest.rb +109 -0
  57. data/test/integration/PaymentTest.rb +73 -0
  58. data/test/integration/RecipientAccountTest.rb +52 -0
  59. data/test/integration/RecipientTest.rb +176 -0
  60. data/test/test_helper.rb +45 -0
  61. data/test/unit/ClientRequestTest.rb +54 -0
  62. data/{spec → test}/unit/ConfigurationTest.rb +1 -1
  63. data/test/unit/GatewayParityTest.rb +184 -0
  64. data/{spec → test}/unit/PaginatedArrayTest.rb +3 -1
  65. data/{spec → test}/unit/TrolleyTest.rb +2 -2
  66. data/trolley.gemspec +11 -8
  67. metadata +101 -18
  68. data/spec/integration/BatchTest.rb +0 -126
  69. data/spec/integration/InvoicePaymentTest.rb +0 -92
  70. data/spec/integration/InvoiceTest.rb +0 -128
  71. data/spec/integration/RecipientAccountTest.rb +0 -48
  72. data/spec/integration/RecipientTest.rb +0 -159
  73. data/spec/integration/helper.rb +0 -19
  74. /data/{spec → test}/unit/ResponseMapperTest.rb +0 -0
@@ -0,0 +1,578 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.trolley.com/v1/recipients/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"type":"individual","firstName":"Tom","lastName":"Jones","email":"test.batch5582a6ac-c66a-42f2-946e-d384f7484afe@example.com","address":{"street1":"123
9
+ Wolfstrasse","city":"Berlin","country":"DE","postalCode":"123123"}}'
10
+ headers:
11
+ X-Pr-Timestamp:
12
+ - '1688740998'
13
+ Content-Type:
14
+ - application/json
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ Accept:
18
+ - "*/*"
19
+ User-Agent:
20
+ - Ruby
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Date:
27
+ - Fri, 07 Jul 2023 14:43:18 GMT
28
+ Content-Type:
29
+ - application/json; charset=utf-8
30
+ Content-Length:
31
+ - '1289'
32
+ Connection:
33
+ - keep-alive
34
+ Cache-Control:
35
+ - no-store, no-cache
36
+ Content-Security-Policy:
37
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
38
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
39
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
40
+ X-Dns-Prefetch-Control:
41
+ - 'off'
42
+ Expect-Ct:
43
+ - max-age=0
44
+ Strict-Transport-Security:
45
+ - max-age=15552000; includeSubDomains
46
+ X-Download-Options:
47
+ - noopen
48
+ X-Content-Type-Options:
49
+ - nosniff
50
+ X-Permitted-Cross-Domain-Policies:
51
+ - none
52
+ Referrer-Policy:
53
+ - no-referrer
54
+ X-Xss-Protection:
55
+ - '0'
56
+ Access-Control-Allow-Origin:
57
+ - "*"
58
+ X-Rate-Limit-Limit:
59
+ - '600'
60
+ X-Rate-Limit-Remaining:
61
+ - '581'
62
+ X-Rate-Limit-Reset:
63
+ - '1688741046'
64
+ Vary:
65
+ - Origin
66
+ Etag:
67
+ - W/"509-442PhTIspp+3/WwfxUGo/NFxo3Y"
68
+ body:
69
+ encoding: UTF-8
70
+ string: '{"ok":true,"recipient":{"id":"R-P2M6nrkrsa2tubXy3GXwEJ","referenceId":"R-P2M6nrkrsa2tubXy3GXwEJ","parentRecipientId":null,"email":"test.batch5582a6ac-c66a-42f2-946e-d384f7484afe@example.com","name":"Tom
71
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"incomplete","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:43:18.900Z","createdAt":"2023-07-07T14:43:18.900Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"123
72
+ Wolfstrasse","street2":"","city":"Berlin","postalCode":"123123","country":"DE","region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/30664c2ccb08da9bf3237dbc475c12be?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":"sepa","routeMinimum":"0","estimatedFees":"3","accounts":[],"payoutMethod":null,"primaryCurrency":null,"riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{"primaryAccount":"missing"},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null}}'
73
+ recorded_at: Fri, 07 Jul 2023 14:43:19 GMT
74
+ - request:
75
+ method: post
76
+ uri: https://api.trolley.com/v1/recipients/R-P2M6nrkrsa2tubXy3GXwEJ/accounts
77
+ body:
78
+ encoding: UTF-8
79
+ string: '{"type":"bank-transfer","currency":"EUR","country":"DE","iban":"DE89
80
+ 3704 0044 0532 0130 00"}'
81
+ headers:
82
+ X-Pr-Timestamp:
83
+ - '1688740999'
84
+ Content-Type:
85
+ - application/json
86
+ Accept-Encoding:
87
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
88
+ Accept:
89
+ - "*/*"
90
+ User-Agent:
91
+ - Ruby
92
+ response:
93
+ status:
94
+ code: 200
95
+ message: OK
96
+ headers:
97
+ Date:
98
+ - Fri, 07 Jul 2023 14:43:19 GMT
99
+ Content-Type:
100
+ - application/json; charset=utf-8
101
+ Content-Length:
102
+ - '657'
103
+ Connection:
104
+ - keep-alive
105
+ Cache-Control:
106
+ - no-store, no-cache
107
+ Content-Security-Policy:
108
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
109
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
110
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
111
+ X-Dns-Prefetch-Control:
112
+ - 'off'
113
+ Expect-Ct:
114
+ - max-age=0
115
+ Strict-Transport-Security:
116
+ - max-age=15552000; includeSubDomains
117
+ X-Download-Options:
118
+ - noopen
119
+ X-Content-Type-Options:
120
+ - nosniff
121
+ X-Permitted-Cross-Domain-Policies:
122
+ - none
123
+ Referrer-Policy:
124
+ - no-referrer
125
+ X-Xss-Protection:
126
+ - '0'
127
+ Access-Control-Allow-Origin:
128
+ - "*"
129
+ X-Rate-Limit-Limit:
130
+ - '600'
131
+ X-Rate-Limit-Remaining:
132
+ - '580'
133
+ X-Rate-Limit-Reset:
134
+ - '1688741046'
135
+ Vary:
136
+ - Origin
137
+ Etag:
138
+ - W/"291-4vDqfZNTgeKK6+n9flbznXwRsMQ"
139
+ body:
140
+ encoding: UTF-8
141
+ string: '{"ok":true,"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-4jTfN1yxjfv7xhKqEE3nFt","recipientId":"R-P2M6nrkrsa2tubXy3GXwEJ","recipientAccountId":"A-4jTfN1yxjfv7xhKqEE3nFt","disabledAt":null,"deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
142
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
143
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"}}'
144
+ recorded_at: Fri, 07 Jul 2023 14:43:19 GMT
145
+ - request:
146
+ method: post
147
+ uri: https://api.trolley.com/v1/recipients/
148
+ body:
149
+ encoding: UTF-8
150
+ string: '{"type":"individual","firstName":"Tom","lastName":"Jones","email":"test.batchc5839db8-46c5-4ddb-8a02-b3442977126c@example.com","address":{"street1":"123
151
+ Wolfstrasse","city":"Berlin","country":"DE","postalCode":"123123"}}'
152
+ headers:
153
+ X-Pr-Timestamp:
154
+ - '1688740999'
155
+ Content-Type:
156
+ - application/json
157
+ Accept-Encoding:
158
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
159
+ Accept:
160
+ - "*/*"
161
+ User-Agent:
162
+ - Ruby
163
+ response:
164
+ status:
165
+ code: 200
166
+ message: OK
167
+ headers:
168
+ Date:
169
+ - Fri, 07 Jul 2023 14:43:19 GMT
170
+ Content-Type:
171
+ - application/json; charset=utf-8
172
+ Content-Length:
173
+ - '1289'
174
+ Connection:
175
+ - keep-alive
176
+ Cache-Control:
177
+ - no-store, no-cache
178
+ Content-Security-Policy:
179
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
180
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
181
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
182
+ X-Dns-Prefetch-Control:
183
+ - 'off'
184
+ Expect-Ct:
185
+ - max-age=0
186
+ Strict-Transport-Security:
187
+ - max-age=15552000; includeSubDomains
188
+ X-Download-Options:
189
+ - noopen
190
+ X-Content-Type-Options:
191
+ - nosniff
192
+ X-Permitted-Cross-Domain-Policies:
193
+ - none
194
+ Referrer-Policy:
195
+ - no-referrer
196
+ X-Xss-Protection:
197
+ - '0'
198
+ Access-Control-Allow-Origin:
199
+ - "*"
200
+ X-Rate-Limit-Limit:
201
+ - '600'
202
+ X-Rate-Limit-Remaining:
203
+ - '579'
204
+ X-Rate-Limit-Reset:
205
+ - '1688741046'
206
+ Vary:
207
+ - Origin
208
+ Etag:
209
+ - W/"509-fh/xJG+fZ3RJbwdOtULFmKoFpg4"
210
+ body:
211
+ encoding: UTF-8
212
+ string: '{"ok":true,"recipient":{"id":"R-9gnXvhuojRoMVrSPC1buU1","referenceId":"R-9gnXvhuojRoMVrSPC1buU1","parentRecipientId":null,"email":"test.batchc5839db8-46c5-4ddb-8a02-b3442977126c@example.com","name":"Tom
213
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"incomplete","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:43:19.898Z","createdAt":"2023-07-07T14:43:19.898Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"123
214
+ Wolfstrasse","street2":"","city":"Berlin","postalCode":"123123","country":"DE","region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/1b78055c3e937225d4f6533352398f30?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":"sepa","routeMinimum":"0","estimatedFees":"3","accounts":[],"payoutMethod":null,"primaryCurrency":null,"riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{"primaryAccount":"missing"},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null}}'
215
+ recorded_at: Fri, 07 Jul 2023 14:43:20 GMT
216
+ - request:
217
+ method: post
218
+ uri: https://api.trolley.com/v1/recipients/R-9gnXvhuojRoMVrSPC1buU1/accounts
219
+ body:
220
+ encoding: UTF-8
221
+ string: '{"type":"bank-transfer","currency":"EUR","country":"DE","iban":"DE89
222
+ 3704 0044 0532 0130 00"}'
223
+ headers:
224
+ X-Pr-Timestamp:
225
+ - '1688741000'
226
+ Content-Type:
227
+ - application/json
228
+ Accept-Encoding:
229
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
230
+ Accept:
231
+ - "*/*"
232
+ User-Agent:
233
+ - Ruby
234
+ response:
235
+ status:
236
+ code: 200
237
+ message: OK
238
+ headers:
239
+ Date:
240
+ - Fri, 07 Jul 2023 14:43:20 GMT
241
+ Content-Type:
242
+ - application/json; charset=utf-8
243
+ Content-Length:
244
+ - '657'
245
+ Connection:
246
+ - keep-alive
247
+ Cache-Control:
248
+ - no-store, no-cache
249
+ Content-Security-Policy:
250
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
251
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
252
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
253
+ X-Dns-Prefetch-Control:
254
+ - 'off'
255
+ Expect-Ct:
256
+ - max-age=0
257
+ Strict-Transport-Security:
258
+ - max-age=15552000; includeSubDomains
259
+ X-Download-Options:
260
+ - noopen
261
+ X-Content-Type-Options:
262
+ - nosniff
263
+ X-Permitted-Cross-Domain-Policies:
264
+ - none
265
+ Referrer-Policy:
266
+ - no-referrer
267
+ X-Xss-Protection:
268
+ - '0'
269
+ Access-Control-Allow-Origin:
270
+ - "*"
271
+ X-Rate-Limit-Limit:
272
+ - '600'
273
+ X-Rate-Limit-Remaining:
274
+ - '578'
275
+ X-Rate-Limit-Reset:
276
+ - '1688741046'
277
+ Vary:
278
+ - Origin
279
+ Etag:
280
+ - W/"291-vG9h+ExbNfIczJqiqIB/+XavPe0"
281
+ body:
282
+ encoding: UTF-8
283
+ string: '{"ok":true,"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-8L1u7oa3grxLheU4NLHfzM","recipientId":"R-9gnXvhuojRoMVrSPC1buU1","recipientAccountId":"A-8L1u7oa3grxLheU4NLHfzM","disabledAt":null,"deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
284
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
285
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"}}'
286
+ recorded_at: Fri, 07 Jul 2023 14:43:20 GMT
287
+ - request:
288
+ method: post
289
+ uri: https://api.trolley.com/v1/batches/
290
+ body:
291
+ encoding: UTF-8
292
+ string: '{"sourceCurrency":"USD","description":"Integration Test Payments","payments":[{"targetAmount":"10.00","targetCurrency":"EUR","recipient":{"id":"R-P2M6nrkrsa2tubXy3GXwEJ"}},{"sourceAmount":"10.00","recipient":{"id":"R-9gnXvhuojRoMVrSPC1buU1"}}]}'
293
+ headers:
294
+ X-Pr-Timestamp:
295
+ - '1688741000'
296
+ Content-Type:
297
+ - application/json
298
+ Accept-Encoding:
299
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
300
+ Accept:
301
+ - "*/*"
302
+ User-Agent:
303
+ - Ruby
304
+ response:
305
+ status:
306
+ code: 200
307
+ message: OK
308
+ headers:
309
+ Date:
310
+ - Fri, 07 Jul 2023 14:43:21 GMT
311
+ Content-Type:
312
+ - application/json; charset=utf-8
313
+ Content-Length:
314
+ - '10391'
315
+ Connection:
316
+ - keep-alive
317
+ Cache-Control:
318
+ - no-store, no-cache
319
+ Content-Security-Policy:
320
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
321
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
322
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
323
+ X-Dns-Prefetch-Control:
324
+ - 'off'
325
+ Expect-Ct:
326
+ - max-age=0
327
+ Strict-Transport-Security:
328
+ - max-age=15552000; includeSubDomains
329
+ X-Download-Options:
330
+ - noopen
331
+ X-Content-Type-Options:
332
+ - nosniff
333
+ X-Permitted-Cross-Domain-Policies:
334
+ - none
335
+ Referrer-Policy:
336
+ - no-referrer
337
+ X-Xss-Protection:
338
+ - '0'
339
+ Access-Control-Allow-Origin:
340
+ - "*"
341
+ X-Rate-Limit-Limit:
342
+ - '600'
343
+ X-Rate-Limit-Remaining:
344
+ - '577'
345
+ X-Rate-Limit-Reset:
346
+ - '1688741046'
347
+ Vary:
348
+ - Origin
349
+ Etag:
350
+ - W/"2897-1RanpdPI4f7mzHLMaCFB4eq0oeA"
351
+ body:
352
+ encoding: UTF-8
353
+ string: '{"ok":true,"batch":{"id":"B-7mfvs7TYDW94FCm2FnnUDi","status":"open","tags":[],"amount":"27.16","currency":"USD","totalPayments":2,"description":"Integration
354
+ Test Payments","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:20.935Z","updatedAt":"2023-07-07T14:43:21.699Z","quoteExpiredAt":"2023-07-07T16:43:21.594Z","payments":{"payments":[{"id":"P-BXYuP6xASJ22to2UrTQqd7","recipient":{"id":"R-P2M6nrkrsa2tubXy3GXwEJ","referenceId":"R-P2M6nrkrsa2tubXy3GXwEJ","parentRecipientId":null,"email":"test.batch5582a6ac-c66a-42f2-946e-d384f7484afe@example.com","name":"Tom
355
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"active","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:43:19.420Z","createdAt":"2023-07-07T14:43:18.900Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"123
356
+ Wolfstrasse","street2":"","city":"Berlin","postalCode":"123123","country":"DE","region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/30664c2ccb08da9bf3237dbc475c12be?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":"sepa","routeMinimum":"0","estimatedFees":"3","accounts":[{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-4jTfN1yxjfv7xhKqEE3nFt","recipientId":"R-P2M6nrkrsa2tubXy3GXwEJ","recipientAccountId":"A-4jTfN1yxjfv7xhKqEE3nFt","disabledAt":null,"recipientReferenceId":"R-P2M6nrkrsa2tubXy3GXwEJ","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
357
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
358
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"}],"payoutMethod":"bank-transfer","primaryCurrency":"EUR","riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null},"status":"pending","isSupplyPayment":true,"coverFees":true,"returnedAmount":"0.00","category":"services","amount":"10.00","currency":"EUR","sourceAmount":"11.16","sourceCurrency":"USD","targetAmount":"10.00","targetCurrency":"EUR","taxReportable":true,"taxBasisAmount":"10.00","taxBasisCurrency":"EUR","withholdingAmount":"0.00","withholdingCurrency":"EUR","equivalentWithholdingAmount":"0.00","equivalentWithholdingCurrency":"USD","exchangeRate":"0.89607","fees":"4.00","recipientFees":"0.00","fxRate":"2.5","memo":"","externalId":"","processedAt":null,"createdAt":"2023-07-07T14:43:20.986Z","updatedAt":"2023-07-07T14:43:21.612Z","forceUsTaxActivity":false,"batch":{"id":"B-7mfvs7TYDW94FCm2FnnUDi","status":"open","tags":[],"amount":"27.16","currency":"USD","totalPayments":2,"description":"Integration
359
+ Test Payments","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:20.935Z","updatedAt":"2023-07-07T14:43:21.699Z","quoteExpiredAt":"2023-07-07T16:43:21.594Z"},"checkNumber":null,"tags":[],"merchantFees":"4.00","compliance":{"status":"pending","checkedAt":null},"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-4jTfN1yxjfv7xhKqEE3nFt","recipientId":"R-P2M6nrkrsa2tubXy3GXwEJ","recipientAccountId":"A-4jTfN1yxjfv7xhKqEE3nFt","disabledAt":null,"recipientReferenceId":"R-P2M6nrkrsa2tubXy3GXwEJ","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
360
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
361
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"},"payoutMethod":"bank-transfer","methodDisplay":"Bank
362
+ Transfer","initiatedAt":null,"settledAt":null,"returnedAt":null,"returnedReason":[],"returnedNote":null,"estimatedDeliveryAt":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","taxes":[{"id":"OP-Us7rMS247KjLg4SvXaBVsj","recipientId":"R-P2M6nrkrsa2tubXy3GXwEJ","taxFormId":null,"entered":{"value":"10.00","currency":"EUR"},"withholding":{"value":"0.00","currency":"EUR"},"equivalentWithholding":{"value":"0.00","currency":"USD"},"amount":"10.00","currency":"EUR","withholdingAmount":"0.00","withholdingCurrency":"EUR","equivalentWithholdingAmount":"0.00","equivalentWithholdingCurrency":"USD","paymentId":"P-BXYuP6xASJ22to2UrTQqd7","externalId":null,"memo":"","payoutMethod":"bank-transfer","tags":[],"taxReportable":true,"category":"services","processedAt":"2023-07-07T14:43:20.957Z","forceUsTaxActivity":false,"taxWithholdingReason":null,"equivalentUntaxedAmount":{"value":"10.89","currency":"USD"},"modifiedSinceCreation":false,"taxPaidByWithholdingAgents":"0","status":"internal","enteredAmount":{"value":"10.00","currency":"EUR"},"updatedAt":"2023-07-07T14:43:21.586Z","createdAt":"2023-07-07T14:43:20.957Z","deletedAt":null,"dac7Meta":null}],"errors":[],"routeMinimum":"0","routeType":"sepa"},{"id":"P-Uy22aSCXD77JMTBzSHPQDX","recipient":{"id":"R-9gnXvhuojRoMVrSPC1buU1","referenceId":"R-9gnXvhuojRoMVrSPC1buU1","parentRecipientId":null,"email":"test.batchc5839db8-46c5-4ddb-8a02-b3442977126c@example.com","name":"Tom
363
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"active","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:43:20.400Z","createdAt":"2023-07-07T14:43:19.898Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"123
364
+ Wolfstrasse","street2":"","city":"Berlin","postalCode":"123123","country":"DE","region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/1b78055c3e937225d4f6533352398f30?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":"sepa","routeMinimum":"0","estimatedFees":"3","accounts":[{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-8L1u7oa3grxLheU4NLHfzM","recipientId":"R-9gnXvhuojRoMVrSPC1buU1","recipientAccountId":"A-8L1u7oa3grxLheU4NLHfzM","disabledAt":null,"recipientReferenceId":"R-9gnXvhuojRoMVrSPC1buU1","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
365
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
366
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"}],"payoutMethod":"bank-transfer","primaryCurrency":"EUR","riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null},"status":"pending","isSupplyPayment":false,"coverFees":false,"returnedAmount":"0.00","category":"services","amount":"10.00","currency":"USD","sourceAmount":"10.00","sourceCurrency":"USD","targetAmount":"7.17","targetCurrency":"EUR","taxReportable":true,"taxBasisAmount":"10.00","taxBasisCurrency":"USD","withholdingAmount":"0.00","withholdingCurrency":"USD","equivalentWithholdingAmount":"0.00","equivalentWithholdingCurrency":"USD","exchangeRate":"0.89607","fees":"4.00","recipientFees":"2.00","fxRate":"2.5","memo":"","externalId":"","processedAt":null,"createdAt":"2023-07-07T14:43:20.976Z","updatedAt":"2023-07-07T14:43:21.608Z","forceUsTaxActivity":false,"batch":{"id":"B-7mfvs7TYDW94FCm2FnnUDi","status":"open","tags":[],"amount":"27.16","currency":"USD","totalPayments":2,"description":"Integration
367
+ Test Payments","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:20.935Z","updatedAt":"2023-07-07T14:43:21.699Z","quoteExpiredAt":"2023-07-07T16:43:21.594Z"},"checkNumber":null,"tags":[],"merchantFees":"2.00","compliance":{"status":"pending","checkedAt":null},"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-8L1u7oa3grxLheU4NLHfzM","recipientId":"R-9gnXvhuojRoMVrSPC1buU1","recipientAccountId":"A-8L1u7oa3grxLheU4NLHfzM","disabledAt":null,"recipientReferenceId":"R-9gnXvhuojRoMVrSPC1buU1","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
368
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
369
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"},"payoutMethod":"bank-transfer","methodDisplay":"Bank
370
+ Transfer","initiatedAt":null,"settledAt":null,"returnedAt":null,"returnedReason":[],"returnedNote":null,"estimatedDeliveryAt":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","taxes":[{"id":"OP-GJq4wgZQaswRYuDBjLqHkg","recipientId":"R-9gnXvhuojRoMVrSPC1buU1","taxFormId":null,"entered":{"value":"10.00","currency":"USD"},"withholding":{"value":"0.00","currency":"USD"},"equivalentWithholding":{"value":"0.00","currency":"USD"},"amount":"10.00","currency":"USD","withholdingAmount":"0.00","withholdingCurrency":"USD","equivalentWithholdingAmount":"0.00","equivalentWithholdingCurrency":"USD","paymentId":"P-Uy22aSCXD77JMTBzSHPQDX","externalId":null,"memo":"","payoutMethod":"bank-transfer","tags":[],"taxReportable":true,"category":"services","processedAt":"2023-07-07T14:43:20.954Z","forceUsTaxActivity":false,"taxWithholdingReason":null,"equivalentUntaxedAmount":{"value":"10.00","currency":"USD"},"modifiedSinceCreation":false,"taxPaidByWithholdingAgents":"0","status":"internal","enteredAmount":{"value":"10.00","currency":"USD"},"updatedAt":"2023-07-07T14:43:21.582Z","createdAt":"2023-07-07T14:43:20.954Z","deletedAt":null,"dac7Meta":null}],"errors":[],"routeMinimum":"0","routeType":"sepa"}],"meta":{"page":1,"pages":1,"records":2}}}}'
371
+ recorded_at: Fri, 07 Jul 2023 14:43:21 GMT
372
+ - request:
373
+ method: get
374
+ uri: https://api.trolley.com/v1/batches/B-7mfvs7TYDW94FCm2FnnUDi/summary
375
+ body:
376
+ encoding: US-ASCII
377
+ string: ''
378
+ headers:
379
+ X-Pr-Timestamp:
380
+ - '1688741001'
381
+ Content-Type:
382
+ - application/json
383
+ Accept-Encoding:
384
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
385
+ Accept:
386
+ - "*/*"
387
+ User-Agent:
388
+ - Ruby
389
+ response:
390
+ status:
391
+ code: 200
392
+ message: OK
393
+ headers:
394
+ Date:
395
+ - Fri, 07 Jul 2023 14:43:22 GMT
396
+ Content-Type:
397
+ - application/json; charset=utf-8
398
+ Content-Length:
399
+ - '612'
400
+ Connection:
401
+ - keep-alive
402
+ Cache-Control:
403
+ - no-store, no-cache
404
+ Content-Security-Policy:
405
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
406
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
407
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
408
+ X-Dns-Prefetch-Control:
409
+ - 'off'
410
+ Expect-Ct:
411
+ - max-age=0
412
+ Strict-Transport-Security:
413
+ - max-age=15552000; includeSubDomains
414
+ X-Download-Options:
415
+ - noopen
416
+ X-Content-Type-Options:
417
+ - nosniff
418
+ X-Permitted-Cross-Domain-Policies:
419
+ - none
420
+ Referrer-Policy:
421
+ - no-referrer
422
+ X-Xss-Protection:
423
+ - '0'
424
+ Access-Control-Allow-Origin:
425
+ - "*"
426
+ X-Rate-Limit-Limit:
427
+ - '600'
428
+ X-Rate-Limit-Remaining:
429
+ - '576'
430
+ X-Rate-Limit-Reset:
431
+ - '1688741046'
432
+ Vary:
433
+ - Origin
434
+ Etag:
435
+ - W/"264-5mgRjFZ0NeqNab/op0rEOWUpL/I"
436
+ body:
437
+ encoding: UTF-8
438
+ string: '{"ok":true,"batchSummary":{"batchId":"B-7mfvs7TYDW94FCm2FnnUDi","detail":{"bank-transfer":{"count":2,"totalFees":"8.00","merchantFees":"6.00","billedFees":"0.00","debitAmount":"27.16","sendingAmount":"21.16","totalWithheld":"0.00"}},"total":{"count":2,"totalFees":"8.00","merchantFees":"6.00","billedFees":"0.00","debitAmount":"27.16","sendingAmount":"21.16","totalWithheld":"0.00"},"balances":[{"id":"BL-db7d007f42b5704e7f4ab0cff8abe6a3","method":"bank-transfer","bankProvider":"sandbox","currency":"USD","amount":"27.16"}],"accounts":{"BL-db7d007f42b5704e7f4ab0cff8abe6a3":{"value":"27.16","currency":"USD"}}}}'
439
+ recorded_at: Fri, 07 Jul 2023 14:43:23 GMT
440
+ - request:
441
+ method: post
442
+ uri: https://api.trolley.com/v1/batches/B-7mfvs7TYDW94FCm2FnnUDi/generate-quote
443
+ body:
444
+ encoding: UTF-8
445
+ string: "{}"
446
+ headers:
447
+ X-Pr-Timestamp:
448
+ - '1688741003'
449
+ Content-Type:
450
+ - application/json
451
+ Accept-Encoding:
452
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
453
+ Accept:
454
+ - "*/*"
455
+ User-Agent:
456
+ - Ruby
457
+ response:
458
+ status:
459
+ code: 200
460
+ message: OK
461
+ headers:
462
+ Date:
463
+ - Fri, 07 Jul 2023 14:43:23 GMT
464
+ Content-Type:
465
+ - application/json; charset=utf-8
466
+ Content-Length:
467
+ - '328'
468
+ Connection:
469
+ - keep-alive
470
+ Cache-Control:
471
+ - no-store, no-cache
472
+ Content-Security-Policy:
473
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
474
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
475
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
476
+ X-Dns-Prefetch-Control:
477
+ - 'off'
478
+ Expect-Ct:
479
+ - max-age=0
480
+ Strict-Transport-Security:
481
+ - max-age=15552000; includeSubDomains
482
+ X-Download-Options:
483
+ - noopen
484
+ X-Content-Type-Options:
485
+ - nosniff
486
+ X-Permitted-Cross-Domain-Policies:
487
+ - none
488
+ Referrer-Policy:
489
+ - no-referrer
490
+ X-Xss-Protection:
491
+ - '0'
492
+ Access-Control-Allow-Origin:
493
+ - "*"
494
+ X-Rate-Limit-Limit:
495
+ - '600'
496
+ X-Rate-Limit-Remaining:
497
+ - '575'
498
+ X-Rate-Limit-Reset:
499
+ - '1688741046'
500
+ Vary:
501
+ - Origin
502
+ Etag:
503
+ - W/"148-IqyJc47LtTJXlSpo+PXFYIFVr5A"
504
+ body:
505
+ encoding: UTF-8
506
+ string: '{"ok":true,"batch":{"id":"B-7mfvs7TYDW94FCm2FnnUDi","status":"open","tags":[],"amount":"27.16","currency":"USD","totalPayments":2,"description":"Integration
507
+ Test Payments","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:20.935Z","updatedAt":"2023-07-07T14:43:23.466Z","quoteExpiredAt":"2023-07-07T16:43:21.594Z"}}'
508
+ recorded_at: Fri, 07 Jul 2023 14:43:23 GMT
509
+ - request:
510
+ method: post
511
+ uri: https://api.trolley.com/v1/batches/B-7mfvs7TYDW94FCm2FnnUDi/start-processing
512
+ body:
513
+ encoding: UTF-8
514
+ string: "{}"
515
+ headers:
516
+ X-Pr-Timestamp:
517
+ - '1688741003'
518
+ Content-Type:
519
+ - application/json
520
+ Accept-Encoding:
521
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
522
+ Accept:
523
+ - "*/*"
524
+ User-Agent:
525
+ - Ruby
526
+ response:
527
+ status:
528
+ code: 200
529
+ message: OK
530
+ headers:
531
+ Date:
532
+ - Fri, 07 Jul 2023 14:43:24 GMT
533
+ Content-Type:
534
+ - application/json; charset=utf-8
535
+ Content-Length:
536
+ - '341'
537
+ Connection:
538
+ - keep-alive
539
+ Cache-Control:
540
+ - no-store, no-cache
541
+ Content-Security-Policy:
542
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
543
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
544
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
545
+ X-Dns-Prefetch-Control:
546
+ - 'off'
547
+ Expect-Ct:
548
+ - max-age=0
549
+ Strict-Transport-Security:
550
+ - max-age=15552000; includeSubDomains
551
+ X-Download-Options:
552
+ - noopen
553
+ X-Content-Type-Options:
554
+ - nosniff
555
+ X-Permitted-Cross-Domain-Policies:
556
+ - none
557
+ Referrer-Policy:
558
+ - no-referrer
559
+ X-Xss-Protection:
560
+ - '0'
561
+ Access-Control-Allow-Origin:
562
+ - "*"
563
+ X-Rate-Limit-Limit:
564
+ - '600'
565
+ X-Rate-Limit-Remaining:
566
+ - '574'
567
+ X-Rate-Limit-Reset:
568
+ - '1688741046'
569
+ Vary:
570
+ - Origin
571
+ Etag:
572
+ - W/"155-vwVoAPLIx8x+dzv5I+9oP/cBF6c"
573
+ body:
574
+ encoding: UTF-8
575
+ string: '{"ok":true,"batch":{"id":"B-7mfvs7TYDW94FCm2FnnUDi","status":"awaiting_approval","tags":[],"amount":"27.16","currency":"USD","totalPayments":2,"description":"Integration
576
+ Test Payments","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:20.935Z","updatedAt":"2023-07-07T14:43:24.235Z","quoteExpiredAt":"2023-07-07T16:43:21.594Z"}}'
577
+ recorded_at: Fri, 07 Jul 2023 14:43:24 GMT
578
+ recorded_with: VCR 6.2.0