order

package
v0.0.0-...-769f768 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "order"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [3]string{"check_order_fulfillability", "create_order", "list_orders"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func MakeBadRequest

func MakeBadRequest(err error) *goa.ServiceError

MakeBadRequest builds a goa.ServiceError from an error.

func MakeClientClosedRequest

func MakeClientClosedRequest(err error) *goa.ServiceError

MakeClientClosedRequest builds a goa.ServiceError from an error.

func MakeConflict

func MakeConflict(err error) *goa.ServiceError

MakeConflict builds a goa.ServiceError from an error.

func MakeForbidden

func MakeForbidden(err error) *goa.ServiceError

MakeForbidden builds a goa.ServiceError from an error.

func MakeGatewayTimeout

func MakeGatewayTimeout(err error) *goa.ServiceError

MakeGatewayTimeout builds a goa.ServiceError from an error.

func MakeInternalServerError

func MakeInternalServerError(err error) *goa.ServiceError

MakeInternalServerError builds a goa.ServiceError from an error.

func MakeNotFound

func MakeNotFound(err error) *goa.ServiceError

MakeNotFound builds a goa.ServiceError from an error.

func MakeNotImplemented

func MakeNotImplemented(err error) *goa.ServiceError

MakeNotImplemented builds a goa.ServiceError from an error.

func MakeServiceUnavailable

func MakeServiceUnavailable(err error) *goa.ServiceError

MakeServiceUnavailable builds a goa.ServiceError from an error.

func MakeTooManyRequests

func MakeTooManyRequests(err error) *goa.ServiceError

MakeTooManyRequests builds a goa.ServiceError from an error.

func MakeUnauthorized

func MakeUnauthorized(err error) *goa.ServiceError

MakeUnauthorized builds a goa.ServiceError from an error.

func NewCheckOrderFulfillabilityEndpoint

func NewCheckOrderFulfillabilityEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint

NewCheckOrderFulfillabilityEndpoint returns an endpoint function that calls the method "check_order_fulfillability" of service "order".

func NewCreateOrderEndpoint

func NewCreateOrderEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint

NewCreateOrderEndpoint returns an endpoint function that calls the method "create_order" of service "order".

func NewListOrdersEndpoint

func NewListOrdersEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint

NewListOrdersEndpoint returns an endpoint function that calls the method "list_orders" of service "order".

Types

type Auther

type Auther interface {
	// BasicAuth implements the authorization logic for the Basic security scheme.
	BasicAuth(ctx context.Context, user, pass string, schema *security.BasicScheme) (context.Context, error)
}

Auther defines the authorization functions to be implemented by the service.

type CardNetworkParameters

type CardNetworkParameters struct {
	CardNetwork        string
	AcquirerBin        string
	AcquirerMerchantID string
}

type CheckOrderFulfillabilityPayload

type CheckOrderFulfillabilityPayload struct {
	Username string
	Password string
	Body     *CheckOrderFulfillabilityRequest
}

CheckOrderFulfillabilityPayload is the payload type of the order service check_order_fulfillability method.

type CheckOrderFulfillabilityRequest

type CheckOrderFulfillabilityRequest struct {
	MerchantID string
	Item       []*LineItem
	CartID     *string
}

type CheckOrderFulfillabilityResponse

type CheckOrderFulfillabilityResponse struct {
	Fulfillability    *OrderFulfillability
	FeesAndTaxes      *Price
	Fees              *Fees
	CartExpirationSec *string
}

CheckOrderFulfillabilityResponse is the result type of the order service check_order_fulfillability method.

type Client

type Client struct {
	CheckOrderFulfillabilityEndpoint goa.Endpoint
	CreateOrderEndpoint              goa.Endpoint
	ListOrdersEndpoint               goa.Endpoint
}

Client is the "order" service client.

func NewClient

func NewClient(checkOrderFulfillability, createOrder, listOrders goa.Endpoint) *Client

NewClient initializes a "order" service client given the endpoints.

func (*Client) CheckOrderFulfillability

func (c *Client) CheckOrderFulfillability(ctx context.Context, p *CheckOrderFulfillabilityPayload) (res *CheckOrderFulfillabilityResponse, err error)

CheckOrderFulfillability calls the "check_order_fulfillability" endpoint of the "order" service.

func (*Client) CreateOrder

func (c *Client) CreateOrder(ctx context.Context, p *CreateOrderPayload) (res *CreateOrderResponse, err error)

CreateOrder calls the "create_order" endpoint of the "order" service.

func (*Client) ListOrders

func (c *Client) ListOrders(ctx context.Context, p *ListOrdersPayload) (res *ListOrdersResponse, err error)

ListOrders calls the "list_orders" endpoint of the "order" service.

type CreateOrderPayload

type CreateOrderPayload struct {
	Username string
	Password string
	Body     *CreateOrderRequest
}

CreateOrderPayload is the payload type of the order service create_order method.

type CreateOrderRequest

type CreateOrderRequest struct {
	Order                       *Order
	PaymentProcessingParameters *PaymentProcessingParameters
	IdempotencyToken            string
}

type CreateOrderResponse

type CreateOrderResponse struct {
	Order        *Order
	OrderFailure *OrderFailure
}

CreateOrderResponse is the result type of the order service create_order method.

type Deposit

type Deposit struct {
	Deposit                   *Price
	MinAdvanceCancellationSec string
	DepositType               string
}

type Endpoints

type Endpoints struct {
	CheckOrderFulfillability goa.Endpoint
	CreateOrder              goa.Endpoint
	ListOrders               goa.Endpoint
}

Endpoints wraps the "order" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "order" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "order" service endpoints.

type Fees

type Fees struct {
	PerTicketFee []*SpecificPerTicketFee
	PerOrderFee  []*SpecificPerOrderFee
}

type IntakeFormAnswers

type IntakeFormAnswers struct {
	Answer []*IntakeFormFieldAnswer
}

type IntakeFormFieldAnswer

type IntakeFormFieldAnswer struct {
	ID       string
	Response []string
}

type LineItem

type LineItem struct {
	ServiceID         string
	StartSec          string
	DurationSec       string
	Tickets           []*OrderedTickets
	Price             *Price
	Status            *string
	IntakeFormAnswers *IntakeFormAnswers
	WarningReason     *string
}

type LineItemFulfillability

type LineItemFulfillability struct {
	Item                     *LineItem
	Result                   string
	UnfulfillableReason      *string
	Availability             *UpdatedAvailability
	TicketType               []*TicketType
	ViolatedTicketConstraint []*ViolatedTicketConstraint
}

type ListOrdersPayload

type ListOrdersPayload struct {
	Username string
	Password string
	Body     *ListOrdersRequest
}

ListOrdersPayload is the payload type of the order service list_orders method.

type ListOrdersRequest

type ListOrdersRequest struct {
	UserID   *string
	OrderIds *OrderIds
}

type ListOrdersResponse

type ListOrdersResponse struct {
	Order []*Order
}

ListOrdersResponse is the result type of the order service list_orders method.

type LocalizedString

type LocalizedString struct {
	Locale string
	Value  string
}

type NoShowFee

type NoShowFee struct {
	Fee     *Price
	FeeType string
}

type Order

type Order struct {
	OrderID            *string
	UserInformation    *UserInformation
	PaymentInformation *PaymentInformation
	MerchantID         *string
	Item               []*LineItem
}

type OrderFailure

type OrderFailure struct {
	Cause            string
	Fulfillability   *OrderFulfillability
	RejectedCardType *string
	Description      *string
	PaymentFailure   *PaymentFailureInformation
}

type OrderFulfillability

type OrderFulfillability struct {
	Result              string
	ItemFulfillability  []*LineItemFulfillability
	UnfulfillableReason *string
}

type OrderIds

type OrderIds struct {
	OrderID []string
}

type OrderedTickets

type OrderedTickets struct {
	TicketID string
	Count    int32
}

type PaymentFailureInformation

type PaymentFailureInformation struct {
	Threeds1Parameters *ThreeDS1Parameters
}

type PaymentInformation

type PaymentInformation struct {
	PrepaymentStatus     string
	PaymentTransactionID *string
	Price                *Price
	TaxAmount            *Price
	Fees                 *Price
	FeesAndTaxes         *Price
	Deposit              *Deposit
	NoShowFee            *NoShowFee
	PaymentProcessedBy   string
	PaymentOptionID      *string
	UserPaymentOptionID  *string
	FraudSignals         *string
	PaResponse           *string
	MdMerchantData       *string
}

type PaymentProcessingParameters

type PaymentProcessingParameters struct {
	Processor                  string
	PaymentMethodToken         *string
	UnparsedPaymentMethodToken *string
	Version                    *string
	PaymentProcessor           string
	TokenizationConfig         *TokenizationConfig
}

type PerTicketFee

type PerTicketFee struct {
	ServiceCharge *Price
	FacilityFee   *Price
	Taxes         *Price
}

type PostalAddress

type PostalAddress struct {
	Country       string
	Locality      string
	Region        *string
	PostalCode    string
	StreetAddress string
}

type Price

type Price struct {
	PriceMicros      int64
	CurrencyCode     string
	PricingOptionTag *string
}

type Service

type Service interface {
	// CheckOrderFulfillability implements check_order_fulfillability.
	CheckOrderFulfillability(context.Context, *CheckOrderFulfillabilityPayload) (res *CheckOrderFulfillabilityResponse, err error)
	// CreateOrder implements create_order.
	CreateOrder(context.Context, *CreateOrderPayload) (res *CreateOrderResponse, err error)
	// ListOrders implements list_orders.
	ListOrders(context.Context, *ListOrdersPayload) (res *ListOrdersResponse, err error)
}

Service is the order service interface.

type SpecificPerOrderFee

type SpecificPerOrderFee struct {
	FeeName   string
	FeeAmount *Price
}

type SpecificPerTicketFee

type SpecificPerTicketFee struct {
	TicketID  string
	ServiceID string
	FeeName   string
	FeeAmount *Price
}

type Text

type Text struct {
	Value          *string
	LocalizedValue []*LocalizedString
}

type ThreeDS1Parameters

type ThreeDS1Parameters struct {
	AcsURL         string
	PaReq          string
	TransactionID  string
	MdMerchantData string
}

type TicketType

type TicketType struct {
	TicketTypeID               string
	ShortDescription           string
	LocalizedShortDescription  *Text
	Price                      *Price
	PerTicketFee               *PerTicketFee
	OptionDescription          string
	LocalizedOptionDescription *Text
}

type TokenizationConfig

type TokenizationConfig struct {
	TokenizationParameter    map[string]string
	BillingInformationFormat string
	MerchantOfRecordName     string
	PaymentCountryCode       string
	CardNetworkParameters    []*CardNetworkParameters
	AllowedAuthMethods       []string
}

type UpdatedAvailability

type UpdatedAvailability struct {
	SpotsOpen int32
}

type UserInformation

type UserInformation struct {
	UserID       string
	GivenName    string
	FamilyName   string
	Address      *PostalAddress
	Telephone    string
	Email        string
	LanguageCode *string
}

type ViolatedTicketConstraint

type ViolatedTicketConstraint struct {
	MinTicketCount int32
	MaxTicketCount int32
	TicketID       string
}

Jump to

Keyboard shortcuts

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