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
# 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)
    @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

Returns The Application to which this AppEnrollment belongs. Contains general name, description, logo, and other metadata about this application. To retrieve this object, specify App in the “Include” parameter for your query.

Returns:

  • (ApplicationModel)

    The Application to which this AppEnrollment belongs. Contains general name, description, logo, and other metadata about this application. To retrieve this object, specify App in the “Include” parameter for your query.



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

def app
  @app
end

#app_enrollment_idUuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.

Returns:

  • (Uuid)

    The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.



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

def app_enrollment_id
  @app_enrollment_id
end

#app_idUuid

Returns The ID number of the Application that this enrollment represents. You can fetch information about this Application object by specifying App in the “Include” parameter for your request.

Returns:

  • (Uuid)

    The ID number of the Application that this enrollment represents. You can fetch information about this Application object by specifying App in the “Include” parameter for your request.



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

def app_id
  @app_id
end

#connector_infoConnectorInfoModel

Returns Optional data necessary to create an app enrollment for a supported connector. Only enter relevant fields for the given connector.

Returns:

  • (ConnectorInfoModel)

    Optional data necessary to create an app enrollment for a supported connector. Only enter relevant fields for the given connector.



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

def connector_info
  @connector_info
end

#createdDate-time

Returns Created date.

Returns:

  • (Date-time)

    Created date



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

def created
  @created
end

#created_user_idUuid

Returns Created user ID.

Returns:

  • (Uuid)

    Created user ID



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

def created_user_id
  @created_user_id
end

#cron_settingsString

Returns Stores schedule information for the application enrollment see en.wikipedia.org/wiki/Cron.

Returns:



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

def cron_settings
  @cron_settings
end

#custom_field_definitionsCustomFieldDefinitionModel

Returns A collection of custom fields linked to this record. To retrieve this collection, specify CustomFieldDefinitions in the include parameter when retrieving data. To create a custom field, use the [Create Custom Field](developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the TableKey to AppEnrollment and the ObjectKey set to the AppEnrollmentId for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).

Returns:



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

def custom_field_definitions
  @custom_field_definitions
end

#custom_field_valuesCustomFieldValueModel

Returns A collection of custom fields linked to this record. To retrieve this collection, specify CustomFieldValues in the include parameter when retrieving data. To create a custom field, use the [Create Custom Field](developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the TableKey to AppEnrollment and the ObjectKey set to the AppEnrollmentId for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).

Returns:



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

def custom_field_values
  @custom_field_values
end

#group_keyUuid

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](developer.lockstep.io/docs/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](developer.lockstep.io/docs/accounts-and-groupkeys).



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

def group_key
  @group_key
end

#is_activeBoolean

Returns Determines whether the app enrollment is in use.

Returns:

  • (Boolean)

    Determines whether the app enrollment is in use



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

def is_active
  @is_active
end

#last_successful_syncSyncRequestModel

Returns Data about the last successful sync associated with this enrollment.

Returns:

  • (SyncRequestModel)

    Data about the last successful sync associated with this enrollment



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

def last_successful_sync
  @last_successful_sync
end

#last_syncSyncRequestModel

Returns Data about the last sync attached to this app enrollment To retrieve this collection, specify LastSync in the “Include” parameter for your query.

Returns:

  • (SyncRequestModel)

    Data about the last sync attached to this app enrollment To retrieve this collection, specify LastSync in the “Include” parameter for your query.



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

def last_sync
  @last_sync
end

#modifiedDate-time

Returns Last modified date.

Returns:

  • (Date-time)

    Last modified date



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

def modified
  @modified
end

#modified_user_idUuid

Returns Last user ID to modify.

Returns:

  • (Uuid)

    Last user ID to modify



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

def modified_user_id
  @modified_user_id
end

#sync_schedule_is_activeBoolean

Returns Flag indicating if the Sync process should be ran on the specified schedule.

Returns:

  • (Boolean)

    Flag indicating if the Sync process should be ran on the specified schedule



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

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



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 115

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,
        '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

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



138
139
140
# File 'lib/lockstep_sdk/models/app_enrollment_model.rb', line 138

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