TIM SDK
TIM API C
item_quantity.h File Reference

Description

Item quantity.

Object type item_quantity.

Functions

ta_e_result_code_t ta_item_quantity_create (ta_object_t *item_quantity)
 Create object of type item_quantity. More...
 
ta_e_result_code_t ta_item_quantity_get_quantity (ta_object_t item_quantity, int *quantity)
 Quantity of the product. More...
 
ta_e_result_code_t ta_item_quantity_set_quantity (ta_object_t item_quantity, int quantity)
 Set quantity of the product. More...
 
ta_e_result_code_t ta_item_quantity_get_exponent (ta_object_t item_quantity, int *exponent)
 Exponent of quantity of the product. More...
 
ta_e_result_code_t ta_item_quantity_set_exponent (ta_object_t item_quantity, int exponent)
 Set exponent of quantity of the product. More...
 
ta_e_result_code_t ta_item_quantity_get_quantity_type (ta_object_t item_quantity, ta_object_t *type)
 Type of quantity of the product. More...
 
ta_e_result_code_t ta_item_quantity_set_type (ta_object_t item_quantity, ta_object_t type)
 Set type of quantity of the product. More...
 

Function Documentation

◆ ta_item_quantity_create()

ta_e_result_code_t ta_item_quantity_create ( ta_object_t item_quantity)

Create object of type item_quantity.

Parameters
[out]item_quantityPointer to variable to write created object instance to. Created object instance is retained.
Return values
ta_c_rc_okObject instance has been created and written to item.
ta_c_rc_invalid_argumentitem_quantity is null-pointer.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_item_quantity_get_exponent()

ta_e_result_code_t ta_item_quantity_get_exponent ( ta_object_t  item_quantity,
int *  exponent 
)

Exponent of quantity of the product.

Parameters
[in]item_quantityObject instance of type item_quantity.
[out]exponentPointer to variable to write value to.
Return values
ta_c_rc_okObject instance written to exponent.
ta_c_rc_invalid_argumentitem_quantity is ta_object_invalid.
ta_c_rc_invalid_argumentitem_quantity is not of type item_quantity.
ta_c_rc_invalid_argumentexponent is null-pointer.

◆ ta_item_quantity_get_quantity()

ta_e_result_code_t ta_item_quantity_get_quantity ( ta_object_t  item_quantity,
int *  quantity 
)

Quantity of the product.

Parameters
[in]item_quantityObject instance of type item_quantity.
[out]quantityPointer to variable to write value to.
Return values
ta_c_rc_okObject instance written to quantity.
ta_c_rc_invalid_argumentitem_quantity is ta_object_invalid.
ta_c_rc_invalid_argumentitem_quantity is not of type item_quantity.
ta_c_rc_invalid_argumentquantity is null-pointer.

◆ ta_item_quantity_get_quantity_type()

ta_e_result_code_t ta_item_quantity_get_quantity_type ( ta_object_t  item_quantity,
ta_object_t type 
)

Type of quantity of the product.

Parameters
[in]item_quantityObject instance of type item_quantity.
[out]typePointer to variable to write object instance to. Object instance is of type string and is not retained.
Return values
ta_c_rc_okObject instance written to type.
ta_c_rc_invalid_argumentitem_quantity is ta_object_invalid.
ta_c_rc_invalid_argumentitem_quantity is not of type item_quantity.
ta_c_rc_invalid_argumenttype is null-pointer.

◆ ta_item_quantity_set_exponent()

ta_e_result_code_t ta_item_quantity_set_exponent ( ta_object_t  item_quantity,
int  exponent 
)

Set exponent of quantity of the product.

Parameters
[in]item_quantityObject instance of type item_quantity.
[in]exponentExponent to set.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem_quantity is ta_object_invalid.
ta_c_rc_invalid_argumentitem_quantity is not of type item_quantity.

◆ ta_item_quantity_set_quantity()

ta_e_result_code_t ta_item_quantity_set_quantity ( ta_object_t  item_quantity,
int  quantity 
)

Set quantity of the product.

Parameters
[in]item_quantityObject instance of type item_quantity.
[in]quantityQuantity to set.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem_quantity is ta_object_invalid.
ta_c_rc_invalid_argumentitem_quantity is not of type item_quantity.

◆ ta_item_quantity_set_type()

ta_e_result_code_t ta_item_quantity_set_type ( ta_object_t  item_quantity,
ta_object_t  type 
)

Set type of quantity of the product.

Parameters
[in]item_quantityObject instance of type item_quantity.
[in]typeObject instance to set. Object instance can be ta_object_invalid to clear the value in item. If object instance is not ta_object_invalid is has to be of type string.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_object_invalid.
ta_c_rc_invalid_argumentitem is not of type item_quantity.
ta_c_rc_invalid_argumenttype is not ta_object_invalid and is not of type string.