Class: LockstepSdk::DailySalesOutstandingReportModel
- Inherits:
-
Object
- Object
- LockstepSdk::DailySalesOutstandingReportModel
- Defined in:
- lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb
Overview
Represents the daily sales outstanding report
Instance Attribute Summary collapse
-
#daily_sales_outstanding ⇒ Double
Time (in days) between an invoice was completed paid off and when the invoice was issued.
-
#invoice_count ⇒ Int32
Number of invoices the average daily sales outstanding is calculated on.
-
#timeframe ⇒ Date-time
Timeframe (month) the daily sales outstanding values are associated with.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ DailySalesOutstandingReportModel
constructor
Initialize the DailySalesOutstandingReportModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ DailySalesOutstandingReportModel
Initialize the DailySalesOutstandingReportModel using the provided prototype
26 27 28 29 30 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 26 def initialize(params = {}) @timeframe = params.dig(:timeframe) @invoice_count = params.dig(:invoice_count) @daily_sales_outstanding = params.dig(:daily_sales_outstanding) end |
Instance Attribute Details
#daily_sales_outstanding ⇒ Double
Returns Time (in days) between an invoice was completed paid off and when the invoice was issued.
37 38 39 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 37 def daily_sales_outstanding @daily_sales_outstanding end |
#invoice_count ⇒ Int32
Returns Number of invoices the average daily sales outstanding is calculated on.
35 36 37 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 35 def invoice_count @invoice_count end |
#timeframe ⇒ Date-time
Returns Timeframe (month) the daily sales outstanding values are associated with.
33 34 35 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 33 def timeframe @timeframe end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
40 41 42 43 44 45 46 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 40 def as_json(={}) { 'timeframe' => @timeframe, 'invoiceCount' => @invoice_count, 'dailySalesOutstanding' => @daily_sales_outstanding, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
49 50 51 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 49 def to_json(*) "[#{as_json(*).to_json(*)}]" end |