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.
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/balanced-ach.iml +9 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +5 -0
- data/.idea/modules.xml +9 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/vcs.xml +7 -0
- data/.idea/workspace.xml +561 -0
- data/CONTRIBUTORS +1 -0
- data/Gemfile +19 -0
- data/Gemfile.lock +64 -0
- data/Guardfile +7 -0
- data/LICENSE +22 -0
- data/README.md +64 -0
- data/Rakefile +12 -0
- data/balanced.gemspec +22 -0
- data/lib/balanced.rb +84 -0
- data/lib/balanced/client.rb +82 -0
- data/lib/balanced/error.rb +85 -0
- data/lib/balanced/pager.rb +201 -0
- data/lib/balanced/resources.rb +5 -0
- data/lib/balanced/resources/bank_account.rb +36 -0
- data/lib/balanced/resources/credit.rb +20 -0
- data/lib/balanced/resources/debit.rb +27 -0
- data/lib/balanced/resources/resource.rb +158 -0
- data/lib/balanced/response/balanced_exception_middleware.rb +33 -0
- data/lib/balanced/utils.rb +62 -0
- data/lib/balanced/version.rb +3 -0
- data/spec/balanced/pager_spec.rb +42 -0
- data/spec/balanced/resources/account_spec.rb +571 -0
- data/spec/balanced/resources/api_key_spec.rb +55 -0
- data/spec/balanced/resources/hold_spec.rb +55 -0
- data/spec/balanced/resources/marketplace_spec.rb +97 -0
- data/spec/balanced/resources/transactions_spec.rb +72 -0
- data/spec/balanced/response/balanced_exception_middleware_spec.rb +47 -0
- data/spec/balanced_spec.rb +77 -0
- data/spec/cassettes/Balanced/configure.yml +48 -0
- data/spec/cassettes/Balanced/configure/reconfigure_with_new_api_key.yml +48 -0
- data/spec/cassettes/Balanced_Account.yml +110 -0
- data/spec/cassettes/Balanced_Account/Account_uri/when_ApiKey_is_configured.yml +240 -0
- data/spec/cassettes/Balanced_Account/Account_uri/when_ApiKey_is_not_configured.yml +44 -0
- data/spec/cassettes/Balanced_Account/_find.yml +400 -0
- data/spec/cassettes/Balanced_Account/_find/_all_some_field_op_.yml +186 -0
- data/spec/cassettes/Balanced_Account/_find/_first_some_field_op_.yml +186 -0
- data/spec/cassettes/Balanced_Account/_find_by_email.yml +400 -0
- data/spec/cassettes/Balanced_Account/_find_by_email/email_address_does_not_exist.yml +175 -0
- data/spec/cassettes/Balanced_Account/_find_by_email/email_address_is_in_system.yml +186 -0
- data/spec/cassettes/Balanced_Account/buyer/_add_card/after_executing.yml +530 -0
- data/spec/cassettes/Balanced_Account/buyer/_add_card/when_executing.yml +455 -0
- data/spec/cassettes/Balanced_Account/buyer/_debit.yml +363 -0
- data/spec/cassettes/Balanced_Account/buyer/_promote_to_merchant/after_executing.yml +281 -0
- data/spec/cassettes/Balanced_Account/buyer/_promote_to_merchant/when_executing.yml +281 -0
- data/spec/cassettes/Balanced_Account/buyer/_save/after_save/attributes.yml +1013 -0
- data/spec/cassettes/Balanced_Account/buyer/_save/when_creating.yml +229 -0
- data/spec/cassettes/Balanced_Account/merchant/_add_bank_account/after_executing.yml +536 -0
- data/spec/cassettes/Balanced_Account/merchant/_add_bank_account/when_executing.yml +460 -0
- data/spec/cassettes/Balanced_Account/merchant/_save/after_save/attributes.yml +232 -0
- data/spec/cassettes/Balanced_Account/merchant/_save/when_creating.yml +232 -0
- data/spec/cassettes/Balanced_Account/merchant/new.yml +179 -0
- data/spec/cassettes/Balanced_ApiKey/attributes.yml +48 -0
- data/spec/cassettes/Balanced_ApiKey/new_key/after_configure.yml +93 -0
- data/spec/cassettes/Balanced_ApiKey/new_key/before_configure.yml +48 -0
- data/spec/cassettes/Balanced_Hold.yml +335 -0
- data/spec/cassettes/Balanced_Hold/_void.yml +62 -0
- data/spec/cassettes/Balanced_Hold/_void/after.yml +62 -0
- data/spec/cassettes/Balanced_Hold/_void/when_exception_is_thrown.yml +306 -0
- data/spec/cassettes/Balanced_Marketplace.yml +339 -0
- data/spec/cassettes/Balanced_Transaction.yml +1261 -0
- data/spec/cassettes/Balanced_Transaction/Transaction.yml +634 -0
- data/spec/cassettes/Balanced_Transaction/Transaction_paginate.yml +634 -0
- data/spec/client_spec.rb +12 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/utils_spec.rb +8 -0
- data/upload_docs.rb +39 -0
- data/x.rb +22 -0
- metadata +199 -0
@@ -0,0 +1,186 @@
|
|
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 NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:52 GMT
|
23
|
+
server:
|
24
|
+
- nginx/1.0.14
|
25
|
+
x-balanced-guru:
|
26
|
+
- OHM644c2738c72211e1ad0d026ba7e5e72e
|
27
|
+
x-balanced-marketplace:
|
28
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
29
|
+
x-balanced-merchant:
|
30
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo\",
|
44
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
45
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"bank_accounts_uri\":
|
46
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/bank_accounts\", \n \"support_phone_number\":
|
47
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/refunds\",
|
48
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/debits\",
|
49
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/holds\",
|
50
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/transactions\",
|
51
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts\",
|
52
|
+
\n \"id\": \"TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"credits_uri\":
|
53
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/credits\", \n \"cards_uri\":
|
54
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards\"\n }, \n \"name\":
|
55
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
56
|
+
\n \"created_at\": \"2012-07-06T04:23:46.724372Z\", \n \"uri\":
|
57
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \n \"accounts_uri\":
|
58
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln/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-MR2WWvoF8yVWTAcuxmNZIbln/api_keys\", \n \"id\":
|
62
|
+
\"TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \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:52 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 NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:52 GMT
|
88
|
+
server:
|
89
|
+
- nginx/1.0.14
|
90
|
+
x-balanced-guru:
|
91
|
+
- OHM6495d6dac72211e1b502026ba7e239a9
|
92
|
+
x-balanced-marketplace:
|
93
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
94
|
+
x-balanced-merchant:
|
95
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo\",
|
109
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
110
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"bank_accounts_uri\":
|
111
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/bank_accounts\", \n \"support_phone_number\":
|
112
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/refunds\",
|
113
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/debits\",
|
114
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/holds\",
|
115
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/transactions\",
|
116
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts\",
|
117
|
+
\n \"id\": \"TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"credits_uri\":
|
118
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/credits\", \n \"cards_uri\":
|
119
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards\"\n }, \n \"name\":
|
120
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
121
|
+
\n \"created_at\": \"2012-07-06T04:23:46.724372Z\", \n \"uri\":
|
122
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \n \"accounts_uri\":
|
123
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln/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-MR2WWvoF8yVWTAcuxmNZIbln/api_keys\", \n \"id\":
|
127
|
+
\"TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \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:53 GMT
|
133
|
+
- request:
|
134
|
+
method: get
|
135
|
+
uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts?email_address=john.doe%40example.com
|
136
|
+
body:
|
137
|
+
encoding: US-ASCII
|
138
|
+
string: ''
|
139
|
+
headers:
|
140
|
+
User-Agent:
|
141
|
+
- balanced-ruby/0.3.5
|
142
|
+
Authorization:
|
143
|
+
- Basic NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
144
|
+
response:
|
145
|
+
status:
|
146
|
+
code: 200
|
147
|
+
message: !!null
|
148
|
+
headers:
|
149
|
+
content-type:
|
150
|
+
- application/json
|
151
|
+
date:
|
152
|
+
- Fri, 06 Jul 2012 04:23:53 GMT
|
153
|
+
server:
|
154
|
+
- nginx/1.0.14
|
155
|
+
x-balanced-guru:
|
156
|
+
- OHM64caaa40c72211e19eae026ba7e5e72e
|
157
|
+
x-balanced-marketplace:
|
158
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
159
|
+
x-balanced-merchant:
|
160
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
161
|
+
x-balanced-version:
|
162
|
+
- ''
|
163
|
+
content-length:
|
164
|
+
- '1638'
|
165
|
+
connection:
|
166
|
+
- Close
|
167
|
+
body:
|
168
|
+
encoding: US-ASCII
|
169
|
+
string: ! "{\n \"first_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts?limit=10&email_address=john.doe%40example.com&offset=0\",
|
170
|
+
\n \"items\": [\n {\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/holds\",
|
171
|
+
\n \"name\": null, \n \"roles\": [\n \"buyer\"\n ],
|
172
|
+
\n \"created_at\": \"2012-07-06T04:23:51.368389Z\", \n \"uri\":
|
173
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3\",
|
174
|
+
\n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/bank_accounts\",
|
175
|
+
\n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/refunds\",
|
176
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/debits\",
|
177
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/transactions\",
|
178
|
+
\n \"email_address\": \"john.doe@example.com\", \n \"id\": \"AC32alTu8zhfsUKg9kZkfrn3\",
|
179
|
+
\n \"credits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/credits\",
|
180
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/cards\"\n
|
181
|
+
\ }\n ], \n \"previous_uri\": null, \n \"uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts?limit=10&email_address=john.doe%40example.com&offset=0\",
|
182
|
+
\n \"limit\": 10, \n \"offset\": 0, \n \"total\": 1, \n \"next_uri\":
|
183
|
+
null, \n \"last_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts?limit=10&email_address=john.doe%40example.com&offset=0\"\n}"
|
184
|
+
http_version: !!null
|
185
|
+
recorded_at: Fri, 06 Jul 2012 04:23:53 GMT
|
186
|
+
recorded_with: VCR 2.2.2
|
@@ -0,0 +1,186 @@
|
|
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 NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:53 GMT
|
23
|
+
server:
|
24
|
+
- nginx/1.0.14
|
25
|
+
x-balanced-guru:
|
26
|
+
- OHM652f7aecc72211e1a476026ba7e239a9
|
27
|
+
x-balanced-marketplace:
|
28
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
29
|
+
x-balanced-merchant:
|
30
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo\",
|
44
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
45
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"bank_accounts_uri\":
|
46
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/bank_accounts\", \n \"support_phone_number\":
|
47
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/refunds\",
|
48
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/debits\",
|
49
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/holds\",
|
50
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/transactions\",
|
51
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts\",
|
52
|
+
\n \"id\": \"TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"credits_uri\":
|
53
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/credits\", \n \"cards_uri\":
|
54
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards\"\n }, \n \"name\":
|
55
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
56
|
+
\n \"created_at\": \"2012-07-06T04:23:46.724372Z\", \n \"uri\":
|
57
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \n \"accounts_uri\":
|
58
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln/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-MR2WWvoF8yVWTAcuxmNZIbln/api_keys\", \n \"id\":
|
62
|
+
\"TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \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:54 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 NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:54 GMT
|
88
|
+
server:
|
89
|
+
- nginx/1.0.14
|
90
|
+
x-balanced-guru:
|
91
|
+
- OHM657661c8c72211e1a29c026ba7e5e72e
|
92
|
+
x-balanced-marketplace:
|
93
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
94
|
+
x-balanced-merchant:
|
95
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo\",
|
109
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
110
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"bank_accounts_uri\":
|
111
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/bank_accounts\", \n \"support_phone_number\":
|
112
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/refunds\",
|
113
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/debits\",
|
114
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/holds\",
|
115
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/transactions\",
|
116
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts\",
|
117
|
+
\n \"id\": \"TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"credits_uri\":
|
118
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/credits\", \n \"cards_uri\":
|
119
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards\"\n }, \n \"name\":
|
120
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
121
|
+
\n \"created_at\": \"2012-07-06T04:23:46.724372Z\", \n \"uri\":
|
122
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \n \"accounts_uri\":
|
123
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln/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-MR2WWvoF8yVWTAcuxmNZIbln/api_keys\", \n \"id\":
|
127
|
+
\"TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \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:54 GMT
|
133
|
+
- request:
|
134
|
+
method: get
|
135
|
+
uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts?email_address=john.doe%40example.com
|
136
|
+
body:
|
137
|
+
encoding: US-ASCII
|
138
|
+
string: ''
|
139
|
+
headers:
|
140
|
+
User-Agent:
|
141
|
+
- balanced-ruby/0.3.5
|
142
|
+
Authorization:
|
143
|
+
- Basic NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
144
|
+
response:
|
145
|
+
status:
|
146
|
+
code: 200
|
147
|
+
message: !!null
|
148
|
+
headers:
|
149
|
+
content-type:
|
150
|
+
- application/json
|
151
|
+
date:
|
152
|
+
- Fri, 06 Jul 2012 04:23:54 GMT
|
153
|
+
server:
|
154
|
+
- nginx/1.0.14
|
155
|
+
x-balanced-guru:
|
156
|
+
- OHM65ac508ac72211e1a977026ba7e239a9
|
157
|
+
x-balanced-marketplace:
|
158
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
159
|
+
x-balanced-merchant:
|
160
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
161
|
+
x-balanced-version:
|
162
|
+
- ''
|
163
|
+
content-length:
|
164
|
+
- '1638'
|
165
|
+
connection:
|
166
|
+
- Close
|
167
|
+
body:
|
168
|
+
encoding: US-ASCII
|
169
|
+
string: ! "{\n \"first_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts?limit=10&email_address=john.doe%40example.com&offset=0\",
|
170
|
+
\n \"items\": [\n {\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/holds\",
|
171
|
+
\n \"name\": null, \n \"roles\": [\n \"buyer\"\n ],
|
172
|
+
\n \"created_at\": \"2012-07-06T04:23:51.368389Z\", \n \"uri\":
|
173
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3\",
|
174
|
+
\n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/bank_accounts\",
|
175
|
+
\n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/refunds\",
|
176
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/debits\",
|
177
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/transactions\",
|
178
|
+
\n \"email_address\": \"john.doe@example.com\", \n \"id\": \"AC32alTu8zhfsUKg9kZkfrn3\",
|
179
|
+
\n \"credits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/credits\",
|
180
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/cards\"\n
|
181
|
+
\ }\n ], \n \"previous_uri\": null, \n \"uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts?limit=10&email_address=john.doe%40example.com&offset=0\",
|
182
|
+
\n \"limit\": 10, \n \"offset\": 0, \n \"total\": 1, \n \"next_uri\":
|
183
|
+
null, \n \"last_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts?limit=10&email_address=john.doe%40example.com&offset=0\"\n}"
|
184
|
+
http_version: !!null
|
185
|
+
recorded_at: Fri, 06 Jul 2012 04:23:54 GMT
|
186
|
+
recorded_with: VCR 2.2.2
|
@@ -0,0 +1,400 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.balancedpayments.com/v1/api_keys
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- balanced-ruby/0.3.5
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 201
|
17
|
+
message: !!null
|
18
|
+
headers:
|
19
|
+
content-type:
|
20
|
+
- application/json
|
21
|
+
date:
|
22
|
+
- Fri, 06 Jul 2012 04:23:55 GMT
|
23
|
+
server:
|
24
|
+
- nginx/1.0.14
|
25
|
+
x-balanced-guru:
|
26
|
+
- OHM65e3086ec72211e19eae026ba7e5e72e
|
27
|
+
x-balanced-version:
|
28
|
+
- ''
|
29
|
+
content-length:
|
30
|
+
- '854'
|
31
|
+
connection:
|
32
|
+
- Close
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! "{\n \"merchant\": {\n \"phone_number\": \"+16505551212\", \n
|
36
|
+
\ \"city\": \"Nowhere\", \n \"marketplace\": null, \n \"name\": \"William
|
37
|
+
Henry Cavendish III\", \n \"email_address\": \"whc@example.org\", \n \"created_at\":
|
38
|
+
\"2012-07-06T04:23:55.134151Z\", \n \"uri\": \"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa\",
|
39
|
+
\n \"accounts_uri\": \"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa/accounts\",
|
40
|
+
\n \"meta\": {}, \n \"postal_code\": \"90210\", \n \"country_code\":
|
41
|
+
\"USA\", \n \"type\": \"person\", \n \"balance\": 0, \n \"api_keys_uri\":
|
42
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa/api_keys\", \n \"id\": \"TEST-MR36oxV2BZ6BFoehSzWvOSaa\",
|
43
|
+
\n \"street_address\": \"123 Fake St\"\n }, \n \"secret\": \"6623d812c72211e19eae026ba7e5e72e\",
|
44
|
+
\n \"meta\": {}, \n \"created_at\": \"2012-07-06T04:23:55.435922Z\", \n
|
45
|
+
\ \"uri\": \"/v1/api_keys/AK36JCjQBrUDx5Ul4NRoXxXo\", \n \"id\": \"AK36JCjQBrUDx5Ul4NRoXxXo\"\n}"
|
46
|
+
http_version: !!null
|
47
|
+
recorded_at: Fri, 06 Jul 2012 04:23:55 GMT
|
48
|
+
- request:
|
49
|
+
method: post
|
50
|
+
uri: https://api.balancedpayments.com/v1/marketplaces
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: ! '{}'
|
54
|
+
headers:
|
55
|
+
User-Agent:
|
56
|
+
- balanced-ruby/0.3.5
|
57
|
+
Authorization:
|
58
|
+
- Basic NjYyM2Q4MTJjNzIyMTFlMTllYWUwMjZiYTdlNWU3MmU6
|
59
|
+
Content-Type:
|
60
|
+
- application/json
|
61
|
+
response:
|
62
|
+
status:
|
63
|
+
code: 201
|
64
|
+
message: !!null
|
65
|
+
headers:
|
66
|
+
content-type:
|
67
|
+
- application/json
|
68
|
+
date:
|
69
|
+
- Fri, 06 Jul 2012 04:23:56 GMT
|
70
|
+
server:
|
71
|
+
- nginx/1.0.14
|
72
|
+
x-balanced-guru:
|
73
|
+
- OHM6670d748c72211e1b502026ba7e239a9
|
74
|
+
x-balanced-marketplace:
|
75
|
+
- TEST-MP37ipYHIZCJYNVu4hNAgbaN
|
76
|
+
x-balanced-merchant:
|
77
|
+
- TEST-MR36oxV2BZ6BFoehSzWvOSaa
|
78
|
+
x-balanced-version:
|
79
|
+
- ''
|
80
|
+
content-length:
|
81
|
+
- '2080'
|
82
|
+
connection:
|
83
|
+
- Close
|
84
|
+
body:
|
85
|
+
encoding: US-ASCII
|
86
|
+
string: ! "{\n \"support_email_address\": \"support@example.com\", \n \"bank_accounts_uri\":
|
87
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/bank_accounts\", \n \"owner_account\":
|
88
|
+
{\n \"holds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ/holds\",
|
89
|
+
\n \"name\": \"William Henry Cavendish III\", \n \"roles\": [\n \"merchant\",
|
90
|
+
\n \"buyer\"\n ], \n \"created_at\": \"2012-07-06T04:23:56.274036Z\",
|
91
|
+
\n \"uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ\",
|
92
|
+
\n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ/bank_accounts\",
|
93
|
+
\n \"refunds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ/refunds\",
|
94
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ/debits\",
|
95
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ/transactions\",
|
96
|
+
\n \"email_address\": \"whc@example.org\", \n \"id\": \"AC37Gs6XP3gcheHoLnuDaMOJ\",
|
97
|
+
\n \"credits_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ/credits\",
|
98
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ/cards\"\n
|
99
|
+
\ }, \n \"holds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/holds\",
|
100
|
+
\n \"meta\": {}, \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/transactions\",
|
101
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts\",
|
102
|
+
\n \"id\": \"TEST-MP37ipYHIZCJYNVu4hNAgbaN\", \n \"credits_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/credits\",
|
103
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/cards\",
|
104
|
+
\n \"in_escrow\": 0, \n \"domain_url\": \"example.com\", \n \"name\": \"Test
|
105
|
+
Marketplace\", \n \"uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN\",
|
106
|
+
\n \"support_phone_number\": \"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/refunds\",
|
107
|
+
\n \"debits_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/debits\"\n}"
|
108
|
+
http_version: !!null
|
109
|
+
recorded_at: Fri, 06 Jul 2012 04:23:56 GMT
|
110
|
+
- request:
|
111
|
+
method: get
|
112
|
+
uri: https://api.balancedpayments.com/v1/merchants
|
113
|
+
body:
|
114
|
+
encoding: US-ASCII
|
115
|
+
string: ''
|
116
|
+
headers:
|
117
|
+
User-Agent:
|
118
|
+
- balanced-ruby/0.3.5
|
119
|
+
Authorization:
|
120
|
+
- Basic NjYyM2Q4MTJjNzIyMTFlMTllYWUwMjZiYTdlNWU3MmU6
|
121
|
+
response:
|
122
|
+
status:
|
123
|
+
code: 200
|
124
|
+
message: !!null
|
125
|
+
headers:
|
126
|
+
content-type:
|
127
|
+
- application/json
|
128
|
+
date:
|
129
|
+
- Fri, 06 Jul 2012 04:23:57 GMT
|
130
|
+
server:
|
131
|
+
- nginx/1.0.14
|
132
|
+
x-balanced-guru:
|
133
|
+
- OHM67233fd2c72211e1ad0d026ba7e5e72e
|
134
|
+
x-balanced-marketplace:
|
135
|
+
- TEST-MP37ipYHIZCJYNVu4hNAgbaN
|
136
|
+
x-balanced-merchant:
|
137
|
+
- TEST-MR36oxV2BZ6BFoehSzWvOSaa
|
138
|
+
x-balanced-version:
|
139
|
+
- ''
|
140
|
+
content-length:
|
141
|
+
- '2062'
|
142
|
+
connection:
|
143
|
+
- Close
|
144
|
+
body:
|
145
|
+
encoding: US-ASCII
|
146
|
+
string: ! "{\n \"first_uri\": \"/v1/merchants?limit=10&offset=0\", \n \"items\":
|
147
|
+
[\n {\n \"phone_number\": \"+16505551212\", \n \"city\": \"Nowhere\",
|
148
|
+
\n \"marketplace\": {\n \"in_escrow\": 0, \n \"domain_url\":
|
149
|
+
\"example.com\", \n \"name\": \"Test Marketplace\", \n \"owner_account_uri\":
|
150
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ\",
|
151
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
152
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN\", \n \"bank_accounts_uri\":
|
153
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/bank_accounts\", \n \"support_phone_number\":
|
154
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/refunds\",
|
155
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/debits\",
|
156
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/holds\",
|
157
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/transactions\",
|
158
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts\",
|
159
|
+
\n \"id\": \"TEST-MP37ipYHIZCJYNVu4hNAgbaN\", \n \"credits_uri\":
|
160
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/credits\", \n \"cards_uri\":
|
161
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/cards\"\n }, \n \"name\":
|
162
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
163
|
+
\n \"created_at\": \"2012-07-06T04:23:55.134151Z\", \n \"uri\":
|
164
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa\", \n \"accounts_uri\":
|
165
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa/accounts\", \n \"meta\":
|
166
|
+
{}, \n \"postal_code\": \"90210\", \n \"country_code\": \"USA\",
|
167
|
+
\n \"type\": \"person\", \n \"balance\": 0, \n \"api_keys_uri\":
|
168
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa/api_keys\", \n \"id\":
|
169
|
+
\"TEST-MR36oxV2BZ6BFoehSzWvOSaa\", \n \"street_address\": \"123 Fake
|
170
|
+
St\"\n }\n ], \n \"previous_uri\": null, \n \"uri\": \"/v1/merchants?limit=10&offset=0\",
|
171
|
+
\n \"limit\": 10, \n \"offset\": 0, \n \"total\": 1, \n \"next_uri\":
|
172
|
+
null, \n \"last_uri\": \"/v1/merchants?limit=10&offset=0\"\n}"
|
173
|
+
http_version: !!null
|
174
|
+
recorded_at: Fri, 06 Jul 2012 04:23:57 GMT
|
175
|
+
- request:
|
176
|
+
method: get
|
177
|
+
uri: https://api.balancedpayments.com/v1/merchants
|
178
|
+
body:
|
179
|
+
encoding: US-ASCII
|
180
|
+
string: ''
|
181
|
+
headers:
|
182
|
+
User-Agent:
|
183
|
+
- balanced-ruby/0.3.5
|
184
|
+
Authorization:
|
185
|
+
- Basic NjYyM2Q4MTJjNzIyMTFlMTllYWUwMjZiYTdlNWU3MmU6
|
186
|
+
response:
|
187
|
+
status:
|
188
|
+
code: 200
|
189
|
+
message: !!null
|
190
|
+
headers:
|
191
|
+
content-type:
|
192
|
+
- application/json
|
193
|
+
date:
|
194
|
+
- Fri, 06 Jul 2012 04:23:57 GMT
|
195
|
+
server:
|
196
|
+
- nginx/1.0.14
|
197
|
+
x-balanced-guru:
|
198
|
+
- OHM67711824c72211e1a476026ba7e239a9
|
199
|
+
x-balanced-marketplace:
|
200
|
+
- TEST-MP37ipYHIZCJYNVu4hNAgbaN
|
201
|
+
x-balanced-merchant:
|
202
|
+
- TEST-MR36oxV2BZ6BFoehSzWvOSaa
|
203
|
+
x-balanced-version:
|
204
|
+
- ''
|
205
|
+
content-length:
|
206
|
+
- '2062'
|
207
|
+
connection:
|
208
|
+
- Close
|
209
|
+
body:
|
210
|
+
encoding: US-ASCII
|
211
|
+
string: ! "{\n \"first_uri\": \"/v1/merchants?limit=10&offset=0\", \n \"items\":
|
212
|
+
[\n {\n \"phone_number\": \"+16505551212\", \n \"city\": \"Nowhere\",
|
213
|
+
\n \"marketplace\": {\n \"in_escrow\": 0, \n \"domain_url\":
|
214
|
+
\"example.com\", \n \"name\": \"Test Marketplace\", \n \"owner_account_uri\":
|
215
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ\",
|
216
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
217
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN\", \n \"bank_accounts_uri\":
|
218
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/bank_accounts\", \n \"support_phone_number\":
|
219
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/refunds\",
|
220
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/debits\",
|
221
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/holds\",
|
222
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/transactions\",
|
223
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts\",
|
224
|
+
\n \"id\": \"TEST-MP37ipYHIZCJYNVu4hNAgbaN\", \n \"credits_uri\":
|
225
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/credits\", \n \"cards_uri\":
|
226
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/cards\"\n }, \n \"name\":
|
227
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
228
|
+
\n \"created_at\": \"2012-07-06T04:23:55.134151Z\", \n \"uri\":
|
229
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa\", \n \"accounts_uri\":
|
230
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa/accounts\", \n \"meta\":
|
231
|
+
{}, \n \"postal_code\": \"90210\", \n \"country_code\": \"USA\",
|
232
|
+
\n \"type\": \"person\", \n \"balance\": 0, \n \"api_keys_uri\":
|
233
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa/api_keys\", \n \"id\":
|
234
|
+
\"TEST-MR36oxV2BZ6BFoehSzWvOSaa\", \n \"street_address\": \"123 Fake
|
235
|
+
St\"\n }\n ], \n \"previous_uri\": null, \n \"uri\": \"/v1/merchants?limit=10&offset=0\",
|
236
|
+
\n \"limit\": 10, \n \"offset\": 0, \n \"total\": 1, \n \"next_uri\":
|
237
|
+
null, \n \"last_uri\": \"/v1/merchants?limit=10&offset=0\"\n}"
|
238
|
+
http_version: !!null
|
239
|
+
recorded_at: Fri, 06 Jul 2012 04:23:57 GMT
|
240
|
+
- request:
|
241
|
+
method: post
|
242
|
+
uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/cards
|
243
|
+
body:
|
244
|
+
encoding: UTF-8
|
245
|
+
string: ! '{"card_number":"5105105105105100","expiration_month":"12","expiration_year":"2015"}'
|
246
|
+
headers:
|
247
|
+
User-Agent:
|
248
|
+
- balanced-ruby/0.3.5
|
249
|
+
Authorization:
|
250
|
+
- Basic NjYyM2Q4MTJjNzIyMTFlMTllYWUwMjZiYTdlNWU3MmU6
|
251
|
+
Content-Type:
|
252
|
+
- application/json
|
253
|
+
response:
|
254
|
+
status:
|
255
|
+
code: 201
|
256
|
+
message: !!null
|
257
|
+
headers:
|
258
|
+
content-type:
|
259
|
+
- application/json
|
260
|
+
date:
|
261
|
+
- Fri, 06 Jul 2012 04:23:58 GMT
|
262
|
+
server:
|
263
|
+
- nginx/1.0.14
|
264
|
+
x-balanced-guru:
|
265
|
+
- OHM67acd6e8c72211e19eae026ba7e5e72e
|
266
|
+
x-balanced-marketplace:
|
267
|
+
- TEST-MP37ipYHIZCJYNVu4hNAgbaN
|
268
|
+
x-balanced-merchant:
|
269
|
+
- TEST-MR36oxV2BZ6BFoehSzWvOSaa
|
270
|
+
x-balanced-version:
|
271
|
+
- ''
|
272
|
+
content-length:
|
273
|
+
- '383'
|
274
|
+
connection:
|
275
|
+
- Close
|
276
|
+
body:
|
277
|
+
encoding: US-ASCII
|
278
|
+
string: ! "{\n \"card_type\": \"mastercard\", \n \"account\": null, \n \"name\":
|
279
|
+
null, \n \"expiration_year\": 2015, \n \"created_at\": \"2012-07-06T04:23:58.108576Z\",
|
280
|
+
\n \"brand\": \"MasterCard\", \n \"uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/cards/CC39JXMaJEKOxKzX3effXk6O\",
|
281
|
+
\n \"expiration_month\": 12, \n \"is_valid\": true, \n \"meta\": {}, \n
|
282
|
+
\ \"last_four\": 5100, \n \"id\": \"CC39JXMaJEKOxKzX3effXk6O\"\n}"
|
283
|
+
http_version: !!null
|
284
|
+
recorded_at: Fri, 06 Jul 2012 04:23:58 GMT
|
285
|
+
- request:
|
286
|
+
method: get
|
287
|
+
uri: https://api.balancedpayments.com/v1/merchants
|
288
|
+
body:
|
289
|
+
encoding: US-ASCII
|
290
|
+
string: ''
|
291
|
+
headers:
|
292
|
+
User-Agent:
|
293
|
+
- balanced-ruby/0.3.5
|
294
|
+
Authorization:
|
295
|
+
- Basic NjYyM2Q4MTJjNzIyMTFlMTllYWUwMjZiYTdlNWU3MmU6
|
296
|
+
response:
|
297
|
+
status:
|
298
|
+
code: 200
|
299
|
+
message: !!null
|
300
|
+
headers:
|
301
|
+
content-type:
|
302
|
+
- application/json
|
303
|
+
date:
|
304
|
+
- Fri, 06 Jul 2012 04:23:58 GMT
|
305
|
+
server:
|
306
|
+
- nginx/1.0.14
|
307
|
+
x-balanced-guru:
|
308
|
+
- OHM68092330c72211e1a476026ba7e239a9
|
309
|
+
x-balanced-marketplace:
|
310
|
+
- TEST-MP37ipYHIZCJYNVu4hNAgbaN
|
311
|
+
x-balanced-merchant:
|
312
|
+
- TEST-MR36oxV2BZ6BFoehSzWvOSaa
|
313
|
+
x-balanced-version:
|
314
|
+
- ''
|
315
|
+
content-length:
|
316
|
+
- '2062'
|
317
|
+
connection:
|
318
|
+
- Close
|
319
|
+
body:
|
320
|
+
encoding: US-ASCII
|
321
|
+
string: ! "{\n \"first_uri\": \"/v1/merchants?limit=10&offset=0\", \n \"items\":
|
322
|
+
[\n {\n \"phone_number\": \"+16505551212\", \n \"city\": \"Nowhere\",
|
323
|
+
\n \"marketplace\": {\n \"in_escrow\": 0, \n \"domain_url\":
|
324
|
+
\"example.com\", \n \"name\": \"Test Marketplace\", \n \"owner_account_uri\":
|
325
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC37Gs6XP3gcheHoLnuDaMOJ\",
|
326
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
327
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN\", \n \"bank_accounts_uri\":
|
328
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/bank_accounts\", \n \"support_phone_number\":
|
329
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/refunds\",
|
330
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/debits\",
|
331
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/holds\",
|
332
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/transactions\",
|
333
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts\",
|
334
|
+
\n \"id\": \"TEST-MP37ipYHIZCJYNVu4hNAgbaN\", \n \"credits_uri\":
|
335
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/credits\", \n \"cards_uri\":
|
336
|
+
\"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/cards\"\n }, \n \"name\":
|
337
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
338
|
+
\n \"created_at\": \"2012-07-06T04:23:55.134151Z\", \n \"uri\":
|
339
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa\", \n \"accounts_uri\":
|
340
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa/accounts\", \n \"meta\":
|
341
|
+
{}, \n \"postal_code\": \"90210\", \n \"country_code\": \"USA\",
|
342
|
+
\n \"type\": \"person\", \n \"balance\": 0, \n \"api_keys_uri\":
|
343
|
+
\"/v1/merchants/TEST-MR36oxV2BZ6BFoehSzWvOSaa/api_keys\", \n \"id\":
|
344
|
+
\"TEST-MR36oxV2BZ6BFoehSzWvOSaa\", \n \"street_address\": \"123 Fake
|
345
|
+
St\"\n }\n ], \n \"previous_uri\": null, \n \"uri\": \"/v1/merchants?limit=10&offset=0\",
|
346
|
+
\n \"limit\": 10, \n \"offset\": 0, \n \"total\": 1, \n \"next_uri\":
|
347
|
+
null, \n \"last_uri\": \"/v1/merchants?limit=10&offset=0\"\n}"
|
348
|
+
http_version: !!null
|
349
|
+
recorded_at: Fri, 06 Jul 2012 04:23:58 GMT
|
350
|
+
- request:
|
351
|
+
method: post
|
352
|
+
uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts
|
353
|
+
body:
|
354
|
+
encoding: UTF-8
|
355
|
+
string: ! '{"email_address":"john.doe@example.com","card_uri":"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/cards/CC39JXMaJEKOxKzX3effXk6O","name":null,"meta":null}'
|
356
|
+
headers:
|
357
|
+
User-Agent:
|
358
|
+
- balanced-ruby/0.3.5
|
359
|
+
Authorization:
|
360
|
+
- Basic NjYyM2Q4MTJjNzIyMTFlMTllYWUwMjZiYTdlNWU3MmU6
|
361
|
+
Content-Type:
|
362
|
+
- application/json
|
363
|
+
response:
|
364
|
+
status:
|
365
|
+
code: 201
|
366
|
+
message: !!null
|
367
|
+
headers:
|
368
|
+
content-type:
|
369
|
+
- application/json
|
370
|
+
date:
|
371
|
+
- Fri, 06 Jul 2012 04:23:59 GMT
|
372
|
+
server:
|
373
|
+
- nginx/1.0.14
|
374
|
+
x-balanced-guru:
|
375
|
+
- OHM68449938c72211e1a29c026ba7e5e72e
|
376
|
+
x-balanced-marketplace:
|
377
|
+
- TEST-MP37ipYHIZCJYNVu4hNAgbaN
|
378
|
+
x-balanced-merchant:
|
379
|
+
- TEST-MR36oxV2BZ6BFoehSzWvOSaa
|
380
|
+
x-balanced-version:
|
381
|
+
- ''
|
382
|
+
content-length:
|
383
|
+
- '1069'
|
384
|
+
connection:
|
385
|
+
- Close
|
386
|
+
body:
|
387
|
+
encoding: US-ASCII
|
388
|
+
string: ! "{\n \"holds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC3aJPDRPCxqjmnWBW7oIKSy/holds\",
|
389
|
+
\n \"name\": null, \n \"roles\": [\n \"buyer\"\n ], \n \"created_at\":
|
390
|
+
\"2012-07-06T04:23:58.995503Z\", \n \"uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC3aJPDRPCxqjmnWBW7oIKSy\",
|
391
|
+
\n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC3aJPDRPCxqjmnWBW7oIKSy/bank_accounts\",
|
392
|
+
\n \"refunds_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC3aJPDRPCxqjmnWBW7oIKSy/refunds\",
|
393
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC3aJPDRPCxqjmnWBW7oIKSy/debits\",
|
394
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC3aJPDRPCxqjmnWBW7oIKSy/transactions\",
|
395
|
+
\n \"email_address\": \"john.doe@example.com\", \n \"id\": \"AC3aJPDRPCxqjmnWBW7oIKSy\",
|
396
|
+
\n \"credits_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC3aJPDRPCxqjmnWBW7oIKSy/credits\",
|
397
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP37ipYHIZCJYNVu4hNAgbaN/accounts/AC3aJPDRPCxqjmnWBW7oIKSy/cards\"\n}"
|
398
|
+
http_version: !!null
|
399
|
+
recorded_at: Fri, 06 Jul 2012 04:23:59 GMT
|
400
|
+
recorded_with: VCR 2.2.2
|