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

Instance Attribute Details

#amount_dueDouble

Returns Total amount due for this time period.

Returns:

  • (Double)

    Total amount due for this time period



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

def amount_due
  @amount_due
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.



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

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



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

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



45
46
47
48
49
50
51
# File 'lib/lockstep_sdk/models/payables_coming_due_widget_model.rb', line 45

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



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

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