teamleader 0.9.0 → 0.10.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
  SHA1:
3
- metadata.gz: b4b70c24a4102dd812062c6a4e8f7d0d21d33204
4
- data.tar.gz: 4fe7d95a896ae1efe5405871b9c4535a4f8e7966
3
+ metadata.gz: 76fad4a78815592a018fd56de16abf6ef06e9f96
4
+ data.tar.gz: b733581ec2ceee62182499e4bb37b4640e81cd24
5
5
  SHA512:
6
- metadata.gz: 441fad03d36da2088da5729f364e90f3e231d722041a426de1830731d93171498e8e5b726127dc9b9b161163a9c4dd53a7cfae2b36397ecb489b5d4da36638a4
7
- data.tar.gz: e01ac1ab35165b8a476dd31df767114cf0010751213f79fe9ea525ada86f2c378156a98b25e262a3e3668d5d5c95ddd843dfbdcfe160e0a8c6a15be42f515e7a
6
+ metadata.gz: a556517d034ae45471afc20751065cccf49d0b100ffeb0e0d0e4311828f56015117fbd7075ac288cafe0f6289194b395e50ad02b00c0de0b95692bb7cd094a5d
7
+ data.tar.gz: 760dfa498fa7e8534eb08315c9ed7e3bb9db6cc39ce255173a6aa050b5da7556aa5982eee849ab942eee4525e66623302c0a8924b96adaffbf53ed962d7d20b9
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [0.10.0] - 2018-01-09
5
+ ### Added
6
+ - All methods related to companies: `add_company`, `update_company`, `delete_company`, `get_companies`, `get_company`, `get_business_types`
7
+
4
8
  ## [0.9.0] - 2018-01-05
5
9
  ### Added
6
10
  - Some methods related to notes: `add_note`, `get_notes`
@@ -304,6 +304,38 @@ module Teamleader
304
304
  request "/addNote.php", params
305
305
  end
306
306
 
307
+ def add_company(params={})
308
+ raise "name is required" if params[:name].nil?
309
+ request "/addCompany.php", params
310
+ end
311
+
312
+ def update_company(params={})
313
+ raise "company_id is required" if params[:company_id].nil?
314
+ raise "track_changes is required" if params[:track_changes].nil?
315
+ request "/updateCompany.php", params
316
+ end
317
+
318
+ def delete_company(params={})
319
+ raise "company_id is required" if params[:company_id].nil?
320
+ request "/deleteCompany.php", params
321
+ end
322
+
323
+ def get_companies(params={})
324
+ raise "amount is required" if params[:amount].nil?
325
+ raise "pageno is required" if params[:pageno].nil?
326
+ request "/getCompanies.php", params
327
+ end
328
+
329
+ def get_company(params={})
330
+ raise "company_id is required" if params[:company_id].nil?
331
+ request "/getCompany.php", params
332
+ end
333
+
334
+ def get_business_types(params={})
335
+ raise "country is required" if params[:country].nil?
336
+ request "/getBusinessTypes.php", params
337
+ end
338
+
307
339
  private
308
340
  def request(path, data={})
309
341
  headers = {
@@ -1,3 +1,3 @@
1
1
  module Teamleader
2
- VERSION = "0.9.0"
2
+ VERSION = "0.10.0"
3
3
  end
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.9.0
4
+ version: 0.10.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: 2018-01-05 00:00:00.000000000 Z
11
+ date: 2018-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler