freshdesk-rest 0.1.6 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba7686f61c35d2af5c5a159ca56f00f73db7ad61d28a33d9b6f51eefbd9d723d
4
- data.tar.gz: 280a3208233d78d5c76f3e978f7bc47e54073cd0a58143416b4f2f7437324aa7
3
+ metadata.gz: 7bc6ab83544f21d8c0a6873372dd3b5d80bd003c3fc62ff23e074f040ac414e7
4
+ data.tar.gz: 46e16135cab76d38398d87ae55fb4d21227f82c7b4707c8c1121df242f31943d
5
5
  SHA512:
6
- metadata.gz: 695926399da6be98272a9e5343f16d0707ac067127010f74e7f01861ce0fdfc45a11e4e1b639605c6c0a33d14ba9b9a51d21e83e1e43ab89ba6bcd1ec90ee917
7
- data.tar.gz: '09a21453b83810bc8fac5cee2e0a9ad16cc3acb3311003ddddd65281a3e5aac607e88a6e1a95f33d8a8d8441dc07e02e36b317df8569cb8e488579045410adc1'
6
+ metadata.gz: 466bebf0fed5cf850005336d56c10cda84e406ac91ff9665ac634207000ebd4ade887acdd1de7e77c6cf165968b45876c2f7faa012fe56c736d09ae62ca78aed
7
+ data.tar.gz: cf6539a9fb2a24e453c7dded2b15347b475f01f614d15c83c7e8f9c4923b7f0b6d347a1dfa782e44297ac89d9f71de04d9e7eda28f97082033e7d8b91c76679c
@@ -0,0 +1,43 @@
1
+ require 'rest-client'
2
+ require_relative 'api'
3
+
4
+ module Freshdesk
5
+ module Rest
6
+ class Client
7
+ def initialize(
8
+ api_key: Freshdesk::Rest.configuration.api_key,
9
+ domain: Freshdesk::Rest.configuration.domain
10
+ )
11
+ @api = Freshdesk::Rest::Api.new(
12
+ rest_client: RestClient,
13
+ api_key:,
14
+ domain:
15
+ )
16
+ end
17
+
18
+ def contact_resource
19
+ Freshdesk::Rest::Resource::Contact.new(client: api)
20
+ end
21
+
22
+ def ticket_resource
23
+ Freshdesk::Rest::Resource::Ticket.new(client: api)
24
+ end
25
+
26
+ def solutions_article_resource
27
+ Freshdesk::Rest::Resource::Solutions::Article.new(client: api)
28
+ end
29
+
30
+ def solutions_category_resource
31
+ Freshdesk::Rest::Resource::Solutions::Category.new(client: api)
32
+ end
33
+
34
+ def solutions_folder_resource
35
+ Freshdesk::Rest::Resource::Solutions::Folder.new(client: api)
36
+ end
37
+
38
+ private
39
+
40
+ attr_reader :api
41
+ end
42
+ end
43
+ end
@@ -31,6 +31,16 @@ module Freshdesk
31
31
  def self.solutions_folder_resource
32
32
  Freshdesk::Rest::Resource::Solutions::Folder.new(client: api)
33
33
  end
34
+
35
+ class << self
36
+ extend Gem::Deprecate
37
+ deprecate :api, :none, 2024, 5
38
+ deprecate :contact_resource, "Freshdesk::Rest::Client.new.contact_resource", 2024, 5
39
+ deprecate :ticket_resource, "Freshdesk::Rest::Client.new.ticket_resource", 2024, 5
40
+ deprecate :solutions_article_resource, "Freshdesk::Rest::Client.new.solutions_article_resource", 2024, 5
41
+ deprecate :solutions_category_resource, "Freshdesk::Rest::Client.new.solutions_category_resource", 2024, 5
42
+ deprecate :solutions_folder_resource, "Freshdesk::Rest::Client.new.solutions_folder_resource", 2024, 5
43
+ end
34
44
  end
35
45
  end
36
46
  end
@@ -1,5 +1,5 @@
1
1
  module Freshdesk
2
2
  module Rest
3
- VERSION = '0.1.6'
3
+ VERSION = '2.0.0'
4
4
  end
5
5
  end
@@ -1,3 +1,4 @@
1
+ require_relative 'freshdesk-rest/client'
1
2
  require_relative 'freshdesk-rest/factory'
2
3
  require_relative 'freshdesk-rest/version'
3
4
  require_relative 'freshdesk-rest/configuration'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freshdesk-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Helpling
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-14 00:00:00.000000000 Z
11
+ date: 2024-03-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A ruby gem to interact with Freshdesk REST resources
14
14
  email: tech@helpling.com
@@ -18,6 +18,7 @@ extra_rdoc_files: []
18
18
  files:
19
19
  - lib/freshdesk-rest.rb
20
20
  - lib/freshdesk-rest/api.rb
21
+ - lib/freshdesk-rest/client.rb
21
22
  - lib/freshdesk-rest/configuration.rb
22
23
  - lib/freshdesk-rest/factory.rb
23
24
  - lib/freshdesk-rest/resource/contact.rb
@@ -49,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
50
  - !ruby/object:Gem::Version
50
51
  version: '0'
51
52
  requirements: []
52
- rubygems_version: 3.1.6
53
+ rubygems_version: 3.5.3
53
54
  signing_key:
54
55
  specification_version: 4
55
56
  summary: Freshdesk rest api resource collection