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,422 @@
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.batch79e254b7-c88e-402e-8754-cb1c9b1246a8@example.com","address":{"street1":"123
9
+ Wolfstrasse","city":"Berlin","country":"DE","postalCode":"123123"}}'
10
+ headers:
11
+ X-Pr-Timestamp:
12
+ - '1688741235'
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:47:15 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
+ - '572'
62
+ X-Rate-Limit-Reset:
63
+ - '1688741279'
64
+ Vary:
65
+ - Origin
66
+ Etag:
67
+ - W/"509-jisp+U5Sa4y4KqiGLMiKwSttH60"
68
+ body:
69
+ encoding: UTF-8
70
+ string: '{"ok":true,"recipient":{"id":"R-Mqbtiri4pkee6XgyLtEjok","referenceId":"R-Mqbtiri4pkee6XgyLtEjok","parentRecipientId":null,"email":"test.batch79e254b7-c88e-402e-8754-cb1c9b1246a8@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:47:15.426Z","createdAt":"2023-07-07T14:47:15.426Z","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/dbcbc3eaed7953a2e1d7c4d6b4dd75af?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:47:15 GMT
74
+ - request:
75
+ method: post
76
+ uri: https://api.trolley.com/v1/recipients/R-Mqbtiri4pkee6XgyLtEjok/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
+ - '1688741235'
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:47:16 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
+ - '571'
133
+ X-Rate-Limit-Reset:
134
+ - '1688741279'
135
+ Vary:
136
+ - Origin
137
+ Etag:
138
+ - W/"291-G9zn8Mxho02+C+9PWZ/2Pej6/Po"
139
+ body:
140
+ encoding: UTF-8
141
+ string: '{"ok":true,"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-XEKQtDFpRUTjT2F6F8a1Su","recipientId":"R-Mqbtiri4pkee6XgyLtEjok","recipientAccountId":"A-XEKQtDFpRUTjT2F6F8a1Su","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:47:16 GMT
145
+ - request:
146
+ method: post
147
+ uri: https://api.trolley.com/v1/invoices/create
148
+ body:
149
+ encoding: UTF-8
150
+ string: '{"recipientId":"R-Mqbtiri4pkee6XgyLtEjok","description":"Integration
151
+ Test Invoice Create"}'
152
+ headers:
153
+ X-Pr-Timestamp:
154
+ - '1688741236'
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:47:16 GMT
170
+ Content-Type:
171
+ - application/json; charset=utf-8
172
+ Content-Length:
173
+ - '582'
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
+ - '570'
204
+ X-Rate-Limit-Reset:
205
+ - '1688741279'
206
+ Vary:
207
+ - Origin
208
+ Etag:
209
+ - W/"246-eiTaZCu+UD0zpCRbGyFacVsPlvQ"
210
+ body:
211
+ encoding: UTF-8
212
+ string: '{"ok":true,"invoice":{"id":"I-GhjuMpPj6VMPwadAjDYKpY","invoiceNumber":"","description":"Integration
213
+ Test Invoice Create","status":"open","externalId":null,"invoiceDate":"2023-07-07T14:47:16.543Z","dueDate":null,"releaseAfter":null,"createdAt":"2023-07-07T14:47:16.543Z","updatedAt":"2023-07-07T14:47:16.543Z","totalAmount":{"value":"0.00","currency":"CAD"},"paidAmount":{"value":"0.00","currency":"CAD"},"pendingAmount":{"value":"0.00","currency":"CAD"},"dueAmount":{"value":"0.00","currency":"CAD"},"tags":[],"lines":[],"recipientId":"R-Mqbtiri4pkee6XgyLtEjok","syncDetails":null}}'
214
+ recorded_at: Fri, 07 Jul 2023 14:47:16 GMT
215
+ - request:
216
+ method: post
217
+ uri: https://api.trolley.com/v1/invoices/create-lines
218
+ body:
219
+ encoding: UTF-8
220
+ string: '{"invoiceId":"I-GhjuMpPj6VMPwadAjDYKpY","lines":[{"unitAmount":{"value":"2000","currency":"USD"}}]}'
221
+ headers:
222
+ X-Pr-Timestamp:
223
+ - '1688741236'
224
+ Content-Type:
225
+ - application/json
226
+ Accept-Encoding:
227
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
228
+ Accept:
229
+ - "*/*"
230
+ User-Agent:
231
+ - Ruby
232
+ response:
233
+ status:
234
+ code: 200
235
+ message: OK
236
+ headers:
237
+ Date:
238
+ - Fri, 07 Jul 2023 14:47:17 GMT
239
+ Content-Type:
240
+ - application/json; charset=utf-8
241
+ Content-Length:
242
+ - '1127'
243
+ Connection:
244
+ - keep-alive
245
+ Cache-Control:
246
+ - no-store, no-cache
247
+ Content-Security-Policy:
248
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
249
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
250
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
251
+ X-Dns-Prefetch-Control:
252
+ - 'off'
253
+ Expect-Ct:
254
+ - max-age=0
255
+ Strict-Transport-Security:
256
+ - max-age=15552000; includeSubDomains
257
+ X-Download-Options:
258
+ - noopen
259
+ X-Content-Type-Options:
260
+ - nosniff
261
+ X-Permitted-Cross-Domain-Policies:
262
+ - none
263
+ Referrer-Policy:
264
+ - no-referrer
265
+ X-Xss-Protection:
266
+ - '0'
267
+ Access-Control-Allow-Origin:
268
+ - "*"
269
+ X-Rate-Limit-Limit:
270
+ - '600'
271
+ X-Rate-Limit-Remaining:
272
+ - '569'
273
+ X-Rate-Limit-Reset:
274
+ - '1688741279'
275
+ Vary:
276
+ - Origin
277
+ Etag:
278
+ - W/"467-fcC4cz11FNq8sCG9BFpt3vlo6hY"
279
+ body:
280
+ encoding: UTF-8
281
+ string: '{"ok":true,"invoice":{"id":"I-GhjuMpPj6VMPwadAjDYKpY","invoiceNumber":"","description":"Integration
282
+ Test Invoice Create","status":"open","externalId":null,"invoiceDate":"2023-07-07T14:47:16.543Z","dueDate":null,"releaseAfter":null,"createdAt":"2023-07-07T14:47:16.543Z","updatedAt":"2023-07-07T14:47:17.012Z","totalAmount":{"value":"2000.00","currency":"USD"},"paidAmount":{"value":"0.00","currency":"USD"},"pendingAmount":{"value":"0.00","currency":"USD"},"dueAmount":{"value":"2000.00","currency":"USD"},"tags":[],"lines":[{"id":"IL-HWK2UqqpDyxfHCjJ6BAjrm","status":"open","itemUrl":null,"description":"","unitAmount":{"value":"2000.00","currency":"USD"},"quantity":"1","discountAmount":{"value":"0.00","currency":"USD"},"taxAmount":{"value":"0.00","currency":"USD"},"totalAmount":{"value":"2000.00","currency":"USD"},"dueAmount":{"value":"2000.00","currency":"USD"},"paidAmount":{"value":"0.00","currency":"USD"},"pendingAmount":{"value":"0.00","currency":"USD"},"externalId":null,"taxReportable":true,"tags":[],"category":"services","forceUsTaxActivity":false}],"recipientId":"R-Mqbtiri4pkee6XgyLtEjok","syncDetails":null}}'
283
+ recorded_at: Fri, 07 Jul 2023 14:47:17 GMT
284
+ - request:
285
+ method: post
286
+ uri: https://api.trolley.com/v1/invoices/update-lines
287
+ body:
288
+ encoding: UTF-8
289
+ string: '{"invoiceId":"I-GhjuMpPj6VMPwadAjDYKpY","lines":[{"invoiceLineId":"IL-HWK2UqqpDyxfHCjJ6BAjrm","unitAmount":{"value":"3000","currency":"USD"}}]}'
290
+ headers:
291
+ X-Pr-Timestamp:
292
+ - '1688741237'
293
+ Content-Type:
294
+ - application/json
295
+ Accept-Encoding:
296
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
297
+ Accept:
298
+ - "*/*"
299
+ User-Agent:
300
+ - Ruby
301
+ response:
302
+ status:
303
+ code: 200
304
+ message: OK
305
+ headers:
306
+ Date:
307
+ - Fri, 07 Jul 2023 14:47:17 GMT
308
+ Content-Type:
309
+ - application/json; charset=utf-8
310
+ Content-Length:
311
+ - '1127'
312
+ Connection:
313
+ - keep-alive
314
+ Cache-Control:
315
+ - no-store, no-cache
316
+ Content-Security-Policy:
317
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
318
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
319
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
320
+ X-Dns-Prefetch-Control:
321
+ - 'off'
322
+ Expect-Ct:
323
+ - max-age=0
324
+ Strict-Transport-Security:
325
+ - max-age=15552000; includeSubDomains
326
+ X-Download-Options:
327
+ - noopen
328
+ X-Content-Type-Options:
329
+ - nosniff
330
+ X-Permitted-Cross-Domain-Policies:
331
+ - none
332
+ Referrer-Policy:
333
+ - no-referrer
334
+ X-Xss-Protection:
335
+ - '0'
336
+ Access-Control-Allow-Origin:
337
+ - "*"
338
+ X-Rate-Limit-Limit:
339
+ - '600'
340
+ X-Rate-Limit-Remaining:
341
+ - '568'
342
+ X-Rate-Limit-Reset:
343
+ - '1688741279'
344
+ Vary:
345
+ - Origin
346
+ Etag:
347
+ - W/"467-fCht0Tp87cNRe3Ssa26+1Bnu7TI"
348
+ body:
349
+ encoding: UTF-8
350
+ string: '{"ok":true,"invoice":{"id":"I-GhjuMpPj6VMPwadAjDYKpY","invoiceNumber":"","description":"Integration
351
+ Test Invoice Create","status":"open","externalId":null,"invoiceDate":"2023-07-07T14:47:16.543Z","dueDate":null,"releaseAfter":null,"createdAt":"2023-07-07T14:47:16.543Z","updatedAt":"2023-07-07T14:47:17.483Z","totalAmount":{"value":"3000.00","currency":"USD"},"paidAmount":{"value":"0.00","currency":"USD"},"pendingAmount":{"value":"0.00","currency":"USD"},"dueAmount":{"value":"3000.00","currency":"USD"},"tags":[],"lines":[{"id":"IL-HWK2UqqpDyxfHCjJ6BAjrm","status":"open","itemUrl":null,"description":"","unitAmount":{"value":"3000.00","currency":"USD"},"quantity":"1","discountAmount":{"value":"0.00","currency":"USD"},"taxAmount":{"value":"0.00","currency":"USD"},"totalAmount":{"value":"3000.00","currency":"USD"},"dueAmount":{"value":"3000.00","currency":"USD"},"paidAmount":{"value":"0.00","currency":"USD"},"pendingAmount":{"value":"0.00","currency":"USD"},"externalId":null,"taxReportable":true,"tags":[],"category":"services","forceUsTaxActivity":false}],"recipientId":"R-Mqbtiri4pkee6XgyLtEjok","syncDetails":null}}'
352
+ recorded_at: Fri, 07 Jul 2023 14:47:17 GMT
353
+ - request:
354
+ method: post
355
+ uri: https://api.trolley.com/v1/invoices/get
356
+ body:
357
+ encoding: UTF-8
358
+ string: '{"invoiceId":"I-GhjuMpPj6VMPwadAjDYKpY"}'
359
+ headers:
360
+ X-Pr-Timestamp:
361
+ - '1688741237'
362
+ Content-Type:
363
+ - application/json
364
+ Accept-Encoding:
365
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
366
+ Accept:
367
+ - "*/*"
368
+ User-Agent:
369
+ - Ruby
370
+ response:
371
+ status:
372
+ code: 200
373
+ message: OK
374
+ headers:
375
+ Date:
376
+ - Fri, 07 Jul 2023 14:47:18 GMT
377
+ Content-Type:
378
+ - application/json; charset=utf-8
379
+ Content-Length:
380
+ - '1127'
381
+ Connection:
382
+ - keep-alive
383
+ Cache-Control:
384
+ - no-store, no-cache
385
+ Content-Security-Policy:
386
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
387
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
388
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
389
+ X-Dns-Prefetch-Control:
390
+ - 'off'
391
+ Expect-Ct:
392
+ - max-age=0
393
+ Strict-Transport-Security:
394
+ - max-age=15552000; includeSubDomains
395
+ X-Download-Options:
396
+ - noopen
397
+ X-Content-Type-Options:
398
+ - nosniff
399
+ X-Permitted-Cross-Domain-Policies:
400
+ - none
401
+ Referrer-Policy:
402
+ - no-referrer
403
+ X-Xss-Protection:
404
+ - '0'
405
+ Access-Control-Allow-Origin:
406
+ - "*"
407
+ X-Rate-Limit-Limit:
408
+ - '600'
409
+ X-Rate-Limit-Remaining:
410
+ - '567'
411
+ X-Rate-Limit-Reset:
412
+ - '1688741279'
413
+ Vary:
414
+ - Origin
415
+ Etag:
416
+ - W/"467-fCht0Tp87cNRe3Ssa26+1Bnu7TI"
417
+ body:
418
+ encoding: UTF-8
419
+ string: '{"ok":true,"invoice":{"id":"I-GhjuMpPj6VMPwadAjDYKpY","invoiceNumber":"","description":"Integration
420
+ Test Invoice Create","status":"open","externalId":null,"invoiceDate":"2023-07-07T14:47:16.543Z","dueDate":null,"releaseAfter":null,"createdAt":"2023-07-07T14:47:16.543Z","updatedAt":"2023-07-07T14:47:17.483Z","totalAmount":{"value":"3000.00","currency":"USD"},"paidAmount":{"value":"0.00","currency":"USD"},"pendingAmount":{"value":"0.00","currency":"USD"},"dueAmount":{"value":"3000.00","currency":"USD"},"tags":[],"lines":[{"id":"IL-HWK2UqqpDyxfHCjJ6BAjrm","status":"open","itemUrl":null,"description":"","unitAmount":{"value":"3000.00","currency":"USD"},"quantity":"1","discountAmount":{"value":"0.00","currency":"USD"},"taxAmount":{"value":"0.00","currency":"USD"},"totalAmount":{"value":"3000.00","currency":"USD"},"dueAmount":{"value":"3000.00","currency":"USD"},"paidAmount":{"value":"0.00","currency":"USD"},"pendingAmount":{"value":"0.00","currency":"USD"},"externalId":null,"taxReportable":true,"tags":[],"category":"services","forceUsTaxActivity":false}],"recipientId":"R-Mqbtiri4pkee6XgyLtEjok","syncDetails":null}}'
421
+ recorded_at: Fri, 07 Jul 2023 14:47:18 GMT
422
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,213 @@
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.batch5842a74a-d024-4829-9a82-6e3972180161@example.com","address":{"street1":"123
9
+ Wolfstrasse","city":"Berlin","country":"DE","postalCode":"123123"}}'
10
+ headers:
11
+ X-Pr-Timestamp:
12
+ - '1691540964'
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
+ - Wed, 09 Aug 2023 00:29:24 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
+ - '587'
62
+ X-Rate-Limit-Reset:
63
+ - '1691541008'
64
+ Vary:
65
+ - Origin
66
+ Etag:
67
+ - W/"509-/jJYplstWM0QVyyZU0lxZzda+sI"
68
+ body:
69
+ encoding: UTF-8
70
+ string: '{"ok":true,"recipient":{"id":"R-GG41kEdxzDwjJshGvxSUpi","referenceId":"R-GG41kEdxzDwjJshGvxSUpi","parentRecipientId":null,"email":"test.batch5842a74a-d024-4829-9a82-6e3972180161@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-08-09T00:29:24.786Z","createdAt":"2023-08-09T00:29:24.786Z","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/d74efe2fb5834a0549d4d4b00f5788e5?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: Wed, 09 Aug 2023 00:29:24 GMT
74
+ - request:
75
+ method: post
76
+ uri: https://api.trolley.com/v1/recipients/R-GG41kEdxzDwjJshGvxSUpi/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
+ - '1691540964'
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
+ - Wed, 09 Aug 2023 00:29:25 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
+ - '586'
133
+ X-Rate-Limit-Reset:
134
+ - '1691541008'
135
+ Vary:
136
+ - Origin
137
+ Etag:
138
+ - W/"291-6VQHN2TWkPqnNdBeQBxoNCziZBw"
139
+ body:
140
+ encoding: UTF-8
141
+ string: '{"ok":true,"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-6nK5UMHJw346p6LufdqqUH","recipientId":"R-GG41kEdxzDwjJshGvxSUpi","recipientAccountId":"A-6nK5UMHJw346p6LufdqqUH","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: Wed, 09 Aug 2023 00:29:25 GMT
145
+ - request:
146
+ method: post
147
+ uri: https://api.trolley.com/v1/recipients/R-GG41kEdxzDwjJshGvxSUpi/offlinePayments
148
+ body:
149
+ encoding: UTF-8
150
+ string: '{"amount":"10.00","currency":"EUR"}'
151
+ headers:
152
+ X-Pr-Timestamp:
153
+ - '1691540965'
154
+ Content-Type:
155
+ - application/json
156
+ Accept-Encoding:
157
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
158
+ Accept:
159
+ - "*/*"
160
+ User-Agent:
161
+ - Ruby
162
+ response:
163
+ status:
164
+ code: 200
165
+ message: OK
166
+ headers:
167
+ Date:
168
+ - Wed, 09 Aug 2023 00:29:25 GMT
169
+ Content-Type:
170
+ - application/json; charset=utf-8
171
+ Content-Length:
172
+ - '957'
173
+ Connection:
174
+ - keep-alive
175
+ Cache-Control:
176
+ - no-store, no-cache
177
+ Content-Security-Policy:
178
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
179
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
180
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
181
+ X-Dns-Prefetch-Control:
182
+ - 'off'
183
+ Expect-Ct:
184
+ - max-age=0
185
+ Strict-Transport-Security:
186
+ - max-age=15552000; includeSubDomains
187
+ X-Download-Options:
188
+ - noopen
189
+ X-Content-Type-Options:
190
+ - nosniff
191
+ X-Permitted-Cross-Domain-Policies:
192
+ - none
193
+ Referrer-Policy:
194
+ - no-referrer
195
+ X-Xss-Protection:
196
+ - '0'
197
+ Access-Control-Allow-Origin:
198
+ - "*"
199
+ X-Rate-Limit-Limit:
200
+ - '600'
201
+ X-Rate-Limit-Remaining:
202
+ - '585'
203
+ X-Rate-Limit-Reset:
204
+ - '1691541008'
205
+ Vary:
206
+ - Origin
207
+ Etag:
208
+ - W/"3bd-1PgdXA42y3V8pIvpSI8D63Wb67w"
209
+ body:
210
+ encoding: UTF-8
211
+ string: '{"ok":true,"offlinePayment":{"id":"OP-NGpp4scv32QtykDXkyrYx3","recipientId":"R-GG41kEdxzDwjJshGvxSUpi","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":null,"externalId":null,"memo":"","payoutMethod":null,"tags":[],"taxReportable":true,"category":"services","processedAt":"2023-08-09T00:29:25.809Z","forceUsTaxActivity":false,"taxWithholdingReason":null,"equivalentUntaxedAmount":{"value":"10.96","currency":"USD"},"modifiedSinceCreation":false,"taxPaidByWithholdingAgents":"0","status":"processed","enteredAmount":{"value":"10.00","currency":"EUR"},"updatedAt":"2023-08-09T00:29:25.809Z","createdAt":"2023-08-09T00:29:25.809Z","deletedAt":null,"dac7Meta":null}}'
212
+ recorded_at: Wed, 09 Aug 2023 00:29:25 GMT
213
+ recorded_with: VCR 6.2.0