TIM SDK
TIM API C
|
|
Loyalty coupon. Contains amount value given by merchant.
Object type loyalty_coupon.
Functions | |
ta_e_result_code_t | ta_loyalty_coupon_create (ta_object_t *loyalty_coupon, ta_object_t amount, ta_e_currency_t currency, ta_object_t exponent, ta_object_t id, ta_e_coupon_rejection_reason_t rejection_reason) |
Create object of type loyalty_coupon. More... | |
ta_e_result_code_t | ta_loyalty_coupon_get_amount (ta_object_t loyalty_coupon, ta_object_t *value) |
Coupon amount. More... | |
ta_e_result_code_t | ta_loyalty_coupon_get_currency (ta_object_t loyalty_coupon, ta_e_currency_t *currency) |
Coupon currency. More... | |
ta_e_result_code_t | ta_loyalty_coupon_get_exponent (ta_object_t loyalty_coupon, ta_object_t *exponent) |
Exponent of coupon amount. More... | |
ta_e_result_code_t | ta_loyalty_coupon_get_id (ta_object_t loyalty_coupon, ta_object_t *id) |
Coupon ID. More... | |
ta_e_result_code_t | ta_loyalty_coupon_get_rejection_reason (ta_object_t loyalty_coupon, ta_e_coupon_rejection_reason_t *rejection_reason) |
Coupon rejection reason. More... | |
ta_e_result_code_t ta_loyalty_coupon_create | ( | ta_object_t * | loyalty_coupon, |
ta_object_t | amount, | ||
ta_e_currency_t | currency, | ||
ta_object_t | exponent, | ||
ta_object_t | id, | ||
ta_e_coupon_rejection_reason_t | rejection_reason | ||
) |
Create object of type loyalty_coupon.
[out] | loyalty_coupon | Pointer to variable to write created object instance to. Created object instance is retained. |
[in] | amount | Coupon amount in minor units as object of type integer. |
[in] | currency | Currency of amount. |
[in] | exponent | Exponent of amount as object of type integer. |
[in] | id | Coupon ID. |
[in] | rejection_reason | Rejection reason. |
ta_c_rc_ok | Object instance has been created and written to loyalty_coupon. |
ta_c_rc_invalid_argument | loyalty_coupon is null-pointer. |
ta_c_rc_invalid_argument | currency is not a valid value from ta_e_currency_t. |
ta_c_rc_invalid_argument | amount is less than 0. |
ta_c_rc_invalid_argument | exponent is less than 0. |
ta_c_rc_invalid_argument | amount is ta_invalid_object. |
ta_c_rc_invalid_argument | exponent is ta_invalid_object. |
ta_c_rc_invalid_argument | id is ta_invalid_object. |
ta_c_rc_invalid_argument | rejection_reason is not a valid value from ta_e_coupon_rejection_reason_t. |
ta_c_rc_out_of_memory | Failed allocating memory. |
ta_e_result_code_t ta_loyalty_coupon_get_amount | ( | ta_object_t | loyalty_coupon, |
ta_object_t * | value | ||
) |
Coupon amount.
[in] | loyalty_coupon | Object instance of type loyalty_coupon. |
[out] | amount | Pointer to variable to write value to. Object instance of type integer and is not retained. |
ta_c_rc_ok | Object instance written to amount. |
ta_c_rc_invalid_argument | loyalty_coupon is ta_invalid_object. |
ta_c_rc_invalid_argument | loyalty_coupon is not of type loyalty_coupon. |
ta_c_rc_invalid_argument | amount is null-pointer. |
ta_e_result_code_t ta_loyalty_coupon_get_currency | ( | ta_object_t | loyalty_coupon, |
ta_e_currency_t * | currency | ||
) |
Coupon currency.
[in] | loyalty_coupon | Object instance of type loyalty_coupon. |
[out] | currency | Pointer to variable to write value to. |
ta_c_rc_ok | Object instance written to amount. |
ta_c_rc_invalid_argument | loyalty_coupon is ta_invalid_object. |
ta_c_rc_invalid_argument | loyalty_coupon is not of type loyalty_coupon. |
ta_c_rc_invalid_argument | currency is null-pointer. |
ta_e_result_code_t ta_loyalty_coupon_get_exponent | ( | ta_object_t | loyalty_coupon, |
ta_object_t * | exponent | ||
) |
Exponent of coupon amount.
[in] | loyalty_coupon | Object instance of type loyalty_coupon. |
[out] | exponent | Pointer to variable to write value to. Object instance of type integer and is not retained. |
ta_c_rc_ok | Object instance written to exponent. |
ta_c_rc_invalid_argument | loyalty_coupon is ta_invalid_object. |
ta_c_rc_invalid_argument | loyalty_coupon is not of type loyalty_coupon. |
ta_c_rc_invalid_argument | exponent is null-pointer. |
ta_e_result_code_t ta_loyalty_coupon_get_id | ( | ta_object_t | loyalty_coupon, |
ta_object_t * | id | ||
) |
Coupon ID.
[in] | loyalty_coupon | Object instance of type loyalty_coupon. |
[out] | id | Pointer to variable to write object instance to. Object instance is of type string and is not retained. |
ta_c_rc_ok | Object instance written to id. |
ta_c_rc_invalid_argument | loyalty_coupon is ta_invalid_object. |
ta_c_rc_invalid_argument | loyalty_coupon is not of type loyalty_coupon. |
ta_c_rc_invalid_argument | id is null-pointer. |
ta_e_result_code_t ta_loyalty_coupon_get_rejection_reason | ( | ta_object_t | loyalty_coupon, |
ta_e_coupon_rejection_reason_t * | rejection_reason | ||
) |
Coupon rejection reason.
[in] | loyalty_coupon | Object instance of type loyalty_coupon. |
[out] | rejection_reason | Pointer to variable to write value to. |
ta_c_rc_ok | Object instance written to rejection_reason. |
ta_c_rc_invalid_argument | loyalty_coupon is ta_invalid_object. |
ta_c_rc_invalid_argument | loyalty_coupon is not of type loyalty_coupon. |
ta_c_rc_invalid_argument | rejection_reason is null-pointer. |