coinsetter 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0549dc7dac8f00511771de0fd1755776352de7ed
4
- data.tar.gz: 6f1a4e13ed46e238685487451dca478332fa1ac5
3
+ metadata.gz: b74c48d5660d6e3820e3954edc1d8758b5882fbe
4
+ data.tar.gz: 8ecf177e0e0477040d4d248b4023ab8d51725132
5
5
  SHA512:
6
- metadata.gz: 574c4c149d396ba13aaf70f9c4a0dc1be0b961e986c6c06639c7b3d40a847b67deb6924d3fd7fe4a34dab2aa2a4fee3093cd487e7e4bf22c1c7d7635c10d8e0c
7
- data.tar.gz: 0c05f54be060c345b691d59be7eabfdb16eca26d0936e74fe703b0b9e60b513420cce9e4b9d832a326bb0ab8c75447711a9059cdd5ce8ad100e19844658ab3f6
6
+ metadata.gz: 192dfe5d536ed7ede7274f82d01f622d1480f9c59706a3c2ba7a104526bb2e1ff1e4156ed8889ce717e48f3036298559490aecb2fa764fb43428a52d3016390b
7
+ data.tar.gz: 80753585302a31e2d602d69f0fae46ac9a1eb1208e4877e99a24bd4000f8fe5dd24250c7dc82ff07c647afeeb8f1576a327f545a89d11edcb2df2ded2e4a0438
@@ -1,6 +1,6 @@
1
1
  module Coinsetter
2
2
  class Collection
3
- attr_accessor :module, :name, :model, :path, :response, :headers, :session_uuid
3
+ attr_accessor :module, :name, :model, :path, :response, :session_uuid
4
4
 
5
5
  def initialize(uuid=nil)
6
6
  self.session_uuid = uuid ? {'coinsetter-client-session-id' => uuid} : {}
@@ -10,10 +10,10 @@ module Coinsetter
10
10
  self.name = split_module.join('/')
11
11
  self.model = self.module.camelize.constantize
12
12
  last = split_module.pop
13
- self.path = [split_module.join('/'), last.camelize(:lower)].join('/')
13
+ self.path = (split_module + [last.camelize(:lower)]).join('/')
14
14
  end
15
15
 
16
- def create(route=path, options={}, headers={})
16
+ def create(options={}, route=path, headers={})
17
17
  headers.merge!(session_uuid)
18
18
  self.response = Coinsetter::Net.post(route, options, headers)
19
19
 
@@ -1,3 +1,3 @@
1
1
  module Coinsetter
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/coinsetter.rb CHANGED
@@ -61,11 +61,11 @@ module Coinsetter
61
61
  end
62
62
 
63
63
  def self.orders(uuid=nil)
64
- Orders.new(uuid)
64
+ Orders.new(uuid || client_session.uuid)
65
65
  end
66
66
 
67
67
  def self.accounts(uuid=nil)
68
- Customer::Accounts.new(uuid)
68
+ Customer::Accounts.new(uuid || client_session.uuid)
69
69
  end
70
70
 
71
71
  def self.list_orders(account_id, view="OPEN")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinsetter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Galaviz