Documentation
¶
Index ¶
- type Client
- func (c *Client) RetrieveEvent(eventID string) (*Response, error)
- func (c *Client) RetrieveEventNotification(eventID string, notificationID string) (*Response, error)
- func (c *Client) RetrieveEventTypes(request *Request) (*Response, error)
- func (c *Client) RetrieveEvents(request *Request) (*Response, error)
- func (c *Client) Retry(eventID string, webhookID string) (*Response, error)
- func (c *Client) RetryAll(eventID string) (*Response, error)
- type Event
- type EventType
- type EventTypeRequest
- type Events
- type Notification
- type NotificationAttempt
- type QueryParameter
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
API checkout.HTTPClient
}
Client ...
func (*Client) RetrieveEvent ¶
RetrieveEvent -
func (*Client) RetrieveEventNotification ¶
func (c *Client) RetrieveEventNotification(eventID string, notificationID string) (*Response, error)
RetrieveEventNotification -
func (*Client) RetrieveEventTypes ¶
RetrieveEventTypes -
func (*Client) RetrieveEvents ¶
RetrieveEvents -
type Event ¶
type Event struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Version string `json:"version,omitempty"`
CreatedOn string `json:"created_on,omitempty"`
Data *payments.Processed `json:"data,omitempty"`
Notifications []Notification `json:"notifications,omitempty"`
Links map[string]common.Link `json:"_links"`
}
Event -
type EventType ¶
type EventType struct {
Version string `json:"version,omitempty"`
EventTypes []string `json:"event_types,omitempty"`
}
EventType -
type EventTypeRequest ¶
type EventTypeRequest struct {
Version string `url:"version,omitempty"`
}
EventTypeRequest -
type Events ¶
type Events struct {
TotalCount uint64 `json:"total_count,omitempty"`
Limit uint64 `json:"limit,omitempty"`
Skip uint64 `json:"skip,omitempty"`
From time.Time `json:"from,omitempty"`
To time.Time `json:"to,omitempty"`
Data []Event `json:"data,omitempty"`
}
Events -
type Notification ¶
type Notification struct {
ID string `json:"id,omitempty"`
URL string `json:"url,omitempty"`
Success *bool `json:"success,omitempty"`
ContentType string `json:"content_type,omitempty"`
Attempts []NotificationAttempt `json:"attempts,omitempty"`
Links map[string]common.Link `json:"_links"`
}
Notification -
type NotificationAttempt ¶
type NotificationAttempt struct {
StatusCode uint64 `json:"status_code,omitempty"`
ResponseBody string `json:"response_body,omitempty"`
RetryMode string `json:"retry_mode,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty"`
}
NotificationAttempt -
type QueryParameter ¶
type QueryParameter struct {
From time.Time `url:"from,omitempty"`
To time.Time `url:"to,omitempty"`
Limit uint64 `url:"limit,omitempty"`
PaymentID string `url:"payment_id,omitempty"`
}
QueryParameter -
type Response ¶
type Response struct {
StatusResponse *checkout.StatusResponse `json:"api_response,omitempty"`
EventTypes []EventType `json:"event_types,omitempty"`
Events *Events `json:"events,omitempty"`
Event *Event `json:"event,omitempty"`
Notification *Notification `json:"notification,omitempty"`
}
Response -
Click to show internal directories.
Click to hide internal directories.