github.com/Ingenico-ePayments/connect-sdk-go@v0.0.0-20240318153750-1f8cd329b9c9/errors/APIError.go (about) 1 package errors 2 3 import "github.com/Ingenico-ePayments/connect-sdk-go/domain/errors" 4 5 // APIError represents an error response from the Ingenico ePayments platform which contains an ID and a list of errors. 6 type APIError interface { 7 // Error implements the error interface 8 Error() string 9 10 // Message gets the raw response body that was returned by the Ingenico ePayments platform. 11 Message() string 12 13 // StatusCode gets the HTTP status code that was returned by the Ingenico ePayments platform. 14 StatusCode() int 15 16 // ResponseBody gets the raw response body that was returned by the Ingenico ePayments platform. 17 ResponseBody() string 18 19 // ErrorID gets the error identifier received from the Ingenico ePayments platform if available. 20 ErrorID() string 21 22 // Errors gets the error list received from the Ingenico ePayments platform if available. Never nil. 23 Errors() []errors.APIError 24 }