balanced-ach 0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,48 @@
|
|
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:22:47 GMT
|
23
|
+
server:
|
24
|
+
- nginx/1.0.14
|
25
|
+
x-balanced-guru:
|
26
|
+
- OHM3d134f70c72211e1b502026ba7e239a9
|
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:22:46.739152Z\", \n \"uri\": \"/v1/merchants/TEST-MR1Rtz5AG9MqrDVbDK8Sw0dz\",
|
39
|
+
\n \"accounts_uri\": \"/v1/merchants/TEST-MR1Rtz5AG9MqrDVbDK8Sw0dz/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-MR1Rtz5AG9MqrDVbDK8Sw0dz/api_keys\", \n \"id\": \"TEST-MR1Rtz5AG9MqrDVbDK8Sw0dz\",
|
43
|
+
\n \"street_address\": \"123 Fake St\"\n }, \n \"secret\": \"3d568592c72211e1b502026ba7e239a9\",
|
44
|
+
\n \"meta\": {}, \n \"created_at\": \"2012-07-06T04:22:46.975772Z\", \n
|
45
|
+
\ \"uri\": \"/v1/api_keys/AK1RK5HuZAU0NlXUOQ2H3iVX\", \n \"id\": \"AK1RK5HuZAU0NlXUOQ2H3iVX\"\n}"
|
46
|
+
http_version: !!null
|
47
|
+
recorded_at: Fri, 06 Jul 2012 04:22:47 GMT
|
48
|
+
recorded_with: VCR 2.2.2
|
@@ -0,0 +1,110 @@
|
|
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:22:47 GMT
|
23
|
+
server:
|
24
|
+
- nginx/1.0.14
|
25
|
+
x-balanced-guru:
|
26
|
+
- OHM3da31060c72211e1a29c026ba7e5e72e
|
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:22:47.628360Z\", \n \"uri\": \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK\",
|
39
|
+
\n \"accounts_uri\": \"/v1/merchants/TEST-MR1StaiKg1wIPZi4BqZBFKgK/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-MR1StaiKg1wIPZi4BqZBFKgK/api_keys\", \n \"id\": \"TEST-MR1StaiKg1wIPZi4BqZBFKgK\",
|
43
|
+
\n \"street_address\": \"123 Fake St\"\n }, \n \"secret\": \"3ddda900c72211e1a29c026ba7e5e72e\",
|
44
|
+
\n \"meta\": {}, \n \"created_at\": \"2012-07-06T04:22:47.867130Z\", \n
|
45
|
+
\ \"uri\": \"/v1/api_keys/AK1SJQPzeiYW5xNhw6dmMCV8\", \n \"id\": \"AK1SJQPzeiYW5xNhw6dmMCV8\"\n}"
|
46
|
+
http_version: !!null
|
47
|
+
recorded_at: Fri, 06 Jul 2012 04:22:48 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 M2RkZGE5MDBjNzIyMTFlMWEyOWMwMjZiYTdlNWU3MmU6
|
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:22:49 GMT
|
70
|
+
server:
|
71
|
+
- nginx/1.0.14
|
72
|
+
x-balanced-guru:
|
73
|
+
- OHM3e24b5d4c72211e1b502026ba7e239a9
|
74
|
+
x-balanced-marketplace:
|
75
|
+
- TEST-MP1TeztGGOGLPPCo2cLKo6SZ
|
76
|
+
x-balanced-merchant:
|
77
|
+
- TEST-MR1StaiKg1wIPZi4BqZBFKgK
|
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-MP1TeztGGOGLPPCo2cLKo6SZ/bank_accounts\", \n \"owner_account\":
|
88
|
+
{\n \"holds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ/holds\",
|
89
|
+
\n \"name\": \"William Henry Cavendish III\", \n \"roles\": [\n \"merchant\",
|
90
|
+
\n \"buyer\"\n ], \n \"created_at\": \"2012-07-06T04:22:48.651197Z\",
|
91
|
+
\n \"uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ\",
|
92
|
+
\n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ/bank_accounts\",
|
93
|
+
\n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ/refunds\",
|
94
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ/debits\",
|
95
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ/transactions\",
|
96
|
+
\n \"email_address\": \"whc@example.org\", \n \"id\": \"AC1TCUdnBEr1KwYUyKqb91wZ\",
|
97
|
+
\n \"credits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ/credits\",
|
98
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts/AC1TCUdnBEr1KwYUyKqb91wZ/cards\"\n
|
99
|
+
\ }, \n \"holds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/holds\",
|
100
|
+
\n \"meta\": {}, \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/transactions\",
|
101
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/accounts\",
|
102
|
+
\n \"id\": \"TEST-MP1TeztGGOGLPPCo2cLKo6SZ\", \n \"credits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/credits\",
|
103
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/cards\",
|
104
|
+
\n \"in_escrow\": 0, \n \"domain_url\": \"example.com\", \n \"name\": \"Test
|
105
|
+
Marketplace\", \n \"uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ\",
|
106
|
+
\n \"support_phone_number\": \"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/refunds\",
|
107
|
+
\n \"debits_uri\": \"/v1/marketplaces/TEST-MP1TeztGGOGLPPCo2cLKo6SZ/debits\"\n}"
|
108
|
+
http_version: !!null
|
109
|
+
recorded_at: Fri, 06 Jul 2012 04:22:49 GMT
|
110
|
+
recorded_with: VCR 2.2.2
|
@@ -0,0 +1,240 @@
|
|
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:22:50 GMT
|
23
|
+
server:
|
24
|
+
- nginx/1.0.14
|
25
|
+
x-balanced-guru:
|
26
|
+
- OHM3f2b137ec72211e1b502026ba7e239a9
|
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:22:50.179661Z\", \n \"uri\": \"/v1/merchants/TEST-MR1VlsUPIe5CyOnz2P4zK36F\",
|
39
|
+
\n \"accounts_uri\": \"/v1/merchants/TEST-MR1VlsUPIe5CyOnz2P4zK36F/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-MR1VlsUPIe5CyOnz2P4zK36F/api_keys\", \n \"id\": \"TEST-MR1VlsUPIe5CyOnz2P4zK36F\",
|
43
|
+
\n \"street_address\": \"123 Fake St\"\n }, \n \"secret\": \"3f647b1ec72211e1b502026ba7e239a9\",
|
44
|
+
\n \"meta\": {}, \n \"created_at\": \"2012-07-06T04:22:50.422842Z\", \n
|
45
|
+
\ \"uri\": \"/v1/api_keys/AK1VCsECcKwxH7OfVyCM6Owh\", \n \"id\": \"AK1VCsECcKwxH7OfVyCM6Owh\"\n}"
|
46
|
+
http_version: !!null
|
47
|
+
recorded_at: Fri, 06 Jul 2012 04:22:50 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 M2Y2NDdiMWVjNzIyMTFlMWI1MDIwMjZiYTdlMjM5YTk6
|
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:22:51 GMT
|
70
|
+
server:
|
71
|
+
- nginx/1.0.14
|
72
|
+
x-balanced-guru:
|
73
|
+
- OHM3fa5ef2cc72211e1ad0d026ba7e5e72e
|
74
|
+
x-balanced-marketplace:
|
75
|
+
- TEST-MP1W5KGboiC3QmCANtF7RL8q
|
76
|
+
x-balanced-merchant:
|
77
|
+
- TEST-MR1VlsUPIe5CyOnz2P4zK36F
|
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-MP1W5KGboiC3QmCANtF7RL8q/bank_accounts\", \n \"owner_account\":
|
88
|
+
{\n \"holds_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy/holds\",
|
89
|
+
\n \"name\": \"William Henry Cavendish III\", \n \"roles\": [\n \"merchant\",
|
90
|
+
\n \"buyer\"\n ], \n \"created_at\": \"2012-07-06T04:22:51.152697Z\",
|
91
|
+
\n \"uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy\",
|
92
|
+
\n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy/bank_accounts\",
|
93
|
+
\n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy/refunds\",
|
94
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy/debits\",
|
95
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy/transactions\",
|
96
|
+
\n \"email_address\": \"whc@example.org\", \n \"id\": \"AC1WqXqBeNfT38dneX7HcEyy\",
|
97
|
+
\n \"credits_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy/credits\",
|
98
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy/cards\"\n
|
99
|
+
\ }, \n \"holds_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/holds\",
|
100
|
+
\n \"meta\": {}, \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/transactions\",
|
101
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts\",
|
102
|
+
\n \"id\": \"TEST-MP1W5KGboiC3QmCANtF7RL8q\", \n \"credits_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/credits\",
|
103
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/cards\",
|
104
|
+
\n \"in_escrow\": 0, \n \"domain_url\": \"example.com\", \n \"name\": \"Test
|
105
|
+
Marketplace\", \n \"uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q\",
|
106
|
+
\n \"support_phone_number\": \"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/refunds\",
|
107
|
+
\n \"debits_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/debits\"\n}"
|
108
|
+
http_version: !!null
|
109
|
+
recorded_at: Fri, 06 Jul 2012 04:22:52 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 M2Y2NDdiMWVjNzIyMTFlMWI1MDIwMjZiYTdlMjM5YTk6
|
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:22:52 GMT
|
130
|
+
server:
|
131
|
+
- nginx/1.0.14
|
132
|
+
x-balanced-guru:
|
133
|
+
- OHM4079b56ec72211e1a476026ba7e239a9
|
134
|
+
x-balanced-marketplace:
|
135
|
+
- TEST-MP1W5KGboiC3QmCANtF7RL8q
|
136
|
+
x-balanced-merchant:
|
137
|
+
- TEST-MR1VlsUPIe5CyOnz2P4zK36F
|
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-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy\",
|
151
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
152
|
+
\"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q\", \n \"bank_accounts_uri\":
|
153
|
+
\"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/bank_accounts\", \n \"support_phone_number\":
|
154
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/refunds\",
|
155
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/debits\",
|
156
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/holds\",
|
157
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/transactions\",
|
158
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts\",
|
159
|
+
\n \"id\": \"TEST-MP1W5KGboiC3QmCANtF7RL8q\", \n \"credits_uri\":
|
160
|
+
\"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/credits\", \n \"cards_uri\":
|
161
|
+
\"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/cards\"\n }, \n \"name\":
|
162
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
163
|
+
\n \"created_at\": \"2012-07-06T04:22:50.179661Z\", \n \"uri\":
|
164
|
+
\"/v1/merchants/TEST-MR1VlsUPIe5CyOnz2P4zK36F\", \n \"accounts_uri\":
|
165
|
+
\"/v1/merchants/TEST-MR1VlsUPIe5CyOnz2P4zK36F/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-MR1VlsUPIe5CyOnz2P4zK36F/api_keys\", \n \"id\":
|
169
|
+
\"TEST-MR1VlsUPIe5CyOnz2P4zK36F\", \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:22:53 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 M2Y2NDdiMWVjNzIyMTFlMWI1MDIwMjZiYTdlMjM5YTk6
|
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:22:53 GMT
|
195
|
+
server:
|
196
|
+
- nginx/1.0.14
|
197
|
+
x-balanced-guru:
|
198
|
+
- OHM413db57cc72211e19eae026ba7e5e72e
|
199
|
+
x-balanced-marketplace:
|
200
|
+
- TEST-MP1W5KGboiC3QmCANtF7RL8q
|
201
|
+
x-balanced-merchant:
|
202
|
+
- TEST-MR1VlsUPIe5CyOnz2P4zK36F
|
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-MP1W5KGboiC3QmCANtF7RL8q/accounts/AC1WqXqBeNfT38dneX7HcEyy\",
|
216
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
217
|
+
\"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q\", \n \"bank_accounts_uri\":
|
218
|
+
\"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/bank_accounts\", \n \"support_phone_number\":
|
219
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/refunds\",
|
220
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/debits\",
|
221
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/holds\",
|
222
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/transactions\",
|
223
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/accounts\",
|
224
|
+
\n \"id\": \"TEST-MP1W5KGboiC3QmCANtF7RL8q\", \n \"credits_uri\":
|
225
|
+
\"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/credits\", \n \"cards_uri\":
|
226
|
+
\"/v1/marketplaces/TEST-MP1W5KGboiC3QmCANtF7RL8q/cards\"\n }, \n \"name\":
|
227
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
228
|
+
\n \"created_at\": \"2012-07-06T04:22:50.179661Z\", \n \"uri\":
|
229
|
+
\"/v1/merchants/TEST-MR1VlsUPIe5CyOnz2P4zK36F\", \n \"accounts_uri\":
|
230
|
+
\"/v1/merchants/TEST-MR1VlsUPIe5CyOnz2P4zK36F/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-MR1VlsUPIe5CyOnz2P4zK36F/api_keys\", \n \"id\":
|
234
|
+
\"TEST-MR1VlsUPIe5CyOnz2P4zK36F\", \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:22:53 GMT
|
240
|
+
recorded_with: VCR 2.2.2
|
@@ -0,0 +1,44 @@
|
|
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
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 401
|
15
|
+
message: !!null
|
16
|
+
headers:
|
17
|
+
content-type:
|
18
|
+
- application/json
|
19
|
+
date:
|
20
|
+
- Fri, 06 Jul 2012 04:22:49 GMT
|
21
|
+
server:
|
22
|
+
- nginx/1.0.14
|
23
|
+
www-authenticate:
|
24
|
+
- Basic realm="Not permitted to perform index on merchants."
|
25
|
+
x-balanced-guru:
|
26
|
+
- OHM3eb9d970c72211e1a29c026ba7e5e72e
|
27
|
+
x-balanced-version:
|
28
|
+
- ''
|
29
|
+
x-sentry-event:
|
30
|
+
- 7d00e5d9ea334813b9f49f48fcb2568c
|
31
|
+
content-length:
|
32
|
+
- '312'
|
33
|
+
connection:
|
34
|
+
- Close
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! "{\n \"status\": \"Unauthorized\", \n \"category_code\": \"authentication-required\",
|
38
|
+
\n \"category_type\": \"permission\", \n \"description\": \"Not permitted
|
39
|
+
to perform index on merchants. Your request id is OHM3eb9d970c72211e1a29c026ba7e5e72e.\",
|
40
|
+
\n \"request_id\": \"OHM3eb9d970c72211e1a29c026ba7e5e72e\", \n \"status_code\":
|
41
|
+
401\n}"
|
42
|
+
http_version: !!null
|
43
|
+
recorded_at: Fri, 06 Jul 2012 04:22:49 GMT
|
44
|
+
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:47 GMT
|
23
|
+
server:
|
24
|
+
- nginx/1.0.14
|
25
|
+
x-balanced-guru:
|
26
|
+
- OHM60dabd6cc72211e1a476026ba7e239a9
|
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:46.724372Z\", \n \"uri\": \"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln\",
|
39
|
+
\n \"accounts_uri\": \"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln/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-MR2WWvoF8yVWTAcuxmNZIbln/api_keys\", \n \"id\": \"TEST-MR2WWvoF8yVWTAcuxmNZIbln\",
|
43
|
+
\n \"street_address\": \"123 Fake St\"\n }, \n \"secret\": \"6116b5cec72211e1a476026ba7e239a9\",
|
44
|
+
\n \"meta\": {}, \n \"created_at\": \"2012-07-06T04:23:46.955563Z\", \n
|
45
|
+
\ \"uri\": \"/v1/api_keys/AK2XcEDKaD8b37jNhhz0qGed\", \n \"id\": \"AK2XcEDKaD8b37jNhhz0qGed\"\n}"
|
46
|
+
http_version: !!null
|
47
|
+
recorded_at: Fri, 06 Jul 2012 04:23:47 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 NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:48 GMT
|
70
|
+
server:
|
71
|
+
- nginx/1.0.14
|
72
|
+
x-balanced-guru:
|
73
|
+
- OHM615bbafcc72211e1a29c026ba7e5e72e
|
74
|
+
x-balanced-marketplace:
|
75
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
76
|
+
x-balanced-merchant:
|
77
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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-MP2XHCQ3eddHTRwD6bFlHIwC/bank_accounts\", \n \"owner_account\":
|
88
|
+
{\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo/holds\",
|
89
|
+
\n \"name\": \"William Henry Cavendish III\", \n \"roles\": [\n \"merchant\",
|
90
|
+
\n \"buyer\"\n ], \n \"created_at\": \"2012-07-06T04:23:47.752304Z\",
|
91
|
+
\n \"uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo\",
|
92
|
+
\n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo/bank_accounts\",
|
93
|
+
\n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo/refunds\",
|
94
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo/debits\",
|
95
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo/transactions\",
|
96
|
+
\n \"email_address\": \"whc@example.org\", \n \"id\": \"AC2Y5Oq0tVMEhdtT2dWVWRvo\",
|
97
|
+
\n \"credits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo/credits\",
|
98
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo/cards\"\n
|
99
|
+
\ }, \n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/holds\",
|
100
|
+
\n \"meta\": {}, \n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/transactions\",
|
101
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts\",
|
102
|
+
\n \"id\": \"TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"credits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/credits\",
|
103
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards\",
|
104
|
+
\n \"in_escrow\": 0, \n \"domain_url\": \"example.com\", \n \"name\": \"Test
|
105
|
+
Marketplace\", \n \"uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC\",
|
106
|
+
\n \"support_phone_number\": \"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/refunds\",
|
107
|
+
\n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/debits\"\n}"
|
108
|
+
http_version: !!null
|
109
|
+
recorded_at: Fri, 06 Jul 2012 04:23:48 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 NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:48 GMT
|
130
|
+
server:
|
131
|
+
- nginx/1.0.14
|
132
|
+
x-balanced-guru:
|
133
|
+
- OHM6235afc8c72211e1b502026ba7e239a9
|
134
|
+
x-balanced-marketplace:
|
135
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
136
|
+
x-balanced-merchant:
|
137
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo\",
|
151
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
152
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"bank_accounts_uri\":
|
153
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/bank_accounts\", \n \"support_phone_number\":
|
154
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/refunds\",
|
155
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/debits\",
|
156
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/holds\",
|
157
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/transactions\",
|
158
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts\",
|
159
|
+
\n \"id\": \"TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"credits_uri\":
|
160
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/credits\", \n \"cards_uri\":
|
161
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards\"\n }, \n \"name\":
|
162
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
163
|
+
\n \"created_at\": \"2012-07-06T04:23:46.724372Z\", \n \"uri\":
|
164
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \n \"accounts_uri\":
|
165
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln/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-MR2WWvoF8yVWTAcuxmNZIbln/api_keys\", \n \"id\":
|
169
|
+
\"TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \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:49 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 NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:49 GMT
|
195
|
+
server:
|
196
|
+
- nginx/1.0.14
|
197
|
+
x-balanced-guru:
|
198
|
+
- OHM6285cc92c72211e1ad0d026ba7e5e72e
|
199
|
+
x-balanced-marketplace:
|
200
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
201
|
+
x-balanced-merchant:
|
202
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo\",
|
216
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
217
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"bank_accounts_uri\":
|
218
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/bank_accounts\", \n \"support_phone_number\":
|
219
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/refunds\",
|
220
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/debits\",
|
221
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/holds\",
|
222
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/transactions\",
|
223
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts\",
|
224
|
+
\n \"id\": \"TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"credits_uri\":
|
225
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/credits\", \n \"cards_uri\":
|
226
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards\"\n }, \n \"name\":
|
227
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
228
|
+
\n \"created_at\": \"2012-07-06T04:23:46.724372Z\", \n \"uri\":
|
229
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \n \"accounts_uri\":
|
230
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln/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-MR2WWvoF8yVWTAcuxmNZIbln/api_keys\", \n \"id\":
|
234
|
+
\"TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \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:49 GMT
|
240
|
+
- request:
|
241
|
+
method: post
|
242
|
+
uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/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 NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:49 GMT
|
262
|
+
server:
|
263
|
+
- nginx/1.0.14
|
264
|
+
x-balanced-guru:
|
265
|
+
- OHM62cc75acc72211e1a977026ba7e239a9
|
266
|
+
x-balanced-marketplace:
|
267
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
268
|
+
x-balanced-merchant:
|
269
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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:49.938658Z\",
|
280
|
+
\n \"brand\": \"MasterCard\", \n \"uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards/CC30yEIm77ZuGohIkVJbfzGp\",
|
281
|
+
\n \"expiration_month\": 12, \n \"is_valid\": true, \n \"meta\": {}, \n
|
282
|
+
\ \"last_four\": 5100, \n \"id\": \"CC30yEIm77ZuGohIkVJbfzGp\"\n}"
|
283
|
+
http_version: !!null
|
284
|
+
recorded_at: Fri, 06 Jul 2012 04:23:50 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 NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:50 GMT
|
305
|
+
server:
|
306
|
+
- nginx/1.0.14
|
307
|
+
x-balanced-guru:
|
308
|
+
- OHM637a786ec72211e1ad0d026ba7e5e72e
|
309
|
+
x-balanced-marketplace:
|
310
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
311
|
+
x-balanced-merchant:
|
312
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC2Y5Oq0tVMEhdtT2dWVWRvo\",
|
326
|
+
\n \"support_email_address\": \"support@example.com\", \n \"uri\":
|
327
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"bank_accounts_uri\":
|
328
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/bank_accounts\", \n \"support_phone_number\":
|
329
|
+
\"+16505551234\", \n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/refunds\",
|
330
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/debits\",
|
331
|
+
\n \"holds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/holds\",
|
332
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/transactions\",
|
333
|
+
\n \"accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts\",
|
334
|
+
\n \"id\": \"TEST-MP2XHCQ3eddHTRwD6bFlHIwC\", \n \"credits_uri\":
|
335
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/credits\", \n \"cards_uri\":
|
336
|
+
\"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards\"\n }, \n \"name\":
|
337
|
+
\"William Henry Cavendish III\", \n \"email_address\": \"whc@example.org\",
|
338
|
+
\n \"created_at\": \"2012-07-06T04:23:46.724372Z\", \n \"uri\":
|
339
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \n \"accounts_uri\":
|
340
|
+
\"/v1/merchants/TEST-MR2WWvoF8yVWTAcuxmNZIbln/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-MR2WWvoF8yVWTAcuxmNZIbln/api_keys\", \n \"id\":
|
344
|
+
\"TEST-MR2WWvoF8yVWTAcuxmNZIbln\", \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:51 GMT
|
350
|
+
- request:
|
351
|
+
method: post
|
352
|
+
uri: https://api.balancedpayments.com/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts
|
353
|
+
body:
|
354
|
+
encoding: UTF-8
|
355
|
+
string: ! '{"email_address":"john.doe@example.com","card_uri":"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/cards/CC30yEIm77ZuGohIkVJbfzGp","name":null,"meta":null}'
|
356
|
+
headers:
|
357
|
+
User-Agent:
|
358
|
+
- balanced-ruby/0.3.5
|
359
|
+
Authorization:
|
360
|
+
- Basic NjExNmI1Y2VjNzIyMTFlMWE0NzYwMjZiYTdlMjM5YTk6
|
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:51 GMT
|
372
|
+
server:
|
373
|
+
- nginx/1.0.14
|
374
|
+
x-balanced-guru:
|
375
|
+
- OHM63b917f4c72211e1a977026ba7e239a9
|
376
|
+
x-balanced-marketplace:
|
377
|
+
- TEST-MP2XHCQ3eddHTRwD6bFlHIwC
|
378
|
+
x-balanced-merchant:
|
379
|
+
- TEST-MR2WWvoF8yVWTAcuxmNZIbln
|
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-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/holds\",
|
389
|
+
\n \"name\": null, \n \"roles\": [\n \"buyer\"\n ], \n \"created_at\":
|
390
|
+
\"2012-07-06T04:23:51.368389Z\", \n \"uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3\",
|
391
|
+
\n \"bank_accounts_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/bank_accounts\",
|
392
|
+
\n \"refunds_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/refunds\",
|
393
|
+
\n \"meta\": {}, \n \"debits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/debits\",
|
394
|
+
\n \"transactions_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/transactions\",
|
395
|
+
\n \"email_address\": \"john.doe@example.com\", \n \"id\": \"AC32alTu8zhfsUKg9kZkfrn3\",
|
396
|
+
\n \"credits_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/credits\",
|
397
|
+
\n \"cards_uri\": \"/v1/marketplaces/TEST-MP2XHCQ3eddHTRwD6bFlHIwC/accounts/AC32alTu8zhfsUKg9kZkfrn3/cards\"\n}"
|
398
|
+
http_version: !!null
|
399
|
+
recorded_at: Fri, 06 Jul 2012 04:23:52 GMT
|
400
|
+
recorded_with: VCR 2.2.2
|