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.
- checksums.yaml +4 -4
- data/lib/trolley/Client.rb +6 -1
- data/lib/trolley/Gateway.rb +7 -1
- data/lib/trolley/InvoicePayment.rb +6 -1
- data/lib/trolley/OfflinePayment.rb +2 -1
- data/lib/trolley/Payment.rb +4 -1
- data/lib/trolley/Recipient.rb +0 -2
- data/lib/trolley/RecipientAccount.rb +4 -1
- data/lib/trolley/RecipientLog.rb +12 -0
- data/lib/trolley/gateways/BalanceGateway.rb +18 -1
- data/lib/trolley/gateways/PaymentGateway.rb +5 -0
- data/lib/trolley/gateways/RecipientGateway.rb +5 -1
- data/lib/trolley/gateways/VerificationGateway.rb +40 -0
- data/lib/trolley/utils/PaginatedArray.rb +8 -3
- data/lib/trolley/utils/ResponseMapper.rb +1 -0
- data/lib/trolley.rb +3 -1
- data/test/fixtures/BalanceTest/test_find.yml +71 -0
- data/test/fixtures/BalanceTest/test_find_with_term.yml +71 -0
- data/test/fixtures/BatchTest/test_create.yml +150 -0
- data/test/fixtures/BatchTest/test_create_with_payments.yml +541 -0
- data/test/fixtures/BatchTest/test_delete_multiple.yml +209 -0
- data/test/fixtures/BatchTest/test_payments.yml +434 -0
- data/test/fixtures/BatchTest/test_processing.yml +578 -0
- data/test/fixtures/BatchTest/test_summary.yml +440 -0
- data/test/fixtures/BatchTest/test_update.yml +356 -0
- data/test/fixtures/InvoicePaymentTest/test_create.yml +489 -0
- data/test/fixtures/InvoicePaymentTest/test_delete.yml +634 -0
- data/test/fixtures/InvoicePaymentTest/test_find.yml +420 -0
- data/test/fixtures/InvoicePaymentTest/test_update.yml +634 -0
- data/test/fixtures/InvoiceTest/test_create.yml +293 -0
- data/test/fixtures/InvoiceTest/test_create_line.yml +353 -0
- data/test/fixtures/InvoiceTest/test_delete.yml +433 -0
- data/test/fixtures/InvoiceTest/test_delete_line.yml +353 -0
- data/test/fixtures/InvoiceTest/test_find.yml +284 -0
- data/test/fixtures/InvoiceTest/test_search.yml +293 -0
- data/test/fixtures/InvoiceTest/test_support_error_arrays.yml +71 -0
- data/test/fixtures/InvoiceTest/test_update.yml +428 -0
- data/test/fixtures/InvoiceTest/test_update_line.yml +422 -0
- data/test/fixtures/OfflinePaymentTest/test_create.yml +213 -0
- data/test/fixtures/OfflinePaymentTest/test_delete.yml +281 -0
- data/test/fixtures/OfflinePaymentTest/test_search.yml +281 -0
- data/test/fixtures/OfflinePaymentTest/test_update.yml +281 -0
- data/test/fixtures/PaymentTest/test_crud.yml +510 -0
- data/test/fixtures/PaymentTest/test_search.yml +366 -0
- data/test/fixtures/RecipientAccountTest/test_basic_crud.yml +351 -0
- data/test/fixtures/RecipientTest/test_account.yml +499 -0
- data/test/fixtures/RecipientTest/test_create.yml +72 -0
- data/test/fixtures/RecipientTest/test_delete_multiple.yml +347 -0
- data/test/fixtures/RecipientTest/test_find_logs.yml +278 -0
- data/test/fixtures/RecipientTest/test_find_payments.yml +512 -0
- data/test/fixtures/RecipientTest/test_lifecycle.yml +347 -0
- data/test/integration/BalanceTest.rb +22 -0
- data/test/integration/BatchTest.rb +157 -0
- data/test/integration/InvoicePaymentTest.rb +109 -0
- data/test/integration/InvoiceTest.rb +156 -0
- data/test/integration/OfflinePaymentTest.rb +109 -0
- data/test/integration/PaymentTest.rb +73 -0
- data/test/integration/RecipientAccountTest.rb +52 -0
- data/test/integration/RecipientTest.rb +176 -0
- data/test/test_helper.rb +45 -0
- data/test/unit/ClientRequestTest.rb +54 -0
- data/{spec → test}/unit/ConfigurationTest.rb +1 -1
- data/test/unit/GatewayParityTest.rb +184 -0
- data/{spec → test}/unit/PaginatedArrayTest.rb +3 -1
- data/{spec → test}/unit/TrolleyTest.rb +1 -1
- data/trolley.gemspec +10 -7
- metadata +101 -17
- data/spec/integration/BatchTest.rb +0 -126
- data/spec/integration/InvoicePaymentTest.rb +0 -92
- data/spec/integration/InvoiceTest.rb +0 -128
- data/spec/integration/RecipientAccountTest.rb +0 -48
- data/spec/integration/RecipientTest.rb +0 -159
- data/spec/integration/helper.rb +0 -19
- /data/{spec → test}/unit/ResponseMapperTest.rb +0 -0
|
@@ -0,0 +1,281 @@
|
|
|
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.batch596b3f89-aa20-4db6-a8bc-44528653e782@example.com","address":{"street1":"123
|
|
9
|
+
Wolfstrasse","city":"Berlin","country":"DE","postalCode":"123123"}}'
|
|
10
|
+
headers:
|
|
11
|
+
X-Pr-Timestamp:
|
|
12
|
+
- '1691540965'
|
|
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:26 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
|
+
- '584'
|
|
62
|
+
X-Rate-Limit-Reset:
|
|
63
|
+
- '1691541008'
|
|
64
|
+
Vary:
|
|
65
|
+
- Origin
|
|
66
|
+
Etag:
|
|
67
|
+
- W/"509-uO/BAnUpxAu8IsvisHGAlfR5pEU"
|
|
68
|
+
body:
|
|
69
|
+
encoding: UTF-8
|
|
70
|
+
string: '{"ok":true,"recipient":{"id":"R-GvUxtcNfWwUBzrmgvPfKSb","referenceId":"R-GvUxtcNfWwUBzrmgvPfKSb","parentRecipientId":null,"email":"test.batch596b3f89-aa20-4db6-a8bc-44528653e782@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:26.291Z","createdAt":"2023-08-09T00:29:26.291Z","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/fcb3c2ab37a0751f4801e781afcd2342?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:26 GMT
|
|
74
|
+
- request:
|
|
75
|
+
method: post
|
|
76
|
+
uri: https://api.trolley.com/v1/recipients/R-GvUxtcNfWwUBzrmgvPfKSb/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
|
+
- '1691540966'
|
|
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:26 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
|
+
- '583'
|
|
133
|
+
X-Rate-Limit-Reset:
|
|
134
|
+
- '1691541008'
|
|
135
|
+
Vary:
|
|
136
|
+
- Origin
|
|
137
|
+
Etag:
|
|
138
|
+
- W/"291-3w1eQTBNoG5y+rS1PzHrMcxy4Nk"
|
|
139
|
+
body:
|
|
140
|
+
encoding: UTF-8
|
|
141
|
+
string: '{"ok":true,"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-AqKLwZyxJMQxHUWZyBuj1w","recipientId":"R-GvUxtcNfWwUBzrmgvPfKSb","recipientAccountId":"A-AqKLwZyxJMQxHUWZyBuj1w","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:26 GMT
|
|
145
|
+
- request:
|
|
146
|
+
method: post
|
|
147
|
+
uri: https://api.trolley.com/v1/recipients/R-GvUxtcNfWwUBzrmgvPfKSb/offlinePayments
|
|
148
|
+
body:
|
|
149
|
+
encoding: UTF-8
|
|
150
|
+
string: '{"amount":"10.00","currency":"EUR","category":"services"}'
|
|
151
|
+
headers:
|
|
152
|
+
X-Pr-Timestamp:
|
|
153
|
+
- '1691540966'
|
|
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:27 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
|
+
- '582'
|
|
203
|
+
X-Rate-Limit-Reset:
|
|
204
|
+
- '1691541008'
|
|
205
|
+
Vary:
|
|
206
|
+
- Origin
|
|
207
|
+
Etag:
|
|
208
|
+
- W/"3bd-dp/aPOaLKhNyPM101vVC63uhYFw"
|
|
209
|
+
body:
|
|
210
|
+
encoding: UTF-8
|
|
211
|
+
string: '{"ok":true,"offlinePayment":{"id":"OP-S7pNnSTVnKVXqDpEHbkCRM","recipientId":"R-GvUxtcNfWwUBzrmgvPfKSb","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:27.283Z","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:27.283Z","createdAt":"2023-08-09T00:29:27.283Z","deletedAt":null,"dac7Meta":null}}'
|
|
212
|
+
recorded_at: Wed, 09 Aug 2023 00:29:27 GMT
|
|
213
|
+
- request:
|
|
214
|
+
method: delete
|
|
215
|
+
uri: https://api.trolley.com/v1/recipients/R-GvUxtcNfWwUBzrmgvPfKSb/offlinePayments/OP-S7pNnSTVnKVXqDpEHbkCRM
|
|
216
|
+
body:
|
|
217
|
+
encoding: UTF-8
|
|
218
|
+
string: ''
|
|
219
|
+
headers:
|
|
220
|
+
X-Pr-Timestamp:
|
|
221
|
+
- '1691540967'
|
|
222
|
+
Content-Type:
|
|
223
|
+
- application/json
|
|
224
|
+
Accept-Encoding:
|
|
225
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
226
|
+
Accept:
|
|
227
|
+
- "*/*"
|
|
228
|
+
User-Agent:
|
|
229
|
+
- Ruby
|
|
230
|
+
response:
|
|
231
|
+
status:
|
|
232
|
+
code: 200
|
|
233
|
+
message: OK
|
|
234
|
+
headers:
|
|
235
|
+
Date:
|
|
236
|
+
- Wed, 09 Aug 2023 00:29:27 GMT
|
|
237
|
+
Content-Type:
|
|
238
|
+
- application/json; charset=utf-8
|
|
239
|
+
Content-Length:
|
|
240
|
+
- '11'
|
|
241
|
+
Connection:
|
|
242
|
+
- keep-alive
|
|
243
|
+
Cache-Control:
|
|
244
|
+
- no-store, no-cache
|
|
245
|
+
Content-Security-Policy:
|
|
246
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
|
247
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
|
248
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
|
249
|
+
X-Dns-Prefetch-Control:
|
|
250
|
+
- 'off'
|
|
251
|
+
Expect-Ct:
|
|
252
|
+
- max-age=0
|
|
253
|
+
Strict-Transport-Security:
|
|
254
|
+
- max-age=15552000; includeSubDomains
|
|
255
|
+
X-Download-Options:
|
|
256
|
+
- noopen
|
|
257
|
+
X-Content-Type-Options:
|
|
258
|
+
- nosniff
|
|
259
|
+
X-Permitted-Cross-Domain-Policies:
|
|
260
|
+
- none
|
|
261
|
+
Referrer-Policy:
|
|
262
|
+
- no-referrer
|
|
263
|
+
X-Xss-Protection:
|
|
264
|
+
- '0'
|
|
265
|
+
Access-Control-Allow-Origin:
|
|
266
|
+
- "*"
|
|
267
|
+
X-Rate-Limit-Limit:
|
|
268
|
+
- '600'
|
|
269
|
+
X-Rate-Limit-Remaining:
|
|
270
|
+
- '581'
|
|
271
|
+
X-Rate-Limit-Reset:
|
|
272
|
+
- '1691541008'
|
|
273
|
+
Vary:
|
|
274
|
+
- Origin
|
|
275
|
+
Etag:
|
|
276
|
+
- W/"b-Ai2R8hgEarLmHKwesT1qcY913ys"
|
|
277
|
+
body:
|
|
278
|
+
encoding: UTF-8
|
|
279
|
+
string: '{"ok":true}'
|
|
280
|
+
recorded_at: Wed, 09 Aug 2023 00:29:27 GMT
|
|
281
|
+
recorded_with: VCR 6.2.0
|
|
@@ -0,0 +1,281 @@
|
|
|
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.batchcd50c26e-8a1a-499e-822f-b80a1ae59952@example.com","address":{"street1":"123
|
|
9
|
+
Wolfstrasse","city":"Berlin","country":"DE","postalCode":"123123"}}'
|
|
10
|
+
headers:
|
|
11
|
+
X-Pr-Timestamp:
|
|
12
|
+
- '1691540967'
|
|
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:28 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
|
+
- '580'
|
|
62
|
+
X-Rate-Limit-Reset:
|
|
63
|
+
- '1691541008'
|
|
64
|
+
Vary:
|
|
65
|
+
- Origin
|
|
66
|
+
Etag:
|
|
67
|
+
- W/"509-CpzhE841uWiJm2AzIncMZrdyBiQ"
|
|
68
|
+
body:
|
|
69
|
+
encoding: UTF-8
|
|
70
|
+
string: '{"ok":true,"recipient":{"id":"R-N4CkVLKRX1dgsNTACtAwjW","referenceId":"R-N4CkVLKRX1dgsNTACtAwjW","parentRecipientId":null,"email":"test.batchcd50c26e-8a1a-499e-822f-b80a1ae59952@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:28.225Z","createdAt":"2023-08-09T00:29:28.225Z","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/76d557c269045e577e04e55ffc61151d?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:28 GMT
|
|
74
|
+
- request:
|
|
75
|
+
method: post
|
|
76
|
+
uri: https://api.trolley.com/v1/recipients/R-N4CkVLKRX1dgsNTACtAwjW/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
|
+
- '1691540968'
|
|
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:28 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
|
+
- '579'
|
|
133
|
+
X-Rate-Limit-Reset:
|
|
134
|
+
- '1691541008'
|
|
135
|
+
Vary:
|
|
136
|
+
- Origin
|
|
137
|
+
Etag:
|
|
138
|
+
- W/"291-Tv+7Ve3A/yzGv0l4ENHyCChmgj8"
|
|
139
|
+
body:
|
|
140
|
+
encoding: UTF-8
|
|
141
|
+
string: '{"ok":true,"account":{"status":"primary","type":"bank-transfer","primary":true,"currency":"EUR","id":"A-URL9krbjcFHe7MAH9gUmDy","recipientId":"R-N4CkVLKRX1dgsNTACtAwjW","recipientAccountId":"A-URL9krbjcFHe7MAH9gUmDy","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:28 GMT
|
|
145
|
+
- request:
|
|
146
|
+
method: post
|
|
147
|
+
uri: https://api.trolley.com/v1/recipients/R-N4CkVLKRX1dgsNTACtAwjW/offlinePayments
|
|
148
|
+
body:
|
|
149
|
+
encoding: UTF-8
|
|
150
|
+
string: '{"amount":"10.00","currency":"EUR","category":"services"}'
|
|
151
|
+
headers:
|
|
152
|
+
X-Pr-Timestamp:
|
|
153
|
+
- '1691540968'
|
|
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:29 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
|
+
- '578'
|
|
203
|
+
X-Rate-Limit-Reset:
|
|
204
|
+
- '1691541008'
|
|
205
|
+
Vary:
|
|
206
|
+
- Origin
|
|
207
|
+
Etag:
|
|
208
|
+
- W/"3bd-nMJ+bbPHxQov5WwGPMF+T0wc278"
|
|
209
|
+
body:
|
|
210
|
+
encoding: UTF-8
|
|
211
|
+
string: '{"ok":true,"offlinePayment":{"id":"OP-59Y28TDe7Bw8NcBA6K2LLP","recipientId":"R-N4CkVLKRX1dgsNTACtAwjW","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:29.223Z","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:29.223Z","createdAt":"2023-08-09T00:29:29.223Z","deletedAt":null,"dac7Meta":null}}'
|
|
212
|
+
recorded_at: Wed, 09 Aug 2023 00:29:29 GMT
|
|
213
|
+
- request:
|
|
214
|
+
method: get
|
|
215
|
+
uri: https://api.trolley.com/v1/recipients/R-N4CkVLKRX1dgsNTACtAwjW/offlinePayments?page=1&pageSize=10&search=
|
|
216
|
+
body:
|
|
217
|
+
encoding: US-ASCII
|
|
218
|
+
string: ''
|
|
219
|
+
headers:
|
|
220
|
+
X-Pr-Timestamp:
|
|
221
|
+
- '1691540969'
|
|
222
|
+
Content-Type:
|
|
223
|
+
- application/json
|
|
224
|
+
Accept-Encoding:
|
|
225
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
226
|
+
Accept:
|
|
227
|
+
- "*/*"
|
|
228
|
+
User-Agent:
|
|
229
|
+
- Ruby
|
|
230
|
+
response:
|
|
231
|
+
status:
|
|
232
|
+
code: 200
|
|
233
|
+
message: OK
|
|
234
|
+
headers:
|
|
235
|
+
Date:
|
|
236
|
+
- Wed, 09 Aug 2023 00:29:29 GMT
|
|
237
|
+
Content-Type:
|
|
238
|
+
- application/json; charset=utf-8
|
|
239
|
+
Content-Length:
|
|
240
|
+
- '1000'
|
|
241
|
+
Connection:
|
|
242
|
+
- keep-alive
|
|
243
|
+
Cache-Control:
|
|
244
|
+
- no-store, no-cache
|
|
245
|
+
Content-Security-Policy:
|
|
246
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
|
247
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
|
248
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
|
249
|
+
X-Dns-Prefetch-Control:
|
|
250
|
+
- 'off'
|
|
251
|
+
Expect-Ct:
|
|
252
|
+
- max-age=0
|
|
253
|
+
Strict-Transport-Security:
|
|
254
|
+
- max-age=15552000; includeSubDomains
|
|
255
|
+
X-Download-Options:
|
|
256
|
+
- noopen
|
|
257
|
+
X-Content-Type-Options:
|
|
258
|
+
- nosniff
|
|
259
|
+
X-Permitted-Cross-Domain-Policies:
|
|
260
|
+
- none
|
|
261
|
+
Referrer-Policy:
|
|
262
|
+
- no-referrer
|
|
263
|
+
X-Xss-Protection:
|
|
264
|
+
- '0'
|
|
265
|
+
Access-Control-Allow-Origin:
|
|
266
|
+
- "*"
|
|
267
|
+
X-Rate-Limit-Limit:
|
|
268
|
+
- '600'
|
|
269
|
+
X-Rate-Limit-Remaining:
|
|
270
|
+
- '577'
|
|
271
|
+
X-Rate-Limit-Reset:
|
|
272
|
+
- '1691541008'
|
|
273
|
+
Vary:
|
|
274
|
+
- Origin
|
|
275
|
+
Etag:
|
|
276
|
+
- W/"3e8-1RAPVTQ5VbvBu4UoIxQH++S5Kw4"
|
|
277
|
+
body:
|
|
278
|
+
encoding: UTF-8
|
|
279
|
+
string: '{"ok":true,"offlinePayments":[{"id":"OP-59Y28TDe7Bw8NcBA6K2LLP","recipientId":"R-N4CkVLKRX1dgsNTACtAwjW","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:29.223Z","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:29.223Z","createdAt":"2023-08-09T00:29:29.223Z","deletedAt":null,"dac7Meta":null}],"meta":{"page":1,"pages":1,"records":1}}'
|
|
280
|
+
recorded_at: Wed, 09 Aug 2023 00:29:30 GMT
|
|
281
|
+
recorded_with: VCR 6.2.0
|