7.11.4 GetPriceForOneSelection Method
The GetPriceForOneSelection Method asks for the current price of one selection of the Vending Machine. It takes indications as input that influence the price. The output contains the price information.
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 PriceInformation shall not be interpreted.
The signature of this Method is specified below. Table 40 and Table 41 specify the Arguments and AddressSpace representation, respectively.
Signature
GetPriceForOneSelection (
[in] 0:String UserId,
[in] 0:String PaymentMode,
[in] SelectionDataType Selection,
[out] PriceAndContextDataType PriceInformation,
[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". |
| Selection | Defines for what selection the price should be provided, including the corresponding machine engine, the SelectionId, and the requested options. |
| PriceInformation | The price for the SelectionId. 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. -2 = Invalid UserId -3 = Invalid PaymentMode -4 = Invalid SelectionId -5 = Invalid Option contained in Options -6 = Invalid SelectionListVersion -7 = 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 | GetPriceForOneSelection | ||||
| 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 |