Class: LockstepSdk::AppEnrollmentCustomFieldModel

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

Overview

App enrollment and custom field merged into one

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ AppEnrollmentCustomFieldModel

Initialize the AppEnrollmentCustomFieldModel using the provided prototype



25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 25

def initialize(params = {})
    @app_enrollment_id = params.dig(:app_enrollment_id)
    @app_id = params.dig(:app_id)
    @name = params.dig(:name)
    @app_type = params.dig(:app_type)
    @group_key = params.dig(:group_key)
    @custom_field_definition_id = params.dig(:custom_field_definition_id)
    @custom_field_label = params.dig(:custom_field_label)
    @data_type = params.dig(:data_type)
    @sort_order = params.dig(:sort_order)
    @string_value = params.dig(:string_value)
    @numeric_value = params.dig(:numeric_value)
    @value = params.dig(:value)
end

Instance Attribute Details

#app_enrollment_id ⇒ Uuid

Returns Unique id for the app enrollment.

Returns:

  • (Uuid) —

    Unique id for the app enrollment



42
43
44
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 42

def app_enrollment_id
  @app_enrollment_id
end

#app_id ⇒ Uuid

Returns Id of enrolled app.

Returns:

  • (Uuid) —

    Id of enrolled app



46
47
48
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 46

def app_id
  @app_id
end

#app_type ⇒ String

Returns Tag for what type of app the application is.

Returns:

  • (String) —

    Tag for what type of app the application is



54
55
56
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 54

def app_type
  @app_type
end

#custom_field_definition_id ⇒ Uuid

Returns Unique Id for the custom field definition.

Returns:

  • (Uuid) —

    Unique Id for the custom field definition



62
63
64
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 62

def custom_field_definition_id
  @custom_field_definition_id
end

#custom_field_label ⇒ String

Returns Text to display in-application for custom field.

Returns:

  • (String) —

    Text to display in-application for custom field



66
67
68
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 66

def custom_field_label
  @custom_field_label
end

#data_type ⇒ String

Returns Data type of the custom field definition.

Returns:

  • (String) —

    Data type of the custom field definition



70
71
72
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 70

def data_type
  @data_type
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.

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.



58
59
60
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 58

def group_key
  @group_key
end

#name ⇒ String

Returns The name of the application.

Returns:

  • (String) —

    The name of the application



50
51
52
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 50

def name
  @name
end

#numeric_value ⇒ Double

Returns Number data for field.

Returns:

  • (Double) —

    Number data for field



82
83
84
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 82

def numeric_value
  @numeric_value
end

#sort_order ⇒ Int32

Returns Used for display logic when multiple app enrollment custom fields exist.

Returns:

  • (Int32) —

    Used for display logic when multiple app enrollment custom fields exist



74
75
76
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 74

def sort_order
  @sort_order
end

#string_value ⇒ String

Returns String of data for field.

Returns:

  • (String) —

    String of data for field



78
79
80
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 78

def string_value
  @string_value
end

#value ⇒ String

Returns Value for the field.

Returns:

  • (String) —

    Value for the field



86
87
88
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 86

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



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 90

def as_json(options={})
    {
        'appEnrollmentId' => @app_enrollment_id,
        'appId' => @app_id,
        'name' => @name,
        'appType' => @app_type,
        'groupKey' => @group_key,
        'customFieldDefinitionId' => @custom_field_definition_id,
        'customFieldLabel' => @custom_field_label,
        'dataType' => @data_type,
        'sortOrder' => @sort_order,
        'stringValue' => @string_value,
        'numericValue' => @numeric_value,
        'value' => @value,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String) —

    This object converted to a JSON string



109
110
111
# File 'lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb', line 109

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