Documentation ¶
Index ¶
- func Unmarshal(resp ForpayResponse, httpResponse *http.Response) error
- type BaseResponse
- func (baseResponse *BaseResponse) GetHTTPContentBytes() []byte
- func (baseResponse *BaseResponse) GetHTTPHeaders() map[string][]string
- func (baseResponse *BaseResponse) GetHTTPStatus() int
- func (baseResponse *BaseResponse) GetOriginHTTPResponse() *http.Response
- func (baseResponse *BaseResponse) IsSuccess() bool
- func (baseResponse *BaseResponse) String() string
- type Error
- type ForpayResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseResponse ¶
type BaseResponse struct {
// contains filtered or unexported fields
}
BaseResponse implements ForpayResponse interface.
func (*BaseResponse) GetHTTPContentBytes ¶
func (baseResponse *BaseResponse) GetHTTPContentBytes() []byte
GetHTTPContentBytes returns http response body bytes.
func (*BaseResponse) GetHTTPHeaders ¶
func (baseResponse *BaseResponse) GetHTTPHeaders() map[string][]string
GetHTTPHeaders returns http headers from response.
func (*BaseResponse) GetHTTPStatus ¶
func (baseResponse *BaseResponse) GetHTTPStatus() int
GetHTTPStatus returns http status of the response.
func (*BaseResponse) GetOriginHTTPResponse ¶
func (baseResponse *BaseResponse) GetOriginHTTPResponse() *http.Response
GetOriginHTTPResponse returns raw http response.
func (*BaseResponse) IsSuccess ¶
func (baseResponse *BaseResponse) IsSuccess() bool
IsSuccess tells if the http request succeed.
func (*BaseResponse) String ¶
func (baseResponse *BaseResponse) String() string
type Error ¶
Error represents forpay api error structure.
func (*Error) IsBusinessFailed ¶
IsBusinessFailed tells if request business(action) failed.
Click to show internal directories.
Click to hide internal directories.