teamleader 0.10.1 → 0.11.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: 90bc69bc3227cbc5d4a21e060db6c068ec0b2474
4
- data.tar.gz: 3ff560a8a73cf98e9139c714a0b0920dd063004f
3
+ metadata.gz: e1812a72f017715c10acdec4291b8c417c08c2b5
4
+ data.tar.gz: 1590bd248e42db13a3d2dcaf997015f8f57e083e
5
5
  SHA512:
6
- metadata.gz: a6e6d7011a609649036010b64588015e852ff0404f59a04a4e9e3a690bb34bd623d0595e2d320a9183257c83c740a967c881d1c3768b448e84166d20841b6ddf
7
- data.tar.gz: f0d976c5318bd9ffa28a792fa3476d775d89ba375bdb732a4b1a29be697ba5127025cdcc061368cba656016274964938e34e9019b40629387bf0321aa6463a57
6
+ metadata.gz: 0eaefda04b78cffce153ffef5e8e84c88247b2c5e5263262114a90849c4c1cb82bd55a97b1997ffc9bd6c0cb4d2e2246ceb93bbc0eedc2d8703423f8f8f0351c
7
+ data.tar.gz: fb8c365b8bacdf25855234e15acc2041e75ec50ff657a1b0863d79996767b380d9c6b1f2d4bf0970c0923af4bbf081705bf4b65305b15be4c2015193238a0050
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.11.0] - 2018-02-15
5
+ ### Added
6
+ - New methods related to invoices and credit notes: `book_draft_invoice`, `update_invoice`, `update_invoice_comments`, `delete_invoice`, `get_creditnote`, `get_invoices_by_project`, `get_creditnotes_by_project`, `get_invoices_by_deal`, `add_creditnote`
7
+
4
8
  ## [0.10.0] - 2018-01-09
5
9
  ### Added
6
10
  - All methods related to companies: `add_company`, `update_company`, `delete_company`, `get_companies`, `get_company`, `get_business_types`
data/README.md CHANGED
@@ -87,6 +87,9 @@ teamleader.get_creditnotes({:date_from => "01/01/2017", :date_to => "01/05/2017"
87
87
  teamleader.get_bookkeeping_accounts({:sys_department_id => 134})
88
88
  ```
89
89
 
90
+ #### Other supported methods
91
+ `book_draft_invoice`, `update_invoice`, `update_invoice_comments`, `delete_invoice`, `get_creditnote`, `get_invoices_by_project`, `get_creditnotes_by_project`, `get_invoices_by_deal`, `add_creditnote`
92
+
90
93
  ### Products
91
94
 
92
95
  ```ruby
@@ -152,11 +152,37 @@ module Teamleader
152
152
  request "/setInvoicePaymentStatus.php", params
153
153
  end
154
154
 
155
+ def book_draft_invoice(params={})
156
+ raise "invoice_id is required" if params[:invoice_id].nil?
157
+ request "/bookDraftInvoice.php", params
158
+ end
159
+
160
+ def update_invoice(params={})
161
+ raise "invoice_id is required" if params[:invoice_id].nil?
162
+ request "/updateInvoice.php", params
163
+ end
164
+
165
+ def update_invoice_comments(params={})
166
+ raise "invoice_id is required" if params[:invoice_id].nil?
167
+ raise "comments is required" if params[:comments].nil?
168
+ request "/updateInvoiceComments.php", params
169
+ end
170
+
171
+ def delete_invoice(params={})
172
+ raise "invoice_id is required" if params[:invoice_id].nil?
173
+ request "/deleteInvoice.php", params
174
+ end
175
+
155
176
  def get_invoice(params={})
156
177
  raise "invoice_id is required" if params[:invoice_id].nil?
157
178
  request "/getInvoice.php", params
158
179
  end
159
180
 
181
+ def get_creditnote(params={})
182
+ raise "creditnote_id is required" if params[:creditnote_id].nil?
183
+ request "/getCreditnote.php", params
184
+ end
185
+
160
186
  def download_invoice_pdf(params={})
161
187
  raise "invoice_id is required" if params[:invoice_id].nil?
162
188
  request "/downloadInvoicePDF.php", params
@@ -174,6 +200,26 @@ module Teamleader
174
200
  request "/getCreditnotes.php", params
175
201
  end
176
202
 
203
+ def get_invoices_by_project(params={})
204
+ raise "project_id is required" if params[:project_id].nil?
205
+ request "/getInvoicesByProject.php", params
206
+ end
207
+
208
+ def get_creditnotes_by_project(params={})
209
+ raise "project_id is required" if params[:project_id].nil?
210
+ request "/getCreditnotesByProject.php", params
211
+ end
212
+
213
+ def get_invoices_by_deal(params={})
214
+ raise "deal_id is required" if params[:deal_id].nil?
215
+ request "/getInvoicesByDeal.php", params
216
+ end
217
+
218
+ def add_creditnote(params={})
219
+ raise "invoice_id is required" if params[:invoice_id].nil?
220
+ request "/addCreditnote.php", params
221
+ end
222
+
177
223
  def send_invoice(params={})
178
224
  raise "invoice_id is required" if params[:invoice_id].nil?
179
225
  raise "email_to is required" if params[:email_to].nil?
@@ -1,3 +1,3 @@
1
1
  module Teamleader
2
- VERSION = "0.10.1"
2
+ VERSION = "0.11.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.10.1
4
+ version: 0.11.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-09 00:00:00.000000000 Z
11
+ date: 2018-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler