balanced-ach 0.1

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 (77) hide show
  1. data/.idea/.name +1 -0
  2. data/.idea/.rakeTasks +7 -0
  3. data/.idea/balanced-ach.iml +9 -0
  4. data/.idea/encodings.xml +5 -0
  5. data/.idea/misc.xml +5 -0
  6. data/.idea/modules.xml +9 -0
  7. data/.idea/scopes/scope_settings.xml +5 -0
  8. data/.idea/vcs.xml +7 -0
  9. data/.idea/workspace.xml +561 -0
  10. data/CONTRIBUTORS +1 -0
  11. data/Gemfile +19 -0
  12. data/Gemfile.lock +64 -0
  13. data/Guardfile +7 -0
  14. data/LICENSE +22 -0
  15. data/README.md +64 -0
  16. data/Rakefile +12 -0
  17. data/balanced.gemspec +22 -0
  18. data/lib/balanced.rb +84 -0
  19. data/lib/balanced/client.rb +82 -0
  20. data/lib/balanced/error.rb +85 -0
  21. data/lib/balanced/pager.rb +201 -0
  22. data/lib/balanced/resources.rb +5 -0
  23. data/lib/balanced/resources/bank_account.rb +36 -0
  24. data/lib/balanced/resources/credit.rb +20 -0
  25. data/lib/balanced/resources/debit.rb +27 -0
  26. data/lib/balanced/resources/resource.rb +158 -0
  27. data/lib/balanced/response/balanced_exception_middleware.rb +33 -0
  28. data/lib/balanced/utils.rb +62 -0
  29. data/lib/balanced/version.rb +3 -0
  30. data/spec/balanced/pager_spec.rb +42 -0
  31. data/spec/balanced/resources/account_spec.rb +571 -0
  32. data/spec/balanced/resources/api_key_spec.rb +55 -0
  33. data/spec/balanced/resources/hold_spec.rb +55 -0
  34. data/spec/balanced/resources/marketplace_spec.rb +97 -0
  35. data/spec/balanced/resources/transactions_spec.rb +72 -0
  36. data/spec/balanced/response/balanced_exception_middleware_spec.rb +47 -0
  37. data/spec/balanced_spec.rb +77 -0
  38. data/spec/cassettes/Balanced/configure.yml +48 -0
  39. data/spec/cassettes/Balanced/configure/reconfigure_with_new_api_key.yml +48 -0
  40. data/spec/cassettes/Balanced_Account.yml +110 -0
  41. data/spec/cassettes/Balanced_Account/Account_uri/when_ApiKey_is_configured.yml +240 -0
  42. data/spec/cassettes/Balanced_Account/Account_uri/when_ApiKey_is_not_configured.yml +44 -0
  43. data/spec/cassettes/Balanced_Account/_find.yml +400 -0
  44. data/spec/cassettes/Balanced_Account/_find/_all_some_field_op_.yml +186 -0
  45. data/spec/cassettes/Balanced_Account/_find/_first_some_field_op_.yml +186 -0
  46. data/spec/cassettes/Balanced_Account/_find_by_email.yml +400 -0
  47. data/spec/cassettes/Balanced_Account/_find_by_email/email_address_does_not_exist.yml +175 -0
  48. data/spec/cassettes/Balanced_Account/_find_by_email/email_address_is_in_system.yml +186 -0
  49. data/spec/cassettes/Balanced_Account/buyer/_add_card/after_executing.yml +530 -0
  50. data/spec/cassettes/Balanced_Account/buyer/_add_card/when_executing.yml +455 -0
  51. data/spec/cassettes/Balanced_Account/buyer/_debit.yml +363 -0
  52. data/spec/cassettes/Balanced_Account/buyer/_promote_to_merchant/after_executing.yml +281 -0
  53. data/spec/cassettes/Balanced_Account/buyer/_promote_to_merchant/when_executing.yml +281 -0
  54. data/spec/cassettes/Balanced_Account/buyer/_save/after_save/attributes.yml +1013 -0
  55. data/spec/cassettes/Balanced_Account/buyer/_save/when_creating.yml +229 -0
  56. data/spec/cassettes/Balanced_Account/merchant/_add_bank_account/after_executing.yml +536 -0
  57. data/spec/cassettes/Balanced_Account/merchant/_add_bank_account/when_executing.yml +460 -0
  58. data/spec/cassettes/Balanced_Account/merchant/_save/after_save/attributes.yml +232 -0
  59. data/spec/cassettes/Balanced_Account/merchant/_save/when_creating.yml +232 -0
  60. data/spec/cassettes/Balanced_Account/merchant/new.yml +179 -0
  61. data/spec/cassettes/Balanced_ApiKey/attributes.yml +48 -0
  62. data/spec/cassettes/Balanced_ApiKey/new_key/after_configure.yml +93 -0
  63. data/spec/cassettes/Balanced_ApiKey/new_key/before_configure.yml +48 -0
  64. data/spec/cassettes/Balanced_Hold.yml +335 -0
  65. data/spec/cassettes/Balanced_Hold/_void.yml +62 -0
  66. data/spec/cassettes/Balanced_Hold/_void/after.yml +62 -0
  67. data/spec/cassettes/Balanced_Hold/_void/when_exception_is_thrown.yml +306 -0
  68. data/spec/cassettes/Balanced_Marketplace.yml +339 -0
  69. data/spec/cassettes/Balanced_Transaction.yml +1261 -0
  70. data/spec/cassettes/Balanced_Transaction/Transaction.yml +634 -0
  71. data/spec/cassettes/Balanced_Transaction/Transaction_paginate.yml +634 -0
  72. data/spec/client_spec.rb +12 -0
  73. data/spec/spec_helper.rb +31 -0
  74. data/spec/utils_spec.rb +8 -0
  75. data/upload_docs.rb +39 -0
  76. data/x.rb +22 -0
  77. metadata +199 -0
