Constructor
new ApplicationManager(args)
Create an application manager.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
args |
Object | An object consists of several properties.
Properties
|
- Source:
Members
callAPI :function
callAPI Function (which should be granted by AcrosureClient#callAPI )
Type:
- function
- Source:
Methods
(async) confirm(id) → {Object}
Confirm current application.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An application id. |
- Source:
Returns:
Confirmed application
- Type
- Object
(async) create(args) → {Object}
Create an application and change ApplicationManager#id if possible.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object | An object consists of several properties.
Properties
|
- Source:
Returns:
Created application
- Type
- Object
(async) get(id) → {Object}
Get an application with specify id or with current id.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An application id. |
- Source:
Returns:
An application
- Type
- Object
(async, protected) get2C2PForm(args) → {Object}
Get form element for 2c2p payment (This is being called by ApplicationManager#redirectToPayment, but it is exposed just in case you need to access the generated form directly).
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object | An object consists of several properties.
Properties
|
- Source:
Returns:
An form element
- Type
- Object
(async) getPackage(id) → {Array}
Get current application's package.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An application id. |
- Source:
Returns:
Current application's package
- Type
- Array
(async) getPackages(id) → {Array}
Get available packages for current application.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An application id. |
- Source:
Returns:
Available packages
- Type
- Array
(async) list(args) → {Array}
Get applications list with or without query.
Parameters:
Name | Type | Description |
---|---|---|
args |
Object | Query object (See Acrosure API document for more detail). |
- Source:
Returns:
Applications
- Type
- Array
(async) redirectToPayment(args)
Redirect to current application's payment page (Browser only).
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object | An object consists of several properties.
Properties
|
- Source:
(async) selectPackage(args) → {Object}
Select package for current application.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object | An object consists of several properties.
Properties
|
- Source:
Returns:
Updated application
- Type
- Object
(async) submit(id) → {Object}
Submit current application.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | An application id. |
- Source:
Returns:
Submitted application
- Type
- Object
(async) update(args) → {Object}
Update current application or with specified id.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object | An object consists of several properties.
Properties
|
- Source:
Returns:
Updated application
- Type
- Object