Class: LockstepSdk::CreditMemoInvoiceModel

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

Overview

Contains information about a credit memo invoice

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ CreditMemoInvoiceModel

Initialize the CreditMemoInvoiceModel using the provided prototype



28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 28

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @credit_memo_applied_id = params.dig(:credit_memo_applied_id)
    @invoice_id = params.dig(:invoice_id)
    @credit_memo_invoice_id = params.dig(:credit_memo_invoice_id)
    @apply_to_invoice_date = params.dig(:apply_to_invoice_date)
    @credit_memo_applied_amount = params.dig(:credit_memo_applied_amount)
    @reference_code = params.dig(:reference_code)
    @company_id = params.dig(:company_id)
    @customer_id = params.dig(:customer_id)
    @invoice_status_code = params.dig(:invoice_status_code)
    @total_amount = params.dig(:total_amount)
    @outstanding_balance_amount = params.dig(:outstanding_balance_amount)
end

Instance Attribute Details

#apply_to_invoice_dateDate

Returns Date invoice applied to credit memo.

Returns:

  • (Date)

    Date invoice applied to credit memo.



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

def apply_to_invoice_date
  @apply_to_invoice_date
end

#company_idUuid

Returns The ID number of the company that created this invoice.

Returns:

  • (Uuid)

    The ID number of the company that created this invoice.



73
74
75
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 73

def company_id
  @company_id
end

#credit_memo_applied_amountDouble

Returns Amount applied to credit memo.

Returns:

  • (Double)

    Amount applied to credit memo.



65
66
67
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 65

def credit_memo_applied_amount
  @credit_memo_applied_amount
end

#credit_memo_applied_idUuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.

Returns:

  • (Uuid)

    The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.



49
50
51
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 49

def credit_memo_applied_id
  @credit_memo_applied_id
end

#credit_memo_invoice_idUuid

Returns The id of the credit memo invoice.

Returns:

  • (Uuid)

    The id of the credit memo invoice



57
58
59
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 57

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



77
78
79
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 77

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



45
46
47
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 45

def group_key
  @group_key
end

#invoice_idUuid

Returns The id of the invoice.

Returns:

  • (Uuid)

    The id of the invoice



53
54
55
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 53

def invoice_id
  @invoice_id
end

#invoice_status_codeString

Returns A code identifying the status of this invoice.

Returns:

  • (String)

    A code identifying the status of this invoice.



81
82
83
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 81

def invoice_status_code
  @invoice_status_code
end

#outstanding_balance_amountDouble

Returns The remaining balance value of this invoice.

Returns:

  • (Double)

    The remaining balance value of this invoice.



89
90
91
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 89

def outstanding_balance_amount
  @outstanding_balance_amount
end

#reference_codeString

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

Returns:

  • (String)

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



69
70
71
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 69

def reference_code
  @reference_code
end

#total_amountDouble

Returns The total value of this invoice, inclusive of all taxes and line items.

Returns:

  • (Double)

    The total value of this invoice, inclusive of all taxes and line items.



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

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



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 93

def as_json(options={})
    {
        'groupKey' => @group_key,
        'creditMemoAppliedId' => @credit_memo_applied_id,
        'invoiceId' => @invoice_id,
        'creditMemoInvoiceId' => @credit_memo_invoice_id,
        'applyToInvoiceDate' => @apply_to_invoice_date,
        'creditMemoAppliedAmount' => @credit_memo_applied_amount,
        'referenceCode' => @reference_code,
        'companyId' => @company_id,
        'customerId' => @customer_id,
        'invoiceStatusCode' => @invoice_status_code,
        'totalAmount' => @total_amount,
        'outstandingBalanceAmount' => @outstanding_balance_amount,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



112
113
114
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 112

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