Class: LockstepSdk::BaseCurrencySyncModel
- Inherits:
-
Object
- Object
- LockstepSdk::BaseCurrencySyncModel
- Defined in:
- lib/lockstep_sdk/models/base_currency_sync_model.rb
Overview
The BaseCurrencySyncModel 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 BaseCurrencySyncModel 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 used to update the Group Account base currency code.
For more information on writing your own connector, see [Connector Data](developer.lockstep.io/docs/connector-data).
Instance Attribute Summary collapse
-
#base_currency_code ⇒ String
The default currency code used by this business entity.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ BaseCurrencySyncModel
constructor
Initialize the BaseCurrencySyncModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ BaseCurrencySyncModel
Initialize the BaseCurrencySyncModel using the provided prototype
33 34 35 |
# File 'lib/lockstep_sdk/models/base_currency_sync_model.rb', line 33 def initialize(params = {}) @base_currency_code = params.dig(:base_currency_code) end |
Instance Attribute Details
#base_currency_code ⇒ String
Returns The default currency code used by this business entity. For a list of defined currency codes, see [Query Currencies](developer.lockstep.io/reference/get_api-v1-definitions-currencies).
39 40 41 |
# File 'lib/lockstep_sdk/models/base_currency_sync_model.rb', line 39 def base_currency_code @base_currency_code end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
43 44 45 46 47 |
# File 'lib/lockstep_sdk/models/base_currency_sync_model.rb', line 43 def as_json(={}) { 'baseCurrencyCode' => @base_currency_code, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
51 52 53 |
# File 'lib/lockstep_sdk/models/base_currency_sync_model.rb', line 51 def to_json(*) "[#{as_json(*).to_json(*)}]" end |