Class: LockstepSdk::DailySalesOutstandingReportModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb

Overview

Represents the daily sales outstanding report

Instance Attribute Summary collapse

Instance Method Summary collapse

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_outstandingDouble

Returns Time (in days) between an invoice was completed paid off and when the invoice was issued.

Returns:

  • (Double)

    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_countInt32

Returns Number of invoices the average daily sales outstanding is calculated on.

Returns:

  • (Int32)

    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

#timeframeDate-time

Returns Timeframe (month) the daily sales outstanding values are associated with.

Returns:

  • (Date-time)

    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.

Returns:

  • (object)

    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(options={})
    {
        'timeframe' => @timeframe,
        'invoiceCount' => @invoice_count,
        'dailySalesOutstanding' => @daily_sales_outstanding,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    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(*options)
    "[#{as_json(*options).to_json(*options)}]"
end