TIM SDK
TIM API C
loyalty_item.h File Reference

Description

Loyalty item.

Object type loyalty_item.

Functions

ta_e_result_code_t ta_loyalty_item_create (ta_object_t *item)
 Create object of type loyalty_item. More...
 
ta_e_result_code_t ta_loyalty_item_copy (ta_object_t *item, const ta_object_t *source_item)
 Create deep copy of object instance of type loyalty_item. More...
 
ta_e_result_code_t ta_loyalty_item_get_item_id (ta_object_t item, ta_object_t *item_id)
 Identifies the item. More...
 
ta_e_result_code_t ta_loyalty_item_set_item_id (ta_object_t item, ta_object_t item_id)
 Set identifies the item. More...
 
ta_e_result_code_t ta_loyalty_item_get_prod_description (ta_object_t item, ta_object_t *prod_description)
 Product description. More...
 
ta_e_result_code_t ta_loyalty_item_set_prod_description (ta_object_t item, ta_object_t prod_description)
 Set product description. More...
 
ta_e_result_code_t ta_loyalty_item_get_amount (ta_object_t item, ta_object_t *amount)
 Amount. More...
 
ta_e_result_code_t ta_loyalty_item_set_amount (ta_object_t item, ta_object_t amount)
 Set amount. More...
 
ta_e_result_code_t ta_loyalty_item_get_item_quantity (ta_object_t item, ta_object_t *item_quantity)
 Quantity of the product. More...
 
ta_e_result_code_t ta_loyalty_item_set_item_quantity (ta_object_t item, ta_object_t item_quantity)
 Set quantity of the product. More...
 
ta_e_result_code_t ta_loyalty_item_get_amount_total (ta_object_t item, ta_object_t *amount_total)
 Total amount. More...
 
ta_e_result_code_t ta_loyalty_item_set_amount_total (ta_object_t item, ta_object_t amount_total)
 Set total amount. More...
 
ta_e_result_code_t ta_loyalty_discount_get_loyalty_discounts (ta_object_t item, ta_object_t *loyalty_discounts)
 List of loyalty discounts. More...
 
ta_e_result_code_t ta_loyalty_coupon_get_loyalty_coupons (ta_object_t item, ta_object_t *loyalty_coupons)
 List of loyalty coupons. More...
 
ta_e_result_code_t ta_loyalty_item_get_display_product_info (ta_object_t item, ta_object_t *info)
 Display product info. More...
 
ta_e_result_code_t ta_loyalty_item_set_display_product_info (ta_object_t item, ta_object_t info)
 Set display product info. More...
 

Function Documentation

◆ ta_loyalty_coupon_get_loyalty_coupons()

ta_e_result_code_t ta_loyalty_coupon_get_loyalty_coupons ( ta_object_t  item,
ta_object_t loyalty_coupons 
)

List of loyalty coupons.

Parameters
[in]itemObject instance of type loyalty_item.
[out]loyalty_couponsPointer to variable to write object instance to. Object instance is of type list and is not retained. Elements are of type loyalty_coupon. List object instance is ta_object_invalid if value is not set in loyalty_coupon.
Return values
ta_c_rc_okObject instance written to auth_result.
ta_c_rc_invalid_argumentitem is ta_object_invalid.
ta_c_rc_invalid_argumentitem is not of type loyalty_item.
ta_c_rc_invalid_argumentloyalty_coupons is not null-pointer.

◆ ta_loyalty_discount_get_loyalty_discounts()

ta_e_result_code_t ta_loyalty_discount_get_loyalty_discounts ( ta_object_t  item,
ta_object_t loyalty_discounts 
)

List of loyalty discounts.

