freshdesk-rest 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/freshdesk-rest/client.rb +4 -0
- data/lib/freshdesk-rest/resource/company.rb +38 -0
- data/lib/freshdesk-rest/version.rb +1 -1
- data/lib/freshdesk-rest.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aad4d7b1cecf8c724587cc8dd2eb39b19090d3373c1254af79005be2203301b6
|
4
|
+
data.tar.gz: 51d958a4c0ef8ef68147c37fdf735bbb22ddbed54d209c4c0d8827dd003812c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51e3751e2b249f81377bbf7234128e33bbef047090a1256cecc108d20b20ebfe6ea3db76f7751385fc6bc9da034b19c7630c857c67a7393e6d2e787ce1fe7c4d
|
7
|
+
data.tar.gz: 69d2fac0f2c1f1f44d461c4f73969f7b6d6f98159103e5b2ad41ca8befde7c1710eaeb1927b3dd35178af85582081f76db9ed3141a3b9c0ea12a562836e3881b
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require_relative 'parser'
|
2
|
+
require_relative 'utils'
|
3
|
+
require 'uri'
|
4
|
+
|
5
|
+
module Freshdesk
|
6
|
+
module Rest
|
7
|
+
module Resource
|
8
|
+
class Company
|
9
|
+
include Utils
|
10
|
+
|
11
|
+
def initialize(client:)
|
12
|
+
@client = client
|
13
|
+
@path = '/companies'
|
14
|
+
end
|
15
|
+
|
16
|
+
def list(params: {})
|
17
|
+
Parser.parse(@client.get(path_with_params(@path, params)))
|
18
|
+
end
|
19
|
+
|
20
|
+
def get(id:)
|
21
|
+
Parser.parse(@client.get("#{@path}/#{id}"))
|
22
|
+
end
|
23
|
+
|
24
|
+
def post(data:)
|
25
|
+
Parser.parse(@client.post(@path, data))
|
26
|
+
end
|
27
|
+
|
28
|
+
def put(id:, data:)
|
29
|
+
Parser.parse(@client.put("#{@path}/#{id}", data))
|
30
|
+
end
|
31
|
+
|
32
|
+
def delete(id:)
|
33
|
+
Parser.parse(@client.delete("#{@path}/#{id}"))
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/freshdesk-rest.rb
CHANGED
@@ -3,6 +3,7 @@ require_relative 'freshdesk-rest/factory'
|
|
3
3
|
require_relative 'freshdesk-rest/version'
|
4
4
|
require_relative 'freshdesk-rest/configuration'
|
5
5
|
require_relative 'freshdesk-rest/resource/contact'
|
6
|
+
require_relative 'freshdesk-rest/resource/company'
|
6
7
|
require_relative 'freshdesk-rest/resource/ticket'
|
7
8
|
require_relative 'freshdesk-rest/resource/solutions'
|
8
9
|
require_relative 'freshdesk-rest/resource/solutions/article'
|
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: 2.
|
4
|
+
version: 2.1.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-03-
|
11
|
+
date: 2024-03-20 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
|
@@ -21,6 +21,7 @@ files:
|
|
21
21
|
- lib/freshdesk-rest/client.rb
|
22
22
|
- lib/freshdesk-rest/configuration.rb
|
23
23
|
- lib/freshdesk-rest/factory.rb
|
24
|
+
- lib/freshdesk-rest/resource/company.rb
|
24
25
|
- lib/freshdesk-rest/resource/contact.rb
|
25
26
|
- lib/freshdesk-rest/resource/parser.rb
|
26
27
|
- lib/freshdesk-rest/resource/solutions.rb
|