booking

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 = "booking"

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 = [6]string{"batch_availability_lookup", "check_availability", "create_booking", "update_booking", "get_booking_status", "list_bookings"}

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 NewBatchAvailabilityLookupEndpoint

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

NewBatchAvailabilityLookupEndpoint returns an endpoint function that calls the method "batch_availability_lookup" of service "booking".

func NewCheckAvailabilityEndpoint

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

NewCheckAvailabilityEndpoint returns an endpoint function that calls the method "check_availability" of service "booking".

func NewCreateBookingEndpoint

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

NewCreateBookingEndpoint returns an endpoint function that calls the method "create_booking" of service "booking".

func NewGetBookingStatusEndpoint

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

NewGetBookingStatusEndpoint returns an endpoint function that calls the method "get_booking_status" of service "booking".

func NewListBookingsEndpoint

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

NewListBookingsEndpoint returns an endpoint function that calls the method "list_bookings" of service "booking".

func NewUpdateBookingEndpoint

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

NewUpdateBookingEndpoint returns an endpoint function that calls the method "update_booking" of service "booking".

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 AvailabilityUpdate

type AvailabilityUpdate struct {
	SlotAvailability []*SlotAvailability
}

type BatchAvailabilityLookupPayload

type BatchAvailabilityLookupPayload struct {
	Username string
	Password string
	Body     *BatchAvailabilityLookupRequest
}

BatchAvailabilityLookupPayload is the payload type of the booking service batch_availability_lookup method.

type BatchAvailabilityLookupRequest

type BatchAvailabilityLookupRequest struct {
	MerchantID string
	SlotTime   []*SlotTime
}

type BatchAvailabilityLookupResponse

type BatchAvailabilityLookupResponse struct {
	SlotTimeAvailability []*SlotTimeAvailability
}

BatchAvailabilityLookupResponse is the result type of the booking service batch_availability_lookup method.

type Booking

type Booking struct {
	BookingID          string
	Slot               *Slot
	UserInformation    *UserInformation
	Status             *string
	PaymentInformation *PaymentInformation
	VirtualSessionInfo *VirtualSessionInfo
	OfferInfo          *OfferInfo
}

type BookingFailure

type BookingFailure struct {
	Cause            string
	RejectedCardType *string
	Description      *string
	PaymentFailure   *PaymentFailureInformation
}

type CardNetworkParameters

type CardNetworkParameters struct {
	CardNetwork        string
	AcquirerBin        string
	AcquirerMerchantID string
}

type CheckAvailabilityPayload

type CheckAvailabilityPayload struct {
	Username string
	Password string
	Body     *CheckAvailabilityRequest
}

CheckAvailabilityPayload is the payload type of the booking service check_availability method.

type CheckAvailabilityRequest

type CheckAvailabilityRequest struct {
	Slot *Slot
}

type CheckAvailabilityResponse

type CheckAvailabilityResponse struct {
	Slot                     *Slot
	CountAvailable           int32
	LastOnlineCancellableSec *string
	DurationRequirement      *string
	AvailabilityUpdate       *AvailabilityUpdate
}

CheckAvailabilityResponse is the result type of the booking service check_availability method.

type Client

type Client struct {
	BatchAvailabilityLookupEndpoint goa.Endpoint
	CheckAvailabilityEndpoint       goa.Endpoint
	CreateBookingEndpoint           goa.Endpoint
	UpdateBookingEndpoint           goa.Endpoint
	GetBookingStatusEndpoint        goa.Endpoint
	ListBookingsEndpoint            goa.Endpoint
}

Client is the "booking" service client.

func NewClient

func NewClient(batchAvailabilityLookup, checkAvailability, createBooking, updateBooking, getBookingStatus, listBookings goa.Endpoint) *Client

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

func (*Client) BatchAvailabilityLookup

func (c *Client) BatchAvailabilityLookup(ctx context.Context, p *BatchAvailabilityLookupPayload) (res *BatchAvailabilityLookupResponse, err error)

BatchAvailabilityLookup calls the "batch_availability_lookup" endpoint of the "booking" service.

func (*Client) CheckAvailability

func (c *Client) CheckAvailability(ctx context.Context, p *CheckAvailabilityPayload) (res *CheckAvailabilityResponse, err error)

CheckAvailability calls the "check_availability" endpoint of the "booking" service.

func (*Client) CreateBooking

func (c *Client) CreateBooking(ctx context.Context, p *CreateBookingPayload) (res *CreateBookingResponse, err error)

CreateBooking calls the "create_booking" endpoint of the "booking" service.

func (*Client) GetBookingStatus

func (c *Client) GetBookingStatus(ctx context.Context, p *GetBookingStatusPayload) (res *GetBookingStatusResponse, err error)

GetBookingStatus calls the "get_booking_status" endpoint of the "booking" service.

func (*Client) ListBookings

func (c *Client) ListBookings(ctx context.Context, p *ListBookingsPayload) (res *ListBookingsResponse, err error)

ListBookings calls the "list_bookings" endpoint of the "booking" service.

func (*Client) UpdateBooking

func (c *Client) UpdateBooking(ctx context.Context, p *UpdateBookingPayload) (res *UpdateBookingResponse, err error)

UpdateBooking calls the "update_booking" endpoint of the "booking" service.

type CreateBookingPayload

