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,510 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.trolley.com/v1/batches/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"sourceCurrency":"USD","description":"Integration Test Create"}'
9
+ headers:
10
+ X-Pr-Timestamp:
11
+ - '1691540947'
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
+ - Wed, 09 Aug 2023 00:29:08 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '370'
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
+ - '599'
61
+ X-Rate-Limit-Reset:
62
+ - '1691541008'
63
+ Vary:
64
+ - Origin
65
+ Etag:
66
+ - W/"172-8eKqMnVoAReWf3S5wfqHLgJZ4PI"
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"ok":true,"batch":{"id":"B-QmoMmcUtHNH2od8jetWvhq","status":"open","tags":[],"amount":"0.00","currency":"USD","totalPayments":0,"description":"Integration
70
+ Test Create","sentAt":null,"completedAt":null,"createdAt":"2023-08-09T00:29:08.203Z","updatedAt":"2023-08-09T00:29:08.203Z","quoteExpiredAt":null,"payments":{"payments":[],"meta":{"page":1,"pages":0,"records":0}}}}'
71
+ recorded_at: Wed, 09 Aug 2023 00:29:08 GMT
72
+ - request:
73
+ method: post
74
+ uri: https://api.trolley.com/v1/recipients/
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"type":"individual","firstName":"Tom","lastName":"Jones","email":"test.batch816a8032-3380-470f-b7f0-5a6ed1bec9e0@example.com","address":{"street1":"123
78
+ Wolfstrasse","city":"Berlin","country":"DE","postalCode":"123123"}}'
79
+ headers:
80
+ X-Pr-Timestamp:
81
+ - '1691540948'
82
+ Content-Type:
83
+ - application/json
84
+ Accept-Encoding:
85
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
86
+ Accept:
87
+ - "*/*"
88
+ User-Agent:
89
+ - Ruby
90
+ response:
91
+ status:
92
+ code: 200
93
+ message: OK
94
+ headers:
95
+ Date:
96
+ - Wed, 09 Aug 2023 00:29:09 GMT
97
+ Content-Type:
98
+ - application/json; charset=utf-8
99
+ Content-Length:
100
+ - '1289'
101
+ Connection:
102
+ - keep-alive
103
+ Cache-Control:
104
+ - no-store, no-cache
105
+ Content-Security-Policy:
106
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
107
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
108
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
109
+ X-Dns-Prefetch-Control:
110
+ - 'off'
111
+ Expect-Ct:
112
+ - max-age=0
113
+ Strict-Transport-Security:
114
+ - max-age=15552000; includeSubDomains
115
+ X-Download-Options:
116
+ - noopen
117
+ X-Content-Type-Options:
118
+ - nosniff
119
+ X-Permitted-Cross-Domain-Policies:
120
+ - none
121
+ Referrer-Policy:
122
+ - no-referrer
123
+ X-Xss-Protection:
124
+ - '0'
125
+ Access-Control-Allow-Origin:
126
+ - "*"
127
+ X-Rate-Limit-Limit:
128
+ - '600'
129
+ X-Rate-Limit-Remaining:
130
+ - '598'
131
+ X-Rate-Limit-Reset:
132
+ - '1691541008'
133
+ Vary:
134
+ - Origin
135
+ Etag:
136
+ - W/"509-9iTa8TIT1ty9fWzPGY5LPMDr59g"
137
+ body:
138
+ encoding: UTF-8
139
+ string: '{"ok":true,"recipient":{"id":"R-2xp7k58h9NRvaEEgXnA7Qo","referenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","parentRecipientId":null,"email":"test.batch816a8032-3380-470f-b7f0-5a6ed1bec9e0@example.com","name":"Tom
140
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"incomplete","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-08-09T00:29:09.017Z","createdAt":"2023-08-09T00:29:09.017Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"123
141
+ Wolfstrasse","street2":"","city":"Berlin","postalCode":"123123","country":"DE","region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/e81b79eda3f49d4a3d475d59b9cd07aa?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}}'
142
+ recorded_at: Wed, 09 Aug 2023 00:29:09 GMT
143
+ - request:
144
+ method: post
145
+ uri: https://api.trolley.com/v1/recipients/R-2xp7k58h9NRvaEEgXnA7Qo/accounts
146
+ body:
147
+ encoding: UTF-8
148
+ string: '{"type":"bank-transfer","currency":"EUR","country":"DE","iban":"DE89
149
+ 3704 0044 0532 0130 00"}'
150
+ headers:
151
+ X-Pr-Timestamp:
152
+ - '1691540949'
153
+ Content-Type:
154
+ - application/json
155
+ Accept-Encoding:
156
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
157
+ Accept:
158
+ - "*/*"
159
+ User-Agent:
160
+ - Ruby
161
+ response:
162
+ status:
163
+ code: 200
164
+ message: OK
165
+ headers:
166
+ Date:
167
+ - Wed, 09 Aug 2023 00:29:09 GMT
168
+ Content-Type:
169
+ - application/json; charset=utf-8
170
+ Content-Length:
171
+ - '657'
172
+ Connection:
173
+ - keep-alive
174
+ Cache-Control:
175
+ - no-store, no-cache
176
+ Content-Security-Policy:
177
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
178
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
179
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
180
+ X-Dns-Prefetch-Control:
181
+ - 'off'
182
+ Expect-Ct:
183
+ - max-age=0
184
+ Strict-Transport-Security:
185
+ - max-age=15552000; includeSubDomains
186
+ X-Download-Options:
187
+ - noopen
188
+ X-Content-Type-Options:
189
+ - nosniff
190
+ X-Permitted-Cross-Domain-Policies:
191
+ - none
192
+ Referrer-Policy:
193
+ - no-referrer
194
+ X-Xss-Protection:
195
+ - '0'
196
+ Access-Control-Allow-Origin:
197
+ - "*"
198
+ X-Rate-Limit-Limit:
199
+ - '600'
200
+ X-Rate-Limit-Remaining:
201
+ - '597'
202
+ X-Rate-Limit-Reset:
203
+ - '1691541008'
204
+ Vary:
205
+ - Origin
206
+ Etag:
207
+ - W/"291-Dp4IVU//PAqlmmjI8OSUCTPMr/Y"
208
+ body:
209
+ encoding: UTF-8
210
+ string: '{"ok":true,"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-65yNLmHwkr2RdhkuNySoZj","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","recipientAccountId":"A-65yNLmHwkr2RdhkuNySoZj","disabledAt":null,"deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
211
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
212
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"}}'
213
+ recorded_at: Wed, 09 Aug 2023 00:29:09 GMT
214
+ - request:
215
+ method: post
216
+ uri: https://api.trolley.com/v1/batches/B-QmoMmcUtHNH2od8jetWvhq/payments
217
+ body:
218
+ encoding: UTF-8
219
+ string: '{"sourceAmount":"10.00","sourceCurrency":"USD","recipient":{"id":"R-2xp7k58h9NRvaEEgXnA7Qo"}}'
220
+ headers:
221
+ X-Pr-Timestamp:
222
+ - '1691540949'
223
+ Content-Type:
224
+ - application/json
225
+ Accept-Encoding:
226
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
227
+ Accept:
228
+ - "*/*"
229
+ User-Agent:
230
+ - Ruby
231
+ response:
232
+ status:
233
+ code: 200
234
+ message: OK
235
+ headers:
236
+ Date:
237
+ - Wed, 09 Aug 2023 00:29:10 GMT
238
+ Content-Type:
239
+ - application/json; charset=utf-8
240
+ Content-Length:
241
+ - '4990'
242
+ Connection:
243
+ - keep-alive
244
+ Cache-Control:
245
+ - no-store, no-cache
246
+ Content-Security-Policy:
247
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
248
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
249
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
250
+ X-Dns-Prefetch-Control:
251
+ - 'off'
252
+ Expect-Ct:
253
+ - max-age=0
254
+ Strict-Transport-Security:
255
+ - max-age=15552000; includeSubDomains
256
+ X-Download-Options:
257
+ - noopen
258
+ X-Content-Type-Options:
259
+ - nosniff
260
+ X-Permitted-Cross-Domain-Policies:
261
+ - none
262
+ Referrer-Policy:
263
+ - no-referrer
264
+ X-Xss-Protection:
265
+ - '0'
266
+ Access-Control-Allow-Origin:
267
+ - "*"
268
+ X-Rate-Limit-Limit:
269
+ - '600'
270
+ X-Rate-Limit-Remaining:
271
+ - '596'
272
+ X-Rate-Limit-Reset:
273
+ - '1691541008'
274
+ Vary:
275
+ - Origin
276
+ Etag:
277
+ - W/"137e-yPaloBzA/UfiXqnM9FGDSmoxYzA"
278
+ body:
279
+ encoding: UTF-8
280
+ string: '{"ok":true,"payment":{"id":"P-KQLGFEHSHqEVkeDLWiTMxP","recipient":{"id":"R-2xp7k58h9NRvaEEgXnA7Qo","referenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","parentRecipientId":null,"email":"test.batch816a8032-3380-470f-b7f0-5a6ed1bec9e0@example.com","name":"Tom
281
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"active","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-08-09T00:29:09.815Z","createdAt":"2023-08-09T00:29:09.017Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"123
282
+ Wolfstrasse","street2":"","city":"Berlin","postalCode":"123123","country":"DE","region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/e81b79eda3f49d4a3d475d59b9cd07aa?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-65yNLmHwkr2RdhkuNySoZj","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","recipientAccountId":"A-65yNLmHwkr2RdhkuNySoZj","disabledAt":null,"recipientReferenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
283
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
284
+ 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":"0.00","targetCurrency":"EUR","taxReportable":true,"taxBasisAmount":"10.00","taxBasisCurrency":"USD","withholdingAmount":"0.00","withholdingCurrency":"USD","equivalentWithholdingAmount":"0.00","equivalentWithholdingCurrency":"USD","exchangeRate":"0","fees":"4.00","recipientFees":"2.00","fxRate":"2.5","memo":"","externalId":"","processedAt":null,"createdAt":"2023-08-09T00:29:10.382Z","updatedAt":"2023-08-09T00:29:10.382Z","forceUsTaxActivity":false,"batch":{"id":"B-QmoMmcUtHNH2od8jetWvhq","status":"open","tags":[],"amount":"12.00","currency":"USD","totalPayments":1,"description":"Integration
285
+ Test Create","sentAt":null,"completedAt":null,"createdAt":"2023-08-09T00:29:08.203Z","updatedAt":"2023-08-09T00:29:10.397Z","quoteExpiredAt":null},"checkNumber":null,"tags":[],"merchantFees":"2.00","compliance":{"status":"pending","checkedAt":null},"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-65yNLmHwkr2RdhkuNySoZj","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","recipientAccountId":"A-65yNLmHwkr2RdhkuNySoZj","disabledAt":null,"recipientReferenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
286
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
287
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"},"payoutMethod":"bank-transfer","methodDisplay":"Bank
288
+ Transfer","initiatedAt":null,"settledAt":null,"returnedAt":null,"returnedReason":[],"returnedNote":null,"estimatedDeliveryAt":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","taxes":[{"id":"OP-C2ZCBcok484o8HPVLWanMf","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","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-KQLGFEHSHqEVkeDLWiTMxP","externalId":null,"memo":"","payoutMethod":"bank-transfer","tags":[],"taxReportable":true,"category":"services","processedAt":"2023-08-09T00:29:10.355Z","forceUsTaxActivity":false,"taxWithholdingReason":null,"equivalentUntaxedAmount":{"value":"10.00","currency":"USD"},"modifiedSinceCreation":false,"taxPaidByWithholdingAgents":"0","status":"internal","enteredAmount":{"value":"10.00","currency":"USD"},"updatedAt":"2023-08-09T00:29:10.374Z","createdAt":"2023-08-09T00:29:10.355Z","deletedAt":null,"dac7Meta":null}],"errors":[],"routeMinimum":"0","routeType":"sepa"}}'
289
+ recorded_at: Wed, 09 Aug 2023 00:29:10 GMT
290
+ - request:
291
+ method: get
292
+ uri: https://api.trolley.com/v1/batches/B-QmoMmcUtHNH2od8jetWvhq/payments/P-KQLGFEHSHqEVkeDLWiTMxP
293
+ body:
294
+ encoding: US-ASCII
295
+ string: ''
296
+ headers:
297
+ X-Pr-Timestamp:
298
+ - '1691540950'
299
+ Content-Type:
300
+ - application/json
301
+ Accept-Encoding:
302
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
303
+ Accept:
304
+ - "*/*"
305
+ User-Agent:
306
+ - Ruby
307
+ response:
308
+ status:
309
+ code: 200
310
+ message: OK
311
+ headers:
312
+ Date:
313
+ - Wed, 09 Aug 2023 00:29:10 GMT
314
+ Content-Type:
315
+ - application/json; charset=utf-8
316
+ Content-Length:
317
+ - '4990'
318
+ Connection:
319
+ - keep-alive
320
+ Cache-Control:
321
+ - no-store, no-cache
322
+ Content-Security-Policy:
323
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
324
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
325
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
326
+ X-Dns-Prefetch-Control:
327
+ - 'off'
328
+ Expect-Ct:
329
+ - max-age=0
330
+ Strict-Transport-Security:
331
+ - max-age=15552000; includeSubDomains
332
+ X-Download-Options:
333
+ - noopen
334
+ X-Content-Type-Options:
335
+ - nosniff
336
+ X-Permitted-Cross-Domain-Policies:
337
+ - none
338
+ Referrer-Policy:
339
+ - no-referrer
340
+ X-Xss-Protection:
341
+ - '0'
342
+ Access-Control-Allow-Origin:
343
+ - "*"
344
+ X-Rate-Limit-Limit:
345
+ - '600'
346
+ X-Rate-Limit-Remaining:
347
+ - '595'
348
+ X-Rate-Limit-Reset:
349
+ - '1691541008'
350
+ Vary:
351
+ - Origin
352
+ Etag:
353
+ - W/"137e-yPaloBzA/UfiXqnM9FGDSmoxYzA"
354
+ body:
355
+ encoding: UTF-8
356
+ string: '{"ok":true,"payment":{"id":"P-KQLGFEHSHqEVkeDLWiTMxP","recipient":{"id":"R-2xp7k58h9NRvaEEgXnA7Qo","referenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","parentRecipientId":null,"email":"test.batch816a8032-3380-470f-b7f0-5a6ed1bec9e0@example.com","name":"Tom
357
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"active","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-08-09T00:29:09.815Z","createdAt":"2023-08-09T00:29:09.017Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"123
358
+ Wolfstrasse","street2":"","city":"Berlin","postalCode":"123123","country":"DE","region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/e81b79eda3f49d4a3d475d59b9cd07aa?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-65yNLmHwkr2RdhkuNySoZj","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","recipientAccountId":"A-65yNLmHwkr2RdhkuNySoZj","disabledAt":null,"recipientReferenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
359
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
360
+ 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":"0.00","targetCurrency":"EUR","taxReportable":true,"taxBasisAmount":"10.00","taxBasisCurrency":"USD","withholdingAmount":"0.00","withholdingCurrency":"USD","equivalentWithholdingAmount":"0.00","equivalentWithholdingCurrency":"USD","exchangeRate":"0","fees":"4.00","recipientFees":"2.00","fxRate":"2.5","memo":"","externalId":"","processedAt":null,"createdAt":"2023-08-09T00:29:10.382Z","updatedAt":"2023-08-09T00:29:10.382Z","forceUsTaxActivity":false,"batch":{"id":"B-QmoMmcUtHNH2od8jetWvhq","status":"open","tags":[],"amount":"12.00","currency":"USD","totalPayments":1,"description":"Integration
361
+ Test Create","sentAt":null,"completedAt":null,"createdAt":"2023-08-09T00:29:08.203Z","updatedAt":"2023-08-09T00:29:10.397Z","quoteExpiredAt":null},"checkNumber":null,"tags":[],"merchantFees":"2.00","compliance":{"status":"pending","checkedAt":null},"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-65yNLmHwkr2RdhkuNySoZj","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","recipientAccountId":"A-65yNLmHwkr2RdhkuNySoZj","disabledAt":null,"recipientReferenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
362
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
363
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"},"payoutMethod":"bank-transfer","methodDisplay":"Bank
364
+ Transfer","initiatedAt":null,"settledAt":null,"returnedAt":null,"returnedReason":[],"returnedNote":null,"estimatedDeliveryAt":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","taxes":[{"id":"OP-C2ZCBcok484o8HPVLWanMf","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","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-KQLGFEHSHqEVkeDLWiTMxP","externalId":null,"memo":"","payoutMethod":"bank-transfer","tags":[],"taxReportable":true,"category":"services","processedAt":"2023-08-09T00:29:10.355Z","forceUsTaxActivity":false,"taxWithholdingReason":null,"equivalentUntaxedAmount":{"value":"10.00","currency":"USD"},"modifiedSinceCreation":false,"taxPaidByWithholdingAgents":"0","status":"internal","enteredAmount":{"value":"10.00","currency":"USD"},"updatedAt":"2023-08-09T00:29:10.374Z","createdAt":"2023-08-09T00:29:10.355Z","deletedAt":null,"dac7Meta":null}],"errors":[],"routeMinimum":"0","routeType":"sepa"}}'
365
+ recorded_at: Wed, 09 Aug 2023 00:29:11 GMT
366
+ - request:
367
+ method: patch
368
+ uri: https://api.trolley.com/v1/batches/B-QmoMmcUtHNH2od8jetWvhq/payments/P-KQLGFEHSHqEVkeDLWiTMxP
369
+ body:
370
+ encoding: UTF-8
371
+ string: '{"sourceAmount":"20.00","sourceCurrency":"USD"}'
372
+ headers:
373
+ X-Pr-Timestamp:
374
+ - '1691540951'
375
+ Content-Type:
376
+ - application/json
377
+ Accept-Encoding:
378
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
379
+ Accept:
380
+ - "*/*"
381
+ User-Agent:
382
+ - Ruby
383
+ response:
384
+ status:
385
+ code: 200
386
+ message: OK
387
+ headers:
388
+ Date:
389
+ - Wed, 09 Aug 2023 00:29:11 GMT
390
+ Content-Type:
391
+ - application/json; charset=utf-8
392
+ Content-Length:
393
+ - '4990'
394
+ Connection:
395
+ - keep-alive
396
+ Cache-Control:
397
+ - no-store, no-cache
398
+ Content-Security-Policy:
399
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
400
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
401
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
402
+ X-Dns-Prefetch-Control:
403
+ - 'off'
404
+ Expect-Ct:
405
+ - max-age=0
406
+ Strict-Transport-Security:
407
+ - max-age=15552000; includeSubDomains
408
+ X-Download-Options:
409
+ - noopen
410
+ X-Content-Type-Options:
411
+ - nosniff
412
+ X-Permitted-Cross-Domain-Policies:
413
+ - none
414
+ Referrer-Policy:
415
+ - no-referrer
416
+ X-Xss-Protection:
417
+ - '0'
418
+ Access-Control-Allow-Origin:
419
+ - "*"
420
+ X-Rate-Limit-Limit:
421
+ - '600'
422
+ X-Rate-Limit-Remaining:
423
+ - '594'
424
+ X-Rate-Limit-Reset:
425
+ - '1691541008'
426
+ Vary:
427
+ - Origin
428
+ Etag:
429
+ - W/"137e-vVOmruOgdFvEtSqDFkAzXl57Q8I"
430
+ body:
431
+ encoding: UTF-8
432
+ string: '{"ok":true,"payment":{"id":"P-KQLGFEHSHqEVkeDLWiTMxP","recipient":{"id":"R-2xp7k58h9NRvaEEgXnA7Qo","referenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","parentRecipientId":null,"email":"test.batch816a8032-3380-470f-b7f0-5a6ed1bec9e0@example.com","name":"Tom
433
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"active","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-08-09T00:29:09.815Z","createdAt":"2023-08-09T00:29:09.017Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"123
434
+ Wolfstrasse","street2":"","city":"Berlin","postalCode":"123123","country":"DE","region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/e81b79eda3f49d4a3d475d59b9cd07aa?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-65yNLmHwkr2RdhkuNySoZj","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","recipientAccountId":"A-65yNLmHwkr2RdhkuNySoZj","disabledAt":null,"recipientReferenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
435
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
436
+ 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":"20.00","currency":"USD","sourceAmount":"20.00","sourceCurrency":"USD","targetAmount":"0.00","targetCurrency":"EUR","taxReportable":true,"taxBasisAmount":"20.00","taxBasisCurrency":"USD","withholdingAmount":"0.00","withholdingCurrency":"USD","equivalentWithholdingAmount":"0.00","equivalentWithholdingCurrency":"USD","exchangeRate":"0","fees":"4.00","recipientFees":"2.00","fxRate":"2.5","memo":"","externalId":"","processedAt":null,"createdAt":"2023-08-09T00:29:10.382Z","updatedAt":"2023-08-09T00:29:11.930Z","forceUsTaxActivity":false,"batch":{"id":"B-QmoMmcUtHNH2od8jetWvhq","status":"open","tags":[],"amount":"22.00","currency":"USD","totalPayments":1,"description":"Integration
437
+ Test Create","sentAt":null,"completedAt":null,"createdAt":"2023-08-09T00:29:08.203Z","updatedAt":"2023-08-09T00:29:11.941Z","quoteExpiredAt":null},"checkNumber":null,"tags":[],"merchantFees":"2.00","compliance":{"status":"pending","checkedAt":null},"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-65yNLmHwkr2RdhkuNySoZj","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","recipientAccountId":"A-65yNLmHwkr2RdhkuNySoZj","disabledAt":null,"recipientReferenceId":"R-2xp7k58h9NRvaEEgXnA7Qo","deliveryBusinessDaysEstimate":5,"country":"DE","iban":"********************00","accountNum":"","bankAccountType":null,"bankCodeMappingId":null,"accountHolderName":"Tom
438
+ Jones","swiftBic":"COBADEFFXXX","branchId":"","bankId":"","bankName":"Commerzbank
439
+ AG","bankAddress":"Unter Sachsenhausen 21-27","bankCity":"Cologne","bankRegionCode":"Nordrhein-Westfalen","bankPostalCode":"50667","routeType":"sepa","recipientFees":"2"},"payoutMethod":"bank-transfer","methodDisplay":"Bank
440
+ Transfer","initiatedAt":null,"settledAt":null,"returnedAt":null,"returnedReason":[],"returnedNote":null,"estimatedDeliveryAt":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","taxes":[{"id":"OP-C2ZCBcok484o8HPVLWanMf","recipientId":"R-2xp7k58h9NRvaEEgXnA7Qo","taxFormId":null,"entered":{"value":"20.00","currency":"USD"},"withholding":{"value":"0.00","currency":"USD"},"equivalentWithholding":{"value":"0.00","currency":"USD"},"amount":"20.00","currency":"USD","withholdingAmount":"0.00","withholdingCurrency":"USD","equivalentWithholdingAmount":"0.00","equivalentWithholdingCurrency":"USD","paymentId":"P-KQLGFEHSHqEVkeDLWiTMxP","externalId":null,"memo":"","payoutMethod":"bank-transfer","tags":[],"taxReportable":true,"category":"services","processedAt":"2023-08-09T00:29:10.355Z","forceUsTaxActivity":false,"taxWithholdingReason":null,"equivalentUntaxedAmount":{"value":"20.00","currency":"USD"},"modifiedSinceCreation":false,"taxPaidByWithholdingAgents":"0","status":"internal","enteredAmount":{"value":"20.00","currency":"USD"},"updatedAt":"2023-08-09T00:29:11.923Z","createdAt":"2023-08-09T00:29:10.355Z","deletedAt":null,"dac7Meta":null}],"errors":[],"routeMinimum":"0","routeType":"sepa"}}'
441
+ recorded_at: Wed, 09 Aug 2023 00:29:12 GMT
442
+ - request:
443
+ method: delete
444
+ uri: https://api.trolley.com/v1/batches/B-QmoMmcUtHNH2od8jetWvhq/payments/P-KQLGFEHSHqEVkeDLWiTMxP
445
+ body:
446
+ encoding: UTF-8
447
+ string: ''
448
+ headers:
449
+ X-Pr-Timestamp:
450
+ - '1691540952'
451
+ Content-Type:
452
+ - application/json
453
+ Accept-Encoding:
454
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
455
+ Accept:
456
+ - "*/*"
457
+ User-Agent:
458
+ - Ruby
459
+ response:
460
+ status:
461
+ code: 200
462
+ message: OK
463
+ headers:
464
+ Date:
465
+ - Wed, 09 Aug 2023 00:29:12 GMT
466
+ Content-Type:
467
+ - application/json; charset=utf-8
468
+ Content-Length:
469
+ - '11'
470
+ Connection:
471
+ - keep-alive
472
+ Cache-Control:
473
+ - no-store, no-cache
474
+ Content-Security-Policy:
475
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
476
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
477
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
478
+ X-Dns-Prefetch-Control:
479
+ - 'off'
480
+ Expect-Ct:
481
+ - max-age=0
482
+ Strict-Transport-Security:
483
+ - max-age=15552000; includeSubDomains
484
+ X-Download-Options:
485
+ - noopen
486
+ X-Content-Type-Options:
487
+ - nosniff
488
+ X-Permitted-Cross-Domain-Policies:
489
+ - none
490
+ Referrer-Policy:
491
+ - no-referrer
492
+ X-Xss-Protection:
493
+ - '0'
494
+ Access-Control-Allow-Origin:
495
+ - "*"
496
+ X-Rate-Limit-Limit:
497
+ - '600'
498
+ X-Rate-Limit-Remaining:
499
+ - '593'
500
+ X-Rate-Limit-Reset:
501
+ - '1691541008'
502
+ Vary:
503
+ - Origin
504
+ Etag:
505
+ - W/"b-Ai2R8hgEarLmHKwesT1qcY913ys"
506
+ body:
507
+ encoding: UTF-8
508
+ string: '{"ok":true}'
509
+ recorded_at: Wed, 09 Aug 2023 00:29:12 GMT
510
+ recorded_with: VCR 6.2.0