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 +4 -4
- data/lib/coinsetter/collection.rb +3 -3
- data/lib/coinsetter/version.rb +1 -1
- data/lib/coinsetter.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b74c48d5660d6e3820e3954edc1d8758b5882fbe
|
4
|
+
data.tar.gz: 8ecf177e0e0477040d4d248b4023ab8d51725132
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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, :
|
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
|
13
|
+
self.path = (split_module + [last.camelize(:lower)]).join('/')
|
14
14
|
end
|
15
15
|
|
16
|
-
def create(
|
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
|
|
data/lib/coinsetter/version.rb
CHANGED
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")
|