Class: LockstepSdk::AppEnrollmentModel

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

Overview

An AppEnrollment represents an app that has been enrolled to the current account. When you sign up for an app using the Lockstep Platform, you obtain an enrollment record for that app. Example types of apps include connectors and feature enhancement apps. The App Enrollment object contains information about this app, its configuration, and settings.

See [Applications and Enrollments](developer.lockstep.io/docs/applications-and-enrollments) for more information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ AppEnrollmentModel

Initialize the AppEnrollmentModel using the provided prototype



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 30

def initialize(params = {})
    @app_enrollment_id = params.dig(:app_enrollment_id)
    @app_id = params.dig(:app_id)
    @group_key = params.dig(:group_key)
    @is_active = params.dig(:is_active)
    @created = params.dig(:created)
    @created_user_id = params.dig(:created_user_id)
    @modified = params.dig(:modified)
    @modified_user_id = params.dig(:modified_user_id)
    @cron_settings = params.dig(:cron_settings)
    @sync_schedule_is_active = params.dig(:sync_schedule_is_active)
    @is_deleted = params.dig(:is_deleted)
    @app = params.dig(:app)
    @custom_field_definitions = params.dig(:custom_field_definitions)
    @custom_field_values = params.dig(:custom_field_values)
    @last_sync = params.dig(:last_sync)
    @last_successful_sync = params.dig(:last_successful_sync)
    @connector_info = params.dig(:connector_info)
end

Instance Attribute Details

#appApplicationModel



96
97
98
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 96

def app
  @app
end

#app_enrollment_idUuid



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

def app_enrollment_id
  @app_enrollment_id
end

#app_idUuid



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

def app_id
  @app_id
end

#connector_infoConnectorInfoModel



116
117
118
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 116

def connector_info
  @connector_info
end

#createdDate-time



68
69
70
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 68

def created
  @created
end

#created_user_idUuid



72
73
74
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 72

def created_user_id
  @created_user_id
end

#cron_settingsString



84
85
86
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 84

def cron_settings
  @cron_settings
end

#custom_field_definitionsCustomFieldDefinitionModel



100
101
102
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 100

def custom_field_definitions
  @custom_field_definitions
end

#custom_field_valuesCustomFieldValueModel



104
105
106
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 104

def custom_field_values
  @custom_field_values
end

#group_keyUuid



60
61
62
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 60

def group_key
  @group_key
end

#is_activeBoolean



64
65
66
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 64

def is_active
  @is_active
end

#is_deletedBoolean



92
93
94
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 92

def is_deleted
  @is_deleted
end

#last_successful_syncSyncRequestModel



112
113
114
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 112

def last_successful_sync
  @last_successful_sync
end

#last_syncSyncRequestModel



108
109
110
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 108

def last_sync
  @last_sync
end

#modifiedDate-time



76
77
78
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 76

def modified
  @modified
end

#modified_user_idUuid



80
81
82
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 80

def modified_user_id
  @modified_user_id
end

#sync_schedule_is_activeBoolean



88
89
90
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 88

def sync_schedule_is_active
  @sync_schedule_is_active
end

Instance Method Details

#as_json(options = {}) ⇒ object



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 120

def as_json(options={})
    {
        'appEnrollmentId' => @app_enrollment_id,
        'appId' => @app_id,
        'groupKey' => @group_key,
        'isActive' => @is_active,
        'created' => @created,
        'createdUserId' => @created_user_id,
        'modified' => @modified,
        'modifiedUserId' => @modified_user_id,
        'cronSettings' => @cron_settings,
        'syncScheduleIsActive' => @sync_schedule_is_active,
        'isDeleted' => @is_deleted,
        'app' => @app,
        'customFieldDefinitions' => @custom_field_definitions,
        'customFieldValues' => @custom_field_values,
        'lastSync' => @last_sync,
        'lastSuccessfulSync' => @last_successful_sync,
        'connectorInfo' => @connector_info,
    }
end

#to_json(*options) ⇒ String



144
145
146
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 144

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