contexts

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PaymentContextsPath = "payment-contexts"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

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

func (*Client) GetPaymentContextDetails

func (c *Client) GetPaymentContextDetails(paymentContextId string) (*PaymentContextDetailsResponse, error)

func (*Client) RequestPaymentContexts

func (c *Client) RequestPaymentContexts(request PaymentContextsRequest) (*PaymentContextsRequestResponse, error)

type PaymentContextDetailsResponse

type PaymentContextDetailsResponse struct {
	HttpMetadata    common.HttpMetadata
	PaymentRequest  *PaymentContextsResponse        `json:"payment_request,omitempty"`
	PartnerMetadata *PaymentContextsPartnerMetadata `json:"partner_metadata,omitempty"`
	Customer        map[string]interface{}          `json:"customer,omitempty"`
}

type PaymentContextsAirlineData

type PaymentContextsAirlineData struct {
	Ticket           []PaymentContextsTicket           `json:"ticket,omitempty"`
	Passenger        []PaymentContextsPassenger        `json:"passenger,omitempty"`
	FlightLegDetails []PaymentContextsFlightLegDetails `json:"flight_leg_details,omitempty"`
}

type PaymentContextsFlightLegDetails

type PaymentContextsFlightLegDetails struct {
	FlightNumber      string     `json:"flight_number,omitempty"`
	CarrierCode       string     `json:"carrier_code,omitempty"`
	ClassOfTravelling string     `json:"class_of_travelling,omitempty"`
	DepartureAirport  string     `json:"departure_airport,omitempty"`
	DepartureDate     *time.Time `json:"departure_date,omitempty"`
	DepartureTime     string     `json:"departure_time,omitempty"`
	ArrivalAirport    string     `json:"arrival_airport,omitempty"`
	StopOverCode      string     `json:"stop_over_code,omitempty"`
	FareBasisCode     string     `json:"fare_basis_code,omitempty"`
}

type PaymentContextsItems

type PaymentContextsItems struct {
	Name           string `json:"name,omitempty"`
	Quantity       int    `json:"quantity,omitempty"`
	UnitPrice      int    `json:"unit_price,omitempty"`
	Reference      string `json:"reference,omitempty"`
	TotalAmount    int    `json:"total_amount,omitempty"`
	TaxAmount      int    `json:"tax_amount,omitempty"`
	DiscountAmount int    `json:"discount_amount,omitempty"`
	Url            string `json:"url,omitempty"`
	ImageUrl       string `json:"image_url,omitempty"`
}

type PaymentContextsPartnerCustomerRiskData

type PaymentContextsPartnerCustomerRiskData struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type PaymentContextsPartnerMetadata

type PaymentContextsPartnerMetadata struct {
	OrderId    string `json:"order_id,omitempty"`
	CustomerId string `json:"customer_id,omitempty"`
}

type PaymentContextsPassenger

type PaymentContextsPassenger struct {
	FirstName   string          `json:"first_name,omitempty"`
	LastName    string          `json:"last_name,omitempty"`
	DateOfBirth *time.Time      `json:"date_of_birth,omitempty"`
	Address     *common.Address `json:"address,omitempty"`
}

type PaymentContextsProcessing

type PaymentContextsProcessing struct {
	Plan                    *apm.BillingPlan                        `json:"plan,omitempty"`
	ShippingAmount          int                                     `json:"shipping_amount,omitempty"`
	InvoiceId               string                                  `json:"invoice_id,omitempty"`
	BrandName               string                                  `json:"brand_name,omitempty"`
	Locale                  string                                  `json:"locale,omitempty"`
	ShippingPreference      payments.ShippingPreference             `json:"shipping_preference,omitempty"`
	UserAction              payments.UserAction                     `json:"user_action,omitempty"`
	PartnerCustomerRiskData *PaymentContextsPartnerCustomerRiskData `json:"partner_customer_risk_data,omitempty"`
	AirlineData             []PaymentContextsAirlineData            `json:"airline_data,omitempty"`
}

type PaymentContextsRequest

type PaymentContextsRequest 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"`
	Capture             bool                       `json:"capture,omitempty"`
	Shipping            *payments.ShippingDetails  `json:"shipping,omitempty"`
	Processing          *PaymentContextsProcessing `json:"processing,omitempty"`
	ProcessingChannelId string                     `json:"processing_channel_id,omitempty"`
	Reference           string                     `json:"reference,omitempty"`
	Description         string                     `json:"description,omitempty"`
	SuccessUrl          string                     `json:"success_url,omitempty"`
	FailureUrl          string                     `json:"failure_url,omitempty"`
	Items               []PaymentContextsItems     `json:"items,omitempty"`
}

type PaymentContextsRequestResponse

type PaymentContextsRequestResponse struct {
	HttpMetadata    common.HttpMetadata
	Id              string                          `json:"id,omitempty"`
	PartnerMetadata *PaymentContextsPartnerMetadata `json:"partner_metadata,omitempty"`
	Links           map[string]common.Link          `json:"links,omitempty"`
}

type PaymentContextsResponse

type PaymentContextsResponse struct {
	Source              *nas.SourceResponse        `json:"source,omitempty"`
	Amount              int64                      `json:"amount,omitempty"`
	Currency            common.Currency            `json:"currency,omitempty"`
	PaymentType         payments.PaymentType       `json:"payment_type,omitempty"`
	Capture             bool                       `json:"capture,omitempty"`
	Shipping            *payments.ShippingDetails  `json:"shipping"`
	Processing          *PaymentContextsProcessing `json:"processing"`
	ProcessingChannelId string                     `json:"processing_channel_id,omitempty"`
	Reference           string                     `json:"reference,omitempty"`
	Description         string                     `json:"description,omitempty"`
	SuccessUrl          string                     `json:"success_url,omitempty"`
	FailureUrl          string                     `json:"failure_url,omitempty"`
	Items               []PaymentContextsItems     `json:"items,omitempty"`
}

type PaymentContextsTicket

type PaymentContextsTicket struct {
	Number                 string     `json:"number,omitempty"`
	IssueDate              *time.Time `json:"issue_date,omitempty"`
	IssuingCarrierCode     string     `json:"issuing_carrier_code,omitempty"`
	TravelPackageIndicator string     `json:"travel_package_indicator,omitempty"`
	TravelAgencyName       string     `json:"travel_agency_name,omitempty"`
	TravelAgencyCode       string     `json:"travel_agency_code,omitempty"`
}

Jump to

Keyboard shortcuts

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