TIM SDK
TIM API C
basket_item.h File Reference

Description

Basket item.

Object type basket_item.

Functions

ta_e_result_code_t ta_basket_item_create (ta_object_t *item)
 Create object of type basket_item. More...
 
ta_e_result_code_t ta_basket_item_copy (ta_object_t *item, const ta_object_t *source_item)
 Create deep copy of object instance of type basket_item. More...
 
ta_e_result_code_t ta_basket_item_get_auth_result (ta_object_t item, ta_object_t *auth_result)
 Acquirers result code, which indicates the result of a restriction request. More...
 
ta_e_result_code_t ta_basket_item_set_auth_result (ta_object_t item, ta_object_t auth_result)
 Set acquirers result code, which indicates the result of a restriction request. More...
 
ta_e_result_code_t ta_basket_item_get_item_id (ta_object_t item, ta_object_t *id)
 Identifies the item. More...
 
ta_e_result_code_t ta_basket_item_set_item_id (ta_object_t item, ta_object_t id)
 Set identifies the item. More...
 
ta_e_result_code_t ta_basket_item_get_loyalty_id (ta_object_t item, ta_object_t *loyalty_id)
 Identifies the loyalty type. More...
 
ta_e_result_code_t ta_basket_item_set_loyalty_id (ta_object_t item, ta_object_t loyalty_id)
 Set identifies the loyalty type. More...
 
ta_e_result_code_t ta_basket_item_get_amount (ta_object_t item, ta_object_t *amount)
 Amount. More...
 
ta_e_result_code_t ta_basket_item_set_amount (ta_object_t item, ta_object_t amount)
 Set amount. More...
 
ta_e_result_code_t ta_basket_item_get_amount_total (ta_object_t item, ta_object_t *amount_total)
 Total amount. More...
 
ta_e_result_code_t ta_basket_item_set_amount_total (ta_object_t item, ta_object_t amount_total)
 Set total amount. More...
 
ta_e_result_code_t ta_basket_item_get_amount_discount (ta_object_t item, ta_object_t *amount_discount)
 Discount amount or 0 if discount amount is not used. More...
 
ta_e_result_code_t ta_basket_item_set_amount_discount (ta_object_t item, ta_object_t amount_discount)
 Set discount amount or 0 if discount amount is not used. More...
 
ta_e_result_code_t ta_basket_item_get_amount_tax (ta_object_t item, ta_object_t *amount_tax)
 Tax amount. More...
 
ta_e_result_code_t ta_basket_item_set_amount_tax (ta_object_t item, ta_object_t amount_tax)
 Set tax amount. More...
 
ta_e_result_code_t ta_basket_item_get_amount_gross (ta_object_t item, ta_object_t *amount_gross)
 Gross amount. More...
 
ta_e_result_code_t ta_basket_item_set_amount_gross (ta_object_t item, ta_object_t amount_gross)
 Set gross amount. More...
 
ta_e_result_code_t ta_basket_item_get_unit_amount_discount (ta_object_t item, ta_object_t *unit_amount_discount)
 Tax amount. More...
 
ta_e_result_code_t ta_basket_item_set_unit_amount_discount (ta_object_t item, ta_object_t unit_amount_discount)
 Set unit_amount_discount amount. More...
 
ta_e_result_code_t ta_basket_item_get_unit_amount_gross (ta_object_t item, ta_object_t *unit_amount_gross)
 Tax amount. More...
 
ta_e_result_code_t ta_basket_item_set_unit_amount_gross (ta_object_t item, ta_object_t unit_amount_gross)
 Set unit_amount_gross amount. More...
 
ta_e_result_code_t ta_basket_item_get_item_quantity (ta_object_t item, ta_object_t *item_quantity)
 Quantity of the product. More...
 
ta_e_result_code_t ta_basket_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_basket_item_get_prod_description (ta_object_t item, ta_object_t *prod_description)
 Product description. More...
 
ta_e_result_code_t ta_basket_item_set_prod_description (ta_object_t item, ta_object_t prod_description)
 Set product description. More...
 

Function Documentation

◆ ta_basket_item_copy()

ta_e_result_code_t ta_basket_item_copy ( ta_object_t item,
const ta_object_t source_item 
)

Create deep copy of object instance of type basket_item.

Parameters
[out]itemPointer to variable to write created object instance to. Created object instance is retained.
[in]source_itemObject of type basket_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_invalid_object.
ta_c_rc_invalid_argumentsource_item is not of type basket_item.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_basket_item_create()

ta_e_result_code_t ta_basket_item_create ( ta_object_t item)

Create object of type basket_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_basket_item_get_amount()

ta_e_result_code_t ta_basket_item_get_amount ( ta_object_t  item,
ta_object_t amount 
)

