Class: AppEnrollmentsClient

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/clients/app_enrollments_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ AppEnrollmentsClient

Initialize the AppEnrollmentsClient class with an API client instance.

Parameters:

  • connection (LockstepApi)

    The API client object for this connection



22
23
24
# File 'lib/lockstep_sdk/clients/app_enrollments_client.rb', line 22

def initialize(connection)
    @connection = connection
end

Instance Method Details

#create_app_enrollments(start_sync:, body:) ⇒ Object

Creates one or more App Enrollments within this account and returns the records as created.

An App Enrollment 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.

Parameters:

  • start_sync (boolean)

    Option to start sync immediately after creation of app enrollments (default false)

  • body (AppEnrollmentModel)

    The App Enrollments to create



80
81
82
83
84
# File 'lib/lockstep_sdk/clients/app_enrollments_client.rb', line 80

def create_app_enrollments(start_sync:, body:)
    path = "/api/v1/AppEnrollments"
    params = {:startSync => start_sync}
    @connection.request(:post, path, body, params)
end

#delete_app_enrollment(id:, remove_enrollment_data:) ⇒ Object

Deletes the App Enrollment referred to by this unique identifier. An App Enrollment 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.

Parameters:

  • id (uuid)

    The unique ID number of the App Enrollment to delete

  • remove_enrollment_data (boolean)

    Option to remove all associated app enrollment data when deleting app enrollment (default false)



65
66
67
68
69
# File 'lib/lockstep_sdk/clients/app_enrollments_client.rb', line 65

def delete_app_enrollment(id:, remove_enrollment_data:)
    path = "/api/v1/AppEnrollments/#{id}"
    params = {:removeEnrollmentData => remove_enrollment_data}
    @connection.request(:delete, path, nil, params)
end

#query_app_enrollments(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object

Queries App Enrollments for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.

More information on querying can be found on the [Searchlight Query Language](developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.

An App Enrollment 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.

Parameters:



110
111
112
113
114
# File 'lib/lockstep_sdk/clients/app_enrollments_client.rb', line 110

def query_app_enrollments(filter:, include_param:, order:, page_size:, page_number:)
    path = "/api/v1/AppEnrollments/query"
    params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
    @connection.request(:get, path, nil, params)
end

#query_enrollment_fields(id:) ⇒ Object

Queries custom fields settings for app enrollment within the Lockstep platform using the specified filtering, sorting, nested fetch, and pagination rules requested.

More information on querying can be found on the [Searchlight Query Language](developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.

An App Enrollment 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.

Parameters:

  • id (uuid)

    The unique ID number of the App Enrollment for which we retrieve custom fields



126
127
128
129
# File 'lib/lockstep_sdk/clients/app_enrollments_client.rb', line 126

def query_enrollment_fields(id:)
    path = "/api/v1/AppEnrollments/settings/#{id}"
    @connection.request(:get, path, nil, nil)
end

#reconnect_app_enrollment(id:, body:) ⇒ Object

Updates the settings associated with this App Enrollment

Parameters:

  • id (uuid)

    The id for the app enrollment

  • body (AppEnrollmentReconnectInfo)

    Information to reconnect the App Enrollment



91
92
93
94
# File 'lib/lockstep_sdk/clients/app_enrollments_client.rb', line 91

def reconnect_app_enrollment(id:, body:)
    path = "/api/v1/AppEnrollments/#{id}/reconnect"
    @connection.request(:post, path, body, nil)
end

#retrieve_app_enrollment(id:, include_param:) ⇒ Object

Retrieves the App Enrollment with this identifier.

An App Enrollment 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.

Parameters:

  • id (uuid)

    The unique ID number of the App Enrollment to retrieve

  • include_param (string)

    To fetch additional data on this object, specify the list of elements to retrieve. Available collections: App, CustomFields, LastSync, LastSuccessfulSync



36
37
38
39
40
# File 'lib/lockstep_sdk/clients/app_enrollments_client.rb', line 36

def retrieve_app_enrollment(id:, include_param:)
    path = "/api/v1/AppEnrollments/#{id}"
    params = {:include => include_param}
    @connection.request(:get, path, nil, params)
end

#update_app_enrollment(id:, body:) ⇒ Object

Updates an existing App Enrollment with the information supplied to this PATCH call.

The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. For example, you can provide the field name “IsActive” and specify the new value “False”; this API will then change the value of IsActive to false.

An App Enrollment 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.

Parameters:

  • id (uuid)

    The unique ID number of the App Enrollment to update

  • body (object)

    A list of changes to apply to this App Enrollment



53
54
55
56
# File 'lib/lockstep_sdk/clients/app_enrollments_client.rb', line 53

def update_app_enrollment(id:, body:)
    path = "/api/v1/AppEnrollments/#{id}"
    @connection.request(:patch, path, body.to_camelback_keys.to_json, nil)
end