Documentation ¶
Overview ¶
Package payment is a generated GoMock package.
Index ¶
- Variables
- type Fetch
- func (impl *Fetch) GetLatestRefundStatus(refundEndpointUrl string, HTTPClient *http.Client, apiKey string) (*data.RefundResource, int, error)
- func (impl *Fetch) GetPayment(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (data.PaymentResponse, int, error)
- func (impl *Fetch) GetPaymentDetails(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (data.PaymentDetailsResponse, int, error)
- type Fetcher
- type InvalidPaymentAPIResponse
- type MockFetcher
- func (m *MockFetcher) EXPECT() *MockFetcherMockRecorder
- func (m *MockFetcher) GetLatestRefundStatus(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (*data.RefundResource, int, error)
- func (m *MockFetcher) GetPayment(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (data.PaymentResponse, int, error)
- func (m *MockFetcher) GetPaymentDetails(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (data.PaymentDetailsResponse, int, error)
- type MockFetcherMockRecorder
- func (mr *MockFetcherMockRecorder) GetLatestRefundStatus(paymentAPIURL, HTTPClient, apiKey interface{}) *gomock.Call
- func (mr *MockFetcherMockRecorder) GetPayment(paymentAPIURL, HTTPClient, apiKey interface{}) *gomock.Call
- func (mr *MockFetcherMockRecorder) GetPaymentDetails(paymentAPIURL, HTTPClient, apiKey interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
var ErrResourceGone = errors.New(`The requested resource for payment is gone - status [410]`)
ErrResourceGone is a sentinel error used when payment resources have been intentionally removed
Functions ¶
This section is empty.
Types ¶
type Fetch ¶
type Fetch struct{}
Fetch implements the the Fetcher interface
func (*Fetch) GetLatestRefundStatus ¶
type Fetcher ¶
type Fetcher interface { GetPayment(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (data.PaymentResponse, int, error) GetPaymentDetails(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (data.PaymentDetailsResponse, int, error) GetLatestRefundStatus(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (*data.RefundResource, int, error) }
Fetcher provides an interface by which to fetch payments data
type InvalidPaymentAPIResponse ¶
type InvalidPaymentAPIResponse struct {
// contains filtered or unexported fields
}
InvalidPaymentAPIResponse is returned when an invalid status is returned from the payments api
func (*InvalidPaymentAPIResponse) Error ¶
func (e *InvalidPaymentAPIResponse) Error() string
Error provides a consistent error when receiving an invalid response status when fetching payments
type MockFetcher ¶
type MockFetcher struct {
// contains filtered or unexported fields
}
MockFetcher is a mock of Fetcher interface
func NewMockFetcher ¶
func NewMockFetcher(ctrl *gomock.Controller) *MockFetcher
NewMockFetcher creates a new mock instance
func (*MockFetcher) EXPECT ¶
func (m *MockFetcher) EXPECT() *MockFetcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockFetcher) GetLatestRefundStatus ¶
func (m *MockFetcher) GetLatestRefundStatus(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (*data.RefundResource, int, error)
GetLatestRefundStatus mocks base method
func (*MockFetcher) GetPayment ¶
func (m *MockFetcher) GetPayment(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (data.PaymentResponse, int, error)
GetPayment mocks base method
func (*MockFetcher) GetPaymentDetails ¶
func (m *MockFetcher) GetPaymentDetails(paymentAPIURL string, HTTPClient *http.Client, apiKey string) (data.PaymentDetailsResponse, int, error)
GetPaymentDetails mocks base method
type MockFetcherMockRecorder ¶
type MockFetcherMockRecorder struct {
// contains filtered or unexported fields
}
MockFetcherMockRecorder is the mock recorder for MockFetcher
func (*MockFetcherMockRecorder) GetLatestRefundStatus ¶
func (mr *MockFetcherMockRecorder) GetLatestRefundStatus(paymentAPIURL, HTTPClient, apiKey interface{}) *gomock.Call
GetLatestRefundStatus indicates an expected call of GetLatestRefundStatus
func (*MockFetcherMockRecorder) GetPayment ¶
func (mr *MockFetcherMockRecorder) GetPayment(paymentAPIURL, HTTPClient, apiKey interface{}) *gomock.Call
GetPayment indicates an expected call of GetPayment
func (*MockFetcherMockRecorder) GetPaymentDetails ¶
func (mr *MockFetcherMockRecorder) GetPaymentDetails(paymentAPIURL, HTTPClient, apiKey interface{}) *gomock.Call
GetPaymentDetails indicates an expected call of GetPaymentDetails