repository

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ProxyURL string
}

type Option

type Option func(*Repository)

Option describes a functional option for configuring the Client.

func SetProxyURL

func SetProxyURL(proxyURL string) Option

type Repository

type Repository struct {
	LogsPublisher publisher.Publisher
	Config        Config
	Transport     service.Storage
	// contains filtered or unexported fields
}

Storage stow storage container

func NewStorage

func NewStorage(transport service.Storage) (*Repository, error)

func (*Repository) AddFFInfo

func (r *Repository) AddFFInfo(pnr, surname string, sirenaRequestPassengers []sirena.AddFFInfoRequestPassenger, logAttributes map[string]string) (*sirena.AddFFInfoResponse, error)

func (Repository) AddRemark

func (r Repository) AddRemark(logAttributes map[string]string, pnr, surname, remarkType, remark string) (*sirena.AddRemarkResponse, error)

func (*Repository) Book

func (r *Repository) Book(
	logAttributes map[string]string,
	bookingSegments []sirena.BookingRequestSegment,
	bookingPassengers []sirena.BookingRequestPassenger,
	bookingContacts *sirena.BookingRequestContacts,
	bookingAgentCommission *sirena.BookingRequestAgentComission,
	brand []sirena.Brand,
) (
	*sirena.BookingResponse,
	error,
)

func (*Repository) Cancel

func (r *Repository) Cancel(pnr string, surname string, logAttributes map[string]string) (*sirena.OrderCancelResponse, error)

func (*Repository) CheckAvailability

func (r *Repository) CheckAvailability(departure, arrival string, subclasses []string, logAttributes map[string]string) (*sirena.AvailabilityResponse, error)

func (Repository) FareRemark

func (r Repository) FareRemark(logAttributes map[string]string, fareRemarkRequest *sirena.FareRemarkRequest) (*sirena.FareRemarkResponse, error)

func (*Repository) Fares

func (r *Repository) Fares(departure, arrival, passenger, company string, subclass []string, logAttributes map[string]string) (*sirena.FaresResponse, error)

func (Repository) GetFareRemark

func (r Repository) GetFareRemark(logAttributes map[string]string, company, uptcode string, upt sirena.Upt) (*sirena.FareRemarkResponse, error)

func (Repository) GetItinReceipts

func (r Repository) GetItinReceipts(logAttributes map[string]string, pnr string, surname string) (*sirena.GetItinReceiptsDataResponse, error)

func (*Repository) ModifyPNRAdd

func (r *Repository) ModifyPNRAdd(pnr, surname string, logAttributes map[string]string, version int, contacts []sirena.ModifyPNRContact, sirenaPassDocuments []sirena.ModifyPNRPassDocument) (*sirena.ModifyPNRResponse, error)

func (*Repository) ModifyPNRRemove

func (r *Repository) ModifyPNRRemove(pnr, surname string, logAttributes map[string]string, keys []sirena.Ssr, version int) (*sirena.ModifyPNRResponse, error)

func (Repository) Order

func (r Repository) Order(logAttributes map[string]string, pnr string, surname string) (*sirena.OrderResponse, error)

func (Repository) Payment

func (r Repository) Payment(
	logAttributes map[string]string,
	surname string,
	pnr string,
	action string,
	paydoc sirena.Paydoc,
	currency string,
	cost float64,
	tickSer string,
	paymentTimeout int,
	returnReceipt bool,
) (
	*sirena.PaymentResponse,
	error,
)

func (*Repository) Refund

func (r *Repository) Refund(pnr, surname string, logAttributes map[string]string, pretend bool) (*sirena.RefundResponse, error)

func (*Repository) RefundConfirm

func (r *Repository) RefundConfirm(pnr string, logAttributes map[string]string, totalCost float64, surname string) (*sirena.RefundResponse, error)

func (Repository) SearchMonobrands

func (r Repository) SearchMonobrands(logAttributes map[string]string, request sirena.PricingMonobrandRequest) ([]byte, error)

@TODO возвращать структуру, а не байты. Потом делать анмаршал будет коряво

func (Repository) SearchMonoclass

func (r Repository) SearchMonoclass(logAttributes map[string]string, pricingSegments []sirena.PricingRequestSegment, pricingPassengers []sirena.PricingRequestPassenger, maxResults, timeout int) (*sirena.PricingResponse, error)

func (Repository) SetAgentDiscount

func (r Repository) SetAgentDiscount(logAttributes map[string]string, version int, pnr string, units []*sirena.SetAgentDiscountUnit) (*sirena.SetAgentDiscountResponse, error)

func (*Repository) ViewFlownStatus

func (r *Repository) ViewFlownStatus(surname, pnr string, logAttributes map[string]string) (*sirena.ViewFlownStatusResponse, error)

func (Repository) Void

func (r Repository) Void(logAttributes map[string]string, pnr string, surname string) (*sirena.VoidTicketsResponse, error)

Jump to

Keyboard shortcuts

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