TIM SDK
TIM API C
receipt.h File Reference

Description

Receipt.

Object type receipt.

Functions

ta_e_result_code_t ta_receipt_create (ta_object_t *receipt, ta_e_recipient_t recipient, ta_object_t value)
 Create receipt. More...
 
ta_e_result_code_t ta_receipt_get_recipient (ta_object_t receipt, ta_e_recipient_t *recipient)
 Recipient of the receipt. More...
 
ta_e_result_code_t ta_receipt_get_value (ta_object_t receipt, ta_object_t *value)
 Receipt to print. More...
 

Function Documentation

◆ ta_receipt_create()

ta_e_result_code_t ta_receipt_create ( ta_object_t receipt,
ta_e_recipient_t  recipient,
ta_object_t  value 
)

Create receipt.

Parameters
[out]receiptPointer to variable to write created object instance to. Created object instance is retained.
[in]recipientRecipient.
[in]valueReceipt text. Object instance has to be of type string.
Return values
ta_c_rc_okObject instance has been created and written to receipt.
ta_c_rc_invalid_argumentreceipt is null-pointer.
ta_c_rc_invalid_argumentrecipient is invalid value.
ta_c_rc_invalid_argumentvalue is ta_object_invalid.
ta_c_rc_invalid_argumentvalue is not of type string.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_receipt_get_recipient()

ta_e_result_code_t ta_receipt_get_recipient ( ta_object_t  receipt,
ta_e_recipient_t recipient 
)

Recipient of the receipt.

Parameters
[in]receiptObject instance of type receipt.
[out]recipientPointer to variable to write value to.
Return values
ta_c_rc_okValue written to recipient.
ta_c_rc_invalid_argumentreceipt is ta_object_invalid.
ta_c_rc_invalid_argumentreceipt is not of type receipt.
ta_c_rc_invalid_argumentrecipient is null-pointer.

◆ ta_receipt_get_value()

ta_e_result_code_t ta_receipt_get_value ( ta_object_t  receipt,
ta_object_t value 
)

Receipt to print.

Parameters
[in]receiptObject instance of type receipt.
[out]valuePointer to variable to write object instance to. Object instance is of type string and is not retained.
Return values
ta_c_rc_okObject instance written to value.
ta_c_rc_invalid_argumentreceipt is ta_object_invalid.
ta_c_rc_invalid_argumentreceipt is not of type receipt.
ta_c_rc_invalid_argumentvalue is null-pointer.