TIM SDK
TIM API C
basket.h File Reference

Description

Basket.

Object type basket.

Functions

ta_e_result_code_t ta_basket_create (ta_object_t *basket)
 Create object of type basket. More...
 
ta_e_result_code_t ta_basket_copy (ta_object_t *basket, const ta_object_t *source_basket)
 Create deep copy of object instance of type basket. More...
 
ta_e_result_code_t ta_basket_get_items (ta_object_t basket, ta_object_t *items)
 Get list of basket items. More...
 
ta_e_result_code_t ta_basket_set_items (ta_object_t basket, ta_object_t items)
 Set list of basket items. More...
 
ta_e_result_code_t ta_basket_get_loyalty_auth_result (ta_object_t basket, ta_object_t *loyalty_auth_result)
 Optional loyalty auth result. More...
 
ta_e_result_code_t ta_basket_set_loyalty_auth_result (ta_object_t basket, ta_object_t loyalty_auth_result)
 Set optional loyalty auth result. More...
 

Function Documentation

◆ ta_basket_copy()

ta_e_result_code_t ta_basket_copy ( ta_object_t basket,
const ta_object_t source_basket 
)

Create deep copy of object instance of type basket.

Parameters
[out]basketPointer to variable to write created object instance to. Created object instance is retained.
[in]source_basketObject of type basket to create copy of.
Return values
ta_c_rc_okObject instance has been created and written to basket.
ta_c_rc_invalid_argumentbasket is null-pointer.
ta_c_rc_invalid_argumentsource_basket is ta_object_invalid.
ta_c_rc_invalid_argumentsource_basket is not of type basket.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_basket_create()

ta_e_result_code_t ta_basket_create ( ta_object_t basket)

Create object of type basket.

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

◆ ta_basket_get_items()

ta_e_result_code_t ta_basket_get_items ( ta_object_t  basket,
ta_object_t items 
)

Get list of basket items.

Parameters
[in]basketObject instance of type basket.
[out]itemsPointer to variable to write object instance to. Object instance is of type list and is not retained. The list contains elements of type basket_item.
Return values
ta_c_rc_okObject instance written to items.
ta_c_rc_invalid_argumentbasket is ta_object_invalid.
ta_c_rc_invalid_argumentbasket is not of type basket.
ta_c_rc_invalid_argumentitems is null-pointer.

◆ ta_basket_get_loyalty_auth_result()

ta_e_result_code_t ta_basket_get_loyalty_auth_result ( ta_object_t  basket,
ta_object_t loyalty_auth_result 
)

Optional loyalty auth result.

Parameters
[in]basketObject instance of type basket.
[out]loyalty_auth_resultPointer to variable to write object instance to. Object instance is of type integer and is not retained. Object instance is ta_object_invalid if value is not set in basket.
Return values
ta_c_rc_okObject instance written to loyalty_auth_result.
ta_c_rc_invalid_argumentbasket is ta_object_invalid.
ta_c_rc_invalid_argumentbasket is not of type basket.
ta_c_rc_invalid_argumentloyalty_auth_result is null-pointer.

◆ ta_basket_set_items()

ta_e_result_code_t ta_basket_set_items ( ta_object_t  basket,
ta_object_t  items 
)

Set list of basket items.

Parameters
[in]basketObject instance of type basket.
[in]itemsObject instance to set. Object instance has to be of type list. The list has to contain elements of type basket_item.
Return values
ta_c_rc_okObject instance assigned to basket.
ta_c_rc_invalid_argumentbasket is ta_object_invalid.
ta_c_rc_invalid_argumentbasket is not of type basket.
ta_c_rc_invalid_argumentitems is ta_object_invalid.
ta_c_rc_invalid_argumentitems is not of type list.
ta_c_rc_invalid_argumentElement in items is ta_object_invalid.
ta_c_rc_invalid_argumentElement in items is not of type basket_item.

◆ ta_basket_set_loyalty_auth_result()

ta_e_result_code_t ta_basket_set_loyalty_auth_result ( ta_object_t  basket,
ta_object_t  loyalty_auth_result 
)

Set optional loyalty auth result.

Parameters
[in]basketObject instance of type basket.
[in]loyalty_auth_resultObject instance to set. Object instance can be ta_object_invalid to clear the value in basket. If object instance is not ta_object_invalid is has to be of type integer.
Return values
ta_c_rc_okObject instance assigned to basket.
ta_c_rc_invalid_argumentbasket is ta_object_invalid.
ta_c_rc_invalid_argumentbasket is not of type basket.
ta_c_rc_invalid_argumentloyalty_auth_result is not ta_object_invalid and is not of type integer.