Class: LockstepSdk::DailyPayableOutstandingReportModel

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

Overview

Represents the daily payable outstanding report

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ DailyPayableOutstandingReportModel

Initialize the DailyPayableOutstandingReportModel using the provided prototype



25
26
27
28
29
# File 'lib/lockstep_sdk/models/daily_payable_outstanding_report_model.rb', line 25

def initialize(params = {})
    @timeframe = params.dig(:timeframe)
    @invoice_count = params.dig(:invoice_count)
    @daily_payable_outstanding = params.dig(:daily_payable_outstanding)
end

Instance Attribute Details

#daily_payable_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



41
42
43
# File 'lib/lockstep_sdk/models/daily_payable_outstanding_report_model.rb', line 41

def daily_payable_outstanding
  @daily_payable_outstanding
end

#invoice_countInt32

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

Returns:

  • (Int32)

    Number of invoices the average daily payable outstanding is calculated on



37
38
39
# File 'lib/lockstep_sdk/models/daily_payable_outstanding_report_model.rb', line 37

def invoice_count
  @invoice_count
end

#timeframeDate-time

Returns Timeframe (quarter) the daily payable outstanding values are associated with.

Returns:

  • (Date-time)

    Timeframe (quarter) the daily payable outstanding values are associated with



33
34
35
# File 'lib/lockstep_sdk/models/daily_payable_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



45
46
47
48
49
50
51
# File 'lib/lockstep_sdk/models/daily_payable_outstanding_report_model.rb', line 45

def as_json(options={})
    {
        'timeframe' => @timeframe,
        'invoiceCount' => @invoice_count,
        'dailyPayableOutstanding' => @daily_payable_outstanding,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



55
56
57
# File 'lib/lockstep_sdk/models/daily_payable_outstanding_report_model.rb', line 55

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end