sirportly 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,6 +12,7 @@ require 'sirportly/spql_query'
12
12
  require 'sirportly/data_objects/brand'
13
13
  require 'sirportly/data_objects/customer'
14
14
  require 'sirportly/data_objects/customer_contact_method'
15
+ require 'sirportly/data_objects/custom_field'
15
16
  require 'sirportly/data_objects/department'
16
17
  require 'sirportly/data_objects/escalation_path'
17
18
  require 'sirportly/data_objects/filter'
@@ -26,7 +27,7 @@ require 'sirportly/data_objects/ticket_update'
26
27
  require 'sirportly/data_objects/user'
27
28
 
28
29
  module Sirportly
29
- VERSION = '1.2.0'
30
+ VERSION = '1.2.1'
30
31
 
31
32
  class << self
32
33
 
@@ -67,6 +67,11 @@ module Sirportly
67
67
  SLA.all(self)
68
68
  end
69
69
 
70
+ ## Return all custom fields
71
+ def custom_fields
72
+ CustomField.all(self)
73
+ end
74
+
70
75
  ## Execute an SPQL query and return the SPQLQuery instance
71
76
  def spql(query)
72
77
  SPQLQuery.new(self, query)
@@ -0,0 +1,5 @@
1
+ module Sirportly
2
+ class CustomField < DataObject
3
+ self.collection_path = 'objects/custom_fields'
4
+ end
5
+ end
@@ -52,7 +52,7 @@ module Sirportly
52
52
  when Net::HTTPServiceUnavailable
53
53
  raise Sirportly::Errors::ServiceUnavailable
54
54
  when Net::HTTPForbidden, Net::HTTPUnauthorized
55
- raise Sirportly::Errors::AccessDenied, "Access Denied for '#{Sirportly.token}'"
55
+ raise Sirportly::Errors::AccessDenied, "Access Denied for '#{@client.token}'"
56
56
  when Net::HTTPNotFound
57
57
  json = JSON.parse(http_result.body)
58
58
  raise Sirportly::Errors::NotFound, json['error']
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.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-15 00:00:00.000000000Z
12
+ date: 2012-11-26 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: A Ruby library for interacting with the Sirportly API.
15
15
  email: adam@atechmedia.com
@@ -21,6 +21,7 @@ files:
21
21
  - lib/sirportly/client.rb
22
22
  - lib/sirportly/data_object.rb
23
23
  - lib/sirportly/data_objects/brand.rb
24
+ - lib/sirportly/data_objects/custom_field.rb
24
25
  - lib/sirportly/data_objects/customer.rb
25
26
  - lib/sirportly/data_objects/customer_contact_method.rb
26
27
  - lib/sirportly/data_objects/department.rb