abc

package
v0.0.0-...-ff628f3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequestCardDestination

func NewRequestCardDestination() *requestCardDestination

func NewRequestIdDestination

func NewRequestIdDestination() *requestIdDestination

func NewRequestTokenDestination

func NewRequestTokenDestination() *requestTokenDestination

Types

type CaptureRequest

type CaptureRequest struct {
	Amount    int64                  `json:"amount,omitempty"`
	Reference string                 `json:"reference,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
}

Request

type Client

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

func NewClient

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

func (*Client) CapturePayment

func (c *Client) CapturePayment(
	paymentId string,
	captureRequest CaptureRequest,
	idempotencyKey *string,
) (*payments.CaptureResponse, error)

func (*Client) CapturePaymentWithContext

func (c *Client) CapturePaymentWithContext(
	ctx context.Context,
	paymentId string,
	captureRequest CaptureRequest,
	idempotencyKey *string,
) (*payments.CaptureResponse, error)

func (*Client) GetPaymentActions

func (c *Client) GetPaymentActions(paymentId string) (*GetPaymentActionsResponse, error)

func (*Client) GetPaymentActionsWithContext

func (c *Client) GetPaymentActionsWithContext(ctx context.Context, paymentId string) (*GetPaymentActionsResponse, error)

func (*Client) GetPaymentDetails

func (c *Client) GetPaymentDetails(paymentId string) (*GetPaymentResponse, error)

func (*Client) GetPaymentDetailsWithContext

func (c *Client) GetPaymentDetailsWithContext(ctx context.Context, paymentId string) (*GetPaymentResponse, error)

func (*Client) RefundPayment

func (c *Client) RefundPayment(
	paymentId string,
	refundRequest *payments.RefundRequest,
	idempotencyKey *string,
) (*payments.RefundResponse, error)

func (*Client) RefundPaymentWithContext

func (c *Client) RefundPaymentWithContext(
	ctx context.Context,
	paymentId string,
	refundRequest *payments.RefundRequest,
	idempotencyKey *string,
) (*payments.RefundResponse, error)

func (*Client) RequestPayment

func (c *Client) RequestPayment(request PaymentRequest, idempotencyKey *string) (*PaymentResponse, error)

func (*Client) RequestPaymentList

func (c *Client) RequestPaymentList(request payments.QueryRequest) (*GetPaymentListResponse, error)

func (*Client) RequestPaymentListWithContext

func (c *Client) RequestPaymentListWithContext(ctx context.Context, request payments.QueryRequest) (*GetPaymentListResponse, error)

func (*Client) RequestPaymentWithContext

func (c *Client) RequestPaymentWithContext(ctx context.Context, request PaymentRequest, idempotencyKey *string) (*PaymentResponse, error)

func (*Client) RequestPayout

func (c *Client) RequestPayout(request PayoutRequest, idempotencyKey *string) (*PaymentResponse, error)

func (*Client) RequestPayoutWithContext

func (c *Client) RequestPayoutWithContext(ctx context.Context, request PayoutRequest, idempotencyKey *string) (*PaymentResponse, error)

func (*Client) VoidPayment

func (c *Client) VoidPayment(
	paymentId string,
	voidRequest *payments.VoidRequest,
	idempotencyKey *string,
) (*payments.VoidResponse, error)

func (*Client) VoidPaymentWithContext

func (c *Client) VoidPaymentWithContext(
	ctx context.Context,
	paymentId string,
	voidRequest *payments.VoidRequest,
	idempotencyKey *string,
) (*payments.VoidResponse, error)

type DestinationResponse

type DestinationResponse struct {
	*ResponseCardDestination
	*common.AlternativeResponse
}

func (*DestinationResponse) UnmarshalJSON

func (s *DestinationResponse) UnmarshalJSON(data []byte) error

type GetPaymentActionsResponse

type GetPaymentActionsResponse struct {
	HttpMetadata common.HttpMetadata
	Actions      []PaymentAction `json:"actions,omitempty"`
}

Response

func (*GetPaymentActionsResponse) UnmarshalJSON

func (p *GetPaymentActionsResponse) UnmarshalJSON(data []byte) error

type GetPaymentListResponse

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

Response

type GetPaymentResponse

type GetPaymentResponse struct {
	HttpMetadata      common.HttpMetadata
	Id                string                          `json:"id,omitempty"`
	RequestedOn       *time.Time                      `json:"requested_on,omitempty"`
	Source            interface{}                     `json:"source,omitempty"`
	Destination       interface{}                     `json:"destination,omitempty"`
	Amount            int64                           `json:"amount,omitempty"`
	Currency          common.Currency                 `json:"currency,omitempty"`
	PaymentType       payments.PaymentType            `json:"payment_type,omitempty"`
	Reference         string                          `json:"reference,omitempty"`
	Description       string                          `json:"description,omitempty"`
	Approved          bool                            `json:"approved,omitempty"`
	Status            payments.PaymentStatus          `json:"status,omitempty"`
	ThreeDs           *payments.ThreeDsData           `json:"3ds,omitempty"`
	Risk              *payments.RiskAssessment        `json:"risk,omitempty"`
	Customer          *common.CustomerResponse        `json:"customer,omitempty"`
	BillingDescriptor *payments.BillingDescriptor     `json:"billing_descriptor,omitempty"`
	ShippingDetails   *payments.ShippingDetails       `json:"shipping,omitempty"`
	PaymentIp         string                          `json:"payment_ip,omitempty"`
	PaymentRecipient  *payments.PaymentRecipient      `json:"recipient,omitempty"`
	Metadata          map[string]interface{}          `json:"metadata,omitempty"`
	Eci               string                          `json:"eci,omitempty"`
	SchemeId          string                          `json:"scheme_id,omitempty"`
	Actions           []payments.PaymentActionSummary `json:"actions,omitempty"`
	Links             map[string]common.Link          `json:"_links"`
}

Response

type PaymentAction

type PaymentAction struct {
	Id              string                 `json:"id,omitempty"`
	Type            payments.ActionType    `json:"type,omitempty"`
	ProcessedOn     *time.Time             `json:"processed_on,omitempty"`
	Amount          int64                  `json:"amount,omitempty"`
	Approved        bool                   `json:"approved,omitempty"`
	AuthCode        string                 `json:"auth_code,omitempty"`
	ResponseCode    string                 `json:"response_code,omitempty"`
	ResponseSummary string                 `json:"response_summary,omitempty"`
	Reference       string                 `json:"reference,omitempty"`
	Processing      *payments.Processing   `json:"processing,omitempty"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
	Links           map[string]common.Link `json:"_links"`
}

