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 CHANGED
@@ -27,7 +27,7 @@ require 'sirportly/data_objects/ticket_update'
27
27
  require 'sirportly/data_objects/user'
28
28
 
29
29
  module Sirportly
30
- VERSION = '1.2.2'
30
+ VERSION = '1.2.3'
31
31
 
32
32
  class << self
33
33
 
@@ -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
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sirportly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: