ErrorMessage.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //
  2. // ErrorMessage.h
  3. // CardinalEMVCoSDK
  4. //
  5. // Copyright © 2018 Cardinal Commerce. All rights reserved.
  6. //
  7. #import <Foundation/Foundation.h>
  8. /**
  9. * The ErrorMessage class represents an error message that is returned by the ACS to the 3DS SDK
  10. * or an error message that is generated by the 3DS SDK to be returned to the ACS.
  11. */
  12. @interface ErrorMessage : NSObject
  13. @property (nonatomic, strong, readonly) NSString* transactionID;
  14. @property (nonatomic, strong, readonly) NSString* errorCode;
  15. @property (nonatomic, strong, readonly) NSString* errorDescription;
  16. @property (nonatomic, strong, readonly) NSString* errorDetail;
  17. /**
  18. * Construct an ErrorMessage object.
  19. * @param transactionID TransactionId of transaction of which error is associated with.
  20. * @param errorCode Error Code.
  21. * @param errorDescription Description of Error.
  22. * @param errorDetail Detail about the error.
  23. * @return ErrorMessage
  24. */
  25. - (id) initWithTransactionID: (NSString *) transactionID
  26. errorCode: (NSString *) errorCode
  27. errorDescription: (NSString *) errorDescription
  28. errorDetail: (NSString *) errorDetail;
  29. /**
  30. * The getTransactionID method returns the Transaction ID.
  31. * @return NSString
  32. */
  33. - (NSString *) getTransactionID;
  34. /**
  35. * The getErrorCode method returns the error code.
  36. * @return NSString
  37. */
  38. - (NSString *) getErrorCode;
  39. /**
  40. * The getErrorDescription method returns text describing the error.
  41. * @return NSString
  42. */
  43. - (NSString *) getErrorDescription;
  44. /**
  45. * The getErrorDetails method provides error details.
  46. * @return NSString
  47. */
  48. - (NSString *) getErrorDetails;
  49. @end