balanced 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/CONTRIBUTORS +4 -0
- data/Gemfile +3 -0
- data/Guardfile +7 -0
- data/README.md +31 -2
- data/balanced.gemspec +4 -1
- data/examples/examples.rb +18 -2
- data/lib/balanced.rb +16 -25
- data/lib/balanced/client.rb +16 -39
- data/lib/balanced/resources.rb +13 -241
- data/lib/balanced/resources/account.rb +134 -0
- data/lib/balanced/resources/api_key.rb +18 -0
- data/lib/balanced/resources/bank_account.rb +34 -0
- data/lib/balanced/resources/card.rb +34 -0
- data/lib/balanced/resources/credit.rb +20 -0
- data/lib/balanced/resources/debit.rb +42 -0
- data/lib/balanced/resources/hold.rb +42 -0
- data/lib/balanced/resources/marketplace.rb +77 -0
- data/lib/balanced/resources/merchant.rb +25 -0
- data/lib/balanced/resources/refund.rb +21 -0
- data/lib/balanced/resources/resource.rb +130 -0
- data/lib/balanced/resources/transaction.rb +18 -0
- data/lib/balanced/version.rb +1 -1
- data/spec/balanced/resources/account_spec.rb +422 -0
- data/spec/balanced/resources/api_key_spec.rb +55 -0
- data/spec/balanced/resources/marketplace_spec.rb +97 -0
- data/spec/balanced_spec.rb +73 -12
- data/spec/client_spec.rb +2 -2
- data/spec/spec_helper.rb +24 -0
- data/spec/utils_spec.rb +2 -2
- metadata +85 -7
- data/lib/balanced/base.rb +0 -129
- data/spec/api_key_spec.rb +0 -20
data/spec/api_key_spec.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require "balanced"
|
2
|
-
|
3
|
-
describe "ApiKey Resource" do
|
4
|
-
before(:each) do
|
5
|
-
end
|
6
|
-
|
7
|
-
it "should create my api key and let me access the secret" do
|
8
|
-
key = Balanced::ApiKey.new.save
|
9
|
-
key.should_not eq(nil)
|
10
|
-
# make sure my secret is there.
|
11
|
-
key.secret.should_not eq(nil)
|
12
|
-
end
|
13
|
-
|
14
|
-
it "should construct the merchant sub resource as an instance of Balanced::Merchant" do
|
15
|
-
key = Balanced::ApiKey.new.save
|
16
|
-
(key.merchant.instance_of? Balanced::Merchant).should == true
|
17
|
-
end
|
18
|
-
|
19
|
-
|
20
|
-
end
|