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
33
# 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)
    @base_currency_code = params.dig(:base_currency_code)
    @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

#base_currency_codeString

Returns The base currency code of the group.

Returns:

  • (String)

    The base currency code of the group.



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

def base_currency_code
  @base_currency_code
end

#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).



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

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



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

def timeframe
  @timeframe
end

#total_amount_billedDouble

Returns Amount of bills received based in the timeframe in the group’s base currency.

Returns:

  • (Double)

    Amount of bills received based in the timeframe in the group’s base currency.



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

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



61
62
63
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 61

def total_bills_count
  @total_bills_count
end

#total_payments_amountDouble

Returns Amount of payments made based in the timeframe in the group’s base currency.

Returns:

  • (Double)

    Amount of payments made based in the timeframe in the group’s base currency.



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

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



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

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



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 65

def as_json(options={})
    {
        'groupKey' => @group_key,
        'timeframe' => @timeframe,
        'baseCurrencyCode' => @base_currency_code,
        '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



79
80
81
# File 'lib/lockstep_sdk/models/payables_summary_report_model.rb', line 79

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