coinsetter 0.0.6 → 0.0.7

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: b74c48d5660d6e3820e3954edc1d8758b5882fbe
4
- data.tar.gz: 8ecf177e0e0477040d4d248b4023ab8d51725132
3
+ metadata.gz: 4e4f21f963b3b6bcc840ce8829ccc9e908183a45
4
+ data.tar.gz: 6a51f4322a133292beea56ecdd5d72196620a4ce
5
5
  SHA512:
6
- metadata.gz: 192dfe5d536ed7ede7274f82d01f622d1480f9c59706a3c2ba7a104526bb2e1ff1e4156ed8889ce717e48f3036298559490aecb2fa764fb43428a52d3016390b
7
- data.tar.gz: 80753585302a31e2d602d69f0fae46ac9a1eb1208e4877e99a24bd4000f8fe5dd24250c7dc82ff07c647afeeb8f1576a327f545a89d11edcb2df2ded2e4a0438
6
+ metadata.gz: b36e788153fd3971e46a3767c8ad318fc18b21924d132872e17feca65dc0e831d8f0dce1df67e5117ca98138f25ca1474e164c33dca78350c748287ade92f156
7
+ data.tar.gz: f7466b937d796ba90fa9ae9707a3b86b327a5b5915bcb1e4e4636991925e8b7af74c06506af7e00b4886098e9905be7e17b0aac89aaeedaf6a08ce3db124874d
@@ -1,3 +1,3 @@
1
1
  module Coinsetter
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/lib/coinsetter.rb CHANGED
@@ -41,8 +41,8 @@ module Coinsetter
41
41
  def self.with_session
42
42
  if client_session.kind_of? ClientSession
43
43
  yield client_session if block_given?
44
- destroy_client_session!
45
44
  else
45
+ destroy_client_session!
46
46
  {error: 'No Client Session available.'}
47
47
  end
48
48
  end
@@ -76,13 +76,26 @@ module Coinsetter
76
76
  accounts.list
77
77
  end
78
78
 
79
- def self.add_order(side='BUY', options={})
80
- with_session do |client_session|
79
+ def self.get_order(order_uuid)
80
+ orders.get(order_uuid)
81
+ end
82
+
83
+ def self.add_order_with_new_session(side='BUY', options={})
84
+ order = with_session do |client_session|
81
85
  params = default_options.merge(options)
82
86
  params.merge!(side: side,
83
87
  customerUuid: client_session.customer_uuid)
84
88
  orders.create(params)
85
89
  end
90
+
91
+ order.kind_of?(Order) ? Coinsetter.get_order(order.uuid) : nil
92
+ end
93
+
94
+ def self.add_order(side='BUY', options={})
95
+ params = default_options.merge(options)
96
+ params.merge!(side: side,
97
+ customerUuid: client_session.customer_uuid)
98
+ orders.create(params)
86
99
  end
87
100
 
88
101
  # Required Order Params
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.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Galaviz