Skip to content

Application Manager

Jetrin Chokchai edited this page Oct 11, 2018 · 7 revisions

Class: ApplicationManager(call_api)

Represents an ApplicationManager. (You most likely shouldn't be accessing this directly, use AcrosureClient#application instead.)


Constructor

ApplicationManager(call_api)

Create an application manager.

Parameters:

Name Type Description
call_api function A function which call Acrosure API.

Members

call_api :function

call_api Function (which should be granted by AcrosureClient#callAPI )

Type:

  • function

Methods

confirm(application_id) → {dict}

Confirm current application.

Parameters:

Name Type Description
application_id string An application id.

Returns:

  • Confirmed application

Type

  • dict

create(parameters...) → {dict}

Create an application.

Parameters:

Name Type Description
product_id string A product id.
basic_data dict Application's basic_data.
package_options dict Application's package_options.
additional_data dict Application's additional_data.
attachments list A list of files.
package_code string A string of package_code.
ref1 string A string of reference #1.
ref2 string A string of reference #2.
ref3 string A string of reference #3.
group_policy_id string A string of group policy id.
step int A number of current step.

Returns:

  • Created application

Type

  • dict

get(application_id) → {dict}

Get an application with specify id or with current id.

Parameters:

Name Type Description
id string An application id.

Returns:

  • An application

Type

  • dict

get_package(application_id) → {list}

Get current application's package.

Parameters:

Name Type Description
id string An application id.

Returns:

  • Current application's package

Type

  • list

get_packages(application_id) → {list}

Get available packages for current application.

Parameters:

Name Type Description
id string An application id.

Returns:

  • Available packages

Type

  • list

list(query) → {list}

Get applications list with or without query.

Parameters:

Name Type Description
query dict Query object (See Acrosure API document for more detail).

Returns:

  • Applications

Type

  • list

select_package(args) → {dict}

Select package for current application.

Parameters:

Name Type Description
application_id string An application id.
package_code string A string of package_code.

Returns:

  • Updated application

Type

  • dict

submit(id) → {dict}

Submit current application.

Parameters:

Name Type Description
id string An application id.

Returns:

  • Submitted application

Type

  • dict

update(args) → {dict}

Update current application or with specified id.

Parameters:

Name Type Description
application_id string An application id.
basic_data dict Application's basic_data.
package_options dict Application's package_options.
additional_data dict Application's additional_data.
attachments list A list of files.
package_code string A string of package_code.
ref1 string A string of reference #1.
ref2 string A string of reference #2.
ref3 string A string of reference #3.
group_policy_id string A string of group policy id.
step int A number of current step.

Returns:

  • Updated application

Type

  • dict