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_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...
 

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_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_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_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_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_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_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.