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,347 @@
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.create07f52829-4736-47d0-ada8-4885e39786e3@example.com"}'
9
+ headers:
10
+ X-Pr-Timestamp:
11
+ - '1688741562'
12
+ Content-Type:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Fri, 07 Jul 2023 14:52:42 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '1263'
31
+ Connection:
32
+ - keep-alive
33
+ Cache-Control:
34
+ - no-store, no-cache
35
+ Content-Security-Policy:
36
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
37
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
38
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
39
+ X-Dns-Prefetch-Control:
40
+ - 'off'
41
+ Expect-Ct:
42
+ - max-age=0
43
+ Strict-Transport-Security:
44
+ - max-age=15552000; includeSubDomains
45
+ X-Download-Options:
46
+ - noopen
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ X-Permitted-Cross-Domain-Policies:
50
+ - none
51
+ Referrer-Policy:
52
+ - no-referrer
53
+ X-Xss-Protection:
54
+ - '0'
55
+ Access-Control-Allow-Origin:
56
+ - "*"
57
+ X-Rate-Limit-Limit:
58
+ - '600'
59
+ X-Rate-Limit-Remaining:
60
+ - '591'
61
+ X-Rate-Limit-Reset:
62
+ - '1688741619'
63
+ Vary:
64
+ - Origin
65
+ Etag:
66
+ - W/"4ef-LM5+QFfc7FfEHQjerM7yULvfVCc"
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"ok":true,"recipient":{"id":"R-YHLKWXRKs5oiGz6bzmbp4r","referenceId":"R-YHLKWXRKs5oiGz6bzmbp4r","parentRecipientId":null,"email":"test.create07f52829-4736-47d0-ada8-4885e39786e3@example.com","name":"Tom
70
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"incomplete","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:52:42.863Z","createdAt":"2023-07-07T14:52:42.863Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"","street2":"","city":"","postalCode":"","country":null,"region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/761d5359c30dbb7a2827da16bc845edc?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":null,"routeMinimum":null,"estimatedFees":null,"accounts":[],"payoutMethod":null,"primaryCurrency":null,"riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{"primaryAccount":"missing"},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null}}'
71
+ recorded_at: Fri, 07 Jul 2023 14:52:43 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.createe90b2735-3a07-4ce5-b58e-82024aa27bca@example.com"}'
78
+ headers:
79
+ X-Pr-Timestamp:
80
+ - '1688741563'
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:52:43 GMT
96
+ Content-Type:
97
+ - application/json; charset=utf-8
98
+ Content-Length:
99
+ - '1263'
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
+ - '590'
130
+ X-Rate-Limit-Reset:
131
+ - '1688741619'
132
+ Vary:
133
+ - Origin
134
+ Etag:
135
+ - W/"4ef-gE/zQsfRnrAIMdaTytnuNHjHTG0"
136
+ body:
137
+ encoding: UTF-8
138
+ string: '{"ok":true,"recipient":{"id":"R-U27xuZBFJ8Th3hiHoQ3MXt","referenceId":"R-U27xuZBFJ8Th3hiHoQ3MXt","parentRecipientId":null,"email":"test.createe90b2735-3a07-4ce5-b58e-82024aa27bca@example.com","name":"Tom
139
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"incomplete","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:52:43.361Z","createdAt":"2023-07-07T14:52:43.361Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"","street2":"","city":"","postalCode":"","country":null,"region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/7f79429dc0404ccb907c51a284ec8564?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":null,"routeMinimum":null,"estimatedFees":null,"accounts":[],"payoutMethod":null,"primaryCurrency":null,"riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{"primaryAccount":"missing"},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null}}'
140
+ recorded_at: Fri, 07 Jul 2023 14:52:43 GMT
141
+ - request:
142
+ method: delete
143
+ uri: https://api.trolley.com/v1/recipients/
144
+ body:
145
+ encoding: UTF-8
146
+ string: '{"ids":["R-YHLKWXRKs5oiGz6bzmbp4r","R-U27xuZBFJ8Th3hiHoQ3MXt"]}'
147
+ headers:
148
+ X-Pr-Timestamp:
149
+ - '1688741563'
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:52:43 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
+ - '589'
199
+ X-Rate-Limit-Reset:
200
+ - '1688741619'
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:52:44 GMT
209
+ - request:
210
+ method: get
211
+ uri: https://api.trolley.com/v1/recipients/R-YHLKWXRKs5oiGz6bzmbp4r
212
+ body:
213
+ encoding: US-ASCII
214
+ string: ''
215
+ headers:
216
+ X-Pr-Timestamp:
217
+ - '1688741564'
218
+ Content-Type:
219
+ - application/json
220
+ Accept-Encoding:
221
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
222
+ Accept:
223
+ - "*/*"
224
+ User-Agent:
225
+ - Ruby
226
+ response:
227
+ status:
228
+ code: 200
229
+ message: OK
230
+ headers:
231
+ Date:
232
+ - Fri, 07 Jul 2023 14:52:44 GMT
233
+ Content-Type:
234
+ - application/json; charset=utf-8
235
+ Content-Length:
236
+ - '1235'
237
+ Connection:
238
+ - keep-alive
239
+ Cache-Control:
240
+ - no-store, no-cache
241
+ Content-Security-Policy:
242
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
243
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
244
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
245
+ X-Dns-Prefetch-Control:
246
+ - 'off'
247
+ Expect-Ct:
248
+ - max-age=0
249
+ Strict-Transport-Security:
250
+ - max-age=15552000; includeSubDomains
251
+ X-Download-Options:
252
+ - noopen
253
+ X-Content-Type-Options:
254
+ - nosniff
255
+ X-Permitted-Cross-Domain-Policies:
256
+ - none
257
+ Referrer-Policy:
258
+ - no-referrer
259
+ X-Xss-Protection:
260
+ - '0'
261
+ Access-Control-Allow-Origin:
262
+ - "*"
263
+ X-Rate-Limit-Limit:
264
+ - '600'
265
+ X-Rate-Limit-Remaining:
266
+ - '588'
267
+ X-Rate-Limit-Reset:
268
+ - '1688741619'
269
+ Vary:
270
+ - Origin
271
+ Etag:
272
+ - W/"4d3-8Chmt0wHO0No3g1gdxuG8OtRazY"
273
+ body:
274
+ encoding: UTF-8
275
+ string: '{"ok":true,"recipient":{"id":"R-YHLKWXRKs5oiGz6bzmbp4r","referenceId":"R-YHLKWXRKs5oiGz6bzmbp4r","parentRecipientId":null,"email":"test.create07f52829-4736-47d0-ada8-4885e39786e3@example.com","name":"Tom
276
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"archived","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:52:43.908Z","createdAt":"2023-07-07T14:52:42.863Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"","street2":"","city":"","postalCode":"","country":null,"region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/761d5359c30dbb7a2827da16bc845edc?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":null,"routeMinimum":null,"estimatedFees":null,"accounts":[],"payoutMethod":null,"primaryCurrency":null,"riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null}}'
277
+ recorded_at: Fri, 07 Jul 2023 14:52:44 GMT
278
+ - request:
279
+ method: get
280
+ uri: https://api.trolley.com/v1/recipients/R-U27xuZBFJ8Th3hiHoQ3MXt
281
+ body:
282
+ encoding: US-ASCII
283
+ string: ''
284
+ headers:
285
+ X-Pr-Timestamp:
286
+ - '1688741564'
287
+ Content-Type:
288
+ - application/json
289
+ Accept-Encoding:
290
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
291
+ Accept:
292
+ - "*/*"
293
+ User-Agent:
294
+ - Ruby
295
+ response:
296
+ status:
297
+ code: 200
298
+ message: OK
299
+ headers:
300
+ Date:
301
+ - Fri, 07 Jul 2023 14:52:44 GMT
302
+ Content-Type:
303
+ - application/json; charset=utf-8
304
+ Content-Length:
305
+ - '1235'
306
+ Connection:
307
+ - keep-alive
308
+ Cache-Control:
309
+ - no-store, no-cache
310
+ Content-Security-Policy:
311
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
312
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
313
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
314
+ X-Dns-Prefetch-Control:
315
+ - 'off'
316
+ Expect-Ct:
317
+ - max-age=0
318
+ Strict-Transport-Security:
319
+ - max-age=15552000; includeSubDomains
320
+ X-Download-Options:
321
+ - noopen
322
+ X-Content-Type-Options:
323
+ - nosniff
324
+ X-Permitted-Cross-Domain-Policies:
325
+ - none
326
+ Referrer-Policy:
327
+ - no-referrer
328
+ X-Xss-Protection:
329
+ - '0'
330
+ Access-Control-Allow-Origin:
331
+ - "*"
332
+ X-Rate-Limit-Limit:
333
+ - '600'
334
+ X-Rate-Limit-Remaining:
335
+ - '587'
336
+ X-Rate-Limit-Reset:
337
+ - '1688741619'
338
+ Vary:
339
+ - Origin
340
+ Etag:
341
+ - W/"4d3-JuxHV1I2tOBBgu/vHp/pgG8nK3s"
342
+ body:
343
+ encoding: UTF-8
344
+ string: '{"ok":true,"recipient":{"id":"R-U27xuZBFJ8Th3hiHoQ3MXt","referenceId":"R-U27xuZBFJ8Th3hiHoQ3MXt","parentRecipientId":null,"email":"test.createe90b2735-3a07-4ce5-b58e-82024aa27bca@example.com","name":"Tom
345
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"archived","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:52:43.907Z","createdAt":"2023-07-07T14:52:43.361Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"","street2":"","city":"","postalCode":"","country":null,"region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/7f79429dc0404ccb907c51a284ec8564?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":null,"routeMinimum":null,"estimatedFees":null,"accounts":[],"payoutMethod":null,"primaryCurrency":null,"riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null}}'
346
+ recorded_at: Fri, 07 Jul 2023 14:52:45 GMT
347
+ recorded_with: VCR 6.2.0
@@ -0,0 +1,278 @@
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.create349b70bc-35a6-40ef-a708-1d72c6d5be9d@example.com"}'
9
+ headers:
10
+ X-Pr-Timestamp:
11
+ - '1688741565'
12
+ Content-Type:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Fri, 07 Jul 2023 14:52:45 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - '1263'
31
+ Connection:
32
+ - keep-alive
33
+ Cache-Control:
34
+ - no-store, no-cache
35
+ Content-Security-Policy:
36
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
37
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
38
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
39
+ X-Dns-Prefetch-Control:
40
+ - 'off'
41
+ Expect-Ct:
42
+ - max-age=0
43
+ Strict-Transport-Security:
44
+ - max-age=15552000; includeSubDomains
45
+ X-Download-Options:
46
+ - noopen
47
+ X-Content-Type-Options:
48
+ - nosniff
49
+ X-Permitted-Cross-Domain-Policies:
50
+ - none
51
+ Referrer-Policy:
52
+ - no-referrer
53
+ X-Xss-Protection:
54
+ - '0'
55
+ Access-Control-Allow-Origin:
56
+ - "*"
57
+ X-Rate-Limit-Limit:
58
+ - '600'
59
+ X-Rate-Limit-Remaining:
60
+ - '586'
61
+ X-Rate-Limit-Reset:
62
+ - '1688741619'
63
+ Vary:
64
+ - Origin
65
+ Etag:
66
+ - W/"4ef-/BHfdmLGdFUwWpCqRb4a40VDiiY"
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"ok":true,"recipient":{"id":"R-2EjyvsDtuv56CVF7oDwHrw","referenceId":"R-2EjyvsDtuv56CVF7oDwHrw","parentRecipientId":null,"email":"test.create349b70bc-35a6-40ef-a708-1d72c6d5be9d@example.com","name":"Tom
70
+ Jones","lastName":"Jones","firstName":"Tom","legalName":"","type":"individual","status":"incomplete","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:52:45.334Z","createdAt":"2023-07-07T14:52:45.334Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"","street2":"","city":"","postalCode":"","country":null,"region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/33af08c0d9db2976ae50ca70eb379bae?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":null,"routeMinimum":null,"estimatedFees":null,"accounts":[],"payoutMethod":null,"primaryCurrency":null,"riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{"primaryAccount":"missing"},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null}}'
71
+ recorded_at: Fri, 07 Jul 2023 14:52:45 GMT
72
+ - request:
73
+ method: patch
74
+ uri: https://api.trolley.com/v1/recipients/R-2EjyvsDtuv56CVF7oDwHrw
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"firstName":"John"}'
78
+ headers:
79
+ X-Pr-Timestamp:
80
+ - '1688741565'
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:52:45 GMT
96
+ Content-Type:
97
+ - application/json; charset=utf-8
98
+ Content-Length:
99
+ - '1265'
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
+ - '585'
130
+ X-Rate-Limit-Reset:
131
+ - '1688741619'
132
+ Vary:
133
+ - Origin
134
+ Etag:
135
+ - W/"4f1-2BVFC6S29Z09YJ35TfipFRqnsUY"
136
+ body:
137
+ encoding: UTF-8
138
+ string: '{"ok":true,"recipient":{"id":"R-2EjyvsDtuv56CVF7oDwHrw","referenceId":"R-2EjyvsDtuv56CVF7oDwHrw","parentRecipientId":null,"email":"test.create349b70bc-35a6-40ef-a708-1d72c6d5be9d@example.com","name":"John
139
+ Jones","lastName":"Jones","firstName":"John","legalName":"","type":"individual","status":"incomplete","language":"en","complianceStatus":"pending","dob":null,"passport":"","placeOfBirth":null,"updatedAt":"2023-07-07T14:52:45.819Z","createdAt":"2023-07-07T14:52:45.334Z","tags":[],"isPortalUser":false,"taxDeliveryType":"mail","contactEmails":[],"occupation":"","address":{"street1":"","street2":"","city":"","postalCode":"","country":null,"region":null,"phone":"","phoneValidated":false},"compliance":{"status":"pending","checkedAt":null},"gravatarUrl":"https://www.gravatar.com/avatar/33af08c0d9db2976ae50ca70eb379bae?d=404","governmentId":null,"ssn":null,"governmentIds":[],"birthplace":{"country":null,"region":null,"city":null},"citizenships":[],"routeType":null,"routeMinimum":null,"estimatedFees":null,"accounts":[],"payoutMethod":null,"primaryCurrency":null,"riskScore":null,"riskScoreLabel":null,"merchantId":"M-C7AsydAeAqW3husDNHSAND","inactiveReasons":{"primaryAccount":"missing"},"taxWithholdingPercentage":null,"taxForm":null,"taxFormStatus":null}}'
140
+ recorded_at: Fri, 07 Jul 2023 14:52:46 GMT
141
+ - request:
142
+ method: get
143
+ uri: https://api.trolley.com/v1/recipients/R-2EjyvsDtuv56CVF7oDwHrw/logs
144
+ body:
145
+ encoding: US-ASCII
146
+ string: ''
147
+ headers:
148
+ X-Pr-Timestamp:
149
+ - '1688741566'
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:52:46 GMT
165
+ Content-Type:
166
+ - application/json; charset=utf-8
167
+ Content-Length:
168
+ - '2057'
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
+ - '584'
199
+ X-Rate-Limit-Reset:
200
+ - '1688741619'
201
+ Vary:
202
+ - Origin
203
+ Etag:
204
+ - W/"809-ycF+rs19XpoTXuU9rwvOVa34kwk"
205
+ body:
206
+ encoding: UTF-8
207
+ string: '{"ok":true,"recipientLogs":[{"via":"apikey","ipAddress":"168.232.29.174","userId":"ASC7AsydGC5RTBMF6MH4C5NQ","type":"create","fields":[{"name":"guid","oldValue":null,"newValue":"R-2EjyvsDtuv56CVF7oDwHrw"},{"name":"referenceId","oldValue":null,"newValue":"R-2EjyvsDtuv56CVF7oDwHrw"},{"name":"status","oldValue":null,"newValue":"incomplete"},{"name":"enabledStatus","oldValue":null,"newValue":"enabled"},{"name":"email","oldValue":null,"newValue":"test.create349b70bc-35a6-40ef-a708-1d72c6d5be9d@example.com"},{"name":"name","oldValue":null,"newValue":"Tom
208
+ Jones"},{"name":"firstName","oldValue":null,"newValue":"Tom"},{"name":"lastName","oldValue":null,"newValue":"Jones"},{"name":"legalName","oldValue":null,"newValue":""},{"name":"occupation","oldValue":null,"newValue":""},{"name":"type","oldValue":null,"newValue":"individual"},{"name":"language","oldValue":null,"newValue":"en"},{"name":"complianceStatus","oldValue":null,"newValue":"pending"},{"name":"taxDeliveryType","oldValue":null,"newValue":"mail"},{"name":"phone","oldValue":null,"newValue":""},{"name":"phoneValidated","oldValue":null,"newValue":false},{"name":"testMode","oldValue":null,"newValue":true},{"name":"isPortalUser","oldValue":null,"newValue":false},{"name":"contactEmails","oldValue":null,"newValue":"[]"},{"name":"street1","oldValue":null,"newValue":""},{"name":"street2","oldValue":null,"newValue":""},{"name":"city","oldValue":null,"newValue":""},{"name":"postalCode","oldValue":null,"newValue":""},{"name":"tags","oldValue":null,"newValue":"[]"},{"name":"idvStatus","oldValue":null,"newValue":"manual"},{"name":"birthplace","oldValue":null,"newValue":"{\"country\":null,\"region\":null,\"city\":null}"},{"name":"governmentIds","oldValue":null,"newValue":"[]"},{"name":"citizenships","oldValue":null,"newValue":"[]"},{"name":"payoutMethod","oldValue":null,"newValue":"bank-transfer"},{"name":"canPay","oldValue":null,"newValue":false},{"name":"taxFormStatus","oldValue":null,"newValue":"missing"}],"createdAt":"2023-07-07T14:52:45.901Z"}],"meta":{"page":1,"pages":1,"records":1}}'
209
+ recorded_at: Fri, 07 Jul 2023 14:52:46 GMT
210
+ - request:
211
+ method: delete
212
+ uri: https://api.trolley.com/v1/recipients/R-2EjyvsDtuv56CVF7oDwHrw
213
+ body:
214
+ encoding: UTF-8
215
+ string: ''
216
+ headers:
217
+ X-Pr-Timestamp:
218
+ - '1688741566'
219
+ Content-Type:
220
+ - application/json
221
+ Accept-Encoding:
222
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
223
+ Accept:
224
+ - "*/*"
225
+ User-Agent:
226
+ - Ruby
227
+ response:
228
+ status:
229
+ code: 200
230
+ message: OK
231
+ headers:
232
+ Date:
233
+ - Fri, 07 Jul 2023 14:52:46 GMT
234
+ Content-Type:
235
+ - application/json; charset=utf-8
236
+ Content-Length:
237
+ - '11'
238
+ Connection:
239
+ - keep-alive
240
+ Cache-Control:
241
+ - no-store, no-cache
242
+ Content-Security-Policy:
243
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
244
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
245
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
246
+ X-Dns-Prefetch-Control:
247
+ - 'off'
248
+ Expect-Ct:
249
+ - max-age=0
250
+ Strict-Transport-Security:
251
+ - max-age=15552000; includeSubDomains
252
+ X-Download-Options:
253
+ - noopen
254
+ X-Content-Type-Options:
255
+ - nosniff
256
+ X-Permitted-Cross-Domain-Policies:
257
+ - none
258
+ Referrer-Policy:
259
+ - no-referrer
260
+ X-Xss-Protection:
261
+ - '0'
262
+ Access-Control-Allow-Origin:
263
+ - "*"
264
+ X-Rate-Limit-Limit:
265
+ - '600'
266
+ X-Rate-Limit-Remaining:
267
+ - '583'
268
+ X-Rate-Limit-Reset:
269
+ - '1688741619'
270
+ Vary:
271
+ - Origin
272
+ Etag:
273
+ - W/"b-Ai2R8hgEarLmHKwesT1qcY913ys"
274
+ body:
275
+ encoding: UTF-8
276
+ string: '{"ok":true}'
277
+ recorded_at: Fri, 07 Jul 2023 14:52:46 GMT
278
+ recorded_with: VCR 6.2.0