Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.InvetorySystem.TransactionService.TransactionOrder Class Reference

Detailed Description

Data container that defines transaction instruction.

from and to properties not visible for serializer. Serialization implemented

Public Types

enum  State { InProgress , Confirmed , Canceled , Failed }
 Defines current order state. More...
 

Public Member Functions

 TransactionOrder (Guid id, Storage from, Storage to, Item item, int count)
 Create new order instance. More...
 
 TransactionOrder (Guid id, Storage from, Storage to, Item item, int count, string serviceCode)
 Create new order instance. More...
 
void Confirm ()
 Confirms order and release it from the pool.
 
void Cancel ()
 Canceling order.
 
override string ToString ()
 

Package Functions

bool Reserve ()
 Making reserve of resources required for transaction. More...
 
void ConfirmInternal ()
 Confirms order and release it from the pool.
 
void CancelInternal ()
 

Properties

Guid id [get]
 Id provided to the order.
 
State state [get]
 Current state of order execution.
 
string code [get]
 Optional. Manually defined code of service placed the order. More...
 
bool expired [get, set]
 true in case if any of transaction storages is no longer available. Can't be used in this case in safety reasons.
 
Storage from [get]
 Storage related to transaction as source.
 
Storage to [get]
 Storage related to transaction as destination.
 
Item item [get]
 Returns Item instance related to the order. More...
 
string Bundle [get]
 Resource bundle key.
 
string Key [get]
 Resource key related to transferring Item.
 
int Count [get]
 Count of items reserved by transfer order for relocation.
 

Member Enumeration Documentation

◆ State

Defines current order state.

Enumerator
InProgress 

Order has been placed by not executed yet.

Confirmed 

Order has been executed.

Canceled 

Order has been canceled.

Failed 

Order execution failed.

Order still in registry.

Constructor & Destructor Documentation

◆ TransactionOrder() [1/2]

Doloro.InvetorySystem.TransactionService.TransactionOrder.TransactionOrder ( Guid  id,
Storage  from,
Storage  to,
Item  item,
int  count 
)

Create new order instance.

Parameters
idId of the order.
fromSource storage entity.
toDestination storage entity.
itemSource item resource to share.
countCount of item to transfer.

◆ TransactionOrder() [2/2]

Doloro.InvetorySystem.TransactionService.TransactionOrder.TransactionOrder ( Guid  id,
Storage  from,
Storage  to,
Item  item,
int  count,
string  serviceCode 
)

Create new order instance.

Parameters
idId of the order.
fromSource storage entity.
toDestination storage entity.
itemSource item resource to share.
countCount of item to transfer.
serviceCodeoptional code of the service placed the order.

Member Function Documentation

◆ Reserve()

bool Doloro.InvetorySystem.TransactionService.TransactionOrder.Reserve ( )
package

Making reserve of resources required for transaction.

Returns

Property Documentation

◆ code

string Doloro.InvetorySystem.TransactionService.TransactionOrder.code
get

Optional. Manually defined code of service placed the order.

Could be used to find out what an order among orders related to the same storages and item related to certain service.

◆ item

Item Doloro.InvetorySystem.TransactionService.TransactionOrder.item
get

Returns Item instance related to the order.

Exceptions
KeyNotFoundExceptionItem's resource not found.
InvalidCastExceptionResource has no Item component.

The documentation for this class was generated from the following file: