Class: LockstepSdk::PayablesSummaryReportModel

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

Overview

Represents the payables summary report based on a timeframe

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PayablesSummaryReportModel

Initialize the PayablesSummaryReportModel using the provided prototype



25
26
27
28
29
30
31
32
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 25

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @timeframe = params.dig(:timeframe)
    @total_payments_amount = params.dig(:total_payments_amount)
    @total_payments_count = params.dig(:total_payments_count)
    @total_amount_billed = params.dig(:total_amount_billed)
    @total_bills_count = params.dig(:total_bills_count)
end

Instance Attribute Details

#group_keyUuid

Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).

Returns:

  • (Uuid)

    The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).



36
37
38
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 36

def group_key
  @group_key
end

#timeframeInt32

Returns Timeframe in days the payables summary report is generated on.

Returns:

  • (Int32)

    Timeframe in days the payables summary report is generated on



40
41
42
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 40

def timeframe
  @timeframe
end

#total_amount_billedDouble

Returns Amount of bills received based in the timeframe.

Returns:

  • (Double)

    Amount of bills received based in the timeframe



52
53
54
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 52

def total_amount_billed
  @total_amount_billed
end

#total_bills_countInt32

Returns Number of bills received in the timeframe.

Returns:

  • (Int32)

    Number of bills received in the timeframe



56
57
58
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 56

def total_bills_count
  @total_bills_count
end

#total_payments_amountDouble

Returns Amount of payments made based in the timeframe.

Returns:

  • (Double)

    Amount of payments made based in the timeframe



44
45
46
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 44

def total_payments_amount
  @total_payments_amount
end

#total_payments_countInt32

Returns Number of payments made based in the timeframe.

Returns:

  • (Int32)

    Number of payments made based in the timeframe



48
49
50
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 48

def total_payments_count
  @total_payments_count
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



60
61
62
63
64
65
66
67
68
69
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 60

def as_json(options={})
    {
        'groupKey' => @group_key,
        'timeframe' => @timeframe,
        'totalPaymentsAmount' => @total_payments_amount,
        'totalPaymentsCount' => @total_payments_count,
        'totalAmountBilled' => @total_amount_billed,
        'totalBillsCount' => @total_bills_count,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



73
74
75
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 73

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