Documentation ¶
Index ¶
- type Action
- type ActionResponse
- type ActionType
- type Client
- func (c *Client) PartiallyUpdate(workflowID string, request *Request) (*Response, error)
- func (c *Client) Register(request *Request) (*Response, error)
- func (c *Client) Remove(workflowID string) (*Response, error)
- func (c *Client) RetrieveAll() (*Response, error)
- func (c *Client) RetrieveSingle(workflowID string) (*Response, error)
- func (c *Client) Test(workflowID string, request *TestRequest) (*Response, error)
- func (c *Client) Update(workflowID string, request *Request) (*Response, error)
- type Condition
- type ConditionResponse
- type ConditionType
- type Events
- type Headers
- type Request
- type Response
- type Signature
- type TestRequest
- type WebhookEvent
- type Workflow
- type WorkflowResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Type ActionType `json:"type,omitempty"` URL string `json:"url,omitempty"` Headers *Headers `json:"headers,omitempty"` Signature *Signature `json:"signature,omitempty"` }
type ActionResponse ¶
type Client ¶
type Client struct {
API checkout.HTTPClient
}
func (*Client) PartiallyUpdate ¶
func (*Client) RetrieveAll ¶
func (*Client) RetrieveSingle ¶
type Condition ¶
type Condition struct { Type ConditionType `json:"type,omitempty"` Events Events `json:"events,omitempty"` }
type ConditionResponse ¶
type ConditionResponse struct { ID string `json:"id,omitempty"` Type ConditionType `json:"type,omitempty"` Events Events `json:"events,omitempty"` Entities []string `json:"entities,omitempty"` ProcessingChannels []string `json:"processing_channels,omitempty"` Links []common.Link `json:"links,omitempty"` }
type ConditionType ¶
type ConditionType string
const ( EventType ConditionType = "event" EntityType ConditionType = "entity" ProcessingChannel ConditionType = "processing_channel" )
type Events ¶
type Events struct { Gateway []WebhookEvent `json:"gateway,omitempty"` Dispute []WebhookEvent `json:"dispute,omitempty"` }
type Response ¶
type Response struct { StatusResponse *checkout.StatusResponse `json:"api_response,omitempty"` Workflows []WorkflowResponse `json:"workflows,omitempty"` Workflow *WorkflowResponse `json:"workflow,omitempty"` }
type TestRequest ¶
type TestRequest struct {
EventTypes []WebhookEvent `json:"event_types"`
}
type WebhookEvent ¶
type WebhookEvent string
const ( // Gateway CardVerifiedEvent WebhookEvent = "card_verified" CardVerificationDeclinedEvent WebhookEvent = "card_verification_declined" PaymentApprovedEvent WebhookEvent = "payment_approved" PaymentPendingEvent WebhookEvent = "payment_pending" PaymentDeclinedEvent WebhookEvent = "payment_declined" PaymentExpiredEvent WebhookEvent = "payment_expired" PaymentVoidedEvent WebhookEvent = "payment_voided" PaymentCanceledEvent WebhookEvent = "payment_canceled" PaymentVoidDeclinedEvent WebhookEvent = "payment_void_declined" PaymentCapturedEvent WebhookEvent = "payment_captured" PaymentCaptureDeclinedEvent WebhookEvent = "payment_capture_declined" PaymentCapturePendingEvent WebhookEvent = "payment_capture_pending" PaymentRefundedEvent WebhookEvent = "payment_refunded" PaymentRefundDeclinedEvent WebhookEvent = "payment_refund_declined" PaymentRefundPendingEvent WebhookEvent = "payment_refund_pending" PaymentChargebackEvent WebhookEvent = "payment_chargeback" PaymentRetrievalEvent WebhookEvent = "payment_retrieval" SourceUpdatedEvent WebhookEvent = "source_updated" PaymentPaidEvent WebhookEvent = "payment_paid" // Dispute DisputeCanceledEvent WebhookEvent = "dispute_canceled" DisputeEvidenceRequiredEvent WebhookEvent = "dispute_evidence_required" DisputeExpiredEvent WebhookEvent = "dispute_expired" DisputeLostEvent WebhookEvent = "dispute_lost" DisputeResolvedEvent WebhookEvent = "dispute_resolved" DisputeWonEvent WebhookEvent = "dispute_won" )
type WorkflowResponse ¶
type WorkflowResponse struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Active bool `json:"active,omitempty"` Conditions []ConditionResponse `json:"conditions,omitempty"` Actions []ActionResponse `json:"actions,omitempty"` }
Click to show internal directories.
Click to hide internal directories.