Documentation ¶
Index ¶
- type APIError
- type Code
- type YandexClient
- func (yc *YandexClient) Accept(payload models.AcceptRequest, opts *options.AcceptOptions) (res responses.APIResponseAccept, err error)
- func (yc *YandexClient) ApplyChanges(payload models.ApplyChangesRequest, opts *options.ApplyChangesOptions) (res responses.APIResponseApplyChanges, err error)
- func (yc *YandexClient) ApplyChangesResult(payload models.ApplyChangesResultRequest, ...) (res responses.APIResponseApplyChangesResult, err error)
- func (yc *YandexClient) BulkInfo(payload models.BulkInfoRequest) (res responses.APIResponseBulkInfo, err error)
- func (yc *YandexClient) Cancel(payload models.CancelRequest, opts *options.CancelOptions) (res responses.APIResponseCancel, err error)
- func (yc *YandexClient) CancelInfo(opts *options.CancelInfoOptions) (res responses.APIResponseCancelInfo, err error)
- func (yc *YandexClient) CheckPrice(payload models.CheckPriceRequest) (res responses.APIResponseCheckPrice, err error)
- func (yc *YandexClient) ConfirmationCode(payload models.ConfirmationCodeRequest) (responses.APIResponseConfirmationCode, error)
- func (yc *YandexClient) CourierPhone(payload models.CourierPhoneRequest) (res responses.APIResponseCourierPhone, err error)
- func (yc *YandexClient) CourierPosition(opts *options.CourierPositionOptions) (res responses.APIResponseCourierPosition, err error)
- func (yc *YandexClient) Create(payload models.CreateRequest, opts *options.CreateOptions) (res responses.APIResponseInfo, err error)
- func (yc *YandexClient) DeliveryMethods(payload models.DeliveryMethodsRequest) (res responses.APIResponseDeliveryMethods, err error)
- func (yc *YandexClient) Document(opts *options.DocumentOptions) (res responses.APIResponseDocument, err error)
- func (yc *YandexClient) Edit(payload models.EditRequest, opts *options.EditOptions) (res responses.APIResponseEdit, err error)
- func (yc *YandexClient) Info(opts *options.InfoOptions) (res responses.APIResponseInfo, err error)
- func (yc *YandexClient) Journal(payload models.JournalRequest) (res responses.APIResponseJournal, err error)
- func (yc *YandexClient) OffersCalculate(payload models.OffersCalculateRequest) (res responses.APIResponseOffersCalculate, err error)
- func (yc *YandexClient) PhotosPoint(payload models.PhotosPointRequest) (res responses.APIResponsePhotosPoint, err error)
- func (yc *YandexClient) PointsEta(opts *options.PointsEtaOptions) (res responses.APIResponsePointsEta, err error)
- func (yc *YandexClient) ProofDelivery(opts *options.ProofDeliveryOptions) (res responses.APIResponseProofDelivery, err error)
- func (yc *YandexClient) Return(payload models.ReturnRequest, opts *options.ReturnOptions) (res responses.APIResponseReturn, err error)
- func (yc *YandexClient) RobotCheckAvailability(payload models.RobotCheckAvailabilityRequest) (res responses.APIResponseRobotCheckAvailability, err error)
- func (yc *YandexClient) RobotOpen(payload models.RobotOpenRequest, opts *options.RobotOpenOptions) (res responses.APIResponseRobotOpen, err error)
- func (yc *YandexClient) Search(payload models.SearchRequest) (res responses.APIResponseSearch, err error)
- func (yc *YandexClient) Tariffs(payload models.TariffsRequest) (res responses.APIResponseTariffs, err error)
- func (yc *YandexClient) TrackingLinks(opts *options.TrackingLinksOptions) (res responses.APIResponseTrackingLinks, err error)
- type YandexDelivery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
// contains filtered or unexported fields
}
APIError относится к типу Error. Не использовать для маршаллинга запросов.
func (*APIError) Description ¶
Description returns the error description received from the Telegram API.
type YandexClient ¶
type YandexClient struct {
// contains filtered or unexported fields
}
func NewYandexClient ¶
func NewYandexClient(urlBase, token string, debugMode bool) *YandexClient
func (*YandexClient) Accept ¶
func (yc *YandexClient) Accept(payload models.AcceptRequest, opts *options.AcceptOptions) (res responses.APIResponseAccept, err error)
Accept 3.2. Подтверждение заявки https://yandex.ru/dev/logistics/api/ref/basic/IntegrationV2ClaimsAccept.html
func (*YandexClient) ApplyChanges ¶
func (yc *YandexClient) ApplyChanges(payload models.ApplyChangesRequest, opts *options.ApplyChangesOptions) (res responses.APIResponseApplyChanges, err error)
ApplyChanges 8.2. Частичное редактирование заявки после ее подтверждения https://yandex.ru/dev/logistics/api/ref/claim-edit/ClaimsApplyChangesRequest.html
func (*YandexClient) ApplyChangesResult ¶
func (yc *YandexClient) ApplyChangesResult(payload models.ApplyChangesResultRequest, opts *options.ApplyChangesResultOptions) (res responses.APIResponseApplyChangesResult, err error)
ApplyChangesResult 8.3. Получить результат применения изменений https://yandex.ru/dev/logistics/api/ref/claim-edit/ClaimsApplyChangesResult.html
func (*YandexClient) BulkInfo ¶
func (yc *YandexClient) BulkInfo(payload models.BulkInfoRequest) (res responses.APIResponseBulkInfo, err error)
BulkInfo 7.1. Получение информации по нескольким заявкам https://yandex.ru/dev/logistics/api/ref/claim-info/IntegrationV2ClaimsBulkInfo.html
func (*YandexClient) Cancel ¶
func (yc *YandexClient) Cancel(payload models.CancelRequest, opts *options.CancelOptions) (res responses.APIResponseCancel, err error)
Cancel 4.2. Отмена заявки https://yandex.ru/dev/logistics/api/ref/cancel-and-skip-points/IntegrationV2ClaimsCancel.html
func (*YandexClient) CancelInfo ¶
func (yc *YandexClient) CancelInfo(opts *options.CancelInfoOptions) (res responses.APIResponseCancelInfo, err error)
CancelInfo 4.1. Получение признака отмены https://yandex.ru/dev/logistics/api/ref/cancel-and-skip-points/IntegrationV2ClaimsCancelInfo.html
func (*YandexClient) CheckPrice ¶
func (yc *YandexClient) CheckPrice(payload models.CheckPriceRequest) (res responses.APIResponseCheckPrice, err error)
CheckPrice 2.1. Первичная оценка стоимости без создания заявки https://yandex.ru/dev/logistics/api/ref/estimate/IntegrationV2CheckPrice.html
func (*YandexClient) ConfirmationCode ¶
func (yc *YandexClient) ConfirmationCode(payload models.ConfirmationCodeRequest) (responses.APIResponseConfirmationCode, error)
ConfirmationCode 6.1. Получение кода подтверждения https://yandex.ru/dev/logistics/api/ref/confirmation-code-and-acts/IntegrationV2ClaimsConfirmationCode.html
func (*YandexClient) CourierPhone ¶
func (yc *YandexClient) CourierPhone(payload models.CourierPhoneRequest) (res responses.APIResponseCourierPhone, err error)
CourierPhone 5.1. Получение номера телефона курьера https://yandex.ru/dev/logistics/api/ref/performer-info/IntegrationV2DriverVoiceForwarding.html
func (*YandexClient) CourierPosition ¶
func (yc *YandexClient) CourierPosition(opts *options.CourierPositionOptions) (res responses.APIResponseCourierPosition, err error)
CourierPosition 5.2. Получение местоположения курьера https://yandex.ru/dev/logistics/api/ref/performer-info/IntegrationV2ClaimsPerformerPosition.html
func (*YandexClient) Create ¶
func (yc *YandexClient) Create(payload models.CreateRequest, opts *options.CreateOptions) (res responses.APIResponseInfo, err error)
Create 3.1. Создание заявки. https://yandex.ru/dev/logistics/api/ref/basic/IntegrationV2ClaimsCreate.html
func (*YandexClient) DeliveryMethods ¶
func (yc *YandexClient) DeliveryMethods(payload models.DeliveryMethodsRequest) (res responses.APIResponseDeliveryMethods, err error)
DeliveryMethods 1.1. Интервалы «Доставки в течение дня» https://yandex.ru/dev/logistics/api/ref/same-day/IntegrationV2DeliveryMethods.html
func (*YandexClient) Document ¶
func (yc *YandexClient) Document(opts *options.DocumentOptions) (res responses.APIResponseDocument, err error)
Document 6.2. Получение акта приёма-передачи https://yandex.ru/dev/logistics/api/ref/confirmation-code-and-acts/IntegrationV2ClaimsDocument.html
func (*YandexClient) Edit ¶
func (yc *YandexClient) Edit(payload models.EditRequest, opts *options.EditOptions) (res responses.APIResponseEdit, err error)
Edit 8.1. Редактирование заявки до её подтверждения https://yandex.ru/dev/logistics/api/ref/claim-edit/IntegrationV2ClaimsEdit.html
func (*YandexClient) Info ¶
func (yc *YandexClient) Info(opts *options.InfoOptions) (res responses.APIResponseInfo, err error)
Info 3.4. Получение информации по заявке https://yandex.ru/dev/logistics/api/ref/basic/IntegrationV2ClaimsInfo.html
func (*YandexClient) Journal ¶
func (yc *YandexClient) Journal(payload models.JournalRequest) (res responses.APIResponseJournal, err error)
Journal 7.2. Журнал изменений заказов https://yandex.ru/dev/logistics/api/ref/claim-info/IntegrationV2ClaimsJournal.html
func (*YandexClient) OffersCalculate ¶
func (yc *YandexClient) OffersCalculate(payload models.OffersCalculateRequest) (res responses.APIResponseOffersCalculate, err error)
OffersCalculate 2.3. Получение вариантов доставки https://yandex.ru/dev/logistics/api/ref/estimate/IntegrationV2OfferCalculate.html
func (*YandexClient) PhotosPoint ¶
func (yc *YandexClient) PhotosPoint(payload models.PhotosPointRequest) (res responses.APIResponsePhotosPoint, err error)
PhotosPoint 10.1. Получение фотографий по точке https://yandex.ru/dev/logistics/api/ref/proof-of-delivery/IntegrationV2ClaimsPhotosByPoint.html
func (*YandexClient) PointsEta ¶
func (yc *YandexClient) PointsEta(opts *options.PointsEtaOptions) (res responses.APIResponsePointsEta, err error)
PointsEta 7.3. Получение прогноза по времени прибытия на точки https://yandex.ru/dev/logistics/api/ref/claim-info/IntegrationV2ClaimsPointsEta.html
func (*YandexClient) ProofDelivery ¶
func (yc *YandexClient) ProofDelivery(opts *options.ProofDeliveryOptions) (res responses.APIResponseProofDelivery, err error)
ProofDelivery 10.1. Получение фотографий по точке https://yandex.ru/dev/logistics/api/ref/proof-of-delivery/IntegrationV2ClaimsProofOfDeliveryInfo.html
func (*YandexClient) Return ¶
func (yc *YandexClient) Return(payload models.ReturnRequest, opts *options.ReturnOptions) (res responses.APIResponseReturn, err error)
Return 4.3. Пропуск точки в заказе с мультиточками. https://yandex.ru/dev/logistics/api/ref/cancel-and-skip-points/IntegrationV2ClaimsReturn.html
func (*YandexClient) RobotCheckAvailability ¶
func (yc *YandexClient) RobotCheckAvailability(payload models.RobotCheckAvailabilityRequest) (res responses.APIResponseRobotCheckAvailability, err error)
RobotCheckAvailability 9.1 Запрос на проверку возможности доставки ровером https://yandex.ru/dev/logistics/api/ref/claim-edit/ClaimsApplyChangesResult.html
func (*YandexClient) RobotOpen ¶
func (yc *YandexClient) RobotOpen(payload models.RobotOpenRequest, opts *options.RobotOpenOptions) (res responses.APIResponseRobotOpen, err error)
RobotOpen 9.2 Запрос на открытие крышки ровера https://yandex.ru/dev/logistics/api/ref/robot/IntegrationV2ClaimsRobotOpenRequest.html
func (*YandexClient) Search ¶
func (yc *YandexClient) Search(payload models.SearchRequest) (res responses.APIResponseSearch, err error)
Search 3.3. Поиск заявок https://yandex.ru/dev/logistics/api/ref/basic/IntegrationV2ClaimsSearch.html
func (*YandexClient) Tariffs ¶
func (yc *YandexClient) Tariffs(payload models.TariffsRequest) (res responses.APIResponseTariffs, err error)
Tariffs 2.2. Получение тарифов, доступных в точке https://yandex.ru/dev/logistics/api/ref/estimate/IntegrationV2Tariffs.html
func (*YandexClient) TrackingLinks ¶
func (yc *YandexClient) TrackingLinks(opts *options.TrackingLinksOptions) (res responses.APIResponseTrackingLinks, err error)
TrackingLinks 5.3. Получение ссылок для отслеживания курьера https://yandex.ru/dev/logistics/api/ref/performer-info/IntegrationV2ClaimsTrackingLinks.html
type YandexDelivery ¶
type YandexDelivery interface { DeliveryMethods(token string, payload models.DeliveryMethodsRequest) (responses.APIResponseDeliveryMethods, error) CheckPrice(token string, payload models.CheckPriceRequest) (responses.APIResponseCheckPrice, error) Tariffs(token string, payload models.TariffsRequest) (responses.APIResponseTariffs, error) OffersCalculate(token string, payload models.OffersCalculateRequest) (responses.APIResponseOffersCalculate, error) Create(token string, payload models.CreateRequest, opts *options.CreateOptions) (responses.APIResponseInfo, error) Accept(token string, payload models.AcceptRequest, opts *options.AcceptOptions) (responses.APIResponseAccept, error) Search(token string, payload models.SearchRequest) (responses.APIResponseSearch, error) Info(token string, opts *options.InfoOptions) (responses.APIResponseInfo, error) CancelInfo(token string, opts *options.CancelInfoOptions) (responses.APIResponseCancelInfo, error) Cancel(token string, payload models.CancelRequest, opts *options.CancelOptions) (responses.APIResponseCancel, error) Return(token string, payload models.ReturnRequest, opts *options.ReturnOptions) (responses.APIResponseReturn, error) CourierPhone(token string, payload models.CourierPhoneRequest) (responses.APIResponseCourierPhone, error) CourierPosition(token string, opts *options.CourierPositionOptions) (responses.APIResponseCourierPosition, error) TrackingLinks(token string, opts *options.TrackingLinksOptions) (responses.APIResponseTrackingLinks, error) ConfirmationCode(token string, payload models.ConfirmationCodeRequest) (responses.APIResponseConfirmationCode, error) Document(token string, opts *options.DocumentOptions) (responses.APIResponseDocument, error) BulkInfo(token string, payload models.BulkInfoRequest) (responses.APIResponseBulkInfo, error) Journal(token string, payload models.JournalRequest) (responses.APIResponseJournal, error) PointsEta(token string, opts *options.PointsEtaOptions) (responses.APIResponsePointsEta, error) Edit(token string, payload models.EditRequest, opts *options.EditOptions) (responses.APIResponseEdit, error) ApplyChanges(token string, payload models.ApplyChangesRequest, opts *options.ApplyChangesOptions) (responses.APIResponseApplyChanges, error) ApplyChangesResult(token string, payload models.ApplyChangesResultRequest, opts *options.ApplyChangesResultOptions) (responses.APIResponseApplyChangesResult, error) RobotCheckAvailability(token string, payload models.RobotCheckAvailabilityRequest) (responses.APIResponseRobotCheckAvailability, error) RobotOpen(token string, payload models.RobotOpenRequest, opts *options.RobotOpenOptions) (responses.APIResponseRobotOpen, error) PhotosPoint(token string, payload models.PhotosPointRequest) (responses.APIResponsePhotosPoint, error) ProofDelivery(token string, opts *options.ProofDeliveryOptions) (responses.APIResponseProofDelivery, error) }