Response

type PaymentRequest

type PaymentRequest struct {
	Source            payments.PaymentSource       `json:"source,omitempty"`
	Amount            int64                        `json:"amount,omitempty"`
	Currency          common.Currency              `json:"currency,omitempty"`
	PaymentType       payments.PaymentType         `json:"payment_type,omitempty"`
	MerchantInitiated bool                         `json:"merchant_initiated"`
	Reference         string                       `json:"reference,omitempty"`
	Description       string                       `json:"description,omitempty"`
	Capture           bool                         `json:"capture"`
	CaptureOn         *time.Time                   `json:"capture_on,omitempty"`
	Customer          *common.CustomerRequest      `json:"customer,omitempty"`
	BillingDescriptor *payments.BillingDescriptor  `json:"billing_descriptor,omitempty"`
	ShippingDetails   *payments.ShippingDetails    `json:"shipping,omitempty"`
	PreviousPaymentId string                       `json:"previous_payment_id,omitempty"`
	Risk              *payments.RiskRequest        `json:"risk,omitempty"`
	SuccessUrl        string                       `json:"success_url,omitempty"`
	FailureUrl        string                       `json:"failure_url,omitempty"`
	PaymentIp         string                       `json:"payment_ip,omitempty"`
	ThreeDsRequest    *payments.ThreeDsRequest     `json:"3ds,omitempty"`
	PaymentRecipient  *payments.PaymentRecipient   `json:"recipient,omitempty"`
	Processing        *payments.ProcessingSettings `json:"processing,omitempty"`
	Metadata          map[string]interface{}       `json:"metadata,omitempty"`
}

Request

type PaymentResponse

type PaymentResponse struct {
	HttpMetadata    common.HttpMetadata
	ActionId        string                      `json:"action_id,omitempty"`
	Amount          int64                       `json:"amount,omitempty"`
	Approved        bool                        `json:"approved,omitempty"`
	AuthCode        string                      `json:"auth_code,omitempty"`
	Id              string                      `json:"id,omitempty"`
	Currency        common.Currency             `json:"currency,omitempty"`
	Customer        *common.CustomerResponse    `json:"customer,omitempty"`
	Source          *SourceResponse             `json:"source,omitempty"`
	Status          payments.PaymentStatus      `json:"status,omitempty"`
	ThreeDs         *payments.ThreeDsEnrollment `json:"3ds,omitempty"`
	Reference       string                      `json:"reference,omitempty"`
	ResponseCode    string                      `json:"response_code,omitempty"`
	ResponseSummary string                      `json:"response_summary,omitempty"`
	Risk            *payments.RiskAssessment    `json:"risk,omitempty"`
	ProcessedOn     *time.Time                  `json:"processed_on,omitempty"`
	Processing      *payments.PaymentProcessing `json:"processing,omitempty"`
	Eci             string                      `json:"eci,omitempty"`
	SchemeId        string                      `json:"scheme_id,omitempty"`
	Links           map[string]common.Link      `json:"_links"`
}

