transaction

package
v0.0.0-...-82292ab Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoGenerated

type AutoGenerated struct {
	Data Data `json:"data"`
}

type Book

type Book struct {
	Booking  Booking `json:"booking"`
	Errors   []Error `json:"errors"`
	Warnings []Error `json:"warnings"`
}

type BookCriteria

type BookCriteria struct {
	OptionRefID     string `json:"optionRefId"`
	ClientReference string `json:"clientReference"`
}

type Booking

type Booking struct {
	Status    string    `json:"status"`
	Reference Reference `json:"reference"`
}

type Data

type Data struct {
	HotelX HotelX `json:"hotelX"`
}

type DestinationSearcher

type DestinationSearcher struct {
	Code      string `json:"code"`
	Available bool   `json:"available"`
}

type DestinationSearcherCriteria

type DestinationSearcherCriteria struct {
	Text    string `json:"text"`
	Access  string `json:"access"`
	MaxSize int    `json:"maxSize"`
}

type Error

type Error struct {
	Code        string `json:"code"`
	Type        string `json:"type"`
	Description string `json:"description"`
}

type HotelX

type HotelX struct {
	Search              Search                `json:"search"`
	DestinationSearcher []DestinationSearcher `json:"destinationSearcher"`
	Quote               Quote                 `json:"quote"`
	Book                Book                  `json:"book"`
}

type HotelxResponse

type HotelxResponse struct {
	Data Data `json:"data"`
}

type OptionQuote

type OptionQuote struct {
	OptionRefID string `json:"optionRefId"`
	Status      string `json:"status"`
}

type Options

type Options struct {
	ID        string `json:"id"`
	HotelName string `json:"hotelName"`
	Price     Price  `json:"price"`
}

type Parameters

type Parameters struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Paxes

type Paxes struct {
	Name    string `json:"name"`
	Surname string `json:"surname"`
	Age     int    `json:"age"`
}

type Plugins

type Plugins struct {
	Step        string        `json:"step"`
	PluginsType []PluginsType `json:"pluginsType"`
}

type PluginsType

type PluginsType struct {
	Type       string       `json:"type"`
	Name       string       `json:"name"`
	Parameters []Parameters `json:"parameters"`
}

type Price

type Price struct {
	Currency string  `json:"currency"`
	Gross    float32 `json:"gross"`
}

type Quote

type Quote struct {
	OptionQuote OptionQuote `json:"optionQuote"`
	Errors      []Error     `json:"errors"`
	Warnings    []Error     `json:"warnings"`
}

type QuoteRequest

type QuoteRequest struct {
	OptionRefId string `json:"optionRefId"`
}

type QuoteResponse

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

type Reference

type Reference struct {
	Client string `json:"client"`
}
type Search struct {
	Errors   []Error   `json:"errors"`
	Warnings []Error   `json:"warnings"`
	Options  []Options `json:"options"`
}

type SearchCriteria

type SearchCriteria struct {
	CheckIn     date.Date `json:"checkIn"`
	CheckOut    date.Date `json:"checkOut"`
	Destination string    `json:"destination"`
	NumPaxes    int       `json:"numPaxes"`
}

type SearchResponse

type SearchResponse struct {
	OptionID   string  `json:"optionID"`
	HotelName  string  `json:"hotelName"`
	Amount     float32 `json:"amount"`
	Currency   string  `json:"currency"`
	Refundable bool    `json:"refundable"`
}

type Service

type Service interface {
	Search(SearchCriteria) (SearchResponse, error)
	DestinationSearcher(DestinationSearcherCriteria) (string, error)
	Quote(QuoteRequest) (string, error)
	Book(BookCriteria) (Booking, error)
}

func NewService

func NewService(c http.Service) Service

type ServiceClient

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

func (*ServiceClient) Book

func (s *ServiceClient) Book(c BookCriteria) (Booking, error)

func (*ServiceClient) DestinationSearcher

func (s *ServiceClient) DestinationSearcher(c DestinationSearcherCriteria) (string, error)

func (*ServiceClient) Quote

func (s *ServiceClient) Quote(c QuoteRequest) (string, error)

func (*ServiceClient) Search

type Settings

type Settings struct {
	Context           string  `json:"context"`
	Client            string  `json:"client"`
	AuditTransactions bool    `json:"auditTransactions"`
	TestMode          bool    `json:"testMode"`
	Plugins           Plugins `json:"plugins"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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