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,499 @@
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.createb8e6424e-a94f-404f-aa8e-e2623e931a5b@example.com","address":{"street1":"123
9
+ Wolfstrasse","city":"Berlin","country":"DE","postalCode":"123123"}}'
10
+ headers:
11
+ X-Pr-Timestamp:
12
+ - '1688741558'
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:52:39 GMT
28
+ Content-Type:
29
+ - application/json; charset=utf-8
30
+ Content-Length:
31
+ - '1290'
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
+ - '599'
62
+ X-Rate-Limit-Reset:
63
+ - '1688741619'
64
+ Vary:
65
+ - Origin
66
+ Etag:
67
+ - W/"50a-4eU/38c63p2woJQwtHM/crnjG18"
68
+ body:
69
+ encoding: UTF-8
70
+ string: '{"ok":true,"recipient":{"id":"R-9nkDE4BNDGCe3MMtzLTw7v","referenceId":"R-9nkDE4BNDGCe3MMtzLTw7v","parentRecipientId":null,"email":"test.createb8e6424e-a94f-404f-aa8e-e2623e931a5b@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:52:39.005Z","createdAt":"2023-07-07T14:52:39.005Z","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/38efd0723a83df3b704d0470331ab9a2?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:52:39 GMT
74
+ - request:
75
+ method: post
76
+ uri: https://api.trolley.com/v1/recipients/R-9nkDE4BNDGCe3MMtzLTw7v/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
+ - '1688741559'
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:52:39 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
+ - '598'
133
+ X-Rate-Limit-Reset:
134
+ - '1688741619'
135
+ Vary:
136
+ - Origin
137
+ Etag:
138
+ - W/"291-K78s3IM/wcdK6HFayAU/rtKVR+0"
139
+ body:
140
+ encoding: UTF-8
141
+ string: '{"ok":true,"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-SPpLxm3exkDB2eSxBSCSjS","recipientId":"R-9nkDE4BNDGCe3MMtzLTw7v","recipientAccountId":"A-SPpLxm3exkDB2eSxBSCSjS","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:52:39 GMT
145
+ - request:
146
+ method: post
147
+ uri: https://api.trolley.com/v1/recipients/R-9nkDE4BNDGCe3MMtzLTw7v/accounts
148
+ body:
149
+ encoding: UTF-8
150
+ string: '{"type":"bank-transfer","currency":"EUR","country":"FR","iban":"FR14
151
+ 2004 1010 0505 0001 3M02 606"}'
152
+ headers:
153
+ X-Pr-Timestamp:
154
+ - '1688741559'
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:52:40 GMT
170
+ Content-Type:
171
+ - application/json; charset=utf-8
172
+ Content-Length:
173
+ - '657'
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
+ - '597'
204
+ X-Rate-Limit-Reset:
205
+ - '1688741619'
206
+ Vary:
207
+ - Origin
208
+ Etag:
209
+ - W/"291-n0JpdXtk/P5333GduHaZyEoiYUU"
210
+ body:
211
+ encoding: UTF-8
212
+ string: '{"ok":true,"account":{"status":"inactive","type":"bank-transfer","primary":false,"currency":"EUR","id":"A-KdXAWZgbAtNhSQFaU72GCf","recipientId":"R-9nkDE4BNDGCe3MMtzLTw7v","recipientAccountId":"A-KdXAWZgbAtNhSQFaU72GCf","disabledAt":null,"deliveryBusinessDaysEstimate":5,"country":"FR","iban":"*************************06","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
213
+ Jones","swiftBic":"PSSTFRPPLIL","branchId":"","bankId":"","bankName":"La Banque
214
+ Postale","bankAddress":"3 R Paul Duez","bankCity":"Lille","bankRegionCode":"Hauts-de-France","bankPostalCode":"59900
215
+ Cedex 9","routeType":"sepa","recipientFees":"2"}}'
216
+ recorded_at: Fri, 07 Jul 2023 14:52:40 GMT
217
+ - request:
218
+ method: get
219
+ uri: https://api.trolley.com/v1/recipients/R-9nkDE4BNDGCe3MMtzLTw7v/accounts/A-KdXAWZgbAtNhSQFaU72GCf
220
+ body:
221
+ encoding: US-ASCII
222
+ string: ''
223
+ headers:
224
+ X-Pr-Timestamp:
225
+ - '1688741560'
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:52:40 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
+ - '596'
275
+ X-Rate-Limit-Reset:
276
+ - '1688741619'
277
+ Vary:
278
+ - Origin
279
+ Etag:
280
+ - W/"291-n0JpdXtk/P5333GduHaZyEoiYUU"
281
+ body:
282
+ encoding: UTF-8
283
+ string: '{"ok":true,"account":{"status":"inactive","type":"bank-transfer","primary":false,"currency":"EUR","id":"A-KdXAWZgbAtNhSQFaU72GCf","recipientId":"R-9nkDE4BNDGCe3MMtzLTw7v","recipientAccountId":"A-KdXAWZgbAtNhSQFaU72GCf","disabledAt":null,"deliveryBusinessDaysEstimate":5,"country":"FR","iban":"*************************06","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
284
+ Jones","swiftBic":"PSSTFRPPLIL","branchId":"","bankId":"","bankName":"La Banque
285
+ Postale","bankAddress":"3 R Paul Duez","bankCity":"Lille","bankRegionCode":"Hauts-de-France","bankPostalCode":"59900
286
+ Cedex 9","routeType":"sepa","recipientFees":"2"}}'
287
+ recorded_at: Fri, 07 Jul 2023 14:52:40 GMT
288
+ - request:
289
+ method: get
290
+ uri: https://api.trolley.com/v1/recipients/R-9nkDE4BNDGCe3MMtzLTw7v/accounts/
291
+ body:
292
+ encoding: US-ASCII
293
+ string: ''
294
+ headers:
295
+ X-Pr-Timestamp:
296
+ - '1688741560'
297
+ Content-Type:
298
+ - application/json
299
+ Accept-Encoding:
300
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
301
+ Accept:
302
+ - "*/*"
303
+ User-Agent:
304
+ - Ruby
305
+ response:
306
+ status:
307
+ code: 200
308
+ message: OK
309
+ headers:
310
+ Date:
311
+ - Fri, 07 Jul 2023 14:52:40 GMT
312
+ Content-Type:
313
+ - application/json; charset=utf-8
314
+ Content-Length:
315
+ - '1296'
316
+ Connection:
317
+ - keep-alive
318
+ Cache-Control:
319
+ - no-store, no-cache
320
+ Content-Security-Policy:
321
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
322
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
323
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
324
+ X-Dns-Prefetch-Control:
325
+ - 'off'
326
+ Expect-Ct:
327
+ - max-age=0
328
+ Strict-Transport-Security:
329
+ - max-age=15552000; includeSubDomains
330
+ X-Download-Options:
331
+ - noopen
332
+ X-Content-Type-Options:
333
+ - nosniff
334
+ X-Permitted-Cross-Domain-Policies:
335
+ - none
336
+ Referrer-Policy:
337
+ - no-referrer
338
+ X-Xss-Protection:
339
+ - '0'
340
+ Access-Control-Allow-Origin:
341
+ - "*"
342
+ X-Rate-Limit-Limit:
343
+ - '600'
344
+ X-Rate-Limit-Remaining:
345
+ - '595'
346
+ X-Rate-Limit-Reset:
347
+ - '1688741619'
348
+ Vary:
349
+ - Origin
350
+ Etag:
351
+ - W/"510-eA4cu480S15ynL0bNKHOCBKV3cw"
352
+ body:
353
+ encoding: UTF-8
354
+ string: '{"ok":true,"accounts":[{"status":"inactive","type":"bank-transfer","primary":false,"currency":"EUR","id":"A-KdXAWZgbAtNhSQFaU72GCf","recipientId":"R-9nkDE4BNDGCe3MMtzLTw7v","recipientAccountId":"A-KdXAWZgbAtNhSQFaU72GCf","disabledAt":null,"deliveryBusinessDaysEstimate":5,"country":"FR","iban":"*************************06","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
355
+ Jones","swiftBic":"PSSTFRPPLIL","branchId":"","bankId":"","bankName":"La Banque
356
+ Postale","bankAddress":"3 R Paul Duez","bankCity":"Lille","bankRegionCode":"Hauts-de-France","bankPostalCode":"59900
357
+ Cedex 9","routeType":"sepa","recipientFees":"2"},{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-SPpLxm3exkDB2eSxBSCSjS","recipientId":"R-9nkDE4BNDGCe3MMtzLTw7v","recipientAccountId":"A-SPpLxm3exkDB2eSxBSCSjS","disabledAt":null,"deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
358
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
359
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"}]}'
360
+ recorded_at: Fri, 07 Jul 2023 14:52:41 GMT
361
+ - request:
362
+ method: delete
363
+ uri: https://api.trolley.com/v1/recipients/R-9nkDE4BNDGCe3MMtzLTw7v/accounts/A-KdXAWZgbAtNhSQFaU72GCf
364
+ body:
365
+ encoding: UTF-8
366
+ string: ''
367
+ headers:
368
+ X-Pr-Timestamp:
369
+ - '1688741561'
370
+ Content-Type:
371
+ - application/json
372
+ Accept-Encoding:
373
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
374
+ Accept:
375
+ - "*/*"
376
+ User-Agent:
377
+ - Ruby
378
+ response:
379
+ status:
380
+ code: 200
381
+ message: OK
382
+ headers:
383
+ Date:
384
+ - Fri, 07 Jul 2023 14:52:41 GMT
385
+ Content-Type:
386
+ - application/json; charset=utf-8
387
+ Content-Length:
388
+ - '11'
389
+ Connection:
390
+ - keep-alive
391
+ Cache-Control:
392
+ - no-store, no-cache
393
+ Content-Security-Policy:
394
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
395
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
396
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
397
+ X-Dns-Prefetch-Control:
398
+ - 'off'
399
+ Expect-Ct:
400
+ - max-age=0
401
+ Strict-Transport-Security:
402
+ - max-age=15552000; includeSubDomains
403
+ X-Download-Options:
404
+ - noopen
405
+ X-Content-Type-Options:
406
+ - nosniff
407
+ X-Permitted-Cross-Domain-Policies:
408
+ - none
409
+ Referrer-Policy:
410
+ - no-referrer
411
+ X-Xss-Protection:
412
+ - '0'
413
+ Access-Control-Allow-Origin:
414
+ - "*"
415
+ X-Rate-Limit-Limit:
416
+ - '600'
417
+ X-Rate-Limit-Remaining:
418
+ - '594'
419
+ X-Rate-Limit-Reset:
420
+ - '1688741619'
421
+ Vary:
422
+ - Origin
423
+ Etag:
424
+ - W/"b-Ai2R8hgEarLmHKwesT1qcY913ys"
425
+ body:
426
+ encoding: UTF-8
427
+ string: '{"ok":true}'
428
+ recorded_at: Fri, 07 Jul 2023 14:52:41 GMT
429
+ - request:
430
+ method: get
431
+ uri: https://api.trolley.com/v1/recipients/R-9nkDE4BNDGCe3MMtzLTw7v/accounts/
432
+ body:
433
+ encoding: US-ASCII
434
+ string: ''
435
+ headers:
436
+ X-Pr-Timestamp:
437
+ - '1688741561'
438
+ Content-Type:
439
+ - application/json
440
+ Accept-Encoding:
441
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
442
+ Accept:
443
+ - "*/*"
444
+ User-Agent:
445
+ - Ruby
446
+ response:
447
+ status:
448
+ code: 200
449
+ message: OK
450
+ headers:
451
+ Date:
452
+ - Fri, 07 Jul 2023 14:52:41 GMT
453
+ Content-Type:
454
+ - application/json; charset=utf-8
455
+ Content-Length:
456
+ - '660'
457
+ Connection:
458
+ - keep-alive
459
+ Cache-Control:
460
+ - no-store, no-cache
461
+ Content-Security-Policy:
462
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
463
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
464
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
465
+ X-Dns-Prefetch-Control:
466
+ - 'off'
467
+ Expect-Ct:
468
+ - max-age=0
469
+ Strict-Transport-Security:
470
+ - max-age=15552000; includeSubDomains
471
+ X-Download-Options:
472
+ - noopen
473
+ X-Content-Type-Options:
474
+ - nosniff
475
+ X-Permitted-Cross-Domain-Policies:
476
+ - none
477
+ Referrer-Policy:
478
+ - no-referrer
479
+ X-Xss-Protection:
480
+ - '0'
481
+ Access-Control-Allow-Origin:
482
+ - "*"
483
+ X-Rate-Limit-Limit:
484
+ - '600'
485
+ X-Rate-Limit-Remaining:
486
+ - '593'
487
+ X-Rate-Limit-Reset:
488
+ - '1688741619'
489
+ Vary:
490
+ - Origin
491
+ Etag:
492
+ - W/"294-Jkj7xB6/lo5btHjPZVL4xl+jPeg"
493
+ body:
494
+ encoding: UTF-8
495
+ string: '{"ok":true,"accounts":[{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-SPpLxm3exkDB2eSxBSCSjS","recipientId":"R-9nkDE4BNDGCe3MMtzLTw7v","recipientAccountId":"A-SPpLxm3exkDB2eSxBSCSjS","disabledAt":null,"deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
496
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
497
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"}]}'
498
+ recorded_at: Fri, 07 Jul 2023 14:52:42 GMT
499
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,72 @@
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.create624e2883-d634-4b73-a83c-3d0708c2caca@example.com"}'
9
+ headers:
10
+ X-Pr-Timestamp:
11
+ - '1688741562'
12
+ Content-Type:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Fri, 07 Jul 2023 14:52:42 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '1263'
31
+ Connection:
32
+ - keep-alive
33
+ Cache-Control:
34
+ - no-store, no-cache
35
+ Content-Security-Policy:
36
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
37
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
38
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
39
+ X-Dns-Prefetch-Control:
40
+ - 'off'
41
+ Expect-Ct:
42
+ - max-age=0
43
+ Strict-Transport-Security:
44
+ - max-age=15552000; includeSubDomains
45
+ X-Download-Options:
46
+ - noopen
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ X-Permitted-Cross-Domain-Policies:
50
+ - none
51
+ Referrer-Policy:
52
+ - no-referrer
53
+ X-Xss-Protection:
54
+ - '0'
55
+ Access-Control-Allow-Origin:
56
+ - "*"
57
+ X-Rate-Limit-Limit:
58
+ - '600'
59
+ X-Rate-Limit-Remaining:
60
+ - '592'
61
+ X-Rate-Limit-Reset:
62
+ - '1688741619'
63
+ Vary:
64
+ - Origin
65
+ Etag:
66
+ - W/"4ef-BNbOBtPZteTxvpiS16nJT1djA7M"
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"ok":true,"recipient":{"id":"R-Up5Cgq3FmANtFcZt3oVH6G","referenceId":"R-Up5Cgq3FmANtFcZt3oVH6G","parentRecipientId":null,"email":"test.create624e2883-d634-4b73-a83c-3d0708c2caca@example.com","name":"Tom
70
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"incomplete","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:52:42.381Z","createdAt":"2023-07-07T14:52:42.381Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"","street2":"","city":"","postalCode":"","country":null,"region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/19fbda248217ef7dce65e6679a8b0e77?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":null,"routeMinimum":null,"estimatedFees":null,"accounts":[],"payoutMethod":null,"primaryCurrency":null,"riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{"primaryAccount":"missing"},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null}}'
71
+ recorded_at: Fri, 07 Jul 2023 14:52:42 GMT
72
+ recorded_with: VCR 6.2.0