Documentation ¶
Index ¶
- type AssetUrl
- type CaptureResponse
- type Client
- func (c *Client) CapturePayment(paymentId string, request OrderCaptureRequest) (*CaptureResponse, error)
- func (c *Client) CreateCreditSession(request CreditSessionRequest) (*CreditSessionResponse, error)
- func (c *Client) GetCreditSession(sessionId string) (*CreditSession, error)
- func (c *Client) VoidPayment(paymentId string, request payments.VoidRequest) (*payments.VoidResponse, error)
- type CreditSession
- type CreditSessionRequest
- type CreditSessionResponse
- type Klarna
- type OrderCaptureRequest
- type PaymentMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptureResponse ¶
type CaptureResponse struct { HttpMetadata common.HttpMetadata `json:"http_metadata,omitempty"` ActionId string `json:"action_id,omitempty"` Reference string `json:"reference,omitempty"` }
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, request OrderCaptureRequest) (*CaptureResponse, error)
func (*Client) CreateCreditSession ¶
func (c *Client) CreateCreditSession(request CreditSessionRequest) (*CreditSessionResponse, error)
func (*Client) GetCreditSession ¶
func (c *Client) GetCreditSession(sessionId string) (*CreditSession, error)
func (*Client) VoidPayment ¶
func (c *Client) VoidPayment(paymentId string, request payments.VoidRequest) (*payments.VoidResponse, error)
type CreditSession ¶
type CreditSession struct { HttpMetadata common.HttpMetadata `json:"http_metadata,omitempty"` ClientToken string `json:"client_token,omitempty"` PurchaseCountry string `json:"purchase_country,omitempty"` Currency string `json:"currency,omitempty"` Locale string `json:"locale,omitempty"` Amount int64 `json:"amount,omitempty"` TaxAmount int64 `json:"tax_amount,omitempty"` Products []map[string]interface{} `json:"products,omitempty"` }
type CreditSessionRequest ¶
type CreditSessionRequest struct { PurchaseCountry common.Country `json:"purchase_country,omitempty"` Currency common.Currency `json:"currency,omitempty"` Locale string `json:"locale,omitempty"` Amount int64 `json:"amount,omitempty"` TaxAmount int64 `json:"tax_amount,omitempty"` Products []map[string]interface{} `json:"products,omitempty"` }
type CreditSessionResponse ¶
type CreditSessionResponse struct { HttpMetadata common.HttpMetadata `json:"http_metadata,omitempty"` SessionId string `json:"session_id,omitempty"` ClientToken string `json:"client_token,omitempty"` PaymentMethodCategories []PaymentMethod `json:"payment_method_categories,omitempty"` }
type OrderCaptureRequest ¶
type OrderCaptureRequest struct { Type payments.SourceType `json:"type,omitempty"` Amount int64 `json:"amount,omitempty"` Reference string `json:"reference,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Klarna *Klarna `json:"klarna,omitempty"` ShippingInfo map[string]interface{} `json:"shipping_info,omitempty"` ShippingDelay int `json:"shipping_delay,omitempty"` }
type PaymentMethod ¶
Click to show internal directories.
Click to hide internal directories.