Class: LockstepSdk::FinancialReportModel

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

Overview

Represents a Financial Report

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ FinancialReportModel

Initialize the FinancialReportModel using the provided prototype



25
26
27
28
29
30
31
32
# File 'lib/lockstep_sdk/models/financial_report_model.rb', line 25

def initialize(params = {})
    @report_name = params.dig(:report_name)
    @group_key = params.dig(:group_key)
    @report_start_date = params.dig(:report_start_date)
    @report_end_date = params.dig(:report_end_date)
    @report_created_date = params.dig(:report_created_date)
    @rows = params.dig(:rows)
end

Instance Attribute Details

#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.

Returns:

  • (Uuid) —

    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.



40
41
42
# File 'lib/lockstep_sdk/models/financial_report_model.rb', line 40

def group_key
  @group_key
end

#report_created_date ⇒ Date-time

Returns The created date of the financial report.

Returns:

  • (Date-time) —

    The created date of the financial report



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

def report_created_date
  @report_created_date
end

#report_end_date ⇒ Date-time

Returns The end date of the financial report.

Returns:

  • (Date-time) —

    The end date of the financial report



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

def report_end_date
  @report_end_date
end

#report_name ⇒ String

Returns The name of the report ("Report Type for Company").

Returns:

  • (String) —

    The name of the report ("Report Type for Company")



36
37
38
# File 'lib/lockstep_sdk/models/financial_report_model.rb', line 36

def report_name
  @report_name
end

#report_start_date ⇒ Date-time

Returns The start date of the financial report.

Returns:

  • (Date-time) —

    The start date of the financial report



44
45
46
# File 'lib/lockstep_sdk/models/financial_report_model.rb', line 44

def report_start_date
  @report_start_date
end

#rows ⇒ FinancialReportRowModel

Returns The rows of the financial report.

Returns:



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

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



60
61
62
63
64
65
66
67
68
69
# File 'lib/lockstep_sdk/models/financial_report_model.rb', line 60

def as_json(options={})
    {
        'reportName' => @report_name,
        'groupKey' => @group_key,
        'reportStartDate' => @report_start_date,
        'reportEndDate' => @report_end_date,
        'reportCreatedDate' => @report_created_date,
        'rows' => @rows,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String) —

    This object converted to a JSON string



73
74
75
# File 'lib/lockstep_sdk/models/financial_report_model.rb', line 73

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