teamleader 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b90a14273fee7021e5122e2fbf5edd49241f959a
4
- data.tar.gz: 1dafd86c0e74191f36dc026956336dff296b6ecc
3
+ metadata.gz: fe8a0c9461b19848e4ac64e19937c65951435ebd
4
+ data.tar.gz: f469750c1ffb54cfaf5f46eca34ea044e060a0b8
5
5
  SHA512:
6
- metadata.gz: 2caf7127f5b0674d0d9c66cb1fe8078db9910983f44bd55d04c5e7d21be4d42ba3b503a7642b990d3c46500491f7fee7ac0fb9aaad6152d4c3d6ac5420a62c1d
7
- data.tar.gz: 2498b6402671f6b9f590008419cf5970c546c6111b8ee6d6a8dd8d5b2fc2c89975c755945dc019df4e794cc04e3c6284fe7b7cb25275da6c1e34ad41b21b9ab5
6
+ metadata.gz: 17521b7288b35701004fba5da4d20ed068de81088485dde20736308b652ebfbf0f1929daa21a97d55cf718c9c7138030759cec30e8c6684fc0fe4e5763c4ed29
7
+ data.tar.gz: 0a5bcaca3b174db050711cede6f5c78a7915aa7ab082f3a326842a4c0fc00faee9a48dd028deac7835ef99a4168a622512d7d29114e50b7b15ca2dbe033a0969
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [0.16.0] - 2019-05-10
5
+ - New method related to custom fields: `get_custom_fields`, `get_custom_field_info`, `add_custom_field_option`
6
+
4
7
  ## [0.15.0] - 2019-05-09
5
8
  - New method related to credit notes: `download_creditnote_pdf`
6
9
 
@@ -76,4 +79,4 @@ All notable changes to this project will be documented in this file.
76
79
 
77
80
  ## [0.1.0] - 2017-05-11
78
81
  ### Added
79
- - Initial commit
82
+ - Initial commit
data/README.md CHANGED
@@ -191,6 +191,9 @@ teamleader.get_call(call_id: '123456')
191
191
  ### Subscriptions
192
192
  Available methods are: `get_subscriptions`, `get_all_subscriptions`
193
193
 
194
+ ### Custom Fields
195
+ Available methods are: `get_custom_fields`, `get_custom_field_info`, `add_custom_field_option`
196
+
194
197
  ## License
195
198
  The Teamleader GEM is released under the MIT License.
196
199
 
@@ -0,0 +1,18 @@
1
+ module Teamleader
2
+ module CustomFields
3
+ def get_custom_fields(params={})
4
+ required_params(%i[for], params)
5
+ request '/getCustomFields.php', params
6
+ end
7
+
8
+ def get_custom_field_info(params={})
9
+ required_params(%i[custom_field_id], params)
10
+ request '/getCustomFieldInfo.php', params
11
+ end
12
+
13
+ def add_custom_field_option(params={})
14
+ required_params(%i[custom_field_id option_name], params)
15
+ request '/addCustomFieldOption.php', params
16
+ end
17
+ end
18
+ end
@@ -7,6 +7,7 @@ module Teamleader
7
7
  API_BASE_URL = "https://app.teamleader.eu/api"
8
8
 
9
9
  class Api
10
+ include Teamleader::CustomFields
10
11
  include Teamleader::Files
11
12
  include Teamleader::Projects
12
13
  include Teamleader::Calls
@@ -1,3 +1,3 @@
1
1
  module Teamleader
2
- VERSION = "0.15.0"
2
+ VERSION = "0.16.0"
3
3
  end
data/lib/teamleader.rb CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
2
  require File.expand_path(File.join(File.dirname(__FILE__), 'teamleader/api/calls'))
3
+ require File.expand_path(File.join(File.dirname(__FILE__), 'teamleader/api/custom_fields'))
3
4
  require File.expand_path(File.join(File.dirname(__FILE__), 'teamleader/api/files'))
4
5
  require File.expand_path(File.join(File.dirname(__FILE__), 'teamleader/api/projects'))
5
6
  require File.expand_path(File.join(File.dirname(__FILE__), 'teamleader/api'))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamleader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre-Yves Orban
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-09 00:00:00.000000000 Z
11
+ date: 2019-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,6 +114,7 @@ files:
114
114
  - lib/teamleader.rb
115
115
  - lib/teamleader/api.rb
116
116
  - lib/teamleader/api/calls.rb
117
+ - lib/teamleader/api/custom_fields.rb
117
118
  - lib/teamleader/api/files.rb
118
119
  - lib/teamleader/api/projects.rb
119
120
  - lib/teamleader/configuration.rb