sirportly 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sirportly.rb +1 -1
- data/lib/sirportly/client.rb +8 -0
- data/lib/sirportly/request.rb +1 -0
- metadata +1 -1
data/lib/sirportly.rb
CHANGED
data/lib/sirportly/client.rb
CHANGED
@@ -117,5 +117,13 @@ module Sirportly
|
|
117
117
|
User.create(self, params)
|
118
118
|
end
|
119
119
|
|
120
|
+
## Enable or disable ticket mode for the token's account
|
121
|
+
def import_mode(status = nil)
|
122
|
+
hash = {}
|
123
|
+
hash[:status] = (status ? 'enabled' : 'disabled') unless status.nil?
|
124
|
+
response = Request.request(self, 'accounts/import_mode', hash)
|
125
|
+
response.is_a?(Hash) ? response['status'] : nil
|
126
|
+
end
|
127
|
+
|
120
128
|
end
|
121
129
|
end
|
data/lib/sirportly/request.rb
CHANGED
@@ -53,6 +53,7 @@ module Sirportly
|
|
53
53
|
when Net::HTTPServiceUnavailable
|
54
54
|
raise Sirportly::Errors::ServiceUnavailable
|
55
55
|
when Net::HTTPForbidden, Net::HTTPUnauthorized
|
56
|
+
puts http_result.body.inspect
|
56
57
|
raise Sirportly::Errors::AccessDenied, "Access Denied for '#{@client.token}'"
|
57
58
|
when Net::HTTPNotFound
|
58
59
|
json = JSON.parse(http_result.body)
|