Response

type PayoutRequest

type PayoutRequest struct {
	Destination       payments.Destination         `json:"destination,omitempty"`
	Amount            int64                        `json:"amount,omitempty"`
	FundTransferType  payments.FundTransferType    `json:"fund_transfer_type,omitempty"`
	Currency          common.Currency              `json:"currency,omitempty"`
	PaymentType       payments.PaymentType         `json:"payment_type,omitempty"`
	Reference         string                       `json:"reference,omitempty"`
	Description       string                       `json:"description,omitempty"`
	Capture           bool                         `json:"capture"`
	CaptureOn         *time.Time                   `json:"capture_on,omitempty"`
	Customer          *common.CustomerRequest      `json:"customer,omitempty"`
	BillingDescriptor *payments.BillingDescriptor  `json:"billing_descriptor,omitempty"`
	ShippingDetails   *payments.ShippingDetails    `json:"shipping,omitempty"`
	ThreeDsRequest    *payments.ThreeDsRequest     `json:"3ds,omitempty"`
	PreviousPaymentId string                       `json:"previous_payment_id,omitempty"`
	Risk              *payments.RiskRequest        `json:"risk,omitempty"`
	SuccessUrl        string                       `json:"success_url,omitempty"`
	FailureUrl        string                       `json:"failure_url,omitempty"`
	PaymentIp         string                       `json:"payment_ip,omitempty"`
	PaymentRecipient  *payments.PaymentRecipient   `json:"recipient,omitempty"`
	Processing        *payments.ProcessingSettings `json:"processing,omitempty"`
	Metadata          map[string]interface{}       `json:"metadata,omitempty"`
}

Request

type ResponseCardDestination

type ResponseCardDestination struct {
	ExpiryMonth   int                 `json:"expiry_month,omitempty"`
	ExpiryYear    int                 `json:"expiry_year,omitempty"`
	Name          string              `json:"name,omitempty"`
	Last4         string              `json:"last4,omitempty"`
	Fingerprint   string              `json:"fingerprint,omitempty"`
	Bin           string              `json:"bin,omitempty"`
	CardType      common.CardType     `json:"card_type,omitempty"`
	CardCategory  common.CardCategory `json:"card_category,omitempty"`
	Issuer        string              `json:"issuer,omitempty"`
	IssuerCountry common.Country      `json:"issuer_country,omitempty"`
	ProductId     string              `json:"product_id,omitempty"`
	ProductType   string              `json:"product_type,omitempty"`
}

type ResponseCardSource

type ResponseCardSource struct {
	Type                    payments.SourceType `json:"type,omitempty"`
	Id                      string              `json:"id,omitempty"`
	BillingAddress          *common.Address     `json:"billing_address,omitempty"`
	Phone                   *common.Phone       `json:"phone,omitempty"`
	ExpiryMonth             int                 `json:"expiry_month,omitempty"`
	ExpiryYear              int                 `json:"expiry_year,omitempty"`
	Name                    string              `json:"name,omitempty"`
	Scheme                  string              `json:"scheme,omitempty"`
	SchemeLocal             string              `json:"scheme_local,omitempty"`
	Last4                   string              `json:"last4,omitempty"`
	Fingerprint             string              `json:"fingerprint,omitempty"`
	Bin                     string              `json:"bin,omitempty"`
	CardType                common.CardType     `json:"card_type,omitempty"`
	CardCategory            common.CardCategory `json:"card_category,omitempty"`
	Issuer                  string              `json:"issuer,omitempty"`
	IssuerCountry           common.Country      `json:"issuer_country,omitempty"`
	ProductId               string              `json:"product_id,omitempty"`
	ProductType             string              `json:"product_type,omitempty"`
	AvsCheck                string              `json:"avs_check,omitempty"`
	CvvCheck                string              `json:"cvv_check,omitempty"`
	Payouts                 bool                `json:"payouts,omitempty"`
	FastFunds               string              `json:"fast_funds,omitempty"`
	PaymentAccountReference string              `json:"payment_account_reference,omitempty"`
}

type SourceResponse

type SourceResponse struct {
	ResponseCardSource  *ResponseCardSource
	AlternativeResponse *common.AlternativeResponse
}

func (*SourceResponse) UnmarshalJSON

func (s *SourceResponse) UnmarshalJSON(data []byte) error

Directories

Path Synopsis
apm

Jump to

Keyboard shortcuts

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