Amount.

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

◆ ta_basket_item_get_amount_discount()

ta_e_result_code_t ta_basket_item_get_amount_discount ( ta_object_t  item,
ta_object_t amount_discount 
)

Discount amount or 0 if discount amount is not used.

Parameters
[in]itemObject instance of type basket_item.
[out]amount_discountPointer to variable to write object instance to. Object instance is of type amount_discount and is not retained. Object instance is ta_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to amount_discount.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentamount_discount is not null-pointer.

◆ ta_basket_item_get_amount_gross()

ta_e_result_code_t ta_basket_item_get_amount_gross ( ta_object_t  item,
ta_object_t amount_gross 
)

Gross amount.

Parameters
[in]itemObject instance of type basket_item.
[out]amount_grossPointer to variable to write object instance to. Object instance is of type amount and is not retained. Object instance is ta_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to amount_gross.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentamount_gross is not null-pointer.

◆ ta_basket_item_get_amount_tax()

ta_e_result_code_t ta_basket_item_get_amount_tax ( ta_object_t  item,
ta_object_t amount_tax 
)

Tax amount.

Parameters
[in]itemObject instance of type basket_item.
[out]amount_taxPointer to variable to write object instance to. Object instance is of type amount and is not retained. Object instance is ta_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to amount_tax.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentamount_tax is not null-pointer.

◆ ta_basket_item_get_amount_total()

ta_e_result_code_t ta_basket_item_get_amount_total ( ta_object_t  item,
ta_object_t amount_total 
)

Total amount.

Parameters
[in]itemObject instance of type basket_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_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to amount_total.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentamount_total is not null-pointer.

◆ ta_basket_item_get_auth_result()

ta_e_result_code_t ta_basket_item_get_auth_result ( ta_object_t  item,
ta_object_t auth_result 
)

Acquirers result code, which indicates the result of a restriction request.

Parameters
[in]itemObject instance of type basket_item.
[out]auth_resultPointer to variable to write object instance to. Object instance is of type integer and is not retained. Object instance is ta_invalid_object if value is not set in basket_item.
Return values
ta_c_rc_okObject instance written to auth_result.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentauth_result is not null-pointer.

◆ ta_basket_item_get_item_id()

ta_e_result_code_t ta_basket_item_get_item_id ( ta_object_t  item,
ta_object_t id 
)

Identifies the item.

Parameters
[in]itemObject instance of type basket_item.
[out]idPointer to variable to write object instance to. Object instance is of type string and is not retained. Object instance is ta_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to id.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentid is not null-pointer.

◆ ta_basket_item_get_item_quantity()

ta_e_result_code_t ta_basket_item_get_item_quantity ( ta_object_t  item,
ta_object_t item_quantity 
)

Quantity of the product.

Parameters
[in]itemObject instance of type basket_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_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to item_quantity.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentitem_quantity is not null-pointer.

◆ ta_basket_item_get_loyalty_id()

ta_e_result_code_t ta_basket_item_get_loyalty_id ( ta_object_t  item,
ta_object_t loyalty_id 
)

Identifies the loyalty type.

Parameters
[in]itemObject instance of type basket_item.
[out]loyalty_idPointer to variable to write object instance to. Object instance is of type string and is not retained. Object instance is ta_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to loyalty_id.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentloyalty_id is not null-pointer.

◆ ta_basket_item_get_prod_description()

ta_e_result_code_t ta_basket_item_get_prod_description ( ta_object_t  item,
ta_object_t prod_description 
)

Product description.

Parameters
[in]itemObject instance of type basket_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_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to prod_description.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentprod_description is not null-pointer.

◆ ta_basket_item_get_unit_amount_discount()

ta_e_result_code_t ta_basket_item_get_unit_amount_discount ( ta_object_t  item,
ta_object_t unit_amount_discount 
)

Tax amount.

Parameters
[in]itemObject instance of type basket_item.
[out]unit_amount_discountPointer to variable to write object instance to. Object instance is of type amount and is not retained. Object instance is ta_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to unit_amount_discount.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentunit_amount_discount is not null-pointer.

◆ ta_basket_item_get_unit_amount_gross()

ta_e_result_code_t ta_basket_item_get_unit_amount_gross ( ta_object_t  item,
ta_object_t unit_amount_gross 
)

Tax amount.

Parameters
[in]itemObject instance of type basket_item.
[out]unit_amount_grossPointer to variable to write object instance to. Object instance is of type amount and is not retained. Object instance is ta_invalid_object if value is not set in item.
Return values
ta_c_rc_okObject instance written to unit_amount_gross.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentunit_amount_gross is not null-pointer.

◆ ta_basket_item_set_amount()

