yandexdelivery

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

README

Library fo API Yandex Delivery

Documentation

Index

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

func (a *APIError) Description() string

Description returns the error description received from the Telegram API.

func (*APIError) Error

func (a *APIError) Error() string

Error returns the error string.

func (*APIError) ErrorCode

func (a *APIError) ErrorCode() string

ErrorCode returns the error code received from the Telegram API.

type Code

type Code string

Статусы из YandexApi

const (
	NotFound    Code = "not_found"
	OldVersionc Code = "old_version"
)

type YandexClient

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

func NewYandexClient

func NewYandexClient(urlBase, token string, debugMode bool) *YandexClient

func (*YandexClient) Accept

Accept 3.2. Подтверждение заявки https://yandex.ru/dev/logistics/api/ref/basic/IntegrationV2ClaimsAccept.html

func (*YandexClient) ApplyChanges

ApplyChanges 8.2. Частичное редактирование заявки после ее подтверждения https://yandex.ru/dev/logistics/api/ref/claim-edit/ClaimsApplyChangesRequest.html

func (*YandexClient) ApplyChangesResult

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) CancelInfo

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

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

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

ProofDelivery 10.1. Получение фотографий по точке https://yandex.ru/dev/logistics/api/ref/proof-of-delivery/IntegrationV2ClaimsProofOfDeliveryInfo.html

func (*YandexClient) Return

Return 4.3. Пропуск точки в заказе с мультиточками. https://yandex.ru/dev/logistics/api/ref/cancel-and-skip-points/IntegrationV2ClaimsReturn.html

func (*YandexClient) RobotCheckAvailability

RobotCheckAvailability 9.1 Запрос на проверку возможности доставки ровером https://yandex.ru/dev/logistics/api/ref/claim-edit/ClaimsApplyChangesResult.html

func (*YandexClient) RobotOpen

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

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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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