Class NSPluginResponse

To be able to respond with more than just a true/false, but also an explanation. Such an explanation can be displayed on for instance a disabled Place Order button.

Constructors

NSPluginResponse()

Initializes a new instance of the NSPluginResponse class.

Declaration

NSPluginResponse

Methods

GetChanges()

Declaration

NSChangedData GetChanges()

Examples

NSPluginResponse thing;
NSChangedData changes = thing.GetChanges();

Returns

Type Description
NSChangedData Table name/record ID of data changed by this method, that the client may need to reload.

GetErrorCode()

Declaration

String GetErrorCode()

Examples

NSPluginResponse thing;
String errorCode = thing.GetErrorCode();

Returns

Type Description
String An error code, if available.

GetIsOk()

Declaration

Bool GetIsOk()

Examples

NSPluginResponse thing;
Bool isOk = thing.GetIsOk();

Returns

Type Description
Bool Answer to the question / An indication if the operation went well.

GetTechExplanation()

Declaration

String GetTechExplanation()

Examples

NSPluginResponse thing;
String techExplanation = thing.GetTechExplanation();

Returns

Type Description
String Always in English.

GetUserExplanation()

Declaration

String GetUserExplanation()

Examples

NSPluginResponse thing;
String userExplanation = thing.GetUserExplanation();

Returns

Type Description
String A localized explanation to the answer.

SetChanges(NSChangedData)

Declaration

Void SetChanges(NSChangedData changes)

Examples

NSPluginResponse thing;
NSChangedData changes;
thing.SetChanges(changes);

Parameters

Type Name Description
NSChangedData changes Tablename/recordid of data changed by this method, that the client may need to reload.

Returns

Type Description
Void

SetErrorCode(String)

Declaration

Void SetErrorCode(String errorCode)

Examples

NSPluginResponse thing;
String errorCode;
thing.SetErrorCode(errorCode);

Parameters

Type Name Description
String errorCode An error code, if available.

Returns

Type Description
Void

SetIsOk(Bool)

Declaration

Void SetIsOk(Bool isOk)

Examples

NSPluginResponse thing;
Bool isOk;
thing.SetIsOk(isOk);

Parameters

Type Name Description
Bool isOk Answer to the question / An indication if the operation went well.

Returns

Type Description
Void

SetTechExplanation(String)

Declaration

Void SetTechExplanation(String techExplanation)

Examples

NSPluginResponse thing;
String techExplanation;
thing.SetTechExplanation(techExplanation);

Parameters

Type Name Description
String techExplanation Always in English.

Returns

Type Description
Void

SetUserExplanation(String)

Declaration

Void SetUserExplanation(String userExplanation)

Examples

NSPluginResponse thing;
String userExplanation;
thing.SetUserExplanation(userExplanation);

Parameters

Type Name Description
String userExplanation A localized explanation to the answer.

Returns

Type Description
Void