Class: LockstepSdk::PayablesComingDueHeaderModel

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

Overview

Contains summary information for payables that will be due soon

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PayablesComingDueHeaderModel

Initialize the PayablesComingDueHeaderModel using the provided prototype



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

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @number_of_bills_due = params.dig(:number_of_bills_due)
    @number_of_vendors = params.dig(:number_of_vendors)
    @percentage_of_total = params.dig(:percentage_of_total)
    @base_currency_code = params.dig(:base_currency_code)
    @total_amount_due = params.dig(:total_amount_due)
    @due_date = params.dig(:due_date)
end

Instance Attribute Details

#base_currency_codeString

Returns The group’s base currency code.

Returns:

  • (String)

    The group’s base currency code.



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

def base_currency_code
  @base_currency_code
end

#due_dateDate-time

Returns This model represents all the payables that are either already due or due within this date.

Returns:

  • (Date-time)

    This model represents all the payables that are either already due or due within this date.



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

def due_date
  @due_date
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_coming_due_header_model.rb', line 37

def group_key
  @group_key
end

#number_of_bills_dueInt32

Returns Number of bills due for this time period.

Returns:

  • (Int32)

    Number of bills due for this time period



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

def number_of_bills_due
  @number_of_bills_due
end

#number_of_vendorsInt32

Returns Number of total vendors for this time period.

Returns:

  • (Int32)

    Number of total vendors for this time period



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

def number_of_vendors
  @number_of_vendors
end

#percentage_of_totalDouble

Returns Percentage of total for this time period.

Returns:

  • (Double)

    Percentage of total for this time period



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

def percentage_of_total
  @percentage_of_total
end

#total_amount_dueDouble

Returns Total amount due for this time period in the group’s base currency.

Returns:

  • (Double)

    Total amount due for this time period in the group’s base currency.



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

def total_amount_due
  @total_amount_due
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_coming_due_header_model.rb', line 65

def as_json(options={})
    {
        'groupKey' => @group_key,
        'numberOfBillsDue' => @number_of_bills_due,
        'numberOfVendors' => @number_of_vendors,
        'percentageOfTotal' => @percentage_of_total,
        'baseCurrencyCode' => @base_currency_code,
        'totalAmountDue' => @total_amount_due,
        'dueDate' => @due_date,
    }
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_coming_due_header_model.rb', line 79

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