gatecoin 0.2.0 → 0.3.0
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 +4 -4
- data/lib/gatecoin/exceptions.rb +1 -0
- data/lib/gatecoin/gatecoin.rb +20 -0
- data/lib/gatecoin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24a4d48abc6f4da304b42d43e67f543bbb7293dd
|
4
|
+
data.tar.gz: a393825653c8a1b4472b27b782492d204dd18856
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 504f209cbc48d827d5f562c7014bc069a36871d91a9f15b8c29a043b6699cc53790f9334569b0d43f50408a451991b3c306c6d1a298e5722e5c4ad5fd383705d
|
7
|
+
data.tar.gz: ffb8ee2ee15295b0b61a06565be36f10783f607d51184e800f6213721900a1ce3f3affb4958a168cf6cc8106b96ca2d14b26ee821a172e4def28adb38052b09a
|
data/lib/gatecoin/exceptions.rb
CHANGED
data/lib/gatecoin/gatecoin.rb
CHANGED
@@ -71,6 +71,26 @@ module Gatecoin
|
|
71
71
|
addresses['addresses']
|
72
72
|
end
|
73
73
|
|
74
|
+
def withdrawal(currency:, address:, amount:, comment: nil, validation: nil)
|
75
|
+
opts = {
|
76
|
+
AddressName: address,
|
77
|
+
Amount: amount,
|
78
|
+
}
|
79
|
+
|
80
|
+
opts[:Comment] = comment if comment
|
81
|
+
opts[:ValidationCode] = validation if validation
|
82
|
+
|
83
|
+
status = post("/ElectronicWallet/withdrawals/#{currency}", opts)
|
84
|
+
|
85
|
+
if status['responseStatus'] && status['responseStatus']['errorCode']
|
86
|
+
error = status['responseStatus']['message']
|
87
|
+
error ||= status['responseStatus']
|
88
|
+
raise Gatecoin::WithdrawalException.new(error)
|
89
|
+
end
|
90
|
+
|
91
|
+
status
|
92
|
+
end
|
93
|
+
|
74
94
|
private
|
75
95
|
|
76
96
|
def signature(timestamp, verb, content_type, path)
|
data/lib/gatecoin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gatecoin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pablo Fernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|