ta_e_result_code_t ta_basket_item_set_amount ( ta_object_t  item,
ta_object_t  amount 
)

Set amount.

Parameters
[in]itemObject instance of type basket_item.
[in]amountObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type amount.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentamount is not ta_invalid_object and is not of type amount.

◆ ta_basket_item_set_amount_discount()

ta_e_result_code_t ta_basket_item_set_amount_discount ( ta_object_t  item,
ta_object_t  amount_discount 
)

Set discount amount or 0 if discount amount is not used.

Parameters
[in]itemObject instance of type basket_item.
[in]amount_discountObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type amount_discount.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentamount_discount is not ta_invalid_object and is not of type amount_discount.

◆ ta_basket_item_set_amount_gross()

ta_e_result_code_t ta_basket_item_set_amount_gross ( ta_object_t  item,
ta_object_t  amount_gross 
)

Set gross amount.

Parameters
[in]itemObject instance of type basket_item.
[in]amount_grossObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type amount.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentamount_gross is not ta_invalid_object and is not of type amount.

◆ ta_basket_item_set_amount_tax()

ta_e_result_code_t ta_basket_item_set_amount_tax ( ta_object_t  item,
ta_object_t  amount_tax 
)

Set tax amount.

Parameters
[in]itemObject instance of type basket_item.
[in]amount_taxObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type amount.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentamount_tax is not ta_invalid_object and is not of type amount.

◆ ta_basket_item_set_amount_total()

ta_e_result_code_t ta_basket_item_set_amount_total ( ta_object_t  item,
ta_object_t  amount_total 
)

Set total amount.

Parameters
[in]itemObject instance of type basket_item.
[in]amount_totalObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type amount.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentamount_total is not ta_invalid_object and is not of type amount.

◆ ta_basket_item_set_auth_result()

ta_e_result_code_t ta_basket_item_set_auth_result ( ta_object_t  item,
ta_object_t  auth_result 
)

Set acquirers result code, which indicates the result of a restriction request.

Parameters
[in]itemObject instance of type basket_item.
[in]auth_resultObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type integer.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentauth_result is not ta_invalid_object and is not of type integer.

◆ ta_basket_item_set_item_id()

ta_e_result_code_t ta_basket_item_set_item_id ( ta_object_t  item,
ta_object_t  id 
)

Set identifies the item.

Parameters
[in]itemObject instance of type basket_item.
[in]idObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type string.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentid is not ta_invalid_object and is not of type string.

◆ ta_basket_item_set_item_quantity()

ta_e_result_code_t ta_basket_item_set_item_quantity ( ta_object_t  item,
ta_object_t  item_quantity 
)

Set quantity of the product.

Parameters
[in]itemObject instance of type basket_item.
[in]item_quantityObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object 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_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentitem_quantity is not ta_invalid_object and is not of type item_quantity.

◆ ta_basket_item_set_loyalty_id()

ta_e_result_code_t ta_basket_item_set_loyalty_id ( ta_object_t  item,
ta_object_t  loyalty_id 
)

Set identifies the loyalty type.

Parameters
[in]itemObject instance of type basket_item.
[in]loyalty_idObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type string.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentloyalty_id is not ta_invalid_object and is not of type string.

◆ ta_basket_item_set_prod_description()

ta_e_result_code_t ta_basket_item_set_prod_description ( ta_object_t  item,
ta_object_t  prod_description 
)

Set product description.

Parameters
[in]itemObject instance of type basket_item.
[in]prod_descriptionObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type string.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentprod_description is not ta_invalid_object and is not of type string.

◆ ta_basket_item_set_unit_amount_discount()

ta_e_result_code_t ta_basket_item_set_unit_amount_discount ( ta_object_t  item,
ta_object_t  unit_amount_discount 
)

Set unit_amount_discount amount.

Parameters
[in]itemObject instance of type basket_item.
[in]unit_amount_discountObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type amount.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentunit_amount_discount is not ta_invalid_object and is not of type amount.

◆ ta_basket_item_set_unit_amount_gross()

ta_e_result_code_t ta_basket_item_set_unit_amount_gross ( ta_object_t  item,
ta_object_t  unit_amount_gross 
)

Set unit_amount_gross amount.

Parameters
[in]itemObject instance of type basket_item.
[in]unit_amount_grossObject instance to set. Object instance can be ta_invalid_object to clear the value in item. If object instance is not ta_invalid_object is has to be of type amount.
Return values
ta_c_rc_okObject instance assigned to item.
ta_c_rc_invalid_argumentitem is ta_invalid_object.
ta_c_rc_invalid_argumentitem is not of type basket_item.
ta_c_rc_invalid_argumentunit_amount_gross is not ta_invalid_object and is not of type amount.