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
28 29 30 31 32 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 28 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.
44 45 46 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 44 def daily_sales_outstanding @daily_sales_outstanding end |
#invoice_count ⇒ Int32
Returns Number of invoices the average daily sales outstanding is calculated on.
40 41 42 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 40 def invoice_count @invoice_count end |
#timeframe ⇒ Date-time
Returns Timeframe (month) the daily sales outstanding values are associated with.
36 37 38 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 36 def timeframe @timeframe end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
48 49 50 51 52 53 54 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 48 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.
58 59 60 |
# File 'lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb', line 58 def to_json(*) "[#{as_json(*).to_json(*)}]" end |