Class: LockstepSdk::PayablesComingDueWidgetModel

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

Overview

Contains summary information for payables for the widget

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PayablesComingDueWidgetModel

Initialize the PayablesComingDueWidgetModel using the provided prototype



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

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @date = params.dig(:date)
    @base_currency_code = params.dig(:base_currency_code)
    @amount_due = params.dig(:amount_due)
end

Instance Attribute Details

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



46
47
48
# File 'lib/lockstep_sdk/models/payables_coming_due_widget_model.rb', line 46

def amount_due
  @amount_due
end

#base_currency_codeString

Returns The group’s base currency code.

Returns:

  • (String)

    The group’s base currency code.



42
43
44
# File 'lib/lockstep_sdk/models/payables_coming_due_widget_model.rb', line 42

def base_currency_code
  @base_currency_code
end

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



38
39
40
# File 'lib/lockstep_sdk/models/payables_coming_due_widget_model.rb', line 38

def date
  @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).



34
35
36
# File 'lib/lockstep_sdk/models/payables_coming_due_widget_model.rb', line 34

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



50
51
52
53
54
55
56
57
# File 'lib/lockstep_sdk/models/payables_coming_due_widget_model.rb', line 50

def as_json(options={})
    {
        'groupKey' => @group_key,
        'date' => @date,
        'baseCurrencyCode' => @base_currency_code,
        'amountDue' => @amount_due,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



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

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