Class: LockstepSdk::AtRiskInvoiceSummaryModel

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

Overview

Contains summarized data for an invoice

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ AtRiskInvoiceSummaryModel

Initialize the AtRiskInvoiceSummaryModel using the provided prototype



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 25

def initialize(params = {})
    @report_date = params.dig(:report_date)
    @group_key = params.dig(:group_key)
    @customer_id = params.dig(:customer_id)
    @invoice_id = params.dig(:invoice_id)
    @invoice_number = params.dig(:invoice_number)
    @invoice_date = params.dig(:invoice_date)
    @customer_name = params.dig(:customer_name)
    @status = params.dig(:status)
    @payment_due_date = params.dig(:payment_due_date)
    @currency_code = params.dig(:currency_code)
    @invoice_amount = params.dig(:invoice_amount)
    @outstanding_balance = params.dig(:outstanding_balance)
    @base_currency_code = params.dig(:base_currency_code)
    @base_currency_invoice_amount = params.dig(:base_currency_invoice_amount)
    @base_currency_outstanding_balance = params.dig(:base_currency_outstanding_balance)
    @invoice_type_code = params.dig(:invoice_type_code)
    @newest_activity = params.dig(:newest_activity)
    @days_past_due = params.dig(:days_past_due)
    @payment_numbers = params.dig(:payment_numbers)
    @payment_ids = params.dig(:payment_ids)
end

Instance Attribute Details

#base_currency_codeString

Returns The currency code of the group.

Returns:

  • (String)

    The currency code of the group.



98
99
100
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 98

def base_currency_code
  @base_currency_code
end

#base_currency_invoice_amountDouble

Returns The total amount of the Invoice in the group's currency.

Returns:

  • (Double)

    The total amount of the Invoice in the group's currency.



102
103
104
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 102

def base_currency_invoice_amount
  @base_currency_invoice_amount
end

#base_currency_outstanding_balanceDouble

Returns The remaining balance value of this invoice in the group's currency.

Returns:

  • (Double)

    The remaining balance value of this invoice in the group's currency.



106
107
108
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 106

def base_currency_outstanding_balance
  @base_currency_outstanding_balance
end

#currency_codeString

Returns The currency code of the invoice.

Returns:

  • (String)

    The currency code of the invoice



86
87
88
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 86

def currency_code
  @currency_code
end

#customer_idUuid

Returns The ID number of the counterparty for the invoice, for example, a customer or vendor.

Returns:

  • (Uuid)

    The ID number of the counterparty for the invoice, for example, a customer or vendor.



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

def customer_id
  @customer_id
end

#customer_nameString

Returns The name of the counterparty for the invoice, for example, a customer or vendor.

Returns:

  • (String)

    The name of the counterparty for the invoice, for example, a customer or vendor.



74
75
76
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 74

def customer_name
  @customer_name
end

#days_past_dueInt32

Returns The number of days this Invoice is past due.

Returns:

  • (Int32)

    The number of days this Invoice is past due.



118
119
120
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 118

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

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.



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

def group_key
  @group_key
end

#invoice_amountDouble

Returns The total amount of the Invoice.

Returns:

  • (Double)

    The total amount of the Invoice.



90
91
92
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 90

def invoice_amount
  @invoice_amount
end

#invoice_dateDate

Returns The reporting date for this invoice.

Returns:

  • (Date)

    The reporting date for this invoice.



70
71
72
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 70

def invoice_date
  @invoice_date
end

#invoice_idUuid

Returns The unique ID number of this invoice.

Returns:

  • (Uuid)

    The unique ID number of this invoice.



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

def invoice_id
  @invoice_id
end

#invoice_numberString

Returns A reference code that is used to identify this invoice. The meaning of this field is specific to the ERP or accounting system used by the user.

Returns:

  • (String)

    A reference code that is used to identify this invoice. The meaning of this field is specific to the ERP or accounting system used by the user.



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

def invoice_number
  @invoice_number
end

#invoice_type_codeString

Returns A code identifying the type of this Invoice.

Returns:

  • (String)

    A code identifying the type of this Invoice.



110
111
112
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 110

def invoice_type_code
  @invoice_type_code
end

#newest_activityDate

Returns The date stamp for the newest Activity on this Invoice.

Returns:

  • (Date)

    The date stamp for the newest Activity on this Invoice.



114
115
116
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 114

def newest_activity
  @newest_activity
end

#outstanding_balanceDouble

Returns The remaining balance value of this invoice.

Returns:

  • (Double)

    The remaining balance value of this invoice.



94
95
96
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 94

def outstanding_balance
  @outstanding_balance
end

#payment_due_dateDate

Returns The due date of the invoice.

Returns:

  • (Date)

    The due date of the invoice.



82
83
84
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 82

def payment_due_date
  @payment_due_date
end

#payment_idsUuid

Returns The ids of the payments associated to this invoice.

Returns:

  • (Uuid)

    The ids of the payments associated to this invoice.



126
127
128
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 126

def payment_ids
  @payment_ids
end

#payment_numbersString

Returns The memo text of the payments associated to this invoice.

Returns:

  • (String)

    The memo text of the payments associated to this invoice.



122
123
124
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 122

def payment_numbers
  @payment_numbers
end

#report_dateDate

Returns The date of the report.

Returns:

  • (Date)

    The date of the report



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

def report_date
  @report_date
end

#statusString

Returns The status of the invoice.

Returns:

  • (String)

    The status of the invoice.



78
79
80
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 78

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



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 130

def as_json(options={})
    {
        'reportDate' => @report_date,
        'groupKey' => @group_key,
        'customerId' => @customer_id,
        'invoiceId' => @invoice_id,
        'invoiceNumber' => @invoice_number,
        'invoiceDate' => @invoice_date,
        'customerName' => @customer_name,
        'status' => @status,
        'paymentDueDate' => @payment_due_date,
        'currencyCode' => @currency_code,
        'invoiceAmount' => @invoice_amount,
        'outstandingBalance' => @outstanding_balance,
        'baseCurrencyCode' => @base_currency_code,
        'baseCurrencyInvoiceAmount' => @base_currency_invoice_amount,
        'baseCurrencyOutstandingBalance' => @base_currency_outstanding_balance,
        'invoiceTypeCode' => @invoice_type_code,
        'newestActivity' => @newest_activity,
        'daysPastDue' => @days_past_due,
        'paymentNumbers' => @payment_numbers,
        'paymentIds' => @payment_ids,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



157
158
159
# File 'lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb', line 157

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