Class: LockstepSdk::CreditMemoAppliedSyncModel

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

Overview

The CreditMemoAppliedSyncModel represents information coming into Lockstep from an external financial system or other enterprise resource planning system. To import data from an external system, convert your original data into the CreditMemoAppliedSyncModel format and call the [Upload Sync File API](developer.lockstep.io/reference/post_api-v1-sync-zip). This API retrieves all of the data you uploaded in a compressed ZIP file and imports it into the Lockstep platform.

Once imported, this record will be available in the Lockstep API as a [CreditMemoAppliedModel](developer.lockstep.io/docs/creditmemoappliedmodel).

For more information on writing your own connector, see [Connector Data](developer.lockstep.io/docs/connector-data).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ CreditMemoAppliedSyncModel

Initialize the CreditMemoAppliedSyncModel using the provided prototype



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 33

def initialize(params = {})
    @on_match_action = params.dig(:on_match_action)
    @erp_key = params.dig(:erp_key)
    @invoice_erp_key = params.dig(:invoice_erp_key)
    @credit_memo_invoice_erp_key = params.dig(:credit_memo_invoice_erp_key)
    @entry_number = params.dig(:entry_number)
    @apply_to_invoice_date = params.dig(:apply_to_invoice_date)
    @credit_memo_applied_amount = params.dig(:credit_memo_applied_amount)
    @created = params.dig(:created)
    @modified = params.dig(:modified)
end

Instance Attribute Details

#apply_to_invoice_dateDate-time

Returns The date on which this credit memo was applied to the Invoice.

Returns:

  • (Date-time)

    The date on which this credit memo was applied to the Invoice.



67
68
69
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 67

def apply_to_invoice_date
  @apply_to_invoice_date
end

#createdDate-time

Returns If known, the date when this record was created according to the originating financial system in which this record is maintained. If the originating financial system does not maintain a created-date, leave this field null.

Returns:

  • (Date-time)

    If known, the date when this record was created according to the originating financial system in which this record is maintained. If the originating financial system does not maintain a created-date, leave this field null.



75
76
77
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 75

def created
  @created
end

#credit_memo_applied_amountDouble

Returns The amount of this credit memo that was applied to this Invoice.

Returns:

  • (Double)

    The amount of this credit memo that was applied to this Invoice.



71
72
73
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 71

def credit_memo_applied_amount
  @credit_memo_applied_amount
end

#credit_memo_invoice_erp_keyString

Returns This field indicates which Invoice is the original credit memo that was used to make this payment application event. In this field, identify the original primary key or unique ID of the Invoice which created the credit memo that was consumed in this event. Example: Company ABC received a credit memo, CM000123 for $500. Company ABC then chooses to apply this credit memo to reduce the balance of the invoice PO1000578. The ‘CreditMemoInvoiceErpKey` is `CM000123`.

Returns:

  • (String)

    This field indicates which Invoice is the original credit memo that was used to make this payment application event. In this field, identify the original primary key or unique ID of the Invoice which created the credit memo that was consumed in this event. Example: Company ABC received a credit memo, CM000123 for $500. Company ABC then chooses to apply this credit memo to reduce the balance of the invoice PO1000578. The ‘CreditMemoInvoiceErpKey` is `CM000123`.



59
60
61
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 59

def credit_memo_invoice_erp_key
  @credit_memo_invoice_erp_key
end

#entry_numberInt32

Returns Reference number for the applied credit memo.

Returns:

  • (Int32)

    Reference number for the applied credit memo.



63
64
65
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 63

def entry_number
  @entry_number
end

#erp_keyString

Returns This is the primary key of the Credit Memo Application record. For this field, you should use whatever this transaction’s unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Since Credit Memo Applications are often considered transactions, a typical value to look for will be the transaction ID number, the payment confirmation number, or some other record of this payment. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).

Returns:

  • (String)

    This is the primary key of the Credit Memo Application record. For this field, you should use whatever this transaction’s unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Since Credit Memo Applications are often considered transactions, a typical value to look for will be the transaction ID number, the payment confirmation number, or some other record of this payment. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).



51
52
53
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 51

def erp_key
  @erp_key
end

#invoice_erp_keyString

Returns This field indicates which Invoice had its balanced reduced by applying a credit memo. In this field, identify the original primary key or unique ID of the Invoice which had its balanced reduced. Example: Company ABC received a credit memo, CM000123 for $500. Company ABC then chooses to apply this credit memo to reduce the balance of the invoice PO1000578. The ‘InvoiceErpKey` is `PO1000578`.

Returns:

  • (String)

    This field indicates which Invoice had its balanced reduced by applying a credit memo. In this field, identify the original primary key or unique ID of the Invoice which had its balanced reduced. Example: Company ABC received a credit memo, CM000123 for $500. Company ABC then chooses to apply this credit memo to reduce the balance of the invoice PO1000578. The ‘InvoiceErpKey` is `PO1000578`.



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

def invoice_erp_key
  @invoice_erp_key
end

#modifiedDate-time

Returns If known, the date when this record was most recently modified according to the originating financial system in which this record is maintained. If the originating financial system does not maintain a most-recently-modified-date, leave this field null.

Returns:

  • (Date-time)

    If known, the date when this record was most recently modified according to the originating financial system in which this record is maintained. If the originating financial system does not maintain a most-recently-modified-date, leave this field null.



79
80
81
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 79

def modified
  @modified
end

#on_match_actionMatchAction

Returns Indicates what action to take when an existing object has been found during the sync process.

Returns:

  • (MatchAction)

    Indicates what action to take when an existing object has been found during the sync process.



47
48
49
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 47

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



83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 83

def as_json(options={})
    {
        'onMatchAction' => @on_match_action,
        'erpKey' => @erp_key,
        'invoiceErpKey' => @invoice_erp_key,
        'creditMemoInvoiceErpKey' => @credit_memo_invoice_erp_key,
        'entryNumber' => @entry_number,
        'applyToInvoiceDate' => @apply_to_invoice_date,
        'creditMemoAppliedAmount' => @credit_memo_applied_amount,
        'created' => @created,
        'modified' => @modified,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



99
100
101
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 99

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