Parameters
[in]itemObject instance of type loyalty_discount.
[out]loyalty_discountsPointer to variable to write object instance to. Object instance is of type list and is not retained. Elements are of type loyalty_discount. List object instance is ta_object_invalid if value is not set in loyalty_discount.
Return values
ta_c_rc_okObject instance written to auth_result.
ta_c_rc_invalid_argumentitem is ta_object_invalid.
ta_c_rc_invalid_argumentitem is not of type loyalty_discount.
ta_c_rc_invalid_argumentloyalty_discounts is not null-pointer.

◆ ta_loyalty_item_copy()

ta_e_result_code_t ta_loyalty_item_copy ( ta_object_t item,
const ta_object_t source_item 
)

Create deep copy of object instance of type loyalty_item.

Parameters
[out]itemPointer to variable to write created object instance to. Created object instance is retained.
[in]source_itemObject of type loyalty_item to create copy of.
Return values
ta_c_rc_okObject instance has been created and written to item.
ta_c_rc_invalid_argumentitem is null-pointer.
ta_c_rc_invalid_argumentsource_item is ta_object_invalid.
ta_c_rc_invalid_argumentsource_item is not of type loyalty_item.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_loyalty_item_create()

ta_e_result_code_t ta_loyalty_item_create ( ta_object_t item)

Create object of type loyalty_item.

Parameters
[out]itemPointer 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 is null-pointer.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_loyalty_item_get_amount()

ta_e_result_code_t ta_loyalty_item_get_amount ( ta_object_t  item,
ta_object_t amount 
)

Amount.

Parameters
[in]itemObject instance of type loyalty_item.
[out]amountPointer to variable to write object instance to. Object instance is of type amount and is not retained. Object instance is ta_object_invalid if value is not set in loyalty_item.
Return values
ta_c_rc_okObject instance written to auth_result.
ta_c_rc_invalid_argumentitem is ta_object_invalid.
ta_c_rc_invalid_argumentitem is not of type loyalty_item.
ta_c_rc_invalid_argumentamount is not null-pointer.

◆ ta_loyalty_item_get_amount_total()

ta_e_result_code_t ta_loyalty_item_get_amount_total ( ta_object_t  item,
ta_object_t amount_total 
)

Total amount.

Parameters
[in]itemObject instance of type loyalty_item.
[out]amount_totalPointer to variable to write object instance to. Object instance is of type amount and is not retained. Object instance is ta_object_invalid if value is not set in loyalty_item.
Return values
ta_c_rc_okObject instance written to auth_result.
ta_c_rc_invalid_argumentitem is ta_object_invalid.
ta_c_rc_invalid_argumentitem is not of type loyalty_item.
ta_c_rc_invalid_argumentamount_total is not null-pointer.

◆ ta_loyalty_item_get_display_product_info()

ta_e_result_code_t ta_loyalty_item_get_display_product_info ( ta_object_t  item,
ta_object_t info 
)

Display product info.

Parameters
[in]itemObject instance of type loyalty_item.
[out]infoPointer to variable to write object instance to. Object instance is of type display_product_info and is not retained. Object instance is ta_object_invalid if value is not set in loyalty_item.
Return values
ta_c_rc_okObject instance written to auth_result.
ta_c_rc_invalid_argumentitem is ta_object_invalid.
ta_c_rc_invalid_argumentitem is not of type loyalty_item.
ta_c_rc_invalid_argumentinfo is not null-pointer.

◆ ta_loyalty_item_get_item_id()

ta_e_result_code_t ta_loyalty_item_get_item_id ( ta_object_t  item,
ta_object_t item_id 
)

Identifies the item.

Parameters
[in]itemObject instance of type loyalty_item.
[out]item_idPointer to variable to write object instance to. Object instance is of type string and is not retained. Object instance is ta_object_invalid if value is not set in loyalty_item.
Return values
ta_c_rc_okObject instance written to auth_result.
ta_c_rc_invalid_argumentitem is ta_object_invalid.
ta_c_rc_invalid_argumentitem is not of type loyalty_item.
ta_c_rc_invalid_argumentitem_id is not null-pointer.

◆ ta_loyalty_item_get_item_quantity()

