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
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 29 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
53 54 55 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 53 def app_enrollment_id @app_enrollment_id end |
#created ⇒ Date-time
73 74 75 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 73 def created @created end |
#created_user_id ⇒ Uuid
77 78 79 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 77 def created_user_id @created_user_id end |
#end_date ⇒ Date
69 70 71 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 69 def end_date @end_date end |
#financial_year_setting_id ⇒ Uuid
45 46 47 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 45 def financial_year_setting_id @financial_year_setting_id end |
#group_key ⇒ Uuid
49 50 51 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 49 def group_key @group_key end |
#modified ⇒ Date-time
81 82 83 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 81 def modified @modified end |
#modified_user_id ⇒ Uuid
85 86 87 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 85 def modified_user_id @modified_user_id end |
#start_date ⇒ Date
65 66 67 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 65 def start_date @start_date end |
#total_periods ⇒ Int32
61 62 63 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 61 def total_periods @total_periods end |
#year_type ⇒ String
57 58 59 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 57 def year_type @year_type end |
Instance Method Details
#as_json(options = {}) ⇒ object
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 89 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
107 108 109 |
# File 'lib/lockstep_sdk/models/financial_year_setting_model.rb', line 107 def to_json(*) "[#{as_json(*options).to_json(*options)}]" end |