trolley 1.0.3 → 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 +1 -0
  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 +1 -1
  66. data/trolley.gemspec +10 -7
  67. metadata +101 -17
  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,209 @@
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
+ - '1688740991'
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:43:12 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
+ - '590'
61
+ X-Rate-Limit-Reset:
62
+ - '1688741046'
63
+ Vary:
64
+ - Origin
65
+ Etag:
66
+ - W/"172-P+aPWSwkQh1GU8onmyDeZGLk2eU"
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"ok":true,"batch":{"id":"B-EZFr8hHK8djLWmtZnsjiEe","status":"open","tags":[],"amount":"0.00","currency":"USD","totalPayments":0,"description":"Integration
70
+ Test Create","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:12.030Z","updatedAt":"2023-07-07T14:43:12.030Z","quoteExpiredAt":null,"payments":{"payments":[],"meta":{"page":1,"pages":0,"records":0}}}}'
71
+ recorded_at: Fri, 07 Jul 2023 14:43:12 GMT
72
+ - request:
73
+ method: post
74
+ uri: https://api.trolley.com/v1/batches/
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"sourceCurrency":"USD","description":"Integration Test Create"}'
78
+ headers:
79
+ X-Pr-Timestamp:
80
+ - '1688740992'
81
+ Content-Type:
82
+ - application/json
83
+ Accept-Encoding:
84
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
85
+ Accept:
86
+ - "*/*"
87
+ User-Agent:
88
+ - Ruby
89
+ response:
90
+ status:
91
+ code: 200
92
+ message: OK
93
+ headers:
94
+ Date:
95
+ - Fri, 07 Jul 2023 14:43:12 GMT
96
+ Content-Type:
97
+ - application/json; charset=utf-8
98
+ Content-Length:
99
+ - '370'
100
+ Connection:
101
+ - keep-alive
102
+ Cache-Control:
103
+ - no-store, no-cache
104
+ Content-Security-Policy:
105
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
106
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
107
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
108
+ X-Dns-Prefetch-Control:
109
+ - 'off'
110
+ Expect-Ct:
111
+ - max-age=0
112
+ Strict-Transport-Security:
113
+ - max-age=15552000; includeSubDomains
114
+ X-Download-Options:
115
+ - noopen
116
+ X-Content-Type-Options:
117
+ - nosniff
118
+ X-Permitted-Cross-Domain-Policies:
119
+ - none
120
+ Referrer-Policy:
121
+ - no-referrer
122
+ X-Xss-Protection:
123
+ - '0'
124
+ Access-Control-Allow-Origin:
125
+ - "*"
126
+ X-Rate-Limit-Limit:
127
+ - '600'
128
+ X-Rate-Limit-Remaining:
129
+ - '589'
130
+ X-Rate-Limit-Reset:
131
+ - '1688741046'
132
+ Vary:
133
+ - Origin
134
+ Etag:
135
+ - W/"172-2DDbDCh1loPZQSS8r2fZHlCzdZo"
136
+ body:
137
+ encoding: UTF-8
138
+ string: '{"ok":true,"batch":{"id":"B-FQJjFMk9wnkHp6SrBUzNXV","status":"open","tags":[],"amount":"0.00","currency":"USD","totalPayments":0,"description":"Integration
139
+ Test Create","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:12.600Z","updatedAt":"2023-07-07T14:43:12.600Z","quoteExpiredAt":null,"payments":{"payments":[],"meta":{"page":1,"pages":0,"records":0}}}}'
140
+ recorded_at: Fri, 07 Jul 2023 14:43:12 GMT
141
+ - request:
142
+ method: delete
143
+ uri: https://api.trolley.com/v1/batches/
144
+ body:
145
+ encoding: UTF-8
146
+ string: '{"ids":["B-EZFr8hHK8djLWmtZnsjiEe","B-FQJjFMk9wnkHp6SrBUzNXV"]}'
147
+ headers:
148
+ X-Pr-Timestamp:
149
+ - '1688740992'
150
+ Content-Type:
151
+ - application/json
152
+ Accept-Encoding:
153
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
154
+ Accept:
155
+ - "*/*"
156
+ User-Agent:
157
+ - Ruby
158
+ response:
159
+ status:
160
+ code: 200
161
+ message: OK
162
+ headers:
163
+ Date:
164
+ - Fri, 07 Jul 2023 14:43:13 GMT
165
+ Content-Type:
166
+ - application/json; charset=utf-8
167
+ Content-Length:
168
+ - '11'
169
+ Connection:
170
+ - keep-alive
171
+ Cache-Control:
172
+ - no-store, no-cache
173
+ Content-Security-Policy:
174
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
175
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
176
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
177
+ X-Dns-Prefetch-Control:
178
+ - 'off'
179
+ Expect-Ct:
180
+ - max-age=0
181
+ Strict-Transport-Security:
182
+ - max-age=15552000; includeSubDomains
183
+ X-Download-Options:
184
+ - noopen
185
+ X-Content-Type-Options:
186
+ - nosniff
187
+ X-Permitted-Cross-Domain-Policies:
188
+ - none
189
+ Referrer-Policy:
190
+ - no-referrer
191
+ X-Xss-Protection:
192
+ - '0'
193
+ Access-Control-Allow-Origin:
194
+ - "*"
195
+ X-Rate-Limit-Limit:
196
+ - '600'
197
+ X-Rate-Limit-Remaining:
198
+ - '588'
199
+ X-Rate-Limit-Reset:
200
+ - '1688741046'
201
+ Vary:
202
+ - Origin
203
+ Etag:
204
+ - W/"b-Ai2R8hgEarLmHKwesT1qcY913ys"
205
+ body:
206
+ encoding: UTF-8
207
+ string: '{"ok":true}'
208
+ recorded_at: Fri, 07 Jul 2023 14:43:13 GMT
209
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,434 @@
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 Payments"}'
9
+ headers:
10
+ X-Pr-Timestamp:
11
+ - '1688740993'
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:43:13 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '372'
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
+ - '587'
61
+ X-Rate-Limit-Reset:
62
+ - '1688741046'
63
+ Vary:
64
+ - Origin
65
+ Etag:
66
+ - W/"174-vBV3SrhaGZhFNsAhjk0q8c+jV+w"
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"ok":true,"batch":{"id":"B-Pt3X27Gm9XTYaxBfJZMhYg","status":"open","tags":[],"amount":"0.00","currency":"USD","totalPayments":0,"description":"Integration
70
+ Test Payments","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:13.721Z","updatedAt":"2023-07-07T14:43:13.721Z","quoteExpiredAt":null,"payments":{"payments":[],"meta":{"page":1,"pages":0,"records":0}}}}'
71
+ recorded_at: Fri, 07 Jul 2023 14:43:13 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.batch817a160e-e333-4054-af69-df0abd1233b3@example.com","address":{"street1":"123
78
+ Wolfstrasse","city":"Berlin","country":"DE","postalCode":"123123"}}'
79
+ headers:
80
+ X-Pr-Timestamp:
81
+ - '1688740993'
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
+ - Fri, 07 Jul 2023 14:43:15 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
+ - '586'
131
+ X-Rate-Limit-Reset:
132
+ - '1688741046'
133
+ Vary:
134
+ - Origin
135
+ Etag:
136
+ - W/"509-PDXZuSAaAiapqr6O9lz4XdMIOvI"
137
+ body:
138
+ encoding: UTF-8
139
+ string: '{"ok":true,"recipient":{"id":"R-J3DquLyvG4WujqFkvJMfbz","referenceId":"R-J3DquLyvG4WujqFkvJMfbz","parentRecipientId":null,"email":"test.batch817a160e-e333-4054-af69-df0abd1233b3@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-07-07T14:43:15.008Z","createdAt":"2023-07-07T14:43:15.008Z","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/86e6f5f22bf58f2a7e3e6cf209afd074?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: Fri, 07 Jul 2023 14:43:15 GMT
143
+ - request:
144
+ method: post
145
+ uri: https://api.trolley.com/v1/recipients/R-J3DquLyvG4WujqFkvJMfbz/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
+ - '1688740995'
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
+ - Fri, 07 Jul 2023 14:43:16 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
+ - '585'
202
+ X-Rate-Limit-Reset:
203
+ - '1688741046'
204
+ Vary:
205
+ - Origin
206
+ Etag:
207
+ - W/"291-jnmmR0hxxvYRprN65oYr7ndP1gY"
208
+ body:
209
+ encoding: UTF-8
210
+ string: '{"ok":true,"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-WM25obYJQkDk63rkG87YLZ","recipientId":"R-J3DquLyvG4WujqFkvJMfbz","recipientAccountId":"A-WM25obYJQkDk63rkG87YLZ","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: Fri, 07 Jul 2023 14:43:16 GMT
214
+ - request:
215
+ method: post
216
+ uri: https://api.trolley.com/v1/batches/B-Pt3X27Gm9XTYaxBfJZMhYg/payments
217
+ body:
218
+ encoding: UTF-8
219
+ string: '{"sourceAmount":"10.00","recipient":{"id":"R-J3DquLyvG4WujqFkvJMfbz"}}'
220
+ headers:
221
+ X-Pr-Timestamp:
222
+ - '1688740996'
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
+ - Fri, 07 Jul 2023 14:43:16 GMT
238
+ Content-Type:
239
+ - application/json; charset=utf-8
240
+ Content-Length:
241
+ - '4992'
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
+ - '584'
272
+ X-Rate-Limit-Reset:
273
+ - '1688741046'
274
+ Vary:
275
+ - Origin
276
+ Etag:
277
+ - W/"1380-QLK8GvWts6vUrfewNUM3oCgDKls"
278
+ body:
279
+ encoding: UTF-8
280
+ string: '{"ok":true,"payment":{"id":"P-BGYAYTxjvr1sZs8Fqqc8kW","recipient":{"id":"R-J3DquLyvG4WujqFkvJMfbz","referenceId":"R-J3DquLyvG4WujqFkvJMfbz","parentRecipientId":null,"email":"test.batch817a160e-e333-4054-af69-df0abd1233b3@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-07-07T14:43:16.283Z","createdAt":"2023-07-07T14:43:15.008Z","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/86e6f5f22bf58f2a7e3e6cf209afd074?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-WM25obYJQkDk63rkG87YLZ","recipientId":"R-J3DquLyvG4WujqFkvJMfbz","recipientAccountId":"A-WM25obYJQkDk63rkG87YLZ","disabledAt":null,"recipientReferenceId":"R-J3DquLyvG4WujqFkvJMfbz","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-07-07T14:43:16.788Z","updatedAt":"2023-07-07T14:43:16.788Z","forceUsTaxActivity":false,"batch":{"id":"B-Pt3X27Gm9XTYaxBfJZMhYg","status":"open","tags":[],"amount":"12.00","currency":"USD","totalPayments":1,"description":"Integration
285
+ Test Payments","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:13.721Z","updatedAt":"2023-07-07T14:43:16.878Z","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-WM25obYJQkDk63rkG87YLZ","recipientId":"R-J3DquLyvG4WujqFkvJMfbz","recipientAccountId":"A-WM25obYJQkDk63rkG87YLZ","disabledAt":null,"recipientReferenceId":"R-J3DquLyvG4WujqFkvJMfbz","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-Rk6sjGTFMWmkwHcwdvQtUT","recipientId":"R-J3DquLyvG4WujqFkvJMfbz","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-BGYAYTxjvr1sZs8Fqqc8kW","externalId":null,"memo":"","payoutMethod":"bank-transfer","tags":[],"taxReportable":true,"category":"services","processedAt":"2023-07-07T14:43:16.767Z","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:16.782Z","createdAt":"2023-07-07T14:43:16.767Z","deletedAt":null,"dac7Meta":null}],"errors":[],"routeMinimum":"0","routeType":"sepa"}}'
289
+ recorded_at: Fri, 07 Jul 2023 14:43:17 GMT
290
+ - request:
291
+ method: patch
292
+ uri: https://api.trolley.com/v1/batches/B-Pt3X27Gm9XTYaxBfJZMhYg/payments/P-BGYAYTxjvr1sZs8Fqqc8kW
293
+ body:
294
+ encoding: UTF-8
295
+ string: '{"sourceAmount":"20.00"}'
296
+ headers:
297
+ X-Pr-Timestamp:
298
+ - '1688740997'
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
+ - Fri, 07 Jul 2023 14:43:17 GMT
314
+ Content-Type:
315
+ - application/json; charset=utf-8
316
+ Content-Length:
317
+ - '4992'
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
+ - '583'
348
+ X-Rate-Limit-Reset:
349
+ - '1688741046'
350
+ Vary:
351
+ - Origin
352
+ Etag:
353
+ - W/"1380-QSFrAsXmOOLlWG1mdvvg2Nos0mA"
354
+ body:
355
+ encoding: UTF-8
356
+ string: '{"ok":true,"payment":{"id":"P-BGYAYTxjvr1sZs8Fqqc8kW","recipient":{"id":"R-J3DquLyvG4WujqFkvJMfbz","referenceId":"R-J3DquLyvG4WujqFkvJMfbz","parentRecipientId":null,"email":"test.batch817a160e-e333-4054-af69-df0abd1233b3@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-07-07T14:43:16.283Z","createdAt":"2023-07-07T14:43:15.008Z","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/86e6f5f22bf58f2a7e3e6cf209afd074?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-WM25obYJQkDk63rkG87YLZ","recipientId":"R-J3DquLyvG4WujqFkvJMfbz","recipientAccountId":"A-WM25obYJQkDk63rkG87YLZ","disabledAt":null,"recipientReferenceId":"R-J3DquLyvG4WujqFkvJMfbz","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":"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-07-07T14:43:16.788Z","updatedAt":"2023-07-07T14:43:17.403Z","forceUsTaxActivity":false,"batch":{"id":"B-Pt3X27Gm9XTYaxBfJZMhYg","status":"open","tags":[],"amount":"22.00","currency":"USD","totalPayments":1,"description":"Integration
361
+ Test Payments","sentAt":null,"completedAt":null,"createdAt":"2023-07-07T14:43:13.721Z","updatedAt":"2023-07-07T14:43:17.491Z","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-WM25obYJQkDk63rkG87YLZ","recipientId":"R-J3DquLyvG4WujqFkvJMfbz","recipientAccountId":"A-WM25obYJQkDk63rkG87YLZ","disabledAt":null,"recipientReferenceId":"R-J3DquLyvG4WujqFkvJMfbz","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-Rk6sjGTFMWmkwHcwdvQtUT","recipientId":"R-J3DquLyvG4WujqFkvJMfbz","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-BGYAYTxjvr1sZs8Fqqc8kW","externalId":null,"memo":"","payoutMethod":"bank-transfer","tags":[],"taxReportable":true,"category":"services","processedAt":"2023-07-07T14:43:16.767Z","forceUsTaxActivity":false,"taxWithholdingReason":null,"equivalentUntaxedAmount":{"value":"20.00","currency":"USD"},"modifiedSinceCreation":false,"taxPaidByWithholdingAgents":"0","status":"internal","enteredAmount":{"value":"20.00","currency":"USD"},"updatedAt":"2023-07-07T14:43:17.393Z","createdAt":"2023-07-07T14:43:16.767Z","deletedAt":null,"dac7Meta":null}],"errors":[],"routeMinimum":"0","routeType":"sepa"}}'
365
+ recorded_at: Fri, 07 Jul 2023 14:43:17 GMT
366
+ - request:
367
+ method: delete
368
+ uri: https://api.trolley.com/v1/batches/B-Pt3X27Gm9XTYaxBfJZMhYg/payments/P-BGYAYTxjvr1sZs8Fqqc8kW
369
+ body:
370
+ encoding: UTF-8
371
+ string: ''
372
+ headers:
373
+ X-Pr-Timestamp:
374
+ - '1688740997'
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
+ - Fri, 07 Jul 2023 14:43:18 GMT
390
+ Content-Type:
391
+ - application/json; charset=utf-8
392
+ Content-Length:
393
+ - '11'
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
+ - '582'
424
+ X-Rate-Limit-Reset:
425
+ - '1688741046'
426
+ Vary:
427
+ - Origin
428
+ Etag:
429
+ - W/"b-Ai2R8hgEarLmHKwesT1qcY913ys"
430
+ body:
431
+ encoding: UTF-8
432
+ string: '{"ok":true}'
433
+ recorded_at: Fri, 07 Jul 2023 14:43:18 GMT
434
+ recorded_with: VCR 6.2.0