netki 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/netki/netki.rb +7 -6
- data/lib/netki/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: 1a7751ae647deb4dff59fef801691193a52bec58
|
4
|
+
data.tar.gz: e49e407b3940f6520d0f803d030f25131a804ca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b021b365b8943226acbfef1ab1d5db4c1781e28f798e8f7a517f7939ff0b17122a54a1e4a675b61fc5d201e217dde9c0cb2047eb4cd63f33ce3c0b4f72d2522d
|
7
|
+
data.tar.gz: 49cd38fbf1b58921f827bbb454d70b4248ecad8341be86891bac582df326adf1be82c0d959284103984bb01e71f7fb161aaedeaf23624dd8617692a0a1d202b5
|
data/lib/netki/netki.rb
CHANGED
@@ -117,7 +117,7 @@ module Netki
|
|
117
117
|
|
118
118
|
# Set the address or URI for the given currency for this wallet name
|
119
119
|
def set_currency_address(currency, address)
|
120
|
-
@wallets[currency]
|
120
|
+
@wallets[currency] = { address: address }
|
121
121
|
end
|
122
122
|
|
123
123
|
# Remove a used currency from this wallet name
|
@@ -156,7 +156,7 @@ module Netki
|
|
156
156
|
}
|
157
157
|
|
158
158
|
wn_api_data = {}
|
159
|
-
wn_api_data['wallet_names'] = [wn_data
|
159
|
+
wn_api_data['wallet_names'] = [wn_data]
|
160
160
|
|
161
161
|
if @id
|
162
162
|
wn_data['id'] = @id
|
@@ -167,7 +167,9 @@ module Netki
|
|
167
167
|
|
168
168
|
unless @id
|
169
169
|
response['wallet_names'].each do |wn|
|
170
|
-
if response['success'] &&
|
170
|
+
if (response['success'] &&
|
171
|
+
wn['domain_name'] == @domain_name &&
|
172
|
+
wn['name'] == @name)
|
171
173
|
@id = wn['id']
|
172
174
|
else
|
173
175
|
raise 'Success, but invalid response received!'
|
@@ -182,7 +184,7 @@ module Netki
|
|
182
184
|
raise 'Unable to Delete Object that Does Not Exist Remotely' unless @id
|
183
185
|
|
184
186
|
wn_api_data = {
|
185
|
-
wallet_names: [{domain_name: @domain_name, id: @id}]
|
187
|
+
wallet_names: [ { domain_name: @domain_name, id: @id } ]
|
186
188
|
}
|
187
189
|
|
188
190
|
Netki.process_request(@api_key, @partner_id, "#{@api_url}/v1/partner/walletname", 'DELETE', JSON.dump(wn_api_data))
|
@@ -266,12 +268,11 @@ module Netki
|
|
266
268
|
# Returns a list of Hashes, each containing current status for each domain
|
267
269
|
#
|
268
270
|
def get_domain_status(domain_name=nil)
|
269
|
-
|
270
271
|
uri="#{@api_url}/v1/partner/domain"
|
271
272
|
uri << "/#{domain_name}" unless domain_name.nil?
|
272
273
|
|
273
274
|
response = Netki.process_request(@api_key, @partner_id, uri, method='GET')
|
274
|
-
response['domains']
|
275
|
+
response['domains'] || response
|
275
276
|
end
|
276
277
|
|
277
278
|
##
|
data/lib/netki/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt David
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|