Class: LockstepSdk::AppEnrollmentModel
- Inherits:
-
Object
- Object
- LockstepSdk::AppEnrollmentModel
- 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
-
#app ⇒ ApplicationModel
The Application to which this AppEnrollment belongs.
-
#app_enrollment_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#app_id ⇒ Uuid
The ID number of the Application that this enrollment represents.
-
#connector_info ⇒ ConnectorInfoModel
Optional data necessary to create an app enrollment for a supported connector.
-
#created ⇒ Date-time
Created date.
-
#created_user_id ⇒ Uuid
Created user ID.
-
#cron_settings ⇒ String
Stores schedule information for the application enrollment see en.wikipedia.org/wiki/Cron.
-
#custom_field_definitions ⇒ CustomFieldDefinitionModel
A collection of custom fields linked to this record.
-
#custom_field_values ⇒ CustomFieldValueModel
A collection of custom fields linked to this record.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#is_active ⇒ Boolean
Determines whether the app enrollment is in use.
-
#last_successful_sync ⇒ SyncRequestModel
Data about the last successful sync associated with this enrollment.
-
#last_sync ⇒ SyncRequestModel
Data about the last sync attached to this app enrollment To retrieve this collection, specify ‘LastSync` in the “Include” parameter for your query.
-
#modified ⇒ Date-time
Last modified date.
-
#modified_user_id ⇒ Uuid
Last user ID to modify.
-
#sync_schedule_is_active ⇒ Boolean
Flag indicating if the Sync process should be ran on the specified schedule.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ AppEnrollmentModel
constructor
Initialize the AppEnrollmentModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ AppEnrollmentModel
Initialize the AppEnrollmentModel using the provided prototype
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 32 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) @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
#app ⇒ ApplicationModel
93 94 95 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 93 def app @app end |
#app_enrollment_id ⇒ Uuid
53 54 55 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 53 def app_enrollment_id @app_enrollment_id end |
#app_id ⇒ Uuid
57 58 59 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 57 def app_id @app_id end |
#connector_info ⇒ ConnectorInfoModel
113 114 115 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 113 def connector_info @connector_info end |
#created ⇒ Date-time
69 70 71 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 69 def created @created end |
#created_user_id ⇒ Uuid
73 74 75 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 73 def created_user_id @created_user_id end |
#cron_settings ⇒ String
85 86 87 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 85 def cron_settings @cron_settings end |
#custom_field_definitions ⇒ CustomFieldDefinitionModel
97 98 99 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 97 def custom_field_definitions @custom_field_definitions end |
#custom_field_values ⇒ CustomFieldValueModel
101 102 103 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 101 def custom_field_values @custom_field_values end |
#group_key ⇒ Uuid
61 62 63 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 61 def group_key @group_key end |
#is_active ⇒ Boolean
65 66 67 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 65 def is_active @is_active end |
#last_successful_sync ⇒ SyncRequestModel
109 110 111 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 109 def last_successful_sync @last_successful_sync end |
#last_sync ⇒ SyncRequestModel
105 106 107 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 105 def last_sync @last_sync end |
#modified ⇒ Date-time
77 78 79 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 77 def modified @modified end |
#modified_user_id ⇒ Uuid
81 82 83 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 81 def modified_user_id @modified_user_id end |
#sync_schedule_is_active ⇒ Boolean
89 90 91 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 89 def sync_schedule_is_active @sync_schedule_is_active end |
Instance Method Details
#as_json(options = {}) ⇒ object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 117 def as_json(={}) { '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, '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
140 141 142 |
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 140 def to_json(*) "[#{as_json(*).to_json(*)}]" end |