balanced 0.8.2 → 1.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rbenv-version +1 -1
- data/.ruby-version +1 -1
- data/Gemfile +7 -3
- data/README.md +2 -10
- data/Rakefile +4 -18
- data/balanced.gemspec +8 -10
- data/lib/balanced.rb +28 -28
- data/lib/balanced/client.rb +15 -6
- data/lib/balanced/error.rb +21 -12
- data/lib/balanced/pager.rb +66 -25
- data/lib/balanced/resources.rb +18 -17
- data/lib/balanced/resources/api_key.rb +4 -0
- data/lib/balanced/resources/bank_account.rb +26 -75
- data/lib/balanced/resources/callback.rb +2 -0
- data/lib/balanced/resources/card.rb +15 -65
- data/lib/balanced/resources/card_hold.rb +38 -0
- data/lib/balanced/resources/credit.rb +6 -50
- data/lib/balanced/resources/customer.rb +33 -71
- data/lib/balanced/resources/debit.rb +6 -14
- data/lib/balanced/resources/event.rb +6 -0
- data/lib/balanced/resources/funding_instrument.rb +11 -0
- data/lib/balanced/resources/hypermedia.rb +28 -0
- data/lib/balanced/resources/marketplace.rb +5 -203
- data/lib/balanced/resources/order.rb +71 -0
- data/lib/balanced/resources/refund.rb +2 -7
- data/lib/balanced/resources/resource.rb +169 -106
- data/lib/balanced/resources/reversal.rb +2 -8
- data/lib/balanced/resources/transfer.rb +11 -0
- data/lib/balanced/response/balanced_exception_middleware.rb +2 -2
- data/lib/balanced/utils.rb +47 -14
- data/lib/balanced/version.rb +1 -1
- data/scenario.cache +526 -380
- data/scenarios/api_key_create/definition.rb +1 -0
- data/scenarios/api_key_create/request.rb +2 -0
- data/scenarios/api_key_create/ruby.mako +21 -0
- data/scenarios/api_key_delete/definition.rb +1 -0
- data/scenarios/api_key_delete/request.rb +3 -0
- data/scenarios/api_key_delete/ruby.mako +12 -0
- data/scenarios/api_key_list/definition.rb +1 -0
- data/scenarios/api_key_list/request.rb +2 -0
- data/scenarios/api_key_list/ruby.mako +28 -0
- data/scenarios/api_key_show/definition.rb +1 -0
- data/scenarios/api_key_show/request.rb +2 -0
- data/scenarios/api_key_show/ruby.mako +18 -0
- data/scenarios/{customer_add_bank_account → bank_account_associate_to_customer}/definition.rb +0 -0
- data/scenarios/bank_account_associate_to_customer/request.rb +3 -0
- data/scenarios/bank_account_associate_to_customer/ruby.mako +49 -0
- data/scenarios/bank_account_create/definition.rb +1 -1
- data/scenarios/bank_account_create/request.rb +1 -1
- data/scenarios/bank_account_create/ruby.mako +44 -7
- data/scenarios/{credit_create_existing_bank_account → bank_account_credit}/definition.rb +0 -0
- data/scenarios/bank_account_credit/request.rb +3 -0
- data/scenarios/bank_account_credit/ruby.mako +42 -0
- data/scenarios/bank_account_debit/definition.rb +1 -0
- data/scenarios/bank_account_debit/request.rb +5 -0
- data/scenarios/bank_account_debit/ruby.mako +50 -0
- data/scenarios/bank_account_delete/request.rb +1 -1
- data/scenarios/bank_account_delete/ruby.mako +5 -3
- data/scenarios/bank_account_list/ruby.mako +76 -2
- data/scenarios/bank_account_show/definition.rb +1 -1
- data/scenarios/bank_account_show/request.rb +1 -1
- data/scenarios/bank_account_show/ruby.mako +41 -5
- data/scenarios/bank_account_update/definition.rb +1 -0
- data/scenarios/bank_account_update/request.rb +6 -0
- data/scenarios/bank_account_update/ruby.mako +56 -0
- data/scenarios/bank_account_verification_create/request.rb +1 -1
- data/scenarios/bank_account_verification_create/ruby.mako +20 -3
- data/scenarios/bank_account_verification_show/definition.rb +1 -1
- data/scenarios/bank_account_verification_show/request.rb +1 -1
- data/scenarios/bank_account_verification_show/ruby.mako +21 -4
- data/scenarios/bank_account_verification_update/definition.rb +1 -1
- data/scenarios/bank_account_verification_update/request.rb +5 -5
- data/scenarios/bank_account_verification_update/ruby.mako +24 -8
- data/scenarios/callback_create/definition.rb +1 -1
- data/scenarios/callback_create/request.rb +2 -2
- data/scenarios/callback_create/ruby.mako +22 -0
- data/scenarios/callback_delete/definition.rb +1 -1
- data/scenarios/callback_delete/request.rb +2 -2
- data/scenarios/callback_delete/ruby.mako +12 -0
- data/scenarios/callback_list/definition.rb +1 -1
- data/scenarios/callback_list/request.rb +1 -2
- data/scenarios/callback_list/ruby.mako +20 -0
- data/scenarios/callback_show/definition.rb +1 -1
- data/scenarios/callback_show/request.rb +1 -1
- data/scenarios/callback_show/ruby.mako +20 -0
- data/scenarios/{customer_add_card → card_associate_to_customer}/definition.rb +0 -0
- data/scenarios/card_associate_to_customer/request.rb +3 -0
- data/scenarios/card_associate_to_customer/ruby.mako +49 -0
- data/scenarios/card_create/request.rb +1 -2
- data/scenarios/card_create/ruby.mako +44 -7
- data/scenarios/card_debit/definition.rb +1 -0
- data/scenarios/card_debit/request.rb +5 -0
- data/scenarios/card_debit/ruby.mako +49 -0
- data/scenarios/card_delete/request.rb +1 -1
- data/scenarios/card_delete/ruby.mako +5 -3
- data/scenarios/card_hold_capture/definition.rb +1 -0
- data/scenarios/card_hold_capture/request.rb +5 -0
- data/scenarios/card_hold_capture/ruby.mako +49 -0
- data/scenarios/card_hold_create/definition.rb +1 -0
- data/scenarios/card_hold_create/request.rb +5 -0
- data/scenarios/card_hold_create/ruby.mako +38 -0
- data/scenarios/card_hold_list/definition.rb +1 -0
- data/scenarios/card_hold_list/request.rb +2 -0
- data/scenarios/card_hold_list/ruby.mako +60 -0
- data/scenarios/card_hold_show/definition.rb +1 -0
- data/scenarios/card_hold_show/request.rb +2 -0
- data/scenarios/card_hold_show/ruby.mako +36 -0
- data/scenarios/card_hold_update/definition.rb +1 -0
- data/scenarios/card_hold_update/request.rb +7 -0
- data/scenarios/card_hold_update/ruby.mako +42 -0
- data/scenarios/card_hold_void/definition.rb +1 -0
- data/scenarios/card_hold_void/request.rb +3 -0
- data/scenarios/card_hold_void/ruby.mako +36 -0
- data/scenarios/card_list/definition.rb +1 -1
- data/scenarios/card_list/request.rb +1 -1
- data/scenarios/card_list/ruby.mako +78 -5
- data/scenarios/card_show/definition.rb +1 -1
- data/scenarios/card_show/request.rb +1 -1
- data/scenarios/card_show/ruby.mako +42 -4
- data/scenarios/card_update/definition.rb +1 -1
- data/scenarios/card_update/request.rb +1 -1
- data/scenarios/card_update/ruby.mako +45 -4
- data/scenarios/credit_list/request.rb +1 -3
- data/scenarios/credit_list/ruby.mako +34 -4
- data/scenarios/{credit_bank_account_list → credit_list_bank_account}/definition.rb +0 -0
- data/scenarios/credit_list_bank_account/request.rb +3 -0
- data/scenarios/credit_list_bank_account/ruby.mako +13 -0
- data/scenarios/credit_show/definition.rb +1 -1
- data/scenarios/credit_show/request.rb +1 -3
- data/scenarios/credit_show/ruby.mako +35 -5
- data/scenarios/{credit_create_new_bank_account → credit_update}/definition.rb +0 -0
- data/scenarios/credit_update/request.rb +7 -0
- data/scenarios/credit_update/ruby.mako +48 -0
- data/scenarios/customer_create/request.rb +4 -1
- data/scenarios/customer_create/ruby.mako +60 -3
- data/scenarios/customer_delete/request.rb +1 -1
- data/scenarios/customer_delete/ruby.mako +4 -2
- data/scenarios/customer_list/definition.rb +1 -0
- data/scenarios/customer_list/request.rb +2 -0
- data/scenarios/customer_list/ruby.mako +105 -0
- data/scenarios/customer_show/definition.rb +1 -0
- data/scenarios/customer_show/request.rb +2 -0
- data/scenarios/customer_show/ruby.mako +58 -0
- data/scenarios/customer_update/definition.rb +1 -0
- data/scenarios/customer_update/request.rb +7 -0
- data/scenarios/customer_update/ruby.mako +64 -0
- data/scenarios/debit_list/request.rb +1 -3
- data/scenarios/debit_list/ruby.mako +70 -4
- data/scenarios/debit_show/definition.rb +1 -1
- data/scenarios/debit_show/request.rb +1 -1
- data/scenarios/debit_show/ruby.mako +39 -4
- data/scenarios/debit_update/definition.rb +1 -1
- data/scenarios/debit_update/request.rb +1 -1
- data/scenarios/debit_update/ruby.mako +39 -4
- data/scenarios/event_list/definition.rb +1 -1
- data/scenarios/event_list/request.rb +1 -2
- data/scenarios/event_list/ruby.mako +54 -5
- data/scenarios/event_show/definition.rb +1 -1
- data/scenarios/event_show/request.rb +1 -1
- data/scenarios/event_show/ruby.mako +54 -4
- data/scenarios/helpers.rb +29 -2
- data/scenarios/order_create/definition.rb +1 -0
- data/scenarios/order_create/request.rb +5 -0
- data/scenarios/order_create/ruby.mako +46 -0
- data/scenarios/order_list/definition.rb +1 -0
- data/scenarios/order_list/request.rb +2 -0
- data/scenarios/order_list/ruby.mako +42 -0
- data/scenarios/order_show/definition.rb +1 -0
- data/scenarios/order_show/request.rb +2 -0
- data/scenarios/order_show/ruby.mako +44 -0
- data/scenarios/order_update/definition.rb +1 -0
- data/scenarios/order_update/request.rb +7 -0
- data/scenarios/order_update/ruby.mako +50 -0
- data/scenarios/refund_create/definition.rb +1 -1
- data/scenarios/refund_create/request.rb +2 -1
- data/scenarios/refund_create/ruby.mako +33 -5
- data/scenarios/refund_list/request.rb +1 -3
- data/scenarios/refund_list/ruby.mako +30 -4
- data/scenarios/refund_show/definition.rb +1 -1
- data/scenarios/refund_show/request.rb +1 -1
- data/scenarios/refund_show/ruby.mako +32 -4
- data/scenarios/refund_update/definition.rb +1 -1
- data/scenarios/refund_update/request.rb +1 -1
- data/scenarios/refund_update/ruby.mako +32 -4
- data/scenarios/render_mako.rb +59 -4
- data/scenarios/reversal_create/definition.rb +1 -0
- data/scenarios/reversal_create/request.rb +9 -0
- data/scenarios/reversal_create/ruby.mako +45 -0
- data/scenarios/reversal_list/definition.rb +1 -0
- data/scenarios/reversal_list/request.rb +2 -0
- data/scenarios/reversal_list/ruby.mako +36 -0
- data/scenarios/reversal_show/definition.rb +1 -0
- data/scenarios/reversal_show/request.rb +2 -0
- data/scenarios/reversal_show/ruby.mako +37 -0
- data/scenarios/reversal_update/definition.rb +1 -0
- data/scenarios/reversal_update/request.rb +7 -0
- data/scenarios/reversal_update/ruby.mako +44 -0
- data/spec/balanced/error_spec.rb +7 -7
- data/spec/balanced/pager_spec.rb +10 -10
- data/spec/balanced/resources/api_key_spec.rb +6 -35
- data/spec/balanced/resources/bank_account_spec.rb +123 -218
- data/spec/balanced/resources/callback_spec.rb +12 -13
- data/spec/balanced/resources/card_hold_spec.rb +103 -0
- data/spec/balanced/resources/card_spec.rb +101 -27
- data/spec/balanced/resources/credit_spec.rb +69 -35
- data/spec/balanced/resources/customer_spec.rb +91 -271
- data/spec/balanced/resources/debit_spec.rb +95 -0
- data/spec/balanced/resources/marketplace_spec.rb +17 -170
- data/spec/balanced/resources/order_spec.rb +364 -0
- data/spec/balanced/resources/resource_spec.rb +25 -32
- data/spec/balanced_spec.rb +18 -36
- data/spec/client_spec.rb +7 -7
- data/spec/spec_helper.rb +19 -18
- data/spec/utils_spec.rb +5 -5
- metadata +123 -165
- data/examples/bank_account_debits.rb +0 -57
- data/examples/customers.rb +0 -114
- data/examples/events_and_callbacks.rb +0 -81
- data/examples/examples.rb +0 -162
- data/examples/exception_handling.rb +0 -44
- data/lib/balanced/resources/account.rb +0 -179
- data/lib/balanced/resources/hold.rb +0 -61
- data/lib/balanced/resources/invoice.rb +0 -11
- data/lib/balanced/resources/merchant.rb +0 -21
- data/lib/balanced/resources/transaction.rb +0 -17
- data/scenarios/account_add_card/definition.rb +0 -1
- data/scenarios/account_add_card/request.rb +0 -3
- data/scenarios/account_add_card/ruby.mako +0 -11
- data/scenarios/account_capture_hold/definition.rb +0 -1
- data/scenarios/account_capture_hold/request.rb +0 -3
- data/scenarios/account_capture_hold/ruby.mako +0 -11
- data/scenarios/account_create/definition.rb +0 -1
- data/scenarios/account_create/request.rb +0 -2
- data/scenarios/account_create/ruby.mako +0 -10
- data/scenarios/account_create_buyer/definition.rb +0 -1
- data/scenarios/account_create_buyer/request.rb +0 -5
- data/scenarios/account_create_buyer/ruby.mako +0 -13
- data/scenarios/account_create_debit/definition.rb +0 -1
- data/scenarios/account_create_debit/request.rb +0 -3
- data/scenarios/account_create_debit/ruby.mako +0 -11
- data/scenarios/account_create_hold/definition.rb +0 -1
- data/scenarios/account_create_hold/request.rb +0 -3
- data/scenarios/account_create_hold/ruby.mako +0 -11
- data/scenarios/account_create_merchant/definition.rb +0 -1
- data/scenarios/account_create_merchant/request.rb +0 -3
- data/scenarios/account_create_merchant/ruby.mako +0 -11
- data/scenarios/account_underwrite_business/definition.rb +0 -1
- data/scenarios/account_underwrite_business/request.rb +0 -17
- data/scenarios/account_underwrite_business/ruby.mako +0 -37
- data/scenarios/account_underwrite_person/definition.rb +0 -1
- data/scenarios/account_underwrite_person/request.rb +0 -18
- data/scenarios/account_underwrite_person/ruby.mako +0 -31
- data/scenarios/bank_account_find_and_credit/definition.rb +0 -1
- data/scenarios/bank_account_find_and_credit/request.rb +0 -5
- data/scenarios/bank_account_find_and_credit/ruby.mako +0 -13
- data/scenarios/bank_account_find_and_delete/definition.rb +0 -1
- data/scenarios/bank_account_find_and_delete/request.rb +0 -3
- data/scenarios/bank_account_find_and_delete/ruby.mako +0 -10
- data/scenarios/bank_account_invalid_routing_number/definition.rb +0 -1
- data/scenarios/bank_account_invalid_routing_number/request.rb +0 -11
- data/scenarios/bank_account_invalid_routing_number/ruby.mako +0 -16
- data/scenarios/card_invalidate/definition.rb +0 -1
- data/scenarios/card_invalidate/request.rb +0 -3
- data/scenarios/card_invalidate/ruby.mako +0 -10
- data/scenarios/credit_account_list/definition.rb +0 -1
- data/scenarios/credit_account_list/request.rb +0 -3
- data/scenarios/credit_account_list/ruby.mako +0 -10
- data/scenarios/credit_account_merchant_create/definition.rb +0 -1
- data/scenarios/credit_account_merchant_create/request.rb +0 -5
- data/scenarios/credit_account_merchant_create/ruby.mako +0 -12
- data/scenarios/credit_bank_account_list/request.rb +0 -5
- data/scenarios/credit_bank_account_list/ruby.mako +0 -12
- data/scenarios/credit_create_existing_bank_account/request.rb +0 -5
- data/scenarios/credit_create_existing_bank_account/ruby.mako +0 -12
- data/scenarios/credit_create_new_bank_account/request.rb +0 -10
- data/scenarios/credit_create_new_bank_account/ruby.mako +0 -21
- data/scenarios/credit_customer_list/definition.rb +0 -1
- data/scenarios/credit_customer_list/request.rb +0 -4
- data/scenarios/credit_customer_list/ruby.mako +0 -12
- data/scenarios/credit_failed_state/definition.rb +0 -1
- data/scenarios/credit_failed_state/request.rb +0 -10
- data/scenarios/credit_failed_state/ruby.mako +0 -18
- data/scenarios/credit_paid_state/definition.rb +0 -1
- data/scenarios/credit_paid_state/request.rb +0 -11
- data/scenarios/credit_paid_state/ruby.mako +0 -19
- data/scenarios/credit_pending_state/definition.rb +0 -1
- data/scenarios/credit_pending_state/request.rb +0 -9
- data/scenarios/credit_pending_state/ruby.mako +0 -17
- data/scenarios/customer_add_bank_account/request.rb +0 -3
- data/scenarios/customer_add_bank_account/ruby.mako +0 -11
- data/scenarios/customer_add_card/request.rb +0 -3
- data/scenarios/customer_add_card/ruby.mako +0 -11
- data/scenarios/customer_capture_hold/definition.rb +0 -1
- data/scenarios/customer_capture_hold/request.rb +0 -3
- data/scenarios/customer_capture_hold/ruby.mako +0 -0
- data/scenarios/customer_create_debit/definition.rb +0 -1
- data/scenarios/customer_create_debit/request.rb +0 -3
- data/scenarios/customer_create_debit/ruby.mako +0 -11
- data/scenarios/customer_create_hold/definition.rb +0 -1
- data/scenarios/customer_create_hold/request.rb +0 -3
- data/scenarios/customer_create_hold/ruby.mako +0 -11
- data/scenarios/customer_credit/definition.rb +0 -1
- data/scenarios/customer_credit/request.rb +0 -2
- data/scenarios/customer_credit/ruby.mako +0 -8
- data/scenarios/debit_account_list/definition.rb +0 -1
- data/scenarios/debit_account_list/request.rb +0 -3
- data/scenarios/debit_account_list/ruby.mako +0 -10
- data/scenarios/debit_create/definition.rb +0 -1
- data/scenarios/debit_create/request.rb +0 -5
- data/scenarios/debit_create/ruby.mako +0 -15
- data/scenarios/debit_customer_list/definition.rb +0 -1
- data/scenarios/debit_customer_list/request.rb +0 -4
- data/scenarios/debit_customer_list/ruby.mako +0 -12
- data/scenarios/debit_refund/definition.rb +0 -1
- data/scenarios/debit_refund/request.rb +0 -3
- data/scenarios/debit_refund/ruby.mako +0 -10
- data/scenarios/delete.rb +0 -7
- data/scenarios/event_replay/definition.rb +0 -0
- data/scenarios/event_replay/request.rb +0 -1
- data/scenarios/event_replay/ruby.mako +0 -0
- data/scenarios/execute.rb +0 -27
- data/scenarios/hold_account_list/definition.rb +0 -1
- data/scenarios/hold_account_list/request.rb +0 -3
- data/scenarios/hold_account_list/ruby.mako +0 -10
- data/scenarios/hold_capture/definition.rb +0 -1
- data/scenarios/hold_capture/request.rb +0 -5
- data/scenarios/hold_capture/ruby.mako +0 -15
- data/scenarios/hold_create/definition.rb +0 -1
- data/scenarios/hold_create/request.rb +0 -5
- data/scenarios/hold_create/ruby.mako +0 -14
- data/scenarios/hold_customer_list/definition.rb +0 -1
- data/scenarios/hold_customer_list/request.rb +0 -3
- data/scenarios/hold_customer_list/ruby.mako +0 -11
- data/scenarios/hold_list/definition.rb +0 -1
- data/scenarios/hold_list/request.rb +0 -4
- data/scenarios/hold_list/ruby.mako +0 -11
- data/scenarios/hold_show/definition.rb +0 -1
- data/scenarios/hold_show/request.rb +0 -2
- data/scenarios/hold_show/ruby.mako +0 -10
- data/scenarios/hold_update/definition.rb +0 -1
- data/scenarios/hold_update/request.rb +0 -7
- data/scenarios/hold_update/ruby.mako +0 -16
- data/scenarios/hold_void/definition.rb +0 -1
- data/scenarios/hold_void/request.rb +0 -3
- data/scenarios/hold_void/ruby.mako +0 -10
- data/scenarios/refund_account_list/definition.rb +0 -1
- data/scenarios/refund_account_list/request.rb +0 -3
- data/scenarios/refund_account_list/ruby.mako +0 -10
- data/scenarios/refund_customer_list/definition.rb +0 -1
- data/scenarios/refund_customer_list/request.rb +0 -3
- data/scenarios/refund_customer_list/ruby.mako +0 -11
- data/scenarios/render.rb +0 -32
- data/scenarios/render_one.rb +0 -32
- data/spec/balanced/resources/account_spec.rb +0 -636
- data/spec/balanced/resources/hold_spec.rb +0 -48
- data/spec/balanced/resources/merchant_spec.rb +0 -6
- data/spec/scenarios_spec.rb +0 -39
- data/upload_docs.rb +0 -40
@@ -1,39 +1,32 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Balanced::Resource
|
4
|
-
|
5
|
-
|
6
|
-
Balanced::Marketplace.stub(:marketplace_uri) { nil }
|
7
|
-
expect {
|
8
|
-
Balanced::Account.uri
|
9
|
-
}.to raise_error(Balanced::StandardError, "Balanced::Account is nested under a marketplace, which is not created or configured.")
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
describe 'when the marketplace is configured' do
|
14
|
-
it 'returns the resource uri corresponding to the resource name passed in' do
|
15
|
-
Balanced::Marketplace.stub(:marketplace_uri) { '/v1/marketplaces/TEST-MPynogsPWE3xLMnLbEbuM0g' }
|
16
|
-
Balanced::Account.uri.should == '/v1/marketplaces/TEST-MPynogsPWE3xLMnLbEbuM0g/accounts'
|
17
|
-
end
|
3
|
+
describe Balanced::Resource do
|
4
|
+
class ApiKey
|
5
|
+
include Balanced::Resource::ClassMethods
|
18
6
|
end
|
19
|
-
end
|
20
7
|
|
21
|
-
|
22
|
-
|
23
|
-
make_marketplace
|
24
|
-
@account = Balanced::Account.new(:email => 'user@example.com', :name => 'John Doe').save
|
8
|
+
before(:all) do
|
9
|
+
@ak = ApiKey.new
|
25
10
|
end
|
26
11
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
12
|
+
describe 'construct_from_response' do
|
13
|
+
it 'should return an instance of an ApiKey' do
|
14
|
+
@payload = JSON.parse('{
|
15
|
+
"links": {},
|
16
|
+
"api_keys": [
|
17
|
+
{
|
18
|
+
"links": {},
|
19
|
+
"created_at": "2013-08-28T00:00:23.337278Z",
|
20
|
+
"secret": "d611bb800f7411e39f5d026ba7d79bff",
|
21
|
+
"href": "/api_keys/AK6vWygDNdcoQLHKdaHPtJ1B",
|
22
|
+
"meta": {},
|
23
|
+
"id": "AK6vWygDNdcoQLHKdaHPtJ1B"
|
24
|
+
}
|
25
|
+
]
|
26
|
+
}')
|
27
|
+
new_ak = @ak.construct_from_response @payload
|
28
|
+
new_ak.should_not be_nil
|
29
|
+
new_ak.should be_instance_of(Balanced::ApiKey)
|
30
|
+
end
|
38
31
|
end
|
39
|
-
end
|
32
|
+
end
|
data/spec/balanced_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Balanced do
|
4
4
|
describe 'configuring the faraday http adapter' do
|
@@ -14,71 +14,53 @@ describe Balanced do
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
describe
|
17
|
+
describe 'configure', :vcr do
|
18
18
|
before do
|
19
19
|
@api_key = Balanced::ApiKey.new.save
|
20
20
|
|
21
21
|
Balanced.configure @api_key.secret
|
22
22
|
end
|
23
23
|
|
24
|
-
describe
|
25
|
-
describe "merchant" do
|
26
|
-
subject { @api_key.merchant }
|
27
|
-
it { should_not be_nil }
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe "#client" do
|
24
|
+
describe '#client' do
|
32
25
|
subject { Balanced.client }
|
33
26
|
it { should_not be_nil }
|
34
27
|
|
35
|
-
describe
|
28
|
+
describe '#connection' do
|
36
29
|
subject { Balanced.client.conn }
|
37
30
|
it { should_not be_nil }
|
38
31
|
end
|
39
32
|
|
40
|
-
describe
|
33
|
+
describe '#api_key' do
|
41
34
|
subject { Balanced.client.api_key }
|
42
35
|
it { should eql @api_key.secret }
|
43
36
|
end
|
44
37
|
|
45
|
-
describe
|
38
|
+
describe '#url' do
|
46
39
|
subject { Balanced.client.url.to_s }
|
47
|
-
it { should satisfy {|s|
|
48
|
-
|
40
|
+
it { should satisfy { |s|
|
41
|
+
%w(https://api.balancedpayments.com http://localhost:5000).include?(s)
|
42
|
+
} }
|
49
43
|
end
|
50
44
|
end
|
51
45
|
|
52
|
-
describe
|
46
|
+
describe 'reconfigure with new api key', :vcr do
|
53
47
|
before do
|
54
48
|
@new_api_key = Balanced::ApiKey.new.save
|
55
49
|
Balanced.configure @new_api_key.secret
|
56
50
|
end
|
57
51
|
|
58
|
-
describe
|
59
|
-
describe
|
60
|
-
subject { @api_key.merchant }
|
61
|
-
it { should_not be_nil }
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
describe "#client" do
|
66
|
-
describe "#api_key" do
|
52
|
+
describe '#client' do
|
53
|
+
describe '#api_key' do
|
67
54
|
subject { Balanced.client.api_key }
|
68
55
|
it { should_not eql @api_key.secret }
|
69
56
|
it { should eql @new_api_key.secret }
|
70
57
|
end
|
71
58
|
end
|
72
59
|
|
73
|
-
describe
|
74
|
-
describe
|
60
|
+
describe 'new api key' do
|
61
|
+
describe 'secret' do
|
75
62
|
subject { @new_api_key.secret }
|
76
63
|
it { should_not be_nil }
|
77
|
-
|
78
|
-
end
|
79
|
-
describe "merchant", :vcr do
|
80
|
-
subject { @new_api_key.merchant }
|
81
|
-
it { should_not be_nil }
|
82
64
|
end
|
83
65
|
end
|
84
66
|
end
|
@@ -87,18 +69,18 @@ end
|
|
87
69
|
|
88
70
|
describe Balanced, '.from_uri' do
|
89
71
|
it 'returns BankAccount for a bank_accounts collection nested under a marketplace' do
|
90
|
-
Balanced.
|
72
|
+
Balanced.from_href('/v1/marketplaces/123/bank_accounts').should == Balanced::BankAccount
|
91
73
|
end
|
92
74
|
|
93
75
|
it 'returns BankAccount for an individual bank account nested under a marketplace' do
|
94
|
-
Balanced.
|
76
|
+
Balanced.from_href('/v1/marketplaces/123/bank_accounts/456').should == Balanced::BankAccount
|
95
77
|
end
|
96
78
|
|
97
79
|
it 'returns BankAccount for a root-level bank account collection resource' do
|
98
|
-
Balanced.
|
80
|
+
Balanced.from_href('/v1/bank_accounts').should == Balanced::BankAccount
|
99
81
|
end
|
100
82
|
|
101
83
|
it 'returns BankAccount for a root-level bank account individual resource' do
|
102
|
-
Balanced.
|
84
|
+
Balanced.from_href('/v1/bank_accounts/123').should == Balanced::BankAccount
|
103
85
|
end
|
104
86
|
end
|
data/spec/client_spec.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
4
|
-
it
|
5
|
-
client = Balanced::Client.new
|
6
|
-
client.api_key.should eq(
|
7
|
-
client.api_key =
|
8
|
-
client.api_key.should eq(
|
3
|
+
describe 'balanced client' do
|
4
|
+
it 'should allow setting and reading of the api_key' do
|
5
|
+
client = Balanced::Client.new 'miscreant'
|
6
|
+
client.api_key.should eq('miscreant')
|
7
|
+
client.api_key = 'foo'
|
8
|
+
client.api_key.should eq('foo')
|
9
9
|
end
|
10
10
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -3,6 +3,7 @@ require 'bundler/setup'
|
|
3
3
|
require 'balanced'
|
4
4
|
require 'vcr'
|
5
5
|
require 'json'
|
6
|
+
require 'securerandom'
|
6
7
|
|
7
8
|
begin
|
8
9
|
require 'ruby-debug'
|
@@ -15,6 +16,8 @@ VCR.configure do |c|
|
|
15
16
|
c.cassette_library_dir = 'spec/cassettes'
|
16
17
|
c.hook_into :faraday
|
17
18
|
c.configure_rspec_metadata!
|
19
|
+
c.default_cassette_options = {:record => :new_episodes}
|
20
|
+
c.allow_http_connections_when_no_cassette = true
|
18
21
|
end
|
19
22
|
|
20
23
|
# TODO: better way to do this?
|
@@ -29,13 +32,21 @@ if !host.nil? then
|
|
29
32
|
end
|
30
33
|
|
31
34
|
RSpec.configure do |c|
|
35
|
+
c.filter_run_excluding :skip => true
|
32
36
|
c.treat_symbols_as_metadata_keys_with_true_values = true
|
33
37
|
|
34
|
-
# @return [Balanced::Marketplace]
|
35
38
|
def make_marketplace
|
36
|
-
api_key = Balanced::ApiKey.new.save
|
37
|
-
Balanced.configure api_key.secret
|
38
|
-
Balanced::Marketplace.new.save
|
39
|
+
@api_key = Balanced::ApiKey.new.save
|
40
|
+
Balanced.configure @api_key.secret
|
41
|
+
@marketplace = Balanced::Marketplace.new.save
|
42
|
+
@rich_card = Balanced::Card.new(
|
43
|
+
:number => '5105105105105100',
|
44
|
+
:expiration_month => '12',
|
45
|
+
:expiration_year => '2020',
|
46
|
+
:cvv => '123'
|
47
|
+
).save
|
48
|
+
@amount_in_escrow = 15000 * 100
|
49
|
+
@rich_card.debit(:amount => @amount_in_escrow)
|
39
50
|
end
|
40
51
|
|
41
52
|
# @example Use this metadata to create a marketplace in a before block
|
@@ -44,19 +55,9 @@ RSpec.configure do |c|
|
|
44
55
|
# # ...
|
45
56
|
# end
|
46
57
|
# end
|
47
|
-
c.before(:
|
48
|
-
make_marketplace
|
58
|
+
c.before(:all, :marketplace => true) do
|
59
|
+
VCR.use_cassette(:make_marketplace) do
|
60
|
+
make_marketplace
|
61
|
+
end
|
49
62
|
end
|
50
63
|
end
|
51
|
-
|
52
|
-
|
53
|
-
ACCOUNTS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts/
|
54
|
-
MERCHANT_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*/
|
55
|
-
HOLDS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/holds/
|
56
|
-
BANK_ACCOUNTS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/bank_accounts/
|
57
|
-
REFUNDS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/refunds/
|
58
|
-
DEBITS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/debits/
|
59
|
-
TRANSACTIONS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/transactions/
|
60
|
-
CREDITS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/credits/
|
61
|
-
CARDS_URI_REGEX = /\/v1\/marketplaces\/TEST-\w*\/accounts\/\w*\/cards/
|
62
|
-
CUSTOMERS_URI_REGEX = /\/v1\/customers/
|
data/spec/utils_spec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
4
|
-
it
|
5
|
-
result = Balanced::Utils.camelize
|
6
|
-
result.should eq(
|
3
|
+
describe 'the utils module' do
|
4
|
+
it 'should correctly translate underscored names' do
|
5
|
+
result = Balanced::Utils.camelize 'api_key'
|
6
|
+
result.should eq('ApiKey')
|
7
7
|
end
|
8
8
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: balanced
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Balanced
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.8.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.8.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -38,11 +38,23 @@ dependencies:
|
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.9.0
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: addressable
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.3.5
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.3.5
|
55
|
+
description: 'Balanced is the payments platform for marketplaces. '
|
44
56
|
email:
|
45
|
-
-
|
57
|
+
- dev@balancedpayments.com
|
46
58
|
executables: []
|
47
59
|
extensions: []
|
48
60
|
extra_rdoc_files: []
|
@@ -70,85 +82,68 @@ files:
|
|
70
82
|
- doc/balanced_templates/default/onefile/html/layout.erb
|
71
83
|
- doc/balanced_templates/default/onefile/html/setup.rb
|
72
84
|
- doc/balanced_templates/default/tags/html/index.erb
|
73
|
-
- examples/bank_account_debits.rb
|
74
|
-
- examples/customers.rb
|
75
|
-
- examples/events_and_callbacks.rb
|
76
|
-
- examples/examples.rb
|
77
|
-
- examples/exception_handling.rb
|
78
85
|
- lib/balanced.rb
|
79
86
|
- lib/balanced/client.rb
|
80
87
|
- lib/balanced/error.rb
|
81
88
|
- lib/balanced/pager.rb
|
82
89
|
- lib/balanced/resources.rb
|
83
|
-
- lib/balanced/resources/account.rb
|
84
90
|
- lib/balanced/resources/api_key.rb
|
85
91
|
- lib/balanced/resources/bank_account.rb
|
86
92
|
- lib/balanced/resources/callback.rb
|
87
93
|
- lib/balanced/resources/card.rb
|
94
|
+
- lib/balanced/resources/card_hold.rb
|
88
95
|
- lib/balanced/resources/credit.rb
|
89
96
|
- lib/balanced/resources/customer.rb
|
90
97
|
- lib/balanced/resources/debit.rb
|
91
98
|
- lib/balanced/resources/event.rb
|
92
|
-
- lib/balanced/resources/
|
93
|
-
- lib/balanced/resources/
|
99
|
+
- lib/balanced/resources/funding_instrument.rb
|
100
|
+
- lib/balanced/resources/hypermedia.rb
|
94
101
|
- lib/balanced/resources/marketplace.rb
|
95
|
-
- lib/balanced/resources/
|
102
|
+
- lib/balanced/resources/order.rb
|
96
103
|
- lib/balanced/resources/refund.rb
|
97
104
|
- lib/balanced/resources/resource.rb
|
98
105
|
- lib/balanced/resources/reversal.rb
|
99
|
-
- lib/balanced/resources/
|
106
|
+
- lib/balanced/resources/transfer.rb
|
100
107
|
- lib/balanced/response/balanced_exception_middleware.rb
|
101
108
|
- lib/balanced/utils.rb
|
102
109
|
- lib/balanced/version.rb
|
103
110
|
- scenario.cache
|
104
|
-
- scenarios/
|
105
|
-
- scenarios/
|
106
|
-
- scenarios/
|
107
|
-
- scenarios/
|
108
|
-
- scenarios/
|
109
|
-
- scenarios/
|
110
|
-
- scenarios/
|
111
|
-
- scenarios/
|
112
|
-
- scenarios/
|
113
|
-
- scenarios/
|
114
|
-
- scenarios/
|
115
|
-
- scenarios/
|
116
|
-
- scenarios/
|
117
|
-
- scenarios/
|
118
|
-
- scenarios/
|
119
|
-
- scenarios/account_create_hold/definition.rb
|
120
|
-
- scenarios/account_create_hold/request.rb
|
121
|
-
- scenarios/account_create_hold/ruby.mako
|
122
|
-
- scenarios/account_create_merchant/definition.rb
|
123
|
-
- scenarios/account_create_merchant/request.rb
|
124
|
-
- scenarios/account_create_merchant/ruby.mako
|
125
|
-
- scenarios/account_underwrite_business/definition.rb
|
126
|
-
- scenarios/account_underwrite_business/request.rb
|
127
|
-
- scenarios/account_underwrite_business/ruby.mako
|
128
|
-
- scenarios/account_underwrite_person/definition.rb
|
129
|
-
- scenarios/account_underwrite_person/request.rb
|
130
|
-
- scenarios/account_underwrite_person/ruby.mako
|
111
|
+
- scenarios/api_key_create/definition.rb
|
112
|
+
- scenarios/api_key_create/request.rb
|
113
|
+
- scenarios/api_key_create/ruby.mako
|
114
|
+
- scenarios/api_key_delete/definition.rb
|
115
|
+
- scenarios/api_key_delete/request.rb
|
116
|
+
- scenarios/api_key_delete/ruby.mako
|
117
|
+
- scenarios/api_key_list/definition.rb
|
118
|
+
- scenarios/api_key_list/request.rb
|
119
|
+
- scenarios/api_key_list/ruby.mako
|
120
|
+
- scenarios/api_key_show/definition.rb
|
121
|
+
- scenarios/api_key_show/request.rb
|
122
|
+
- scenarios/api_key_show/ruby.mako
|
123
|
+
- scenarios/bank_account_associate_to_customer/definition.rb
|
124
|
+
- scenarios/bank_account_associate_to_customer/request.rb
|
125
|
+
- scenarios/bank_account_associate_to_customer/ruby.mako
|
131
126
|
- scenarios/bank_account_create/definition.rb
|
132
127
|
- scenarios/bank_account_create/request.rb
|
133
128
|
- scenarios/bank_account_create/ruby.mako
|
129
|
+
- scenarios/bank_account_credit/definition.rb
|
130
|
+
- scenarios/bank_account_credit/request.rb
|
131
|
+
- scenarios/bank_account_credit/ruby.mako
|
132
|
+
- scenarios/bank_account_debit/definition.rb
|
133
|
+
- scenarios/bank_account_debit/request.rb
|
134
|
+
- scenarios/bank_account_debit/ruby.mako
|
134
135
|
- scenarios/bank_account_delete/definition.rb
|
135
136
|
- scenarios/bank_account_delete/request.rb
|
136
137
|
- scenarios/bank_account_delete/ruby.mako
|
137
|
-
- scenarios/bank_account_find_and_credit/definition.rb
|
138
|
-
- scenarios/bank_account_find_and_credit/request.rb
|
139
|
-
- scenarios/bank_account_find_and_credit/ruby.mako
|
140
|
-
- scenarios/bank_account_find_and_delete/definition.rb
|
141
|
-
- scenarios/bank_account_find_and_delete/request.rb
|
142
|
-
- scenarios/bank_account_find_and_delete/ruby.mako
|
143
|
-
- scenarios/bank_account_invalid_routing_number/definition.rb
|
144
|
-
- scenarios/bank_account_invalid_routing_number/request.rb
|
145
|
-
- scenarios/bank_account_invalid_routing_number/ruby.mako
|
146
138
|
- scenarios/bank_account_list/definition.rb
|
147
139
|
- scenarios/bank_account_list/request.rb
|
148
140
|
- scenarios/bank_account_list/ruby.mako
|
149
141
|
- scenarios/bank_account_show/definition.rb
|
150
142
|
- scenarios/bank_account_show/request.rb
|
151
143
|
- scenarios/bank_account_show/ruby.mako
|
144
|
+
- scenarios/bank_account_update/definition.rb
|
145
|
+
- scenarios/bank_account_update/request.rb
|
146
|
+
- scenarios/bank_account_update/ruby.mako
|
152
147
|
- scenarios/bank_account_verification_create/definition.rb
|
153
148
|
- scenarios/bank_account_verification_create/request.rb
|
154
149
|
- scenarios/bank_account_verification_create/ruby.mako
|
@@ -170,15 +165,36 @@ files:
|
|
170
165
|
- scenarios/callback_show/definition.rb
|
171
166
|
- scenarios/callback_show/request.rb
|
172
167
|
- scenarios/callback_show/ruby.mako
|
168
|
+
- scenarios/card_associate_to_customer/definition.rb
|
169
|
+
- scenarios/card_associate_to_customer/request.rb
|
170
|
+
- scenarios/card_associate_to_customer/ruby.mako
|
173
171
|
- scenarios/card_create/definition.rb
|
174
172
|
- scenarios/card_create/request.rb
|
175
173
|
- scenarios/card_create/ruby.mako
|
174
|
+
- scenarios/card_debit/definition.rb
|
175
|
+
- scenarios/card_debit/request.rb
|
176
|
+
- scenarios/card_debit/ruby.mako
|
176
177
|
- scenarios/card_delete/definition.rb
|
177
178
|
- scenarios/card_delete/request.rb
|
178
179
|
- scenarios/card_delete/ruby.mako
|
179
|
-
- scenarios/
|
180
|
-
- scenarios/
|
181
|
-
- scenarios/
|
180
|
+
- scenarios/card_hold_capture/definition.rb
|
181
|
+
- scenarios/card_hold_capture/request.rb
|
182
|
+
- scenarios/card_hold_capture/ruby.mako
|
183
|
+
- scenarios/card_hold_create/definition.rb
|
184
|
+
- scenarios/card_hold_create/request.rb
|
185
|
+
- scenarios/card_hold_create/ruby.mako
|
186
|
+
- scenarios/card_hold_list/definition.rb
|
187
|
+
- scenarios/card_hold_list/request.rb
|
188
|
+
- scenarios/card_hold_list/ruby.mako
|
189
|
+
- scenarios/card_hold_show/definition.rb
|
190
|
+
- scenarios/card_hold_show/request.rb
|
191
|
+
- scenarios/card_hold_show/ruby.mako
|
192
|
+
- scenarios/card_hold_update/definition.rb
|
193
|
+
- scenarios/card_hold_update/request.rb
|
194
|
+
- scenarios/card_hold_update/ruby.mako
|
195
|
+
- scenarios/card_hold_void/definition.rb
|
196
|
+
- scenarios/card_hold_void/request.rb
|
197
|
+
- scenarios/card_hold_void/ruby.mako
|
182
198
|
- scenarios/card_list/definition.rb
|
183
199
|
- scenarios/card_list/request.rb
|
184
200
|
- scenarios/card_list/ruby.mako
|
@@ -188,129 +204,64 @@ files:
|
|
188
204
|
- scenarios/card_update/definition.rb
|
189
205
|
- scenarios/card_update/request.rb
|
190
206
|
- scenarios/card_update/ruby.mako
|
191
|
-
- scenarios/credit_account_list/definition.rb
|
192
|
-
- scenarios/credit_account_list/request.rb
|
193
|
-
- scenarios/credit_account_list/ruby.mako
|
194
|
-
- scenarios/credit_account_merchant_create/definition.rb
|
195
|
-
- scenarios/credit_account_merchant_create/request.rb
|
196
|
-
- scenarios/credit_account_merchant_create/ruby.mako
|
197
|
-
- scenarios/credit_bank_account_list/definition.rb
|
198
|
-
- scenarios/credit_bank_account_list/request.rb
|
199
|
-
- scenarios/credit_bank_account_list/ruby.mako
|
200
|
-
- scenarios/credit_create_existing_bank_account/definition.rb
|
201
|
-
- scenarios/credit_create_existing_bank_account/request.rb
|
202
|
-
- scenarios/credit_create_existing_bank_account/ruby.mako
|
203
|
-
- scenarios/credit_create_new_bank_account/definition.rb
|
204
|
-
- scenarios/credit_create_new_bank_account/request.rb
|
205
|
-
- scenarios/credit_create_new_bank_account/ruby.mako
|
206
|
-
- scenarios/credit_customer_list/definition.rb
|
207
|
-
- scenarios/credit_customer_list/request.rb
|
208
|
-
- scenarios/credit_customer_list/ruby.mako
|
209
|
-
- scenarios/credit_failed_state/definition.rb
|
210
|
-
- scenarios/credit_failed_state/request.rb
|
211
|
-
- scenarios/credit_failed_state/ruby.mako
|
212
207
|
- scenarios/credit_list/definition.rb
|
213
208
|
- scenarios/credit_list/request.rb
|
214
209
|
- scenarios/credit_list/ruby.mako
|
215
|
-
- scenarios/
|
216
|
-
- scenarios/
|
217
|
-
- scenarios/
|
218
|
-
- scenarios/credit_pending_state/definition.rb
|
219
|
-
- scenarios/credit_pending_state/request.rb
|
220
|
-
- scenarios/credit_pending_state/ruby.mako
|
210
|
+
- scenarios/credit_list_bank_account/definition.rb
|
211
|
+
- scenarios/credit_list_bank_account/request.rb
|
212
|
+
- scenarios/credit_list_bank_account/ruby.mako
|
221
213
|
- scenarios/credit_show/definition.rb
|
222
214
|
- scenarios/credit_show/request.rb
|
223
215
|
- scenarios/credit_show/ruby.mako
|
224
|
-
- scenarios/
|
225
|
-
- scenarios/
|
226
|
-
- scenarios/
|
227
|
-
- scenarios/customer_add_card/definition.rb
|
228
|
-
- scenarios/customer_add_card/request.rb
|
229
|
-
- scenarios/customer_add_card/ruby.mako
|
230
|
-
- scenarios/customer_capture_hold/definition.rb
|
231
|
-
- scenarios/customer_capture_hold/request.rb
|
232
|
-
- scenarios/customer_capture_hold/ruby.mako
|
216
|
+
- scenarios/credit_update/definition.rb
|
217
|
+
- scenarios/credit_update/request.rb
|
218
|
+
- scenarios/credit_update/ruby.mako
|
233
219
|
- scenarios/customer_create/definition.rb
|
234
220
|
- scenarios/customer_create/request.rb
|
235
221
|
- scenarios/customer_create/ruby.mako
|
236
|
-
- scenarios/customer_create_debit/definition.rb
|
237
|
-
- scenarios/customer_create_debit/request.rb
|
238
|
-
- scenarios/customer_create_debit/ruby.mako
|
239
|
-
- scenarios/customer_create_hold/definition.rb
|
240
|
-
- scenarios/customer_create_hold/request.rb
|
241
|
-
- scenarios/customer_create_hold/ruby.mako
|
242
|
-
- scenarios/customer_credit/definition.rb
|
243
|
-
- scenarios/customer_credit/request.rb
|
244
|
-
- scenarios/customer_credit/ruby.mako
|
245
222
|
- scenarios/customer_delete/definition.rb
|
246
223
|
- scenarios/customer_delete/request.rb
|
247
224
|
- scenarios/customer_delete/ruby.mako
|
248
|
-
- scenarios/
|
249
|
-
- scenarios/
|
250
|
-
- scenarios/
|
251
|
-
- scenarios/
|
252
|
-
- scenarios/
|
253
|
-
- scenarios/
|
254
|
-
- scenarios/
|
255
|
-
- scenarios/
|
256
|
-
- scenarios/
|
225
|
+
- scenarios/customer_list/definition.rb
|
226
|
+
- scenarios/customer_list/request.rb
|
227
|
+
- scenarios/customer_list/ruby.mako
|
228
|
+
- scenarios/customer_show/definition.rb
|
229
|
+
- scenarios/customer_show/request.rb
|
230
|
+
- scenarios/customer_show/ruby.mako
|
231
|
+
- scenarios/customer_update/definition.rb
|
232
|
+
- scenarios/customer_update/request.rb
|
233
|
+
- scenarios/customer_update/ruby.mako
|
257
234
|
- scenarios/debit_list/definition.rb
|
258
235
|
- scenarios/debit_list/request.rb
|
259
236
|
- scenarios/debit_list/ruby.mako
|
260
|
-
- scenarios/debit_refund/definition.rb
|
261
|
-
- scenarios/debit_refund/request.rb
|
262
|
-
- scenarios/debit_refund/ruby.mako
|
263
237
|
- scenarios/debit_show/definition.rb
|
264
238
|
- scenarios/debit_show/request.rb
|
265
239
|
- scenarios/debit_show/ruby.mako
|
266
240
|
- scenarios/debit_update/definition.rb
|
267
241
|
- scenarios/debit_update/request.rb
|
268
242
|
- scenarios/debit_update/ruby.mako
|
269
|
-
- scenarios/delete.rb
|
270
243
|
- scenarios/event_list/definition.rb
|
271
244
|
- scenarios/event_list/request.rb
|
272
245
|
- scenarios/event_list/ruby.mako
|
273
|
-
- scenarios/event_replay/definition.rb
|
274
|
-
- scenarios/event_replay/request.rb
|
275
|
-
- scenarios/event_replay/ruby.mako
|
276
246
|
- scenarios/event_show/definition.rb
|
277
247
|
- scenarios/event_show/request.rb
|
278
248
|
- scenarios/event_show/ruby.mako
|
279
|
-
- scenarios/execute.rb
|
280
249
|
- scenarios/helpers.rb
|
281
|
-
- scenarios/
|
282
|
-
- scenarios/
|
283
|
-
- scenarios/
|
284
|
-
- scenarios/
|
285
|
-
- scenarios/
|
286
|
-
- scenarios/
|
287
|
-
- scenarios/
|
288
|
-
- scenarios/
|
289
|
-
- scenarios/
|
290
|
-
- scenarios/
|
291
|
-
- scenarios/
|
292
|
-
- scenarios/
|
293
|
-
- scenarios/hold_list/definition.rb
|
294
|
-
- scenarios/hold_list/request.rb
|
295
|
-
- scenarios/hold_list/ruby.mako
|
296
|
-
- scenarios/hold_show/definition.rb
|
297
|
-
- scenarios/hold_show/request.rb
|
298
|
-
- scenarios/hold_show/ruby.mako
|
299
|
-
- scenarios/hold_update/definition.rb
|
300
|
-
- scenarios/hold_update/request.rb
|
301
|
-
- scenarios/hold_update/ruby.mako
|
302
|
-
- scenarios/hold_void/definition.rb
|
303
|
-
- scenarios/hold_void/request.rb
|
304
|
-
- scenarios/hold_void/ruby.mako
|
305
|
-
- scenarios/refund_account_list/definition.rb
|
306
|
-
- scenarios/refund_account_list/request.rb
|
307
|
-
- scenarios/refund_account_list/ruby.mako
|
250
|
+
- scenarios/order_create/definition.rb
|
251
|
+
- scenarios/order_create/request.rb
|
252
|
+
- scenarios/order_create/ruby.mako
|
253
|
+
- scenarios/order_list/definition.rb
|
254
|
+
- scenarios/order_list/request.rb
|
255
|
+
- scenarios/order_list/ruby.mako
|
256
|
+
- scenarios/order_show/definition.rb
|
257
|
+
- scenarios/order_show/request.rb
|
258
|
+
- scenarios/order_show/ruby.mako
|
259
|
+
- scenarios/order_update/definition.rb
|
260
|
+
- scenarios/order_update/request.rb
|
261
|
+
- scenarios/order_update/ruby.mako
|
308
262
|
- scenarios/refund_create/definition.rb
|
309
263
|
- scenarios/refund_create/request.rb
|
310
264
|
- scenarios/refund_create/ruby.mako
|
311
|
-
- scenarios/refund_customer_list/definition.rb
|
312
|
-
- scenarios/refund_customer_list/request.rb
|
313
|
-
- scenarios/refund_customer_list/ruby.mako
|
314
265
|
- scenarios/refund_list/definition.rb
|
315
266
|
- scenarios/refund_list/request.rb
|
316
267
|
- scenarios/refund_list/ruby.mako
|
@@ -320,30 +271,38 @@ files:
|
|
320
271
|
- scenarios/refund_update/definition.rb
|
321
272
|
- scenarios/refund_update/request.rb
|
322
273
|
- scenarios/refund_update/ruby.mako
|
323
|
-
- scenarios/render.rb
|
324
274
|
- scenarios/render_mako.rb
|
325
|
-
- scenarios/
|
275
|
+
- scenarios/reversal_create/definition.rb
|
276
|
+
- scenarios/reversal_create/request.rb
|
277
|
+
- scenarios/reversal_create/ruby.mako
|
278
|
+
- scenarios/reversal_list/definition.rb
|
279
|
+
- scenarios/reversal_list/request.rb
|
280
|
+
- scenarios/reversal_list/ruby.mako
|
281
|
+
- scenarios/reversal_show/definition.rb
|
282
|
+
- scenarios/reversal_show/request.rb
|
283
|
+
- scenarios/reversal_show/ruby.mako
|
284
|
+
- scenarios/reversal_update/definition.rb
|
285
|
+
- scenarios/reversal_update/request.rb
|
286
|
+
- scenarios/reversal_update/ruby.mako
|
326
287
|
- spec/balanced/error_spec.rb
|
327
288
|
- spec/balanced/pager_spec.rb
|
328
|
-
- spec/balanced/resources/account_spec.rb
|
329
289
|
- spec/balanced/resources/api_key_spec.rb
|
330
290
|
- spec/balanced/resources/bank_account_spec.rb
|
331
291
|
- spec/balanced/resources/callback_spec.rb
|
292
|
+
- spec/balanced/resources/card_hold_spec.rb
|
332
293
|
- spec/balanced/resources/card_spec.rb
|
333
294
|
- spec/balanced/resources/credit_spec.rb
|
334
295
|
- spec/balanced/resources/customer_spec.rb
|
335
|
-
- spec/balanced/resources/
|
296
|
+
- spec/balanced/resources/debit_spec.rb
|
336
297
|
- spec/balanced/resources/marketplace_spec.rb
|
337
|
-
- spec/balanced/resources/
|
298
|
+
- spec/balanced/resources/order_spec.rb
|
338
299
|
- spec/balanced/resources/resource_spec.rb
|
339
300
|
- spec/balanced/response/balanced_exception_middleware_spec.rb
|
340
301
|
- spec/balanced_spec.rb
|
341
302
|
- spec/client_spec.rb
|
342
|
-
- spec/scenarios_spec.rb
|
343
303
|
- spec/spec_helper.rb
|
344
304
|
- spec/utils_spec.rb
|
345
|
-
|
346
|
-
homepage: https://balancedpayments.com
|
305
|
+
homepage: https://www.balancedpayments.com
|
347
306
|
licenses: []
|
348
307
|
metadata: {}
|
349
308
|
post_install_message:
|
@@ -357,33 +316,32 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
357
316
|
version: '0'
|
358
317
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
359
318
|
requirements:
|
360
|
-
- - '
|
319
|
+
- - '>'
|
361
320
|
- !ruby/object:Gem::Version
|
362
|
-
version:
|
321
|
+
version: 1.3.1
|
363
322
|
requirements: []
|
364
323
|
rubyforge_project:
|
365
324
|
rubygems_version: 2.0.3
|
366
325
|
signing_key:
|
367
326
|
specification_version: 4
|
368
|
-
summary:
|
327
|
+
summary: https://docs.balancedpayments.com/
|
369
328
|
test_files:
|
370
329
|
- spec/balanced/error_spec.rb
|
371
330
|
- spec/balanced/pager_spec.rb
|
372
|
-
- spec/balanced/resources/account_spec.rb
|
373
331
|
- spec/balanced/resources/api_key_spec.rb
|
374
332
|
- spec/balanced/resources/bank_account_spec.rb
|
375
333
|
- spec/balanced/resources/callback_spec.rb
|
334
|
+
- spec/balanced/resources/card_hold_spec.rb
|
376
335
|
- spec/balanced/resources/card_spec.rb
|
377
336
|
- spec/balanced/resources/credit_spec.rb
|
378
337
|
- spec/balanced/resources/customer_spec.rb
|
379
|
-
- spec/balanced/resources/
|
338
|
+
- spec/balanced/resources/debit_spec.rb
|
380
339
|
- spec/balanced/resources/marketplace_spec.rb
|
381
|
-
- spec/balanced/resources/
|
340
|
+
- spec/balanced/resources/order_spec.rb
|
382
341
|
- spec/balanced/resources/resource_spec.rb
|
383
342
|
- spec/balanced/response/balanced_exception_middleware_spec.rb
|
384
343
|
- spec/balanced_spec.rb
|
385
344
|
- spec/client_spec.rb
|
386
|
-
- spec/scenarios_spec.rb
|
387
345
|
- spec/spec_helper.rb
|
388
346
|
- spec/utils_spec.rb
|
389
347
|
has_rdoc:
|