ta_e_result_code_t ta_loyalty_item_get_item_quantity ( ta_object_t  item,
ta_object_t item_quantity 
)

Quantity of the product.

Parameters
[in]itemObject instance of type loyalty_item.
[out]item_quantityPointer to variable to write object instance to. Object instance is of type item_quantity and is not retained. Object instance is ta_object_invalid if value is not set in loyalty_item.
Return values
ta_c_rc_okObject instance written to auth_result.
ta_c_rc_invalid_argumentitem is ta_object_invalid.
ta_c_rc_invalid_argumentitem is not of type loyalty_item.
ta_c_rc_invalid_argumentitem_quantity is not null-pointer.

◆ ta_loyalty_item_get_prod_description()

ta_e_result_code_t ta_loyalty_item_get_prod_description ( ta_object_t  item,
ta_object_t prod_description 
)

Product description.

Parameters
[in]itemObject instance of type loyalty_item.
[out]prod_descriptionPointer to variable to write object instance to. Object instance is of type string and is not retained. Object instance is ta_object_invalid if value is not set in loyalty_item.
Return values
ta_c_rc_okObject instance written to auth_result.
ta_c_rc_invalid_argumentitem is ta_object_invalid.
ta_c_rc_invalid_argumentitem is not of type loyalty_item.
ta_c_rc_invalid_argumentprod_description is not null-pointer.

◆ ta_loyalty_item_set_amount()

ta_e_result_code_t ta_loyalty_item_set_amount ( ta_object_t  item,
ta_object_t  amount 
)

Set amount.

Parameters
[in]itemObject instance of type loyalty_item.
[in]amountObject 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 amount.
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 loyalty_item.
ta_c_rc_invalid_argumentamount is not ta_object_invalid and is not of type amount.

◆ ta_loyalty_item_set_amount_total()

ta_e_result_code_t ta_loyalty_item_set_amount_total ( ta_object_t  item,
ta_object_t  amount_total 
)

Set total amount.

Parameters
[in]itemObject instance of type loyalty_item.
[in]amount_totalObject 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 amount.
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 loyalty_item.
ta_c_rc_invalid_argumentamount_total is not ta_object_invalid and is not of type amount.

◆ ta_loyalty_item_set_display_product_info()

ta_e_result_code_t ta_loyalty_item_set_display_product_info ( ta_object_t  item,
ta_object_t  info 
)

Set display product info.

Parameters
[in]itemObject instance of type loyalty_item.
[in]infoObject 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 display_product_info.
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 loyalty_item.
ta_c_rc_invalid_argumentinfo is not ta_object_invalid and is not of type display_product_info.

◆ ta_loyalty_item_set_item_id()

ta_e_result_code_t ta_loyalty_item_set_item_id ( ta_object_t  item,
ta_object_t  item_id 
)

Set identifies the item.

Parameters
[in]itemObject instance of type loyalty_item.
[in]item_idObject 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 loyalty_item.
ta_c_rc_invalid_argumentitem_id is not ta_object_invalid and is not of type string.

◆ ta_loyalty_item_set_item_quantity()

ta_e_result_code_t ta_loyalty_item_set_item_quantity ( ta_object_t  item,
ta_object_t  item_quantity 
)

Set quantity of the product.

Parameters
[in]itemObject instance of type loyalty_item.
[in]item_quantityObject 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 item_quantity.
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 loyalty_item.
ta_c_rc_invalid_argumentitem_quantity is not ta_object_invalid and is not of type item_quantity.

◆ ta_loyalty_item_set_prod_description()

ta_e_result_code_t ta_loyalty_item_set_prod_description ( ta_object_t  item,
ta_object_t  prod_description 
)

Set product description.

Parameters
[in]itemObject instance of type loyalty_item.
[in]prod_descriptionObject 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 loyalty_item.
ta_c_rc_invalid_argumentprod_description is not ta_object_invalid and is not of type string.