type CreateBookingPayload struct {
	Username string
	Password string
	Body     *CreateBookingRequest
}

CreateBookingPayload is the payload type of the booking service create_booking method.

type CreateBookingRequest

type CreateBookingRequest struct {
	Slot                        *Slot
	LeaseRef                    *LeaseReference
	UserInformation             *UserInformation
	PaymentInformation          *PaymentInformation
	PaymentProcessingParameters *PaymentProcessingParameters
	IdempotencyToken            string
	AdditionalRequest           *string
	OfferID                     *string
	DealID                      *string
}

type CreateBookingResponse

type CreateBookingResponse struct {
	Booking           *Booking
	UserPaymentOption *UserPaymentOption
	BookingFailure    *BookingFailure
}

CreateBookingResponse is the result type of the booking service create_booking method.

type Deposit

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

type Endpoints

type Endpoints struct {
	BatchAvailabilityLookup goa.Endpoint
	CheckAvailability       goa.Endpoint
	CreateBooking           goa.Endpoint
	UpdateBooking           goa.Endpoint
	GetBookingStatus        goa.Endpoint
	ListBookings            goa.Endpoint
}

Endpoints wraps the "booking" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type GetBookingStatusPayload

type GetBookingStatusPayload struct {
	Username string
	Password string
	Body     *GetBookingStatusRequest
}

GetBookingStatusPayload is the payload type of the booking service get_booking_status method.

type GetBookingStatusRequest

type GetBookingStatusRequest struct {
	BookingID string
}

type GetBookingStatusResponse

type GetBookingStatusResponse struct {
	BookingID        string
	BookingStatus    string
	PrepaymentStatus string
}

GetBookingStatusResponse is the result type of the booking service get_booking_status method.

type LeaseReference

type LeaseReference struct {
	LeaseID string
}

type ListBookingsPayload

type ListBookingsPayload struct {
	Username string
	Password string
	Body     *ListBookingsRequest
}

ListBookingsPayload is the payload type of the booking service list_bookings method.

type ListBookingsRequest

type ListBookingsRequest struct {
	UserID string
}

type ListBookingsResponse

type ListBookingsResponse struct {
	Bookings []*Booking
}

ListBookingsResponse is the result type of the booking service list_bookings method.

type NoShowFee

type NoShowFee struct {
	Fee     *Price
	FeeType string
}

type OfferInfo

type OfferInfo struct {
	OfferID string
}

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 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 ResourceIds

type ResourceIds struct {
	StaffID   *string
	RoomID    *string
	PartySize *int32
}

type Service

type Service interface {
	// BatchAvailabilityLookup implements batch_availability_lookup.
	BatchAvailabilityLookup(context.Context, *BatchAvailabilityLookupPayload) (res *BatchAvailabilityLookupResponse, err error)
	// CheckAvailability implements check_availability.
	CheckAvailability(context.Context, *CheckAvailabilityPayload) (res *CheckAvailabilityResponse, err error)
	// CreateBooking implements create_booking.
	CreateBooking(context.Context, *CreateBookingPayload) (res *CreateBookingResponse, err error)
	// UpdateBooking implements update_booking.
	UpdateBooking(context.Context, *UpdateBookingPayload) (res *UpdateBookingResponse, err error)
	// GetBookingStatus implements get_booking_status.
	GetBookingStatus(context.Context, *GetBookingStatusPayload) (res *GetBookingStatusResponse, err error)
	// ListBookings implements list_bookings.
	ListBookings(context.Context, *ListBookingsPayload) (res *ListBookingsResponse, err error)
}

Service is the booking service interface.

type Slot

type Slot struct {
	MerchantID       *string
	ServiceID        *string
	StartSec         *string
	DurationSec      *string
	AvailabilityTag  *string
	Resources        *ResourceIds
	ConfirmationMode *string
}

type SlotAvailability

type SlotAvailability struct {
	Slot           *Slot
	CountAvailable int32
}

type SlotTime

type SlotTime struct {
	ServiceID        string
	StartSec         string
	DurationSec      *string
	AvailabilityTag  *string
	ResourceIds      *ResourceIds
	ConfirmationMode *string
}

type SlotTimeAvailability

type SlotTimeAvailability struct {
	SlotTime  *SlotTime
	Available bool
}

type ThreeDS1Parameters

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

type TokenizationConfig

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

type UpdateBookingPayload

type UpdateBookingPayload struct {
	Username string
	Password string
	Body     *UpdateBookingRequest
}

UpdateBookingPayload is the payload type of the booking service update_booking method.

type UpdateBookingRequest

type UpdateBookingRequest struct {
	Booking *Booking
}

type UpdateBookingResponse

type UpdateBookingResponse struct {
	Booking           *Booking
	UserPaymentOption *UserPaymentOption
	BookingFailure    *BookingFailure
}

UpdateBookingResponse is the result type of the booking service update_booking method.

type UserInformation

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

type UserPaymentOption

type UserPaymentOption struct {
	UserPaymentOptionID string
	ValidStartTimeSec   *string
	ValidEndTimeSec     *string
	Type                string
	OriginalCount       int32
	CurrentCount        int32
	PaymentOptionID     string
}

type VirtualSessionInfo

type VirtualSessionInfo struct {
	SessionURL *string
	MeetingID  *string
	Password   *string
}

Jump to

Keyboard shortcuts

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