coinjar 1.0.0.alpha.4 → 1.0.0.beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 349ea541aa457db0f47a4e1fb09f7859020b0ca8
4
- data.tar.gz: b880533bb371bab05025032241e1c3d0480de22d
3
+ metadata.gz: 107d9840af1adabeda08f2c87f037daaf5aceb58
4
+ data.tar.gz: 155b21ed2e6b51fdb3227d3c5b305019f5b87337
5
5
  SHA512:
6
- metadata.gz: c98263942dd80a189418d0047a1279268a34d06fbbf92ed72401ecb332ced994a6b3db56e21b8d2b45f50eb3a0714f446d404003aae1ea31de80c184ff881f36
7
- data.tar.gz: 32296020af2cbcb5f0ebd5b38f5f2b9332ae65d1a91e70b68c847ac216c6c8e575a43bed42b2cab06a46600d4e375a3d4cd2e6cbbeafa6a317a00a8a9381a3af
6
+ metadata.gz: 39e6a2cac54386db36e465dba5925595442c1a6ca137de4f8bb6c378d2e53d06ef3f2f6ba9427fa09060845c823d27ac09bf9d8e4eb485ea3348f1f2c3886201
7
+ data.tar.gz: 32709ae402299ada5359de56ff246fdc4d078d91a2d29d76085fea5a792c0cd135b2181143292f8e254bc67ad082699114bf557a50408fee7021b7a0c5f41065
data/lib/coinjar.rb CHANGED
@@ -9,6 +9,7 @@ require 'coinjar/address'
9
9
  require 'coinjar/payment'
10
10
  require 'coinjar/transaction'
11
11
  require 'coinjar/fair_rate'
12
+ require 'coinjar/account'
12
13
 
13
14
  module CoinJar
14
15
  extend Configuration
@@ -0,0 +1,23 @@
1
+ module CoinJar
2
+ class Account
3
+
4
+ class << self
5
+ def info
6
+ CoinJar.client.get("account")[:user]
7
+ end
8
+
9
+ def balance
10
+ info
11
+ end
12
+
13
+ def available_balance
14
+ balance[:available_balance]
15
+ end
16
+
17
+ def unconfirmed_balance
18
+ balance[:unconfirmed_balance]
19
+ end
20
+ end
21
+
22
+ end
23
+ end
@@ -8,8 +8,8 @@ module CoinJar
8
8
  end
9
9
 
10
10
  def fetch
11
- CoinJar.client.get("transactions/" + uuid)[:transaction]
12
- self.reset(response[:transaction])
11
+ response = CoinJar.client.get("transactions/" + uuid)[:transaction]
12
+ self.reset(response)
13
13
  self
14
14
  end
15
15
 
@@ -1,3 +1,3 @@
1
1
  module CoinJar
2
- VERSION = "1.0.0.alpha.4"
2
+ VERSION = "1.0.0.beta"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinjar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.4
4
+ version: 1.0.0.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - CoinJar Pty Ltd
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-06-19 00:00:00.000000000 Z
13
+ date: 2013-07-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -96,6 +96,7 @@ files:
96
96
  - Rakefile
97
97
  - coinjar.gemspec
98
98
  - lib/coinjar.rb
99
+ - lib/coinjar/account.rb
99
100
  - lib/coinjar/address.rb
100
101
  - lib/coinjar/client.rb
101
102
  - lib/coinjar/configuration.rb