TIM SDK
TIM API C
transaction_request.h File Reference

Description

Transaction request.

Object type transaction_request.

Functions

ta_e_result_code_t ta_transaction_request_create (ta_object_t *request)
 Create object of type transaction_request. More...
 
ta_e_result_code_t ta_transaction_request_copy (ta_object_t *request, const ta_object_t *source_request)
 Create deep copy of object instance of type transaction_request. More...
 
ta_e_result_code_t ta_transaction_request_get_user_id (ta_object_t request, ta_object_t *user_id)
 ECR user identifier. More...
 
ta_e_result_code_t ta_transaction_request_set_user_id (ta_object_t request, ta_object_t user_id)
 Set ECR user identifier. More...
 
ta_e_result_code_t ta_transaction_request_get_amount (ta_object_t request, ta_object_t *amount)
 Transaction amount and currency. More...
 
ta_e_result_code_t ta_transaction_request_set_amount (ta_object_t request, ta_object_t amount)
 Set transaction amount and currency. More...
 
ta_e_result_code_t ta_transaction_request_get_transaction_data (ta_object_t request, ta_object_t *transaction_data)
 Transaction information. More...
 
ta_e_result_code_t ta_transaction_request_set_transaction_data (ta_object_t request, ta_object_t transaction_data)
 Set transaction information. More...
 
ta_e_result_code_t ta_transaction_request_get_merchant_options (ta_object_t request, ta_object_t *merchant_options)
 Additional merchant options. More...
 
ta_e_result_code_t ta_transaction_request_set_merchant_options (ta_object_t request, ta_object_t merchant_options)
 Set additional merchant options. More...
 
ta_e_result_code_t ta_transaction_request_get_customer_data (ta_object_t request, ta_object_t *customer_data)
 Customer data. More...
 
ta_e_result_code_t ta_transaction_request_set_customer_data (ta_object_t request, ta_object_t customer_data)
 Set customer data. More...
 
ta_e_result_code_t ta_transaction_request_get_additional_info (ta_object_t request, ta_object_t *additional_info)
 Additional information list. More...
 
ta_e_result_code_t ta_transaction_request_set_additional_info (ta_object_t request, ta_object_t additional_info)
 Set additional information list. More...
 
ta_e_result_code_t ta_transaction_request_get_basket (ta_object_t request, ta_object_t *basket)
 Petrol: Basket. More...
 
ta_e_result_code_t ta_transaction_request_set_basket (ta_object_t request, ta_object_t basket)
 Set request (petrol). More...
 
ta_e_result_code_t ta_transaction_request_get_amount_tip (ta_object_t request, ta_object_t *amount_tip)
 Proposed tip amount. More...
 
ta_e_result_code_t ta_transaction_request_set_amount_tip (ta_object_t request, ta_object_t amount_tip)
 Set proposed tip amount. More...
 
ta_e_result_code_t ta_transaction_request_get_amount_other (ta_object_t request, ta_object_t *amount_other)
 Cashback amount and currency. More...
 
ta_e_result_code_t ta_transaction_request_set_amount_other (ta_object_t request, ta_object_t amount_other)
 Set cashback amount and currency. More...
 
ta_e_result_code_t ta_transaction_request_get_amount_discount (ta_object_t request, ta_object_t *amount_discount)
 Discount amount and currency. More...
 
ta_e_result_code_t ta_transaction_request_set_amount_discount (ta_object_t request, ta_object_t amount_discount)
 Set discount amount and currency. More...
 
ta_e_result_code_t ta_transaction_request_get_loyalty_coupon_list (ta_object_t request, ta_object_t *loyalty_coupon_list)
 Loyalty coupon list. More...
 
ta_e_result_code_t ta_transaction_request_set_loyalty_coupon_list (ta_object_t request, ta_object_t loyalty_coupon_list)
 Set loyalty coupon list. More...
 
ta_e_result_code_t ta_transaction_request_get_retain_card (ta_object_t request, ta_e_boolean_t *retain_card)
 Retain card. More...
 
ta_e_result_code_t ta_transaction_request_set_retain_card (ta_object_t request, ta_e_boolean_t retain_card)
 Set retain card. More...
 

Function Documentation

◆ ta_transaction_request_copy()

ta_e_result_code_t ta_transaction_request_copy ( ta_object_t request,
const ta_object_t source_request 
)

