Class: LockstepSdk::FinancialYearSettingModel
- Inherits:
-
Object
- Object
- LockstepSdk::FinancialYearSettingModel
- Defined in:
- lib/lockstep_sdk/models/financial_year_setting_model.rb
Overview
A Financial Year Setting is used to to set the type, beginning, end, and number of periods of a year used to calculate accounting reports. The financial setting can either be for a specific app enrollment id via a sync or, when the financial year setting is manually created, will cover all account data without an app enrollment id.
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
The AppEnrollmentId of the application that imported this record.
-
#created ⇒ Date-time
The date on which this financial year setting record was created.
-
#created_user_id ⇒ Uuid
The ID number of the user who created this financial year setting.
-
#end_date ⇒ Date
The end date of the financial year.
-
#financial_year_setting_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#modified ⇒ Date-time
The date on which this financial year setting record was last modified.
-
#modified_user_id ⇒ Uuid
The ID number of the user who most recently modified this financial year setting.
-
#start_date ⇒ Date
The start date of the financial year.
-
#total_periods ⇒ Int32
Total number of periods in the year.
-
#year_type ⇒ String
The type of financial year, either Calendar or Fiscal.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ FinancialYearSettingModel
constructor
Initialize the FinancialYearSettingModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ FinancialYearSettingModel
Initialize the FinancialYearSettingModel using the provided prototype
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 27 def initialize(params = {}) @financial_year_setting_id = params.dig(:financial_year_setting_id) @group_key = params.dig(:group_key) @app_enrollment_id = params.dig(:app_enrollment_id) @year_type = params.dig(:year_type) @total_periods = params.dig(:total_periods) @start_date = params.dig(:start_date) @end_date = params.dig(:end_date) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
Returns The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.
51 52 53 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 51 def app_enrollment_id @app_enrollment_id end |
#created ⇒ Date-time
Returns The date on which this financial year setting record was created.
71 72 73 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 71 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID number of the user who created this financial year setting.
75 76 77 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 75 def created_user_id @created_user_id end |
#end_date ⇒ Date
Returns The end date of the financial year. Should be entered in MM-DD format.
67 68 69 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 67 def end_date @end_date end |
#financial_year_setting_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
43 44 45 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 43 def financial_year_setting_id @financial_year_setting_id end |
#group_key ⇒ Uuid
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).
47 48 49 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 47 def group_key @group_key end |
#modified ⇒ Date-time
Returns The date on which this financial year setting record was last modified.
79 80 81 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 79 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID number of the user who most recently modified this financial year setting.
83 84 85 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 83 def modified_user_id @modified_user_id end |
#start_date ⇒ Date
Returns The start date of the financial year. Should be entered in MM-DD format.
63 64 65 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 63 def start_date @start_date end |
#total_periods ⇒ Int32
Returns Total number of periods in the year. For Calendar year types this should always be 12. For Fiscal year types this can either be 12 or 13 for a 4 week 13 period year.
59 60 61 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 59 def total_periods @total_periods end |
#year_type ⇒ String
Returns The type of financial year, either Calendar or Fiscal.
55 56 57 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 55 def year_type @year_type end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 87 def as_json(={}) { 'financialYearSettingId' => @financial_year_setting_id, 'groupKey' => @group_key, 'appEnrollmentId' => @app_enrollment_id, 'yearType' => @year_type, 'totalPeriods' => @total_periods, 'startDate' => @start_date, 'endDate' => @end_date, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
105 106 107 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 105 def to_json(*) "[#{as_json(*).to_json(*)}]" end |