TIM SDK
TIM API C
amount_final.h File Reference

Description

Final amount.

Object type amount_final.

Functions

ta_e_result_code_t ta_amount_final_get_value (ta_object_t amount_final, int64_t *value)
 Amount in minor units. More...
 
ta_e_result_code_t ta_amount_final_get_decimal_value (ta_object_t amount_final, double *value)
 Amount in major units as double precision floating point value. More...
 
ta_e_result_code_t ta_amount_final_get_currency (ta_object_t amount_final, ta_e_currency_t *currency)
 Currency. More...
 
ta_e_result_code_t ta_amount_final_get_exponent (ta_object_t amount_final, int *exponent)
 Exponent. More...
 
ta_e_result_code_t ta_amount_final_get_adjustment_result (ta_object_t amount_final, ta_e_adjustment_result_t *adjustment_result)
 Adjustment result. More...
 

Function Documentation

◆ ta_amount_final_get_adjustment_result()

ta_e_result_code_t ta_amount_final_get_adjustment_result ( ta_object_t  amount_final,
ta_e_adjustment_result_t adjustment_result 
)

Adjustment result.

Parameters
[in]amount_finalObject instance of type amount_final.
[out]adjustment_resultPointer to variable to write value to.
Return values
ta_c_rc_okValue written to currency.
ta_c_rc_invalid_argumentamount_final is ta_object_invalid.
ta_c_rc_invalid_argumentamount_final is not of type amount_final.
ta_c_rc_invalid_argumentadjustment_result is null-pointer.

◆ ta_amount_final_get_currency()

ta_e_result_code_t ta_amount_final_get_currency ( ta_object_t  amount_final,
ta_e_currency_t currency 
)

Currency.

Parameters
[in]amount_finalObject instance of type amount_final.
[out]currencyPointer to variable to write currency to.
Return values
ta_c_rc_okValue written to currency.
ta_c_rc_invalid_argumentamount_final is ta_object_invalid.
ta_c_rc_invalid_argumentamount_final is not of type amount_final.
ta_c_rc_invalid_argumentcurrency is null-pointer.

◆ ta_amount_final_get_decimal_value()

ta_e_result_code_t ta_amount_final_get_decimal_value ( ta_object_t  amount_final,
double *  value 
)

Amount in major units as double precision floating point value.

Note
Double precision floating point values can not provide the same level of numerical accuracy as int64_t. It is recommended to use the integer based methods.
Parameters
[in]amount_finalObject instance of type amount_final.
[out]valuePointer to variable to write value to.
Return values
ta_c_rc_okValue written to value.
ta_c_rc_invalid_argumentamount_final is ta_object_invalid.
ta_c_rc_invalid_argumentamount_final is not of type amount_final.
ta_c_rc_invalid_argumentvalue is null-pointer.

◆ ta_amount_final_get_exponent()

ta_e_result_code_t ta_amount_final_get_exponent ( ta_object_t  amount_final,
int *  exponent 
)

Exponent.

Parameters
[in]amount_finalObject instance of type amount_final.
[out]exponentPointer to variable to write exponent to.
Return values
ta_c_rc_okValue written to exponent.
ta_c_rc_invalid_argumentamount_final is ta_object_invalid.
ta_c_rc_invalid_argumentamount_final is not of type amount_final.
ta_c_rc_invalid_argumentexponent is null-pointer.

◆ ta_amount_final_get_value()

ta_e_result_code_t ta_amount_final_get_value ( ta_object_t  amount_final,
int64_t *  value 
)

Amount in minor units.

Parameters
[in]amount_finalObject instance of type amount_final.
[out]valuePointer to variable to write value to. Use ta_amount_final_get_exponent to get the used exponent. This can be a different exponent than the one defined by the used currency.
Return values
ta_c_rc_okValue written to value.
ta_c_rc_invalid_argumentamount_final is ta_object_invalid.
ta_c_rc_invalid_argumentamount_final is not of type amount_final.
ta_c_rc_invalid_argumentvalue is null-pointer.