7.11.3 GetPriceForSelections Method
The GetPriceForSelections Method asks for the current price of all selections of a machine engine of the Vending Machine. It takes indications (UserId, PaymentMode) as input that influence the price. The output contains the price information including price information per Option.
If the execution of the Method cannot be done due to some application logic, the Method should return an Uncertain StatusCode and provide details of the failure in the Status output Argument. When the Method returns an Uncertain StatusCode, the Method is considered to be failed, and the returned PriceInformationList shall not be interpreted.
The signature of this Method is specified below. Table 38 and Table 39 specify the Arguments and AddressSpace representation, respectively.
Signature
GetPriceForSelections (
[in] 0:String UserId,
[in] 0:String PaymentMode,
[in] 0:UriString MachineEngineProductInstanceUri,
[in] 0:SemanticVersionString SelectionListVersion,
[out] SelectionPriceDataType[] PriceInformationList,
[out] 0:Int32 Status);| Argument | Description |
| UserId | The UserId context for which the provided price is valid. |
| PaymentMode | The payment mode that will be used for the payment, which may influence the price. Supported payment modes of the payment service are defined in the PaymentModes of the PaymentService Object, using the PaymentModeId. It is not allowed to provide a NULL or empty string or to use the PaymentMode "NoCheck". |
| MachineEngineProductInstanceUri | The machine engine for which the price information shall be provided. |
| SelectionListVersion | Provides the version of the selections as defined in the Capabilities. Used as context to interpret the Selections and Options correctly. |
| PriceInformationList | The price per selection available for the machine engine. Shall contain exactly one entry for all SelectionIds currently supported by the machine engine. Shall not be interpreted when the Method returns with an UNCERTAIN StatusCode. |
| Status | Status of the execution of the method. If issues occurred during execution. 0 = Execution was successful. -1 = Machine engine referenced in MachineEngineProductInstanceUri not managed by payment service or price service. -2 = Invalid UserId -3 = Invalid PaymentMode -4 = Invalid SelectionListVersion -5 = Price service not available Vendors may return a vendor specific status starting with number -16 or smaller. |
Method Result Codes (defined in Call Service)
| Result Code | Description |
| Bad_UserAccessDenied | See OPC 10000-4 for a general description. |
| Attribute | Value | ||||
| BrowseName | GetPriceForSelections | ||||
| References | NodeClass | BrowseName | DataType | TypeDefinition | ModellingRule |
|---|---|---|---|---|---|
| 0:HasProperty | Variable | 0:InputArguments | 0:Argument[] | 0:PropertyType | 0:Mandatory |
| 0:HasProperty | Variable | 0:OutputArguments | 0:Argument[] | 0:PropertyType | 0:Mandatory |