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



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

def initialize(params = {})
    @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



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

def apply_to_invoice_date
  @apply_to_invoice_date
end

#createdDate-time



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

def created
  @created
end

#credit_memo_applied_amountDouble



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

def credit_memo_applied_amount
  @credit_memo_applied_amount
end

#credit_memo_invoice_erp_keyString



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

def credit_memo_invoice_erp_key
  @credit_memo_invoice_erp_key
end

#entry_numberInt32



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

def entry_number
  @entry_number
end

#erp_keyString



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

def erp_key
  @erp_key
end

#invoice_erp_keyString



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

def invoice_erp_key
  @invoice_erp_key
end

#modifiedDate-time



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

def modified
  @modified
end

Instance Method Details

#as_json(options = {}) ⇒ object



80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 80

def as_json(options={})
    {
        '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



95
96
97
# File 'lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb', line 95

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