abc

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttemptSummary

type AttemptSummary struct {
	StatusCode   int    `json:"status_code,omitempty"`
	ResponseBody string `json:"response_body,omitempty"`
	SendMode     string `json:"send_mode,omitempty"`
	Timestamp    string `json:"timestamp,omitempty"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(configuration *configuration.Configuration, apiClient client.HttpClient) *Client

func (*Client) RetrieveAllEventTypes

func (c *Client) RetrieveAllEventTypes() (*EventTypesResponse, error)

func (*Client) RetrieveAllEventTypesQuery

func (c *Client) RetrieveAllEventTypesQuery(
	query QueryRetrieveAllEventType,
) (*EventTypesResponse, error)

func (*Client) RetrieveEvent

func (c *Client) RetrieveEvent(eventId string) (*EventResponse, error)

func (*Client) RetrieveEventNotification

func (c *Client) RetrieveEventNotification(
	eventId string,
	notificationId string,
) (*EventNotificationResponse, error)

func (*Client) RetrieveEvents

func (c *Client) RetrieveEvents() (*EventsPageResponse, error)

func (*Client) RetrieveEventsQuery

func (c *Client) RetrieveEventsQuery(query QueryRetrieveEvents) (*EventsPageResponse, error)

func (*Client) RetryAllWebhooks

func (c *Client) RetryAllWebhooks(eventId string) (*common.MetadataResponse, error)

func (*Client) RetryWebhook

func (c *Client) RetryWebhook(eventId string, webhookId string) (*common.MetadataResponse, error)

type EventDataStatus

type EventDataStatus string
const (
	Pending           EventDataStatus = "Pending"
	Authorized        EventDataStatus = "Authorized"
	Voided            EventDataStatus = "Voided"
	PartiallyCaptured EventDataStatus = "Partially Captured"
	Captured          EventDataStatus = "Captured"
	PartiallyRefunded EventDataStatus = "Partially Refunded"
	Refunded          EventDataStatus = "Refunded"
	Declined          EventDataStatus = "Declined"
	Canceled          EventDataStatus = "Canceled"
)

type EventNotificationResponse

type EventNotificationResponse struct {
	HttpResponse common.HttpMetadata
	Id           string                 `json:"id,omitempty"`
	Url          string                 `json:"url,omitempty"`
	Success      bool                   `json:"success,omitempty"`
	ContentType  string                 `json:"content_type,omitempty"`
	Attempts     []AttemptSummary       `json:"attempts,omitempty"`
	Links        map[string]common.Link `json:"_links"`
}

type EventNotificationSummaryResponse

type EventNotificationSummaryResponse struct {
	Id      string                 `json:"id,omitempty"`
	Url     string                 `json:"url,omitempty"`
	Success bool                   `json:"success,omitempty"`
	Links   map[string]common.Link `json:"_links"`
}

type EventPaymentData

type EventPaymentData struct {
	Id              string                      `json:"id,omitempty"`
	ActionId        string                      `json:"action_id,omitempty"`
	Amount          int64                       `json:"amount,omitempty"`
	Currency        common.Currency             `json:"currency,omitempty"`
	Approved        bool                        `json:"approved,omitempty"`
	Status          EventDataStatus             `json:"status,omitempty"`
	AuthCode        string                      `json:"auth_code,omitempty"`
	ResponseCode    string                      `json:"response_code,omitempty"`
	ResponseSummary string                      `json:"response_summary,omitempty"`
	ThreeDs         *payments.ThreeDsEnrollment `json:"3ds,omitempty"`
	Source          *abc.ResponseCardSource     `json:"source,omitempty"`
	Customer        *common.CustomerResponse    `json:"customer,omitempty"`
	ProcessedOn     *time.Time                  `json:"processed_on,omitempty"`
	Reference       string                      `json:"reference,omitempty"`
	Metadata        map[string]interface{}      `json:"metadata,omitempty"`
}

type EventResponse

type EventResponse struct {
	HttpResponse  common.HttpMetadata
	Id            string                             `json:"id,omitempty"`
	Type          string                             `json:"type,omitempty"`
	Version       string                             `json:"version,omitempty"`
	CreatedOn     string                             `json:"created_on,omitempty"`
	Data          *EventPaymentData                  `json:"data,omitempty"`
	Notifications []EventNotificationSummaryResponse `json:"notifications,omitempty"`
	Links         map[string]common.Link             `json:"_links"`
}

type EventTypes

type EventTypes struct {
	Version    string   `json:"version"`
	EventTypes []string `json:"event_types"`
}

type EventTypesResponse

type EventTypesResponse struct {
	HttpResponse common.HttpMetadata
	EventTypes   []EventTypes
}

func (*EventTypesResponse) UnmarshalJSON

func (e *EventTypesResponse) UnmarshalJSON(data []byte) error

type EventsPageResponse

type EventsPageResponse struct {
	HttpResponse common.HttpMetadata
	TotalCount   int                     `json:"total_count,omitempty"`
	Limit        int                     `json:"limit,omitempty"`
	Skip         int                     `json:"skip,omitempty"`
	Data         []EventsSummaryResponse `json:"data,omitempty"`
}

type EventsSummaryResponse

type EventsSummaryResponse struct {
	Id        string                 `json:"id,omitempty"`
	Type      string                 `json:"type,omitempty"`
	CreatedOn string                 `json:"created_on,omitempty"`
	Links     map[string]common.Link `json:"_links"`
}

type QueryRetrieveAllEventType

type QueryRetrieveAllEventType struct {
	Version string `url:"version,omitempty"`
}

type QueryRetrieveEvents

type QueryRetrieveEvents struct {
	PaymentId string `url:"payment_id,omitempty"`
	ChargeId  string `url:"charge_id,omitempty"`
	TrackId   string `url:"track_id,omitempty"`
	Reference string `url:"reference,omitempty"`
	Skip      int    `url:"skip,omitempty"`
	Limit     int    `url:"limit,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL