Class: LockstepSdk::PayablesComingDueModel

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

Overview

Contains information for payables that will be due soon

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PayablesComingDueModel

Initialize the PayablesComingDueModel using the provided prototype



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

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @number_of_bills_due = params.dig(:number_of_bills_due)
    @vendor_id = params.dig(:vendor_id)
    @vendor_name = params.dig(:vendor_name)
    @primary_contact = params.dig(:primary_contact)
    @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 base currency code of the group.

Returns:

  • (String)

    The base currency code of the group



63
64
65
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 63

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.



71
72
73
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 71

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



39
40
41
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 39

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



43
44
45
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 43

def number_of_bills_due
  @number_of_bills_due
end

#percentage_of_totalDouble

Returns Percentage of total for this time period.

Returns:

  • (Double)

    Percentage of total for this time period



59
60
61
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 59

def percentage_of_total
  @percentage_of_total
end

#primary_contactString

Returns Primary Contact for this company.

Returns:

  • (String)

    Primary Contact for this company



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

def primary_contact
  @primary_contact
end

#total_amount_dueDouble

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

Returns:

  • (Double)

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



67
68
69
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 67

def total_amount_due
  @total_amount_due
end

#vendor_idUuid

Returns The unique Lockstep Id for the Vendor.

Returns:

  • (Uuid)

    The unique Lockstep Id for the Vendor



47
48
49
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 47

def vendor_id
  @vendor_id
end

#vendor_nameString

Returns Name for this company.

Returns:

  • (String)

    Name for this company



51
52
53
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 51

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



75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 75

def as_json(options={})
    {
        'groupKey' => @group_key,
        'numberOfBillsDue' => @number_of_bills_due,
        'vendorId' => @vendor_id,
        'vendorName' => @vendor_name,
        'primaryContact' => @primary_contact,
        '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



91
92
93
# File 'lib/lockstep_sdk/models/payables_coming_due_model.rb', line 91

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