Create deep copy of object instance of type transaction_request.

Parameters
[out]requestPointer to variable to write created object instance to. Created object instance is retained.
[in]source_requestObject of type transaction_request to create copy of.
Return values
ta_c_rc_okObject instance has been created and written to request.
ta_c_rc_invalid_argumentrequest is null-pointer.
ta_c_rc_invalid_argumentsource_request is ta_invalid_object.
ta_c_rc_invalid_argumentsource_request is not of type transaction_request.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_transaction_request_create()

ta_e_result_code_t ta_transaction_request_create ( ta_object_t request)

Create object of type transaction_request.

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

◆ ta_transaction_request_get_additional_info()

ta_e_result_code_t ta_transaction_request_get_additional_info ( ta_object_t  request,
ta_object_t additional_info 
)

Additional information list.

Parameters
[in]requestObject instance of type transaction_request.
[out]additional_infoPointer to variable to write object instance to. Object instance is of type map and is not retained. The map contains keys of type integer and values of type string.
Return values
ta_c_rc_okObject instance written to additional_info.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentadditional_info is null-pointer.

◆ ta_transaction_request_get_amount()

ta_e_result_code_t ta_transaction_request_get_amount ( ta_object_t  request,
ta_object_t amount 
)

Transaction amount and currency.

Parameters
[in]requestObject instance of type transaction_request.
[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 request.
Return values
ta_c_rc_okObject instance written to amount.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentamount is null-pointer.

◆ ta_transaction_request_get_amount_discount()

ta_e_result_code_t ta_transaction_request_get_amount_discount ( ta_object_t  request,
ta_object_t amount_discount 
)

Discount amount and currency.

Parameters
[in]requestObject instance of type transaction_request.
[out]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 request.
Return values
ta_c_rc_okObject instance written to amount_discount.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentamount_discount is null-pointer.

◆ ta_transaction_request_get_amount_other()

ta_e_result_code_t ta_transaction_request_get_amount_other ( ta_object_t  request,
ta_object_t amount_other 
)

Cashback amount and currency.

Parameters
[in]requestObject instance of type transaction_request.
[out]amount_otherPointer 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 request.
Return values
ta_c_rc_okObject instance written to amount_other.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentamount_other is null-pointer.

◆ ta_transaction_request_get_amount_tip()

ta_e_result_code_t ta_transaction_request_get_amount_tip ( ta_object_t  request,
ta_object_t amount_tip 
)

Proposed tip amount.

Parameters
[in]requestObject instance of type transaction_request.
[out]amount_tipPointer 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 request.
Return values
ta_c_rc_okObject instance written to amount_tip.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentamount_tip is null-pointer.

◆ ta_transaction_request_get_basket()

ta_e_result_code_t ta_transaction_request_get_basket ( ta_object_t  request,
ta_object_t basket 
)

Petrol: Basket.

Parameters
[in]requestObject instance of type transaction_request.
[out]basketPointer to variable to write object instance to. Object instance is of type basket and is not retained. Object instance is ta_invalid_object if value is not set in request.
Return values
ta_c_rc_okObject instance written to basket.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentbasket is null-pointer.

◆ ta_transaction_request_get_customer_data()

ta_e_result_code_t ta_transaction_request_get_customer_data ( ta_object_t  request,
ta_object_t customer_data 
)

Customer data.

Parameters
[in]requestObject instance of type transaction_request.
[out]customer_dataPointer to variable to write object instance to. Object instance is of type map and is not retained. The map contains elements of key type integer with values from enumeration ta_e_customer_data_type_t and value type string.
Return values
ta_c_rc_okObject instance written to customer_data.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentcustomer_data is null-pointer.

◆ ta_transaction_request_get_loyalty_coupon_list()

ta_e_result_code_t ta_transaction_request_get_loyalty_coupon_list ( ta_object_t  request,
ta_object_t loyalty_coupon_list 
)

Loyalty coupon list.

Parameters
[in]requestObject instance of type transaction_request.
[out]loyalty_coupon_listPointer to variable to write object instance to. Object instance is of type list and is not retained. The list contains elements of type loyalty_coupon.
Return values
ta_c_rc_okObject instance written to loyalty_coupon_list.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentloyalty_coupon_list is null-pointer.

◆ ta_transaction_request_get_merchant_options()

ta_e_result_code_t ta_transaction_request_get_merchant_options ( ta_object_t  request,
ta_object_t merchant_options 
)

Additional merchant options.

Parameters
[in]requestObject instance of type transaction_request.
[out]merchant_optionsPointer to variable to write object instance to. Object instance is of type list and is not retained. The list contains elements of type merchant_option.
Return values
ta_c_rc_okObject instance written to merchant_options.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentmerchant_options is null-pointer.

◆ ta_transaction_request_get_retain_card()

ta_e_result_code_t ta_transaction_request_get_retain_card ( ta_object_t  request,
ta_e_boolean_t retain_card 
)

Retain card.

Parameters
[in]requestObject instance of type transaction_request.
[out]retain_cardPointer to variable to write object instance to.
Return values
ta_c_rc_okObject instance written to retain_card.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentretain_card is null-pointer.

◆ ta_transaction_request_get_transaction_data()

ta_e_result_code_t ta_transaction_request_get_transaction_data ( ta_object_t  request,
ta_object_t transaction_data 
)

Transaction information.

Parameters
[in]requestObject instance of type transaction_request.
[out]transaction_dataPointer to variable to write object instance to. Object instance is of type transaction_data and is not retained. Object instance is ta_invalid_object if value is not set in request.
Return values
ta_c_rc_okObject instance written to transaction_data.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumenttransaction_data is null-pointer.

◆ ta_transaction_request_get_user_id()

ta_e_result_code_t ta_transaction_request_get_user_id ( ta_object_t  request,
ta_object_t user_id 
)

ECR user identifier.

Parameters
[in]requestObject instance of type transaction_request.
[out]user_idPointer 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 request.
Return values
ta_c_rc_okObject instance written to user_id.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentuser_id is null-pointer.

◆ ta_transaction_request_set_additional_info()

ta_e_result_code_t ta_transaction_request_set_additional_info ( ta_object_t  request,
ta_object_t  additional_info 
)

Set additional information list.

Parameters
[in]requestObject instance of type transaction_request.
[in]additional_infoObject instance to set. Object instance has to be of type map. The map has to contain keys of type integer and values of type string.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentadditional_info is ta_invalid_object.
ta_c_rc_invalid_argumentadditional_info is not of type map.
ta_c_rc_invalid_argumentKey in additional_info is ta_invalid_object.
ta_c_rc_invalid_argumentKey in additional_info is not of type integer.
ta_c_rc_invalid_argumentValue in additional_info is ta_invalid_object.
ta_c_rc_invalid_argumentValue in additional_info is not of type string.

◆ ta_transaction_request_set_amount()

ta_e_result_code_t ta_transaction_request_set_amount ( ta_object_t  request,
ta_object_t  amount 
)

Set transaction amount and currency.

Parameters
[in]requestObject instance of type transaction_request.
[in]amountObject instance to set. Object instance can be ta_invalid_object to clear the value in request. If object instance is not ta_invalid_object is has to be of type amount.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentamount is not ta_invalid_object and is not of type amount.

◆ ta_transaction_request_set_amount_discount()

ta_e_result_code_t ta_transaction_request_set_amount_discount ( ta_object_t  request,
ta_object_t  amount_discount 
)

Set discount amount and currency.

Parameters
[in]requestObject instance of type transaction_request.
[in]amount_discountObject instance to set. Object instance can be ta_invalid_object to clear the value in request. 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 request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentamount_discount is not ta_invalid_object and is not of type amount_discount.

◆ ta_transaction_request_set_amount_other()

ta_e_result_code_t ta_transaction_request_set_amount_other ( ta_object_t  request,
ta_object_t  amount_other 
)

Set cashback amount and currency.

Parameters
[in]requestObject instance of type transaction_request.
[in]amount_otherObject instance to set. Object instance can be ta_invalid_object to clear the value in request. If object instance is not ta_invalid_object is has to be of type amount.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentamount_other is not ta_invalid_object and is not of type amount.

◆ ta_transaction_request_set_amount_tip()

ta_e_result_code_t ta_transaction_request_set_amount_tip ( ta_object_t  request,
ta_object_t  amount_tip 
)

Set proposed tip amount.

Parameters
[in]requestObject instance of type transaction_request.
[in]amount_tipObject instance to set. Object instance can be ta_invalid_object to clear the value in request. If object instance is not ta_invalid_object is has to be of type amount.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentamount_tip is not ta_invalid_object and is not of type amount.

◆ ta_transaction_request_set_basket()

ta_e_result_code_t ta_transaction_request_set_basket ( ta_object_t  request,
ta_object_t  basket 
)

Set request (petrol).

Parameters
[in]requestObject instance of type transaction_request.
[in]basketObject instance to set. Object instance can be ta_invalid_object to clear the value in request. If object instance is not ta_invalid_object is has to be of type basket.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentbasket is not ta_invalid_object and is not of type basket.

◆ ta_transaction_request_set_customer_data()

ta_e_result_code_t ta_transaction_request_set_customer_data ( ta_object_t  request,
ta_object_t  customer_data 
)

Set customer data.

Parameters
[in]requestObject instance of type transaction_request.
[in]customer_dataObject instance to set. Object instance has to be of type map. The map has to contain elements of key type integer with values from enumeration ta_e_customer_data_type_t and key type string.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentcustomer_data is ta_invalid_object.
ta_c_rc_invalid_argumentcustomer_data is not of type map.
ta_c_rc_invalid_argumentKey in customer_data is not of type integer with with values from enumeration ta_e_customer_data_type_t.
ta_c_rc_invalid_argumentValue in customer_data is ta_invalid_object.
ta_c_rc_invalid_argumentValue in customer_data is not of type string.

◆ ta_transaction_request_set_loyalty_coupon_list()

ta_e_result_code_t ta_transaction_request_set_loyalty_coupon_list ( ta_object_t  request,
ta_object_t  loyalty_coupon_list 
)

Set loyalty coupon list.

Parameters
[in]requestObject instance of type transaction_request.
[in]loyalty_coupon_listObject instance to set. Object instance has to be of type list. The list has to contain elements of type loyalty_coupon.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentloyalty_coupon_list is ta_invalid_object.
ta_c_rc_invalid_argumentloyalty_coupon_list is not of type list.
ta_c_rc_invalid_argumentElement in loyalty_coupon_list is ta_invalid_object.
ta_c_rc_invalid_argumentElement in loyalty_coupon_list is not of type loyalty_coupon.

◆ ta_transaction_request_set_merchant_options()

ta_e_result_code_t ta_transaction_request_set_merchant_options ( ta_object_t  request,
ta_object_t  merchant_options 
)

Set additional merchant options.

Parameters
[in]requestObject instance of type transaction_request.
[in]merchant_optionsObject instance to set. Object instance has to be of type list. The list has to contain elements of type merchant_option.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentmerchant_options is ta_invalid_object.
ta_c_rc_invalid_argumentmerchant_options is not of type list.
ta_c_rc_invalid_argumentElement in merchant_options is ta_invalid_object.
ta_c_rc_invalid_argumentElement in merchant_options is not of type merchant_option.

◆ ta_transaction_request_set_retain_card()

ta_e_result_code_t ta_transaction_request_set_retain_card ( ta_object_t  request,
ta_e_boolean_t  retain_card 
)

Set retain card.

Parameters
[in]requestObject instance of type transaction_request.
[in]retain_cardValue to set.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.

◆ ta_transaction_request_set_transaction_data()

ta_e_result_code_t ta_transaction_request_set_transaction_data ( ta_object_t  request,
ta_object_t  transaction_data 
)

Set transaction information.

Parameters
[in]requestObject instance of type transaction_request.
[in]transaction_dataObject instance to set. Object instance can be ta_invalid_object to clear the value in request. If object instance is not ta_invalid_object is has to be of type transaction_data.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumenttransaction_data is not ta_invalid_object and is not of type transaction_data.

◆ ta_transaction_request_set_user_id()

ta_e_result_code_t ta_transaction_request_set_user_id ( ta_object_t  request,
ta_object_t  user_id 
)

Set ECR user identifier.

Parameters
[in]requestObject instance of type transaction_request.
[in]user_idObject instance to set. Object instance can be ta_invalid_object to clear the value in request. If object instance is not ta_invalid_object is has to be of type integer.
Return values
ta_c_rc_okObject instance assigned to request.
ta_c_rc_invalid_argumentrequest is ta_invalid_object.
ta_c_rc_invalid_argumentrequest is not of type transaction_request.
ta_c_rc_invalid_argumentuser_id is not ta_invalid_object and is not of type integer.