Module: Invoicexpress::Client::Charts
- Included in:
- Invoicexpress::Client
- Defined in:
- lib/invoicexpress/client/charts.rb
Instance Method Summary collapse
-
#invoicing_chart(options = {}) ⇒ Array<Invoicexpress::Models::Chart>
Returns the invoicing chart data.
-
#quarterly_results(year = Date.today.year, options = {}) ⇒ Array<Invoicexpress::Models::TopClient>
This method allows you to obtain the quarterly results.
-
#top_clients(options = {}) ⇒ Array<Invoicexpress::Models::TopClient>
Returns your 5 top clients for which you have invoiced more.
-
#top_debtors(options = {}) ⇒ Array<Invoicexpress::Models::TopClient>
Returns your 5 top debtors.
-
#treasury_chart(options = {}) ⇒ Array<Invoicexpress::Models::Chart>
Returns the treasury chart data.
Instance Method Details
#invoicing_chart(options = {}) ⇒ Array<Invoicexpress::Models::Chart>
Returns the invoicing chart data.
9 10 11 12 |
# File 'lib/invoicexpress/client/charts.rb', line 9 def invoicing_chart( = {}) params = { :klass => Invoicexpress::Models::Chart } get("api/charts/invoicing.xml", params.merge()) end |
#quarterly_results(year = Date.today.year, options = {}) ⇒ Array<Invoicexpress::Models::TopClient>
This method allows you to obtain the quarterly results. Each quarter has: The amount invoiced before taxes Taxes amount Year to date (YTD) which consists on the difference between the invoiced on the current quarter less the invoiced on the same quarter one year ago
50 51 52 53 54 |
# File 'lib/invoicexpress/client/charts.rb', line 50 def quarterly_results(year=Date.today.year , = {}) #params = { :klass => Invoicexpress::Models::QuaterlyResult } params = { :klass => Invoicexpress::Models::QuarterlyResult, :year => year } get("api/charts/quarterly-results.xml", params.merge()) end |
#top_clients(options = {}) ⇒ Array<Invoicexpress::Models::TopClient>
Returns your 5 top clients for which you have invoiced more.
27 28 29 30 |
# File 'lib/invoicexpress/client/charts.rb', line 27 def top_clients( = {}) params = { :klass => Invoicexpress::Models::TopClient } get("api/charts/top-clients.xml", params.merge()) end |
#top_debtors(options = {}) ⇒ Array<Invoicexpress::Models::TopClient>
Returns your 5 top debtors. Values are calculated based on the due amount.
36 37 38 39 |
# File 'lib/invoicexpress/client/charts.rb', line 36 def top_debtors( = {}) params = { :klass => Invoicexpress::Models::TopDebtor } get("api/charts/top-debtors.xml", params.merge()) end |
#treasury_chart(options = {}) ⇒ Array<Invoicexpress::Models::Chart>
Returns the treasury chart data.
18 19 20 21 |
# File 'lib/invoicexpress/client/charts.rb', line 18 def treasury_chart( = {}) params = { :klass => Invoicexpress::Models::Chart } get("api/charts/treasury.xml", params.merge()) end |