@@ -0,0 +1,460 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.balancedpayments.com/v1/merchants
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - balanced-ruby/0.3.5
12
+ Authorization:
13
+ - Basic M2RkZGE5MDBjNzIyMTFlMWEyOWMwMjZiYTdlNWU3MmU6
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: !!null
18
+ headers:
19
+ content-type:
20
+ - application/json
21
+ date:
22
+ - Fri, 06 Jul 2012 04:23:01 GMT
23
+ server:
24
+ - nginx/1.0.14
25
+ x-balanced-guru:
26
+ - OHM46453b26c72211e19eae026ba7e5e72e
27
+ x-balanced-marketplace:
28
+ - TEST-MP1TeztGGOGLPPCo2cLKo6SZ
29
+ x-balanced-merchant:
30
+ - TEST-MR1StaiKg1wIPZi4BqZBFKgK
31
+ x-balanced-version:
32
+ - ''
33
+ content-length:
34
+ - '2062'
35
+ connection:
36
+ - Close
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ! "{\n \"first_uri\": \"/v1/merchants?limit=10&offset=0\", \n \"items\":
40
+ [\n {\n \"phone_number\": \"+16505551212\", \n \"city\": \"Nowhere\",
41
+ \n \"marketplace\": {\n \"in_escrow\": 0, \n \"domain_url\":
42
+ \"example.com\", \n \"name\": \"Test Marketplace\", \n \"owner_account_uri\":
43
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ\",
44
+ \n \"support_email_address\": \"support@example.com\", \n \"uri\":
45
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ\", \n \"bank_accounts_uri\":
46
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts\", \n \"support_phone_number\":
47
+ \"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/refunds\",
48
+ \n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/debits\",
49
+ \n \"holds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/holds\",
50
+ \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/transactions\",
51
+ \n \"accounts_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts\",
52
+ \n \"id\": \"TEST-MP1TeztGGOGLPPCo2cLKo6SZ\", \n \"credits_uri\":
53
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/credits\", \n \"cards_uri\":
54
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/cards\"\n }, \n \"name\":
55
+ \"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
56
+ \n \"created_at\": \"2012-07-06T04:22:47.628360Z\", \n \"uri\":
57
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK\", \n \"accounts_uri\":
58
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK/accounts\", \n \"meta\":
59
+ {}, \n \"postal_code\": \"90210\", \n \"country_code\": \"USA\",
60
+ \n \"type\": \"person\", \n \"balance\": 0, \n \"api_keys_uri\":
61
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK/api_keys\", \n \"id\":
62
+ \"TEST-MR1StaiKg1wIPZi4BqZBFKgK\", \n \"street_address\": \"123 Fake
63
+ St\"\n }\n ], \n \"previous_uri\": null, \n \"uri\": \"/v1/merchants?limit=10&offset=0\",
64
+ \n \"limit\": 10, \n \"offset\": 0, \n \"total\": 1, \n \"next_uri\":
65
+ null, \n \"last_uri\": \"/v1/merchants?limit=10&offset=0\"\n}"
66
+ http_version: !!null
67
+ recorded_at: Fri, 06 Jul 2012 04:23:02 GMT
68
+ - request:
69
+ method: get
70
+ uri: https://api.balancedpayments.com/v1/merchants
71
+ body:
72
+ encoding: US-ASCII
73
+ string: ''
74
+ headers:
75
+ User-Agent:
76
+ - balanced-ruby/0.3.5
77
+ Authorization:
78
+ - Basic M2RkZGE5MDBjNzIyMTFlMWEyOWMwMjZiYTdlNWU3MmU6
79
+ response:
80
+ status:
81
+ code: 200
82
+ message: !!null
83
+ headers:
84
+ content-type:
85
+ - application/json
86
+ date:
87
+ - Fri, 06 Jul 2012 04:23:02 GMT
88
+ server:
89
+ - nginx/1.0.14
90
+ x-balanced-guru:
91
+ - OHM46922012c72211e1b502026ba7e239a9
92
+ x-balanced-marketplace:
93
+ - TEST-MP1TeztGGOGLPPCo2cLKo6SZ
94
+ x-balanced-merchant:
95
+ - TEST-MR1StaiKg1wIPZi4BqZBFKgK
96
+ x-balanced-version:
97
+ - ''
98
+ content-length:
99
+ - '2062'
100
+ connection:
101
+ - Close
102
+ body:
103
+ encoding: US-ASCII
104
+ string: ! "{\n \"first_uri\": \"/v1/merchants?limit=10&offset=0\", \n \"items\":
105
+ [\n {\n \"phone_number\": \"+16505551212\", \n \"city\": \"Nowhere\",
106
+ \n \"marketplace\": {\n \"in_escrow\": 0, \n \"domain_url\":
107
+ \"example.com\", \n \"name\": \"Test Marketplace\", \n \"owner_account_uri\":
108
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ\",
109
+ \n \"support_email_address\": \"support@example.com\", \n \"uri\":
110
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ\", \n \"bank_accounts_uri\":
111
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts\", \n \"support_phone_number\":
112
+ \"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/refunds\",
113
+ \n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/debits\",
114
+ \n \"holds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/holds\",
115
+ \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/transactions\",
116
+ \n \"accounts_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts\",
117
+ \n \"id\": \"TEST-MP1TeztGGOGLPPCo2cLKo6SZ\", \n \"credits_uri\":
118
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/credits\", \n \"cards_uri\":
119
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/cards\"\n }, \n \"name\":
120
+ \"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
121
+ \n \"created_at\": \"2012-07-06T04:22:47.628360Z\", \n \"uri\":
122
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK\", \n \"accounts_uri\":
123
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK/accounts\", \n \"meta\":
124
+ {}, \n \"postal_code\": \"90210\", \n \"country_code\": \"USA\",
125
+ \n \"type\": \"person\", \n \"balance\": 0, \n \"api_keys_uri\":
126
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK/api_keys\", \n \"id\":
127
+ \"TEST-MR1StaiKg1wIPZi4BqZBFKgK\", \n \"street_address\": \"123 Fake
128
+ St\"\n }\n ], \n \"previous_uri\": null, \n \"uri\": \"/v1/merchants?limit=10&offset=0\",
129
+ \n \"limit\": 10, \n \"offset\": 0, \n \"total\": 1, \n \"next_uri\":
130
+ null, \n \"last_uri\": \"/v1/merchants?limit=10&offset=0\"\n}"
131
+ http_version: !!null
132
+ recorded_at: Fri, 06 Jul 2012 04:23:02 GMT
133
+ - request:
134
+ method: post
135
+ uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts
136
+ body:
137
+ encoding: UTF-8
138
+ string: ! '{"account_number":"1234567890","bank_code":"321174851","name":"Jack
139
+ Q Merchant"}'
140
+ headers:
141
+ User-Agent:
142
+ - balanced-ruby/0.3.5
143
+ Authorization:
144
+ - Basic M2RkZGE5MDBjNzIyMTFlMWEyOWMwMjZiYTdlNWU3MmU6
145
+ Content-Type:
146
+ - application/json
147
+ response:
148
+ status:
149
+ code: 201
150
+ message: !!null
151
+ headers:
152
+ content-type:
153
+ - application/json
154
+ date:
155
+ - Fri, 06 Jul 2012 04:23:02 GMT
156
+ server:
157
+ - nginx/1.0.14
158
+ x-balanced-guru:
159
+ - OHM46cb1d72c72211e1a29c026ba7e5e72e
160
+ x-balanced-marketplace:
161
+ - TEST-MP1TeztGGOGLPPCo2cLKo6SZ
162
+ x-balanced-merchant:
163
+ - TEST-MR1StaiKg1wIPZi4BqZBFKgK
164
+ x-balanced-version:
165
+ - ''
166
+ content-length:
167
+ - '366'
168
+ connection:
169
+ - Close
170
+ body:
171
+ encoding: US-ASCII
172
+ string: ! "{\n \"bank_name\": \"SAN MATEO CREDIT UNION\", \n \"account\":
173
+ null, \n \"name\": \"Jack Q Merchant\", \n \"bank_code\": \"321174851\",
174
+ \n \"created_at\": \"2012-07-06T04:23:02.936624Z\", \n \"uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts/BA29GG3CPl8EROESZ25CbSVw\",
175
+ \n \"is_valid\": true, \n \"meta\": {}, \n \"last_four\": \"7890\", \n
176
+ \ \"id\": \"BA29GG3CPl8EROESZ25CbSVw\"\n}"
177
+ http_version: !!null
178
+ recorded_at: Fri, 06 Jul 2012 04:23:03 GMT
179
+ - request:
180
+ method: post
181
+ uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts
182
+ body:
183
+ encoding: UTF-8
184
+ string: ! '{"email_address":"merchant1@example.org","merchant":{"type":"person","name":"Billy
185
+ Jones","street_address":"801 High St.","postal_code":"94301","country":"USA","dob":"1842-01","phone_number":"+16505551234"},"bank_account_uri":"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts/BA29GG3CPl8EROESZ25CbSVw","name":"Jack
186
+ Q Merchant"}'
187
+ headers:
188
+ User-Agent:
189
+ - balanced-ruby/0.3.5
190
+ Authorization:
191
+ - Basic M2RkZGE5MDBjNzIyMTFlMWEyOWMwMjZiYTdlNWU3MmU6
192
+ Content-Type:
193
+ - application/json
194
+ response:
195
+ status:
196
+ code: 201
197
+ message: !!null
198
+ headers:
199
+ content-type:
200
+ - application/json
201
+ date:
202
+ - Fri, 06 Jul 2012 04:23:03 GMT
203
+ server:
204
+ - nginx/1.0.14
205
+ x-balanced-guru:
206
+ - OHM47220678c72211e1b502026ba7e239a9
207
+ x-balanced-marketplace:
208
+ - TEST-MP1TeztGGOGLPPCo2cLKo6SZ
209
+ x-balanced-merchant:
210
+ - TEST-MR1StaiKg1wIPZi4BqZBFKgK
211
+ x-balanced-version:
212
+ - ''
213
+ content-length:
214
+ - '1100'
215
+ connection:
216
+ - Close
217
+ body:
218
+ encoding: US-ASCII
219
+ string: ! "{\n \"holds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/holds\",
220
+ \n \"name\": \"Jack Q Merchant\", \n \"roles\": [\n \"merchant\", \n
221
+ \ \"buyer\"\n ], \n \"created_at\": \"2012-07-06T04:23:03.558449Z\", \n
222
+ \ \"uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal\",
223
+ \n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/bank_accounts\",
224
+ \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/refunds\",
225
+ \n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/debits\",
226
+ \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/transactions\",
227
+ \n \"email_address\": \"merchant1@example.org\", \n \"id\": \"AC2aoriEeozWvmqUBVBCNcal\",
228
+ \n \"credits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/credits\",
229
+ \n \"cards_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/cards\"\n}"
230
+ http_version: !!null
231
+ recorded_at: Fri, 06 Jul 2012 04:23:04 GMT
232
+ - request:
233
+ method: get
234
+ uri: https://api.balancedpayments.com/v1/merchants
235
+ body:
236
+ encoding: US-ASCII
237
+ string: ''
238
+ headers:
239
+ User-Agent:
240
+ - balanced-ruby/0.3.5
241
+ Authorization:
242
+ - Basic M2RkZGE5MDBjNzIyMTFlMWEyOWMwMjZiYTdlNWU3MmU6
243
+ response:
244
+ status:
245
+ code: 200
246
+ message: !!null
247
+ headers:
248
+ content-type:
249
+ - application/json
250
+ date:
251
+ - Fri, 06 Jul 2012 04:23:04 GMT
252
+ server:
253
+ - nginx/1.0.14
254
+ x-balanced-guru:
255
+ - OHM47b26808c72211e19eae026ba7e5e72e
256
+ x-balanced-marketplace:
257
+ - TEST-MP1TeztGGOGLPPCo2cLKo6SZ
258
+ x-balanced-merchant:
259
+ - TEST-MR1StaiKg1wIPZi4BqZBFKgK
260
+ x-balanced-version:
261
+ - ''
262
+ content-length:
263
+ - '2062'
264
+ connection:
265
+ - Close
266
+ body:
267
+ encoding: US-ASCII
268
+ string: ! "{\n \"first_uri\": \"/v1/merchants?limit=10&offset=0\", \n \"items\":
269
+ [\n {\n \"phone_number\": \"+16505551212\", \n \"city\": \"Nowhere\",
270
+ \n \"marketplace\": {\n \"in_escrow\": 0, \n \"domain_url\":
271
+ \"example.com\", \n \"name\": \"Test Marketplace\", \n \"owner_account_uri\":
272
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ\",
273
+ \n \"support_email_address\": \"support@example.com\", \n \"uri\":
274
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ\", \n \"bank_accounts_uri\":
275
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts\", \n \"support_phone_number\":
276
+ \"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/refunds\",
277
+ \n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/debits\",
278
+ \n \"holds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/holds\",
279
+ \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/transactions\",
280
+ \n \"accounts_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts\",
281
+ \n \"id\": \"TEST-MP1TeztGGOGLPPCo2cLKo6SZ\", \n \"credits_uri\":
282
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/credits\", \n \"cards_uri\":
283
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/cards\"\n }, \n \"name\":
284
+ \"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
285
+ \n \"created_at\": \"2012-07-06T04:22:47.628360Z\", \n \"uri\":
286
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK\", \n \"accounts_uri\":
287
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK/accounts\", \n \"meta\":
288
+ {}, \n \"postal_code\": \"90210\", \n \"country_code\": \"USA\",
289
+ \n \"type\": \"person\", \n \"balance\": 0, \n \"api_keys_uri\":
290
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK/api_keys\", \n \"id\":
291
+ \"TEST-MR1StaiKg1wIPZi4BqZBFKgK\", \n \"street_address\": \"123 Fake
292
+ St\"\n }\n ], \n \"previous_uri\": null, \n \"uri\": \"/v1/merchants?limit=10&offset=0\",
293
+ \n \"limit\": 10, \n \"offset\": 0, \n \"total\": 1, \n \"next_uri\":
294
+ null, \n \"last_uri\": \"/v1/merchants?limit=10&offset=0\"\n}"
295
+ http_version: !!null
296
+ recorded_at: Fri, 06 Jul 2012 04:23:04 GMT
297
+ - request:
298
+ method: get
299
+ uri: https://api.balancedpayments.com/v1/merchants
300
+ body:
301
+ encoding: US-ASCII
302
+ string: ''
303
+ headers:
304
+ User-Agent:
305
+ - balanced-ruby/0.3.5
306
+ Authorization:
307
+ - Basic M2RkZGE5MDBjNzIyMTFlMWEyOWMwMjZiYTdlNWU3MmU6
308
+ response:
309
+ status:
310
+ code: 200
311
+ message: !!null
312
+ headers:
313
+ content-type:
314
+ - application/json
315
+ date:
316
+ - Fri, 06 Jul 2012 04:23:04 GMT
317
+ server:
318
+ - nginx/1.0.14
319
+ x-balanced-guru:
320
+ - OHM480c9cc4c72211e1a476026ba7e239a9
321
+ x-balanced-marketplace:
322
+ - TEST-MP1TeztGGOGLPPCo2cLKo6SZ
323
+ x-balanced-merchant:
324
+ - TEST-MR1StaiKg1wIPZi4BqZBFKgK
325
+ x-balanced-version:
326
+ - ''
327
+ content-length:
328
+ - '2062'
329
+ connection:
330
+ - Close
331
+ body:
332
+ encoding: US-ASCII
333
+ string: ! "{\n \"first_uri\": \"/v1/merchants?limit=10&offset=0\", \n \"items\":
334
+ [\n {\n \"phone_number\": \"+16505551212\", \n \"city\": \"Nowhere\",
335
+ \n \"marketplace\": {\n \"in_escrow\": 0, \n \"domain_url\":
336
+ \"example.com\", \n \"name\": \"Test Marketplace\", \n \"owner_account_uri\":
337
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ\",
338
+ \n \"support_email_address\": \"support@example.com\", \n \"uri\":
339
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ\", \n \"bank_accounts_uri\":
340
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts\", \n \"support_phone_number\":
341
+ \"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/refunds\",
342
+ \n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/debits\",
343
+ \n \"holds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/holds\",
344
+ \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/transactions\",
345
+ \n \"accounts_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts\",
346
+ \n \"id\": \"TEST-MP1TeztGGOGLPPCo2cLKo6SZ\", \n \"credits_uri\":
347
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/credits\", \n \"cards_uri\":
348
+ \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/cards\"\n }, \n \"name\":
349
+ \"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
350
+ \n \"created_at\": \"2012-07-06T04:22:47.628360Z\", \n \"uri\":
351
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK\", \n \"accounts_uri\":
352
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK/accounts\", \n \"meta\":
353
+ {}, \n \"postal_code\": \"90210\", \n \"country_code\": \"USA\",
354
+ \n \"type\": \"person\", \n \"balance\": 0, \n \"api_keys_uri\":
355
+ \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK/api_keys\", \n \"id\":
356
+ \"TEST-MR1StaiKg1wIPZi4BqZBFKgK\", \n \"street_address\": \"123 Fake
357
+ St\"\n }\n ], \n \"previous_uri\": null, \n \"uri\": \"/v1/merchants?limit=10&offset=0\",
358
+ \n \"limit\": 10, \n \"offset\": 0, \n \"total\": 1, \n \"next_uri\":
359
+ null, \n \"last_uri\": \"/v1/merchants?limit=10&offset=0\"\n}"
360
+ http_version: !!null
361
+ recorded_at: Fri, 06 Jul 2012 04:23:05 GMT
362
+ - request:
363
+ method: post
364
+ uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts
365
+ body:
366
+ encoding: UTF-8
367
+ string: ! '{"account_number":"53434533","bank_code":"12345678","name":"Jack
368
+ Q Merchant"}'
369
+ headers:
370
+ User-Agent:
371
+ - balanced-ruby/0.3.5
372
+ Authorization:
373
+ - Basic M2RkZGE5MDBjNzIyMTFlMWEyOWMwMjZiYTdlNWU3MmU6
374
+ Content-Type:
375
+ - application/json
376
+ response:
377
+ status:
378
+ code: 201
379
+ message: !!null
380
+ headers:
381
+ content-type:
382
+ - application/json
383
+ date:
384
+ - Fri, 06 Jul 2012 04:23:05 GMT
385
+ server:
386
+ - nginx/1.0.14
387
+ x-balanced-guru:
388
+ - OHM484952ccc72211e1ad0d026ba7e5e72e
389
+ x-balanced-marketplace:
390
+ - TEST-MP1TeztGGOGLPPCo2cLKo6SZ
391
+ x-balanced-merchant:
392
+ - TEST-MR1StaiKg1wIPZi4BqZBFKgK
393
+ x-balanced-version:
394
+ - ''
395
+ content-length:
396
+ - '345'
397
+ connection:
398
+ - Close
399
+ body:
400
+ encoding: US-ASCII
401
+ string: ! "{\n \"bank_name\": null, \n \"account\": null, \n \"name\": \"Jack
402
+ Q Merchant\", \n \"bank_code\": \"12345678\", \n \"created_at\": \"2012-07-06T04:23:05.444913Z\",
403
+ \n \"uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts/BA2cvAKF7gDM5XE9seNfycjA\",
404
+ \n \"is_valid\": true, \n \"meta\": {}, \n \"last_four\": \"4533\", \n
405
+ \ \"id\": \"BA2cvAKF7gDM5XE9seNfycjA\"\n}"
406
+ http_version: !!null
407
+ recorded_at: Fri, 06 Jul 2012 04:23:05 GMT
408
+ - request:
409
+ method: put
410
+ uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal
411
+ body:
412
+ encoding: UTF-8
413
+ string: ! '{"holds_uri":"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/holds","name":"Jack
414
+ Q Merchant","roles":["merchant","buyer"],"created_at":"2012-07-06T04:23:03.558449Z","bank_accounts_uri":"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/bank_accounts","refunds_uri":"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/refunds","meta":{},"debits_uri":"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/debits","transactions_uri":"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/transactions","email_address":"merchant1@example.org","id":"AC2aoriEeozWvmqUBVBCNcal","credits_uri":"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/credits","cards_uri":"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/cards","bank_account_uri":"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts/BA2cvAKF7gDM5XE9seNfycjA"}'
415
+ headers:
416
+ User-Agent:
417
+ - balanced-ruby/0.3.5
418
+ Authorization:
419
+ - Basic M2RkZGE5MDBjNzIyMTFlMWEyOWMwMjZiYTdlNWU3MmU6
420
+ Content-Type:
421
+ - application/json
422
+ response:
423
+ status:
424
+ code: 200
425
+ message: !!null
426
+ headers:
427
+ content-type:
428
+ - application/json
429
+ date:
430
+ - Fri, 06 Jul 2012 04:23:06 GMT
431
+ server:
432
+ - nginx/1.0.14
433
+ x-balanced-guru:
434
+ - OHM48a0f716c72211e1a476026ba7e239a9
435
+ x-balanced-marketplace:
436
+ - TEST-MP1TeztGGOGLPPCo2cLKo6SZ
437
+ x-balanced-merchant:
438
+ - TEST-MR1StaiKg1wIPZi4BqZBFKgK
439
+ x-balanced-version:
440
+ - ''
441
+ content-length:
442
+ - '1100'
443
+ connection:
444
+ - Close
445
+ body:
446
+ encoding: US-ASCII
447
+ string: ! "{\n \"holds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/holds\",
448
+ \n \"name\": \"Jack Q Merchant\", \n \"roles\": [\n \"merchant\", \n
449
+ \ \"buyer\"\n ], \n \"created_at\": \"2012-07-06T04:23:03.558449Z\", \n
450
+ \ \"uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal\",
451
+ \n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/bank_accounts\",
452
+ \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/refunds\",
453
+ \n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/debits\",
454
+ \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/transactions\",
455
+ \n \"email_address\": \"merchant1@example.org\", \n \"id\": \"AC2aoriEeozWvmqUBVBCNcal\",
456
+ \n \"credits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/credits\",
457
+ \n \"cards_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC2aoriEeozWvmqUBVBCNcal/cards\"\n}"
458
+ http_version: !!null
459
+ recorded_at: Fri, 06 Jul 2012 04:23:06 GMT
460
+ recorded_with: VCR 2.2.2