|
TIM SDK
TIM API C
|
|
Loalty discount amount.
Object type loyalty_discount.
Functions | |
| ta_e_result_code_t | ta_loyalty_discount_get_value (ta_object_t amount, int64_t *value) |
| Discount amount in minor units. More... | |
| ta_e_result_code_t | ta_loyalty_discount_get_decimal_value (ta_object_t amount, double *value) |
| Discount amount in major units as double precision floating point value. More... | |
| ta_e_result_code_t | ta_loyalty_discount_get_currency (ta_object_t amount, ta_e_currency_t *currency) |
| Discount currency. More... | |
| ta_e_result_code_t | ta_loyalty_discount_get_exponent (ta_object_t amount, int *exponent) |
| Discount exponent. More... | |
| ta_e_result_code_t | ta_loyalty_discount_get_discount_description (ta_object_t amount, ta_object_t *identifier) |
| Discount identifier. More... | |
| ta_e_result_code_t ta_loyalty_discount_get_currency | ( | ta_object_t | amount, |
| ta_e_currency_t * | currency | ||
| ) |
Discount currency.
| [in] | amount | Object instance of type loyalty_discount. |
| [out] | currency | Pointer to variable to write currency to. |
| ta_c_rc_ok | Value written to currency. |
| ta_c_rc_invalid_argument | amount is ta_invalid_object. |
| ta_c_rc_invalid_argument | amount is not of type loyalty_discount. |
| ta_c_rc_invalid_argument | currency is null-pointer. |
| ta_e_result_code_t ta_loyalty_discount_get_decimal_value | ( | ta_object_t | amount, |
| double * | value | ||
| ) |
Discount amount in major units as double precision floating point value.
| [in] | amount | Object instance of type loyalty_discount. |
| [out] | value | Pointer to variable to write value to. |
| ta_c_rc_ok | Value written to value. |
| ta_c_rc_invalid_argument | amount is ta_invalid_object. |
| ta_c_rc_invalid_argument | amount is not of type loyalty_discount. |
| ta_c_rc_invalid_argument | value is null-pointer. |
| ta_e_result_code_t ta_loyalty_discount_get_discount_description | ( | ta_object_t | amount, |
| ta_object_t * | identifier | ||
| ) |
Discount identifier.
| [in] | amount | Object instance of type loyalty_discount. |
| [out] | identifier | Pointer to variable to write object instance to. Object instance is of type string and is not retained. Object instance is ta_invalid_object if identifier is not set in loyalty_discount. |
| ta_c_rc_ok | Object instance written to identifier. |
| ta_c_rc_invalid_argument | amount is ta_invalid_object. |
| ta_c_rc_invalid_argument | amount is not of type loyalty_discount. |
| ta_c_rc_invalid_argument | identifier is null-pointer. |
| ta_e_result_code_t ta_loyalty_discount_get_exponent | ( | ta_object_t | amount, |
| int * | exponent | ||
| ) |
Discount exponent.
| [in] | amount | Object instance of type loyalty_discount. |
| [out] | exponent | Pointer to variable to write exponent to. |
| ta_c_rc_ok | Value written to exponent. |
| ta_c_rc_invalid_argument | amount is ta_invalid_object. |
| ta_c_rc_invalid_argument | amount is not of type loyalty_discount. |
| ta_c_rc_invalid_argument | exponent is null-pointer. |
| ta_e_result_code_t ta_loyalty_discount_get_value | ( | ta_object_t | amount, |
| int64_t * | value | ||
| ) |
Discount amount in minor units.
| [in] | amount | Object instance of type loyalty_discount. |
| [out] | value | Pointer to variable to write value to. Use ta_loyalty_discount_get_exponent to get the used exponent. This can be a different exponent than the one defined by the used currency. |
| ta_c_rc_ok | Value written to value. |
| ta_c_rc_invalid_argument | amount is ta_invalid_object. |
| ta_c_rc_invalid_argument | amount is not of type loyalty_discount. |
| ta_c_rc_invalid_argument | value is null-pointer. |