Class: LockstepSdk::DpoSummaryModel

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

Overview

Represents a summary of outstanding amounts for bills to vendors and their associated daily payable outstanding value.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ DpoSummaryModel

Initialize the DpoSummaryModel using the provided prototype



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

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @vendor_id = params.dig(:vendor_id)
    @vendor_name = params.dig(:vendor_name)
    @primary_contact = params.dig(:primary_contact)
    @bills = params.dig(:bills)
    @base_currency_code = params.dig(:base_currency_code)
    @amount_outstanding = params.dig(:amount_outstanding)
    @dpo = params.dig(:dpo)
end

Instance Attribute Details

#amount_outstanding ⇒ Double

Returns The total amount outstanding at the group's base currency.

Returns:

  • (Double) —

    The total amount outstanding at the group's base currency.



62
63
64
# File 'lib/lockstep_sdk/models/dpo_summary_model.rb', line 62

def amount_outstanding
  @amount_outstanding
end

#base_currency_code ⇒ String

Returns The group's base currency code.

Returns:

  • (String) —

    The group's base currency code.



58
59
60
# File 'lib/lockstep_sdk/models/dpo_summary_model.rb', line 58

def base_currency_code
  @base_currency_code
end

#bills ⇒ Int32

Returns The total number of outstanding bills.

Returns:

  • (Int32) —

    The total number of outstanding bills.



54
55
56
# File 'lib/lockstep_sdk/models/dpo_summary_model.rb', line 54

def bills
  @bills
end

#dpo ⇒ Double

Returns The days payable outstanding value.

Returns:

  • (Double) —

    The days payable outstanding value.



66
67
68
# File 'lib/lockstep_sdk/models/dpo_summary_model.rb', line 66

def dpo
  @dpo
end

#group_key ⇒ Uuid

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.

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.



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

def group_key
  @group_key
end

#primary_contact ⇒ String

Returns The name of the primary contact.

Returns:

  • (String) —

    The name of the primary contact.



50
51
52
# File 'lib/lockstep_sdk/models/dpo_summary_model.rb', line 50

def primary_contact
  @primary_contact
end

#vendor_id ⇒ Uuid

Returns The unique ID of the vendor.

Returns:

  • (Uuid) —

    The unique ID of the vendor.



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

def vendor_id
  @vendor_id
end

#vendor_name ⇒ String

Returns The name of the vendor.

Returns:

  • (String) —

    The name of the vendor.



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

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



70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/lockstep_sdk/models/dpo_summary_model.rb', line 70

def as_json(options={})
    {
        'groupKey' => @group_key,
        'vendorId' => @vendor_id,
        'vendorName' => @vendor_name,
        'primaryContact' => @primary_contact,
        'bills' => @bills,
        'baseCurrencyCode' => @base_currency_code,
        'amountOutstanding' => @amount_outstanding,
        'dpo' => @dpo,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String) —

    This object converted to a JSON string



85
86
87
# File 'lib/lockstep_sdk/models/dpo_summary_model.rb', line 85

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