moysklad

package
v0.0.0-...-e5623b0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "v0.0.1"

	MaxFiles      = 100  // Максимальное количество файлов
	MaxImages     = 10   // Максимальное количество изображений
	MaxPositions  = 1000 // Максимальное число объектов, передаваемых в одном массиве в запросе
	MaxPrintCount = 1000 // TODO: Максимальное количество ценников/термоэтикеток
)
View Source
const TimestampFormat = "2006-01-02 15:04:05.000"

Variables

View Source
var ErrWrongMetaType = func(h, n MetaType) error { return fmt.Errorf(errWrongMetaTypeMessage, h, n) }

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func Clamp

func Clamp(val, min, max int) int

Clamp задаёт значение в диапазоне между указанными нижней и верхней границами

func DefaultBackoff

func DefaultBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration

DefaultBackoff provides a default callback for RetryableClient.Backoff which will perform exponential backoff based on the attempt number and limited by the provided minimum and maximum durations.

It also tries to parse Retry-After response header when a http.StatusTooManyRequests (HTTP Code 429) is found in the resp parameter. Hence it will return the number of seconds the server states it may be ready to process more requests from this client.

func DefaultPooledClient

func DefaultPooledClient() *http.Client

func DefaultPooledTransport

func DefaultPooledTransport() *http.Transport

func Deref

func Deref[T any](ptr *T) T

Deref разыменовывает указатель

func ErrorPropagatedRetryPolicy

func ErrorPropagatedRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)

ErrorPropagatedRetryPolicy is the same as DefaultRetryPolicy, except it propagates errors back instead of returning nil. This allows you to inspect why it decided to retry or not.

func Float

func Float(v float64) *float64

Float is a helper routine that allocates a new float64 value to store v and returns a pointer to it.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int value to store v and returns a pointer to it.

func RGBtoUint64

func RGBtoUint64(str string) (uint64, error)

RGBtoUint64 конвертирует код цвета из формата RRGGBB и RGB в uint64 Example RGBtoUint64("#E6E6E6") RGBtoUint64("e3e3e3") RGBtoUint64("FFF")

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

func Stringify

func Stringify(message any) string

Stringify attempts to create a reasonable string representation of types in the Moysklad library. It does things like resolve pointers to their values and omits struct fields with nil values.

func Uint

func Uint(v uint64) *uint64

Uint is a helper routine that allocates a new uint64 value to store v and returns a pointer to it.

Types

type AccumulationDiscount

type AccumulationDiscount struct {
	AccountId      *uuid.UUID      `json:"accountId,omitempty"`      // ID учетной записи
	Id             *uuid.UUID      `json:"id,omitempty"`             // ID сущности
	Name           *string         `json:"name,omitempty"`           // Наименование Скидки
	Meta           *Meta           `json:"meta,omitempty"`           // Метаданные
	Active         *bool           `json:"active,omitempty"`         // Индикатор, является ли скидка активной на данный момент
	AgentTags      *Tags           `json:"agentTags,omitempty"`      // Тэги контрагентов, к которым применяется скидка, если применяется не ко всем контрагентам
	AllProducts    *bool           `json:"allProducts,omitempty"`    // Индикатор, действует ли скидка на все товары
	AllAgents      *bool           `json:"allAgents,omitempty"`      // Индикатор, действует ли скидка на всех агентов
	Assortment     *Assortment     `json:"assortment,omitempty"`     // Массив метаданных Товаров и Услуг, которые были выбраны для применения скидки, если та применяется не ко всем товарам
	ProductFolders *ProductFolders `json:"productFolders,omitempty"` // Группы товаров которые были выбраны для применения скидки (если применяется не ко всем товарам)
	Levels         *Levels         `json:"levels,omitempty"`         // Проценты скидок при определенной сумме продаж
}

AccumulationDiscount Накопительная скидка. Ключевое слово: accumulationdiscount Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-polq-nakopitel-nyh-skidok

func (AccumulationDiscount) MetaType

func (a AccumulationDiscount) MetaType() MetaType

func (AccumulationDiscount) String

func (a AccumulationDiscount) String() string

type AccumulationLevel

type AccumulationLevel struct {
	Amount   *float64 `json:"amount,omitempty"`   // Сумма накоплений в копейках
	Discount *float64 `json:"discount,omitempty"` // Процент скидки, соответствующий данной сумме
}

AccumulationLevel Проценты скидок при определенной сумме продаж. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-levels

type Address

type Address struct {
	AddInfo    *string  `json:"addInfo,omitempty"`    // Другое
	Apartment  *string  `json:"apartment,omitempty"`  // Квартира
	City       *string  `json:"city,omitempty"`       // Город
	Comment    *string  `json:"comment,omitempty"`    // Комментарий
	Country    *Country `json:"country,omitempty"`    // Метаданные страны
	House      *string  `json:"house,omitempty"`      // Дом
	PostalCode *string  `json:"postalCode,omitempty"` // Почтовый индекс
	Region     *Region  `json:"region,omitempty"`     // Метаданные региона
	Street     *string  `json:"street,omitempty"`     // Улица
}

Address Адрес с детализацией по отдельным полям. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-sklady-attributy-suschnosti-adres

func (Address) String

func (a Address) String() string

type AgentAccount

type AgentAccount struct {
	AccountId            *uuid.UUID `json:"accountId,omitempty"`            // ID учетной записи
	AccountNumber        *string    `json:"accountNumber,omitempty"`        // Номер счета
	BankLocation         *string    `json:"bankLocation,omitempty"`         // Адрес банка
	BankName             *string    `json:"bankName,omitempty"`             // Наименование банка
	Bic                  *string    `json:"bic,omitempty"`                  // БИК
	CorrespondentAccount *string    `json:"correspondentAccount,omitempty"` // Корр счет
	Id                   *uuid.UUID `json:"id,omitempty"`                   // ID сущности
	IsDefault            *bool      `json:"isDefault,omitempty"`            // Является ли счет основным счетом Контрагента
	Meta                 *Meta      `json:"meta,omitempty"`                 // Метаданные
	Updated              *Timestamp `json:"updated,omitempty"`              // Момент последнего обновления
}

AgentAccount Счёт Контрагента. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-kontragenty-attributy-suschnosti-adres-scheta-kontragentow

func (AgentAccount) String

func (a AgentAccount) String() string

type AgentAccounts

type AgentAccounts = Iterator[AgentAccount]

type Alcoholic

type Alcoholic struct {
	Excise   *bool    `json:"excise,omitempty"`   // Содержит акцизную марку
	Type     *int     `json:"type,omitempty"`     // Код вида продукции
	Strength *float64 `json:"strength,omitempty"` // Крепость
	Volume   *float64 `json:"volume,omitempty"`   // Объём тары
}

Alcoholic Объект, содержащий поля алкогольной продукции Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar-towary-atributy-wlozhennyh-suschnostej-ob-ekt-soderzhaschij-polq-alkogol-noj-produkcii

func (Alcoholic) String

func (a Alcoholic) String() string

type ApiError

type ApiError struct {
	Message      string `json:"error"`         // Заголовок ошибки (обязательное при ответе)
	Parameter    string `json:"parameter"`     // Параметр, на котором произошла ошибка
	Code         int    `json:"code"`          // Код ошибки (Если поле ничего не содержит, смотрите HTTP status code)
	ErrorMessage string `json:"error_message"` // Сообщение, прилагаемое к ошибке
	MoreInfo     string `json:"moreInfo"`      // Ссылка на документацию с описанием полученной ошибки
	Line         int    `json:"line"`          // Строка JSON, на которой произошла ошибка
	Column       int    `json:"column"`        // Координата элемента в строке line, на котором произошла ошибка
	Dependencies []Meta `json:"dependencies"`  // Список метаданных зависимых сущностей или документов. Выводится при невозможности удаления сущности, документа, если имеются зависимости от удаляемой сущности, документа
	Meta         Meta   `json:"meta"`          // Метаданные сущности, документа на котором произошла ошибка
}

ApiError Структура ошибки API МойСклад. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-obschie-swedeniq-obrabotka-oshibok

func (ApiError) Error

func (e ApiError) Error() string

type ApiErrors

type ApiErrors struct {
	ApiErrors []ApiError `json:"errors"`
}

func (ApiErrors) Error

func (e ApiErrors) Error() string

type Application

type Application struct {
	AccountId *uuid.UUID `json:"accountId,omitempty"` // ID учетной записи
	Id        *uuid.UUID `json:"id,omitempty"`        // ID сущности
	Name      *string    `json:"name,omitempty"`      // Наименование
	Meta      *Meta      `json:"meta,omitempty"`      // Метаданные
	AppUid    *uuid.UUID `json:"appUid,omitempty"`    // UID приложения
}

Application Серверное приложение. Ключевое слово: application Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-obschie-swedeniq-serwernye-prilozheniq

func (Application) MetaType

func (a Application) MetaType() MetaType

func (Application) String

func (a Application) String() string

type ApplicationService

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

ApplicationService Сервис для работы с приложениями.

func NewApplicationService

func NewApplicationService(client *Client) *ApplicationService

func (*ApplicationService) Get

func (s *ApplicationService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ApplicationService) GetById

func (s *ApplicationService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

type Assortment

type Assortment Slice[AssortmentPosition]

Assortment Ассортимент. Ключевое слово: assortment Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-assortiment

func (Assortment) FilterBundle

func (a Assortment) FilterBundle() []Bundle

FilterBundle фильтрует позиции по типу Bundle (Комплект)

func (Assortment) FilterConsignment

func (a Assortment) FilterConsignment() []Consignment

FilterConsignment фильтрует позиции по типу Consignment (Серия)

func (Assortment) FilterProduct

func (a Assortment) FilterProduct() []Product

FilterProduct фильтрует позиции по типу Product (Товар)

func (Assortment) FilterService

func (a Assortment) FilterService() []Service

FilterService фильтрует позиции по типу Service (Услуга)

func (Assortment) FilterVariant

func (a Assortment) FilterVariant() []Variant

FilterVariant фильтрует позиции по типу Variant (Модификация)

func (Assortment) MetaType

func (a Assortment) MetaType() MetaType

type AssortmentPosition

type AssortmentPosition struct {
	// Общие поля
	AccountId    uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	Barcodes     Barcodes  `json:"barcodes,omitempty"`     // Штрихкоды
	Code         string    `json:"code,omitempty"`         // Код
	Description  string    `json:"description,omitempty"`  // Описание
	ExternalCode string    `json:"externalCode,omitempty"` // Внешний код
	Id           uuid.UUID `json:"id,omitempty"`           // ID сущности
	Meta         Meta      `json:"meta"`                   // Метаданные
	Name         string    `json:"name,omitempty"`         // Наименование
	// contains filtered or unexported fields
}

AssortmentPosition позиция ассортимента. Представляет из себя структуру из полей: Meta для хранения метаданных сущности data для хранения сырых данных Product | Variant | Bundle | Service | Consignment

func (*AssortmentPosition) ConvertToBundle

func (a *AssortmentPosition) ConvertToBundle() (*Bundle, error)

ConvertToBundle структурирует позицию в *Bundle Возвращает ошибку в случае неудачи

func (*AssortmentPosition) ConvertToConsignment

func (a *AssortmentPosition) ConvertToConsignment() (*Consignment, error)

ConvertToConsignment структурирует позицию в *Consignment Возвращает ошибку в случае неудачи

func (*AssortmentPosition) ConvertToProduct

func (a *AssortmentPosition) ConvertToProduct() (*Product, error)

ConvertToProduct структурирует сущность в *Product Возвращает ошибку в случае неудачи

func (*AssortmentPosition) ConvertToService

func (a *AssortmentPosition) ConvertToService() (*Service, error)

ConvertToService структурирует позицию в *Service Возвращает ошибку в случае неудачи

func (*AssortmentPosition) ConvertToVariant

func (a *AssortmentPosition) ConvertToVariant() (*Variant, error)

ConvertToVariant структурирует позицию в *Variant Возвращает ошибку в случае неудачи

func (AssortmentPosition) Data

Data удовлетворяет интерфейсу DataMetaTyper

func (AssortmentPosition) MetaType

func (a AssortmentPosition) MetaType() MetaType

MetaType удовлетворяет интерфейсу MetaTyper

func (*AssortmentPosition) String

func (a *AssortmentPosition) String() string

func (*AssortmentPosition) UnmarshalJSON

func (a *AssortmentPosition) UnmarshalJSON(data []byte) error

type AssortmentPositionTypes

type AssortmentPositionTypes interface {
	Product | Variant | Bundle | Service | Consignment
	HasMeta
}

type AssortmentResult

type AssortmentResult struct {
	Context Context        `json:"context,omitempty"`
	Meta    MetaCollection `json:"meta,omitempty"`
	Rows    Assortment     `json:"rows,omitempty"`
}

func (AssortmentResult) String

func (m AssortmentResult) String() string

type AssortmentService

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

AssortmentService Сервис для работы с ассортиментом.

func NewAssortmentService

func NewAssortmentService(client *Client) *AssortmentService

func (*AssortmentService) DeleteMany

func (s *AssortmentService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*AssortmentService) Get

func (s *AssortmentService) Get(ctx context.Context, params *Params) (*T, *Response, error)

func (*AssortmentService) GetAsync

func (s *AssortmentService) GetAsync(ctx context.Context) (*AsyncResultService[T], *Response, error)

func (*AssortmentService) GetSettings

func (s *AssortmentService) GetSettings(ctx context.Context) (*T, *Response, error)

GetSettings Запрос на получение настроек справочника

func (*AssortmentService) UpdateSettings

func (s *AssortmentService) UpdateSettings(ctx context.Context, settings *T) (*T, *Response, error)

UpdateSettings Изменить настройки справочника

type AssortmentSettings

type AssortmentSettings struct {
	Meta            *Meta            `json:"meta,omitempty"`            // Метаданные Настроек справочника
	BarcodeRules    *BarcodeRules    `json:"barcodeRules,omitempty"`    // Настройки правил штрихкодов для сущностей справочника
	UniqueCodeRules *UniqueCodeRules `json:"uniqueCodeRules,omitempty"` // Настройки уникальности кода для сущностей справочника
	CreatedShared   *bool            `json:"createdShared,omitempty"`   // Создавать новые документы с меткой «Общий»
}

AssortmentSettings Настройки справочника. Ключевое слово: assortmentsettings Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-assortiment-nastrojki-sprawochnika

func (AssortmentSettings) MetaType

func (a AssortmentSettings) MetaType() MetaType

func (AssortmentSettings) String

func (a AssortmentSettings) String() string

type Async

type Async struct {
	AccountId    uuid.UUID       `json:"accountId,omitempty"`    // ID учетной записи
	DeletionDate Timestamp       `json:"deletionDate,omitempty"` // Дата, после которой результат выполнения задачи станет недоступен. Содержится в ответе, если поле state имеет значение DONE
	ApiErrors    Slice[ApiError] `json:"errors,omitempty"`       // json ошибки апи, если поле state имеет значение API_ERROR
	Id           uuid.UUID       `json:"id,omitempty"`           // ID Асинхронной задачи
	Meta         Meta            `json:"meta,omitempty"`         // Метаданные Асинхронной задачи
	Owner        Meta            `json:"owner,omitempty"`        // Пользователь или приложение, которые создали Асинхронную задачу
	RequestURL   string          `json:"request,omitempty"`      // URL запроса, по которому создана Асинхронная задача
	ResultURL    string          `json:"resultUrl,omitempty"`    // Ссылка на результат выполнения задачи. Содержится в ответе, если поле state имеет значение DONE
	State        AsyncState      `json:"state,omitempty"`        // Статус выполнения Асинхронной задачи
}

Async Асинхронная задача. Ключевое слово: async Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-asinhronnyj-obmen-asinhronnaq-zadacha

func (Async) String

func (a Async) String() string

type AsyncResultService

type AsyncResultService[T any] struct {
	// contains filtered or unexported fields
}

func NewAsyncResultService

func NewAsyncResultService[T any](rb *RequestBuilder[T], resp *Response) *AsyncResultService[T]

NewAsyncResultService Сервис для работы с асинхронной задачей.

func (*AsyncResultService[T]) Cancel

func (s *AsyncResultService[T]) Cancel(ctx context.Context) (bool, *Response, error)

Cancel Отмена Асинхронной задачи. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-asinhronnyj-obmen-otmena-asinhronnoj-zadachi

func (*AsyncResultService[T]) Check

func (s *AsyncResultService[T]) Check(ctx context.Context) (bool, *Response, error)

Check Проверяет статус асинхронной задачи. Если статус задачи = DONE, возвращает true, иначе false

func (*AsyncResultService[T]) Result

func (s *AsyncResultService[T]) Result(ctx context.Context) (*T, *Response, error)

Result Запрос на получение результата. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-asinhronnyj-obmen-poluchenie-rezul-tata-wypolneniq-asinhronnoj-zadachi

func (*AsyncResultService[T]) ResultURL

func (s *AsyncResultService[T]) ResultURL() *url.URL

ResultURL возвращает URL результата выполнения асинхронной задачи.

func (*AsyncResultService[T]) StatusURL

func (s *AsyncResultService[T]) StatusURL() *url.URL

StatusURL возвращает URL проверки статуса асинхронной задачи.

type AsyncService

type AsyncService struct {
	Endpoint
}

AsyncService Сервис для работы с асинхронными задачами. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-asinhronnyj-obmen

func NewAsyncService

func NewAsyncService(client *Client) *AsyncService

func (*AsyncService) GetStatusById

func (s *AsyncService) GetStatusById(ctx context.Context, id *uuid.UUID, params *Params) (*Async, *Response, error)

GetStatusById Получение статуса Асинхронной задачи. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-asinhronnyj-obmen-poluchenie-statusa-asinhronnoj-zadachi

func (*AsyncService) GetStatuses

func (s *AsyncService) GetStatuses(ctx context.Context, params *Params) (*List[Async], *Response, error)

GetStatuses Статусы Асинхронных задач. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-asinhronnyj-obmen-statusy-asinhronnyh-zadach

type AsyncState

type AsyncState string

AsyncState Статус выполнения Асинхронной задачи.

const (
	AsyncStatePending    AsyncState = "PENDING"    // Задача находится в очереди
	AsyncStateProcessing AsyncState = "PROCESSING" // Задача находится в обработке, результат еще не готов
	AsyncStateDone       AsyncState = "DONE"       // Задача выполнена успешно
	AsyncStateError      AsyncState = "ERROR"      // Задача не была выполнена в результате внутренней ошибки. В этом случае нужно попробовать запустить задачу заново
	AsyncStateCancel     AsyncState = "CANCEL"     // Задача была отменена
	AsyncStateApiError   AsyncState = "API_ERROR"  // Задача была завершена с ошибкой апи
)

type Attribute

type Attribute struct {
	CustomEntityMeta *Meta         `json:"customEntityMeta,omitempty"` // Ссылка на метаданные пользовательского справочника
	Description      *string       `json:"description,omitempty"`      // Описание доп. поля
	Id               *uuid.UUID    `json:"id,omitempty"`               // ID доп. поля
	Meta             *Meta         `json:"meta,omitempty"`             // Ссылка на метаданные доп. поля
	Name             *string       `json:"name,omitempty"`             // Наименование доп. поля
	Required         *bool         `json:"required,omitempty"`         // Является ли доп. поле обязательным
	Show             *bool         `json:"show,omitempty"`             // Показывать ли доп. поле на UI. Не может быть скрытым и обязательным одновременно. Только для операций
	Type             AttributeType `json:"type,omitempty"`             // Тип доп. поля
	Value            any           `json:"value,omitempty"`            // Значение доп. поля
	File             *File         `json:"file,omitempty"`
}

Attribute Доп поле Ключевое слово: attributemetadata Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-rabota-s-dopolnitel-nymi-polqmi-cherez-json-api

func (Attribute) MetaType

func (a Attribute) MetaType() MetaType

func (Attribute) String

func (a Attribute) String() string

type AttributeType

type AttributeType string

AttributeType Тип доп. поля

const (
	AttributeTypeTime                   AttributeType = "time"
	AttributeTypeLink                   AttributeType = "link"
	AttributeTypeString                 AttributeType = "string"
	AttributeTypeText                   AttributeType = "text"
	AttributeTypeFile                   AttributeType = "file"
	AttributeTypeBoolean                AttributeType = "boolean"
	AttributeTypeDouble                 AttributeType = "double"
	AttributeTypeLong                   AttributeType = "long"
	AttributeTypeDictionaryContract     AttributeType = "contract"
	AttributeTypeDictionaryCounterParty AttributeType = "counterparty"
	AttributeTypeDictionaryProject      AttributeType = "project"
	AttributeTypeDictionaryStore        AttributeType = "store"
	AttributeTypeDictionaryEmployee     AttributeType = "employee"
	AttributeTypeDictionaryProduct      AttributeType = "product"
	AttributeTypeDictionaryCustom       AttributeType = "customentity"
)

type Attributes

type Attributes = Iterator[Attribute]

type AttributesCreateSharedWrapper

type AttributesCreateSharedWrapper struct {
	Meta         Meta `json:"meta"`
	CreateShared bool `json:"createShared"`
	AttributesWrapper
}

type AttributesStatesCreateSharedWrapper

type AttributesStatesCreateSharedWrapper struct {
	AttributesCreateSharedWrapper
	States []StatesElement `json:"states"`
}

type AttributesWrapper

type AttributesWrapper struct {
	Meta       Meta        `json:"meta"`
	Attributes MetaWrapper `json:"attributes"`
}

type Audit

type Audit struct {
	EntityType    string           `json:"entityType"`    // Название сущности (поле присутствует, только если оно одинаково у всех Событий в рамках данного Контекста)
	EventType     AuditEventType   `json:"eventType"`     // Действие Событий (поле присутствует, только если оно одинаково у всех Событий в рамках данного Контекста)
	Events        MetaWrapper      `json:"events"`        // Список метаданных Событий аудита
	Id            uuid.UUID        `json:"id"`            // ID Контекста
	Info          AuditContextInfo `json:"info"`          // Краткое описание
	Meta          Meta             `json:"meta"`          // Метаданные сущности Контекста
	Moment        Timestamp        `json:"moment"`        // Дата изменения
	ObjectCount   int              `json:"objectCount"`   // Количество измененных объектов
	ObjectType    string           `json:"objectType"`    // Тип сущностей, с которыми связанно данное изменение. Поле присутствует только для entityType = entitysettings или statesettings или templatesettings
	Source        string           `json:"source"`        // Тип изменения
	SupportAccess bool             `json:"supportAccess"` // Был ли доступ произведен поддержкой от имени пользователя. Флаг отсутствует, если значение false
	UID           string           `json:"uid"`           // Логин Сотрудника
}

Audit Контексты Аудита. Ключевое слово: audit Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-kontexty

func (Audit) MetaType

func (a Audit) MetaType() MetaType

func (Audit) String

func (a Audit) String() string

type AuditContext

type AuditContext struct {
	Meta   Meta      `json:"meta,omitempty"`   // Метаданные контекста аудита
	Moment Timestamp `json:"moment,omitempty"` // Дата изменения
	Uid    string    `json:"uid,omitempty"`    // Логин Сотрудника
}

AuditContext Контекст аудита, соответствующий событию вебхука

type AuditContextInfo

type AuditContextInfo struct {
	AdditionalInfo string `json:"additionalInfo"`
}

type AuditEvent

type AuditEvent struct {
	AdditionalInfo string         `json:"additionalInfo"` // Дополнительная информация о Событии
	Audit          MetaWrapper    `json:"audit"`          // Метаданные контекста
	Diff           any            `json:"diff"`           // TODO Изменения, произошедшие в Событии, в специальном формате diff, описанном в разделе Формат поля diff
	Entity         MetaWrapper    `json:"entity"`         // Метаданные сущности. Не будет выводиться только для товаров, услуг, модификаций, комплектов удаленных до 20.08.2017
	EntityType     string         `json:"entityType"`     // Название сущности
	EventType      AuditEventType `json:"eventType"`      // Действие События
	Moment         Timestamp      `json:"moment"`         // Время создания события
	Name           string         `json:"name"`           // Имя сущности
	ObjectCount    int            `json:"objectCount"`    // Количество измененных объектов
	ObjectType     string         `json:"objectType"`     // Тип сущностей, с которыми связанно данное изменение. Поле присутствует только для entityType = entitysettings или statesettings или templatesettings
	Source         string         `json:"source"`         // Тип изменения
	SupportAccess  bool           `json:"supportAccess"`  // Был ли доступ произведен поддержкой от имени пользователя. Флаг отсутствует, если значение false
	UID            string         `json:"uid"`            // Логин Сотрудника
}

AuditEvent Событие аудита. Ключевое слово: auditevent Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-sobytiq

func (AuditEvent) MetaType

func (a AuditEvent) MetaType() MetaType

func (AuditEvent) String

func (a AuditEvent) String() string

type AuditEventDiff

type AuditEventDiff struct {
	// Событие регистрации
	// Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-sobytiq-sobytie-registracii
	Account string `json:"account,omitempty"` // Название аккаунта
	Country string `json:"country,omitempty"` // Конфигурация аккаунта (страна)

	// События публикации документов
	// Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-sobytiq-sobytiq-publikacii-dokumentow
	TemplateName    string `json:"templateName,omitempty"`    // Название шаблона
	PublicationHref string `json:"publicationHref,omitempty"` // Ссылка на публикацию

	// События отправки писем
	// Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-sobytiq-sobytiq-otprawki-pisem
	SenderEmail  string `json:"senderEmail,omitempty"`  // Почта отправителя письма
	TargetEmail  string `json:"targetEmail,omitempty"`  // Почта получателя письма
	SubjectEmail string `json:"subjectEmail,omitempty"` // Тема письма
	Text         string `json:"text,omitempty"`         // Текст письма

	// События удаления сущностей
	// Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-sobytiq-sobytiq-udaleniq-suschnostej
	AttributeName string `json:"attributeName,omitempty"` // Название атрибута сущности
	OldValue      any    `json:"oldValue,omitempty"`      // Значение атрибута до удаления

	// События обновления сущностей, перемещения/восстановления из корзины, перемещение/восстановление из архива
	// Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-sobytiq-sobytiq-obnowleniq-suschnostej-peremescheniq-wosstanowleniq-iz-korziny-peremeschenie-wosstanowlenie-iz-arhiwa
	NewValue any `json:"newValue,omitempty"` // Значение атрибута после обновления
}

AuditEventDiff Формат поля diff

Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-sobytiq-format-polq-diff

func (AuditEventDiff) String

func (a AuditEventDiff) String() string

type AuditEventType

type AuditEventType string

AuditEventType Действие События

const (
	AuditEventTypeRegistration          AuditEventType = "registration"          // Регистрация
	AuditEventTypeBulkOperation         AuditEventType = "bulkoperation"         // Массовая операция
	AuditEventTypeClosePublication      AuditEventType = "closepublication"      // Удаление публикации
	AuditEventTypeCreate                AuditEventType = "create"                // Создание сущностей
	AuditEventTypeDelete                AuditEventType = "delete"                // Удаление сущностей
	AuditEventTypeOpenPublication       AuditEventType = "openpublication"       // Создание публикации
	AuditEventTypePrint                 AuditEventType = "print"                 // Печать документа
	AuditEventTypePutToArchive          AuditEventType = "puttoarchive"          // Помещение в архив
	AuditEventTypePutToRecycleBin       AuditEventType = "puttorecyclebin"       // Помещение в корзину
	AuditEventTypeReplaceToken          AuditEventType = "replacetoken"          // Смена токена для Точки продаж
	AuditEventTypeRestoreFromArchive    AuditEventType = "restorefromarchive"    // Извлечение из архива
	AuditEventTypeRestoreFromRecycleBin AuditEventType = "restorefromrecyclebin" // Извлечение из корзины
	AuditEventTypeSendEmailFromEntity   AuditEventType = "sendemailfromentity"   // Отправка письма
	AuditEventTypeUpdate                AuditEventType = "update"                // Изменение сущностей
)

type AuditFilters

type AuditFilters struct {
	EventType  Slice[string] `json:"eventType"`  // Действия, по которым могут быть отфильтрованы сущности аудита
	Source     Slice[string] `json:"source"`     // Типы действий, по которым могут быть отфильтрованы сущности аудита
	EntityType Slice[string] `json:"entityType"` // Названия сущностей, по которым могут быть отфильтрованы сущности аудита
}

AuditFilters Фильтры Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-fil-try

func (AuditFilters) String

func (a AuditFilters) String() string

type AuditService

type AuditService struct {
	Endpoint
}

AuditService Сервис для работы с аудитом.

func NewAuditService

func NewAuditService(client *Client) *AuditService

func (*AuditService) GetContexts

func (s *AuditService) GetContexts(ctx context.Context, params *Params) (*List[Audit], *Response, error)

GetContexts Получить Контексты. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-poluchit-kontexty

func (*AuditService) GetEvents

func (s *AuditService) GetEvents(ctx context.Context, id *uuid.UUID) (*List[AuditEvent], *Response, error)

GetEvents Получить События по Контексту. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-poluchit-sobytiq-po-kontextu

func (*AuditService) GetFilters

func (s *AuditService) GetFilters(ctx context.Context) (*AuditFilters, *Response, error)

GetFilters Получить Фильтры. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-poluchit-fil-try

type Backoff

type Backoff func(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration

Backoff specifies a policy for how long to wait between retries. It is called after a failing request to determine the amount of time that should pass before trying again.

type Barcode

type Barcode struct {
	Type  BarcodeType // Тип штрихкода
	Value string      // Штрихкод
}

Barcode Штрихкод. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar-towary-atributy-wlozhennyh-suschnostej-shtrihkody

func (Barcode) MarshalJSON

func (b Barcode) MarshalJSON() ([]byte, error)

func (Barcode) String

func (b Barcode) String() string

func (*Barcode) UnmarshalJSON

func (b *Barcode) UnmarshalJSON(bytes []byte) (err error)

type BarcodeRules

type BarcodeRules struct {
	FillEAN13Barcode    *bool `json:"fillEAN13Barcode,omitempty"`    // Автоматически создавать штрихкод EAN13 для новых товаров, комплектов, модификаций и услуг
	WeightBarcode       *bool `json:"weightBarcode,omitempty"`       // Использовать префиксы штрихкодов для весовых товаров
	WeightBarcodePrefix *int  `json:"weightBarcodePrefix,omitempty"` // Префикс штрихкодов для весовых товаров. Возможные значения: число формата X или XX
}

BarcodeRules Настройки правил штрихкодов для сущностей справочника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-assortiment-atributy-wlozhennyh-suschnostej-nastrojki-prawil-shtrihkodow-dlq-suschnostej-sprawochnika

func (BarcodeRules) String

func (b BarcodeRules) String() string

type BarcodeType

type BarcodeType string

BarcodeType Тип штрихкода

const (
	BarcodeEAN13   BarcodeType = "ean13"   // штрихкод в формате EAN13, если требуется создать штрихкод в формате EAN13
	BarcodeEAN8    BarcodeType = "ean8"    // штрихкод в формате EAN8, если требуется создать штрихкод в формате EAN8
	BarcodeCode128 BarcodeType = "code128" // штрихкод в формате Code128, если требуется создать штрихкод в формате Code128
	BarcodeGTIN    BarcodeType = "gtin"    // штрихкод в формате GTIN, если требуется создать штрихкод в формате GTIN. Валидируется на соответствие формату GS1
	BarcodeUPC     BarcodeType = "upc"     // штрихкод в формате UPC, если требуется создать штрихкод в формате UPC
)

type Barcodes

type Barcodes = Iterator[Barcode]

type BasePermission

type BasePermission struct {
	View   PermissionValue `json:"view"`
	Create PermissionValue `json:"create"`
	Update PermissionValue `json:"update"`
	Delete PermissionValue `json:"delete"`
}

type BonusProgram

type BonusProgram struct {
	AccountId                 *uuid.UUID         `json:"accountId,omitempty"`                 // ID учетной записи
	Active                    *bool              `json:"active,omitempty"`                    // Индикатор, является ли бонусная программа активной на данный момент
	AgentTags                 *Tags              `json:"agentTags,omitempty"`                 // Тэги контрагентов, к которым применяется бонусная программа. В случае пустого значения контрагентов в результате выводится пустой массив.
	AllAgents                 *bool              `json:"allAgents,omitempty"`                 // Индикатор, действует ли скидка на всех контрагентов (см. Скидки)
	AllProducts               *bool              `json:"allProducts,omitempty"`               // Индикатор, действует ли бонусная программа на все товары (всегда true, см. Скидки)
	EarnRateRoublesToPoint    *int               `json:"earnRateRoublesToPoint,omitempty"`    // Курс начисления
	EarnWhileRedeeming        *bool              `json:"earnWhileRedeeming,omitempty"`        // Разрешить одновременное начисление и списание бонусов. Если true - бонусы будут начислены на денежную часть покупки, даже при частичной оплате покупки баллами.
	Id                        *uuid.UUID         `json:"id,omitempty"`                        // ID сущности
	MaxPaidRatePercents       *int               `json:"maxPaidRatePercents,omitempty"`       // Максимальный процент оплаты баллами
	Meta                      *Meta              `json:"meta,omitempty"`                      // Метаданные
	Name                      *string            `json:"name,omitempty"`                      // Наименование Бонусной программы
	PostponedBonusesDelayDays *int               `json:"postponedBonusesDelayDays,omitempty"` // Баллы начисляются через [N] дней (Тарифная опция «Расширенная бонусная программа»)
	SpendRatePointsToRouble   *int               `json:"spendRatePointsToRouble,omitempty"`   // Курс списания
	WelcomeBonusesEnabled     *bool              `json:"welcomeBonusesEnabled,omitempty"`     // Возможность начисления приветственных баллов
	WelcomeBonusesMode        WelcomeBonusesMode `json:"welcomeBonusesMode,omitempty"`        // Условие начисления приветственных баллов. Не может быть пустым, если welcomeBonusesEnabled = true
	WelcomeBonusesValue       *int               `json:"welcomeBonusesValue,omitempty"`       //	Количество приветственных баллов, начисляемых участникам бонусной программы. Не может быть отрицательным. Не может быть пустым, если welcomeBonusesEnabled = true
}

BonusProgram Бонусная программа. Ключевое слово: bonusprogram Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-bonusnaq-programma

func (BonusProgram) MetaType

func (b BonusProgram) MetaType() MetaType

func (BonusProgram) String

func (b BonusProgram) String() string

type BonusProgramService

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

BonusProgramService Сервис для работы с бонусными программами.

func NewBonusProgramService

func NewBonusProgramService(client *Client) *BonusProgramService

func (*BonusProgramService) Create

func (s *BonusProgramService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*BonusProgramService) Delete

func (s *BonusProgramService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*BonusProgramService) DeleteMany

func (s *BonusProgramService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*BonusProgramService) Get

func (s *BonusProgramService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*BonusProgramService) GetById

func (s *BonusProgramService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*BonusProgramService) Update

func (s *BonusProgramService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type BonusTransaction

type BonusTransaction struct {
	AccountId         *uuid.UUID               `json:"accountId,omitempty"`         // ID учетной записи
	Agent             *Counterparty            `json:"agent,omitempty"`             // Метаданные Контрагента, связанного с бонусной операцией
	Applicable        *bool                    `json:"applicable,omitempty"`        // Отметка о проведении
	BonusProgram      *BonusProgram            `json:"bonusProgram,omitempty"`      // Метаданные бонусной программы
	BonusValue        *int                     `json:"bonusValue,omitempty"`        // Количество бонусных баллов
	CategoryType      BonusTransactionCategory `json:"categoryType,omitempty"`      // Категория бонусной операции
	Code              *string                  `json:"code,omitempty"`              // Код Бонусной операции
	Created           *Timestamp               `json:"created,omitempty"`           // Момент создания Бонусной операции
	ExecutionDate     *Timestamp               `json:"executionDate,omitempty"`     // Дата начисления бонусной операции.
	ExternalCode      *string                  `json:"externalCode,omitempty"`      // Внешний код Бонусной операции
	Group             *Group                   `json:"group,omitempty"`             // Отдел сотрудника
	Id                *uuid.UUID               `json:"id,omitempty"`                // ID сущности
	Meta              *Meta                    `json:"meta,omitempty"`              // Метаданные
	Moment            *Timestamp               `json:"moment,omitempty"`            // Время проведения бонусной операции
	Name              *string                  `json:"name,omitempty"`              // Наименование
	Organization      *Organization            `json:"organization,omitempty"`      // Метаданные юрлица
	Owner             *Employee                `json:"owner,omitempty"`             // Владелец (Сотрудник)
	ParentDocument    *BonusTransaction        `json:"parentDocument,omitempty"`    // Метаданные связанного документа бонусной операции
	Shared            *bool                    `json:"shared,omitempty"`            // Общий доступ
	TransactionStatus BonusTransactionStatus   `json:"transactionStatus,omitempty"` // Статус бонусной операции. Возможные значения: WAIT_PROCESSING, COMPLETED, CANCELED
	TransactionType   BonusTransactionType     `json:"transactionType,omitempty"`   // Тип бонусной операции. Возможные значения: EARNING, SPENDING
	Updated           *Timestamp               `json:"updated,omitempty"`           // Момент последнего обновления Бонусной операции
	UpdatedBy         *string                  `json:"updatedBy,omitempty"`         // Автор последнего обновления бонусной операции в формате uid (admin@admin) (Атрибут используется только для фильтрации)
}

BonusTransaction Бонусная операция. Ключевое слово: bonustransaction Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-bonusnaq-operaciq

func (BonusTransaction) MetaType

func (b BonusTransaction) MetaType() MetaType

func (BonusTransaction) String

func (b BonusTransaction) String() string

type BonusTransactionCategory

type BonusTransactionCategory string

BonusTransactionCategory Категория бонусной операции

const (
	BonusTransactionCategoryTypeRegular BonusTransactionCategory = "REGULAR"
	BonusTransactionCategoryTypeWelcome BonusTransactionCategory = "WELCOME"
)

type BonusTransactionService

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

BonusTransactionService Сервис для работы с бонусными операциями.

func NewBonusTransactionService

func NewBonusTransactionService(client *Client) *BonusTransactionService

func (*BonusTransactionService) Create

func (s *BonusTransactionService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*BonusTransactionService) CreateUpdateMany

func (s *BonusTransactionService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*BonusTransactionService) Delete

func (s *BonusTransactionService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*BonusTransactionService) Get

func (s *BonusTransactionService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*BonusTransactionService) GetById

func (s *BonusTransactionService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*BonusTransactionService) Update

func (s *BonusTransactionService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type BonusTransactionStatus

type BonusTransactionStatus string

BonusTransactionStatus Статус бонусной операции

const (
	BonusTransactionStatusWaitProcessing BonusTransactionStatus = "WAIT_PROCESSING"
	BonusTransactionStatusCompleted      BonusTransactionStatus = "COMPLETED"
	BonusTransactionStatusCanceled       BonusTransactionStatus = "CANCELED"
)

type BonusTransactionType

type BonusTransactionType string

BonusTransactionType Тип бонусной операции

const (
	Earning  BonusTransactionType = "EARNING"
	Spending BonusTransactionType = "SPENDING"
)

type Bundle

type Bundle struct {
	AccountId           *uuid.UUID                  `json:"accountId,omitempty"`           // ID учетной записи
	Barcodes            *Barcodes                   `json:"barcodes,omitempty"`            // Штрихкоды
	Code                *string                     `json:"code,omitempty"`                // Код
	Description         *string                     `json:"description,omitempty"`         // Описание
	ExternalCode        *string                     `json:"externalCode,omitempty"`        // Внешний код
	Id                  *uuid.UUID                  `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta                       `json:"meta,omitempty"`                // Метаданные
	Name                *string                     `json:"name,omitempty"`                // Наименование
	Archived            *bool                       `json:"archived,omitempty"`            // Добавлен ли Комплект в архив
	Article             *string                     `json:"article,omitempty"`             // Артикул
	Attributes          *Attributes                 `json:"attributes,omitempty"`          // Коллекция доп. полей
	Components          *Positions[BundleComponent] `json:"components,omitempty"`          // Массив компонентов Комплекта
	Country             *Country                    `json:"country,omitempty"`             // Метаданные Страны
	DiscountProhibited  *bool                       `json:"discountProhibited"`            // Признак запрета скидок
	EffectiveVat        *int                        `json:"effectiveVat,omitempty"`        // Реальный НДС %
	EffectiveVatEnabled *bool                       `json:"effectiveVatEnabled,omitempty"` // Дополнительный признак для определения разграничения реального НДС = 0 или "без НДС". (effectiveVat = 0, effectiveVatEnabled = false) -> "без НДС", (effectiveVat = 0, effectiveVatEnabled = true) -> 0%.
	Files               *Files                      `json:"files,omitempty"`               // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group               *Group                      `json:"group,omitempty"`               // Метаданные отдела сотрудника
	Images              *Images                     `json:"images,omitempty"`              // Массив метаданных Изображений (Максимальное количество изображений - 10)
	MinPrice            *MinPrice                   `json:"minPrice,omitempty"`            // Минимальная цена
	Overhead            *BundleOverhead             `json:"overhead,omitempty"`            // Дополнительные расходы
	Owner               *Employee                   `json:"owner,omitempty"`               // Метаданные владельца (Сотрудника)
	PartialDisposal     *bool                       `json:"partialDisposal,omitempty"`     // Управление состоянием частичного выбытия маркированного товара. «true» - возможность включена.
	PathName            *string                     `json:"pathName,omitempty"`            // Наименование группы, в которую входит Комплект
	PaymentItemType     PaymentItem                 `json:"paymentItemType,omitempty"`     // Признак предмета расчета
	SalePrices          *SalePrices                 `json:"salePrices,omitempty"`          // Цены продажи
	ProductFolder       *ProductFolder              `json:"productFolder,omitempty"`       // Метаданные группы
	Shared              *bool                       `json:"shared,omitempty"`              // Общий доступ
	SyncId              *uuid.UUID                  `json:"syncId,omitempty"`              // Общий доступ
	TaxSystem           GoodTaxSystem               `json:"taxSystem,omitempty"`           // Код системы налогообложения
	Tnved               *string                     `json:"tnved,omitempty"`               // Код ТН ВЭД
	TrackingType        TrackingType                `json:"trackingType,omitempty"`        // Тип маркируемой продукции
	Uom                 *Uom                        `json:"uom,omitempty"`                 // Единицы измерения
	Updated             *Timestamp                  `json:"updated,omitempty"`             // Момент последнего обновления сущности
	UseParentVat        *bool                       `json:"useParentVat,omitempty"`        // Используется ли ставка НДС родительской группы. Если true для единицы ассортимента будет применена ставка, установленная для родительской группы.
	Vat                 *int                        `json:"vat,omitempty"`                 // НДС %
	VatEnabled          *bool                       `json:"vatEnabled,omitempty"`          // Включен ли НДС для товара. С помощью этого флага для товара можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Volume              *float64                    `json:"volume,omitempty"`              // Объем
	Weight              *float64                    `json:"weight,omitempty"`              // Вес
}

Bundle Комплект. Ключевое слово: bundle Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-komplekt

func (Bundle) ConvertToAssortmentPosition

func (b Bundle) ConvertToAssortmentPosition() (*AssortmentPosition, error)

func (Bundle) GetMeta

func (b Bundle) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Bundle) MetaType

func (b Bundle) MetaType() MetaType

func (Bundle) String

func (b Bundle) String() string

type BundleComponent

type BundleComponent struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги, которую представляет собой компонент
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID сущности
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в компоненте
}

BundleComponent Компонент комплекта. Ключевое слово: bundlecomponent Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-komplekt-komplekty-komponenty-komplekta

func (BundleComponent) MetaType

func (b BundleComponent) MetaType() MetaType

func (BundleComponent) String

func (b BundleComponent) String() string

type BundleOverhead

type BundleOverhead struct {
	Value    *float64  `json:"value,omitempty"`    // Значение цены
	Currency *Currency `json:"currency,omitempty"` // Ссылка на валюту в формате Метаданных
}

BundleOverhead Дополнительные расходы Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-komplekt-komplekty-atributy-wlozhennyh-suschnostej-dopolnitel-nye-rashody

func (BundleOverhead) String

func (b BundleOverhead) String() string

type BundleService

type BundleService struct {
	Endpoint
	// contains filtered or unexported fields
}

BundleService Сервис для работы с комплектами.

func NewBundleService

func NewBundleService(client *Client) *BundleService

func (*BundleService) Create

func (s *BundleService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*BundleService) CreateComponent

func (s *BundleService) CreateComponent(ctx context.Context, id *uuid.UUID, bundleComponent *BundleComponent) (*BundleComponent, *Response, error)

CreateComponent Добавить компонент Комплекта. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-komplekt-dobawit-komponent-komplekta

func (*BundleService) CreateUpdateMany

func (s *BundleService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*BundleService) Delete

func (s *BundleService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*BundleService) DeleteComponent

func (s *BundleService) DeleteComponent(ctx context.Context, id, componentId uuid.UUID) (bool, *Response, error)

DeleteComponent Удалить компонент. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-komplekt-udalit-komponent

func (*BundleService) Get

func (s *BundleService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*BundleService) GetById

func (s *BundleService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*BundleService) GetComponentById

func (s *BundleService) GetComponentById(ctx context.Context, id, componentId uuid.UUID) (*BundleComponent, *Response, error)

GetComponentById Получить компонент. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-komplekt-poluchit-komponent

func (*BundleService) GetComponents

func (s *BundleService) GetComponents(ctx context.Context, id *uuid.UUID) (*List[BundleComponent], *Response, error)

GetComponents Получить компоненты Комплекта. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-komplekt-poluchit-komponenty-komplekta

func (*BundleService) Update

func (s *BundleService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*BundleService) UpdateComponent

func (s *BundleService) UpdateComponent(ctx context.Context, id, componentId uuid.UUID, bundleComponent *BundleComponent) (*BundleComponent, *Response, error)

UpdateComponent Изменить компонент. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-komplekt-izmenit-komponent

type BuyPrice

type BuyPrice struct {
	Value    *float64  `json:"value,omitempty"`    // Значение цены
	Currency *Currency `json:"currency,omitempty"` // Ссылка на валюту в формате Метаданных
}

BuyPrice Закупочная цена. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar-towary-atributy-wlozhennyh-suschnostej-zakupochnaq-cena

func (BuyPrice) String

func (b BuyPrice) String() string

type CashIn

type CashIn struct {
	AccountId      *uuid.UUID    `json:"accountId,omitempty"`      // ID учетной записи
	Agent          *Counterparty `json:"agent,omitempty"`          // Метаданные контрагента
	Applicable     *bool         `json:"applicable,omitempty"`     // Отметка о проведении
	Attributes     *Attributes   `json:"attributes,omitempty"`     // Коллекция метаданных доп. полей. Поля объекта
	Code           *string       `json:"code,omitempty"`           // Код
	Contract       *Contract     `json:"contract,omitempty"`       // Метаданные договора
	Created        *Timestamp    `json:"created,omitempty"`        // Дата создания
	Deleted        *Timestamp    `json:"deleted,omitempty"`        // Момент последнего удаления
	Description    *string       `json:"description,omitempty"`    // Комментарий
	ExternalCode   *string       `json:"externalCode,omitempty"`   // Внешний код
	Files          *Files        `json:"files,omitempty"`          // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group          *Group        `json:"group,omitempty"`          // Отдел сотрудника
	Id             *uuid.UUID    `json:"id,omitempty"`             // ID сущности
	Meta           *Meta         `json:"meta,omitempty"`           // Метаданные
	Moment         *Timestamp    `json:"moment,omitempty"`         // Дата документа
	Name           *string       `json:"name,omitempty"`           // Наименование
	Organization   *Organization `json:"organization,omitempty"`   // Метаданные юрлица
	Owner          *Employee     `json:"owner,omitempty"`          // Владелец (Сотрудник)
	PaymentPurpose *string       `json:"paymentPurpose,omitempty"` // Основание
	Printed        *bool         `json:"printed,omitempty"`        // Напечатан ли документ
	Project        *Project      `json:"project,omitempty"`        // Метаданные проекта
	Published      *bool         `json:"published,omitempty"`      // Опубликован ли документ
	Rate           *Rate         `json:"rate,omitempty"`           // Валюта
	SalesChannel   *SalesChannel `json:"salesChannel,omitempty"`   // Метаданные канала продаж
	Shared         *bool         `json:"shared,omitempty"`         // Общий доступ
	State          *State        `json:"state,omitempty"`          // Метаданные статуса
	Sum            *float64      `json:"sum,omitempty"`            // Сумма
	SyncId         *uuid.UUID    `json:"syncId,omitempty"`         // ID синхронизации. После заполнения недоступен для изменения
	Updated        *Timestamp    `json:"updated,omitempty"`        // Момент последнего обновления
	VatSum         *float64      `json:"vatSum,omitempty"`         // Сумма включая НДС
	FactureIn      *FactureIn    `json:"factureIn,omitempty"`      // Ссылка на Счет-фактуру полученный, с которым связан этот платеж в формате Метаданных
	Operations     *OperationsIn `json:"operations,omitempty"`     // Массив ссылок на связанные операции в формате Метаданных
}

CashIn Приходный ордер. Ключевое слово: cashin Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-prihodnyj-order

func (CashIn) MetaType

func (c CashIn) MetaType() MetaType

func (CashIn) String

func (c CashIn) String() string

type CashInService

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

CashInService Сервис для работы с приходными ордерами.

func NewCashInService

func NewCashInService(client *Client) *CashInService

func (*CashInService) Create

func (s *CashInService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CashInService) CreateAttribute

func (s *CashInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CashInService) CreateAttributes

func (s *CashInService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CashInService) CreateUpdateMany

func (s *CashInService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CashInService) Delete

func (s *CashInService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CashInService) DeleteAttribute

func (s *CashInService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*CashInService) DeleteAttributes

func (s *CashInService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*CashInService) DeleteBySyncId

func (s *CashInService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*CashInService) DeletePublication

func (s *CashInService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*CashInService) Get

func (s *CashInService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*CashInService) GetAttributeById

func (s *CashInService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*CashInService) GetAttributes

func (s *CashInService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*CashInService) GetById

func (s *CashInService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*CashInService) GetBySyncId

func (s *CashInService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*CashInService) GetMetadata

func (s *CashInService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*CashInService) GetPublicationById

func (s *CashInService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*CashInService) GetPublications

func (s *CashInService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*CashInService) Publish

func (s *CashInService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*CashInService) Remove

func (s *CashInService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*CashInService) Template

func (s *CashInService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*CashInService) Update

func (s *CashInService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*CashInService) UpdateAttribute

func (s *CashInService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type CashOut

type CashOut struct {
	AccountId      *uuid.UUID    `json:"accountId,omitempty"`      // ID учетной записи
	Agent          *Counterparty `json:"agent,omitempty"`          // Метаданные контрагента
	Applicable     *bool         `json:"applicable,omitempty"`     // Отметка о проведении
	Attributes     *Attributes   `json:"attributes,omitempty"`     // Коллекция метаданных доп. полей. Поля объекта
	Code           *string       `json:"code,omitempty"`           // Код
	Contract       *Contract     `json:"contract,omitempty"`       // Метаданные договора
	Created        *Timestamp    `json:"created,omitempty"`        // Дата создания
	Deleted        *Timestamp    `json:"deleted,omitempty"`        // Момент последнего удаления
	Description    *string       `json:"description,omitempty"`    // Комментарий
	ExpenseItem    *ExpenseItem  `json:"expenseItem,omitempty"`    // Метаданные Статьи расходов
	ExternalCode   *string       `json:"externalCode,omitempty"`   // Внешний код
	Files          *Files        `json:"files,omitempty"`          // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group          *Group        `json:"group,omitempty"`          // Отдел сотрудника
	Id             *uuid.UUID    `json:"id,omitempty"`             // ID сущности
	Meta           *Meta         `json:"meta,omitempty"`           // Метаданные
	Moment         *Timestamp    `json:"moment,omitempty"`         // Дата документа
	Name           *string       `json:"name,omitempty"`           // Наименование
	Organization   *Organization `json:"organization,omitempty"`   // Метаданные юрлица
	Owner          *Employee     `json:"owner,omitempty"`          // Владелец (Сотрудник)
	PaymentPurpose *string       `json:"paymentPurpose,omitempty"` // Основание
	Printed        *bool         `json:"printed,omitempty"`        // Напечатан ли документ
	Project        *Project      `json:"project,omitempty"`        // Метаданные проекта
	Published      *bool         `json:"published,omitempty"`      // Опубликован ли документ
	Rate           *Rate         `json:"rate,omitempty"`           // Валюта
	SalesChannel   *SalesChannel `json:"salesChannel,omitempty"`   // Метаданные канала продаж
	Shared         *bool         `json:"shared,omitempty"`         // Общий доступ
	State          *State        `json:"state,omitempty"`          // Метаданные статуса
	Sum            *float64      `json:"sum,omitempty"`            // Сумма
	SyncId         *uuid.UUID    `json:"syncId,omitempty"`         // ID синхронизации. После заполнения недоступен для изменения
	Updated        *Timestamp    `json:"updated,omitempty"`        // Момент последнего обновления
	VatSum         *float64      `json:"vatSum,omitempty"`         // Сумма включая НДС
	FactureOut     *FactureOut   `json:"factureOut,omitempty"`     // Ссылка на Счет-фактуру выданный, с которым связан этот платеж в формате Метаданных

}

CashOut Расходный ордер. Ключевое слово: cashout Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-rashodnyj-order

func (CashOut) MetaType

func (c CashOut) MetaType() MetaType

func (CashOut) String

func (c CashOut) String() string

type CashOutService

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

CashOutService cashout Сервис для работы с расходными ордерами.

func NewCashOutService

func NewCashOutService(client *Client) *CashOutService

func (*CashOutService) Create

func (s *CashOutService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CashOutService) CreateAttribute

func (s *CashOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CashOutService) CreateAttributes

func (s *CashOutService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CashOutService) CreateUpdateMany

func (s *CashOutService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CashOutService) Delete

func (s *CashOutService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CashOutService) DeleteAttribute

func (s *CashOutService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*CashOutService) DeleteAttributes

func (s *CashOutService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*CashOutService) DeleteBySyncId

func (s *CashOutService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*CashOutService) DeletePublication

func (s *CashOutService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*CashOutService) Get

func (s *CashOutService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*CashOutService) GetAttributeById

func (s *CashOutService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*CashOutService) GetAttributes

func (s *CashOutService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*CashOutService) GetById

func (s *CashOutService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*CashOutService) GetBySyncId

func (s *CashOutService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*CashOutService) GetMetadata

func (s *CashOutService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*CashOutService) GetPublicationById

func (s *CashOutService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*CashOutService) GetPublications

func (s *CashOutService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*CashOutService) Publish

func (s *CashOutService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*CashOutService) Remove

func (s *CashOutService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*CashOutService) Template

func (s *CashOutService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*CashOutService) Update

func (s *CashOutService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*CashOutService) UpdateAttribute

func (s *CashOutService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type Cashier

type Cashier struct {
	AccountId   *uuid.UUID   `json:"accountId,omitempty"`   // ID учетной записи
	Employee    *Employee    `json:"employee,omitempty"`    // Метаданные сотрудника, которого представляет собой кассир
	Id          *uuid.UUID   `json:"id,omitempty"`          // ID сущности
	Meta        *Meta        `json:"meta,omitempty"`        // Метаданные
	RetailStore *RetailStore `json:"retailStore,omitempty"` // Метаданные точки продаж, к которой прикреплен кассир
}

Cashier Кассир. Ключевое слово: cashier Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kassir

func (Cashier) MetaType

func (c Cashier) MetaType() MetaType

func (Cashier) String

func (c Cashier) String() string

type Cashiers

type Cashiers MetaArray[Cashier]

type Characteristic

type Characteristic struct {
	Id       *uuid.UUID `json:"id,omitempty"`       // ID соответствующей характеристики
	Meta     *Meta      `json:"meta,omitempty"`     // Метаданные характеристики
	Name     *string    `json:"name,omitempty"`     // Наименование характеристики
	Required *bool      `json:"required,omitempty"` // Флаг о том, является ли характеристика обязательной
	Type     *string    `json:"type,omitempty"`     // Тип значения характеристики (значение всегда "string")
	Value    *string    `json:"value,omitempty"`    // Значение характеристики
}

Characteristic Характеристика Ключевое слово: attributemetadata Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-modifikaciq-modifikacii-atributy-wlozhennyh-suschnostej-metadannye-modifikacij-harakteristiki-modifikacii

func (Characteristic) MetaType

func (c Characteristic) MetaType() MetaType

func (Characteristic) String

func (c Characteristic) String() string

type Characteristics

type Characteristics = Iterator[Characteristic]

type CheckRetry

type CheckRetry func(ctx context.Context, resp *http.Response, err error) (bool, error)

CheckRetry specifies a policy for handling retries. It is called following each request with the response and error values returned by the http.Client. If CheckRetry returns false, the RetryableClient stops retrying and returns the response to the caller. If CheckRetry returns an error, that error value is returned in lieu of the error from the request. The RetryableClient will close any response body when retrying, but if the retry is aborted it is up to the CheckRetry callback to properly close any response body before returning.

type Cheque

type Cheque struct {
	Start ChequeStart `json:"start,omitempty"` // Информация об открытии смены
	End   ChequeEnd   `json:"end,omitempty"`   // Информация о закрытии смены
}

Cheque Информация о смене ККТ Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-roznichnaq-smena-roznichnye-smeny-informaciq-o-smene-kkt

func (Cheque) String

func (c Cheque) String() string

type ChequeEnd

type ChequeEnd struct {
	ChequeStart
	ChequesTotal    float64 `json:"chequesTotal,omitempty"`    // Количество чеков за смену
	FiscalDocsTotal float64 `json:"fiscalDocsTotal,omitempty"` // Количество фискальных документов за смену
}

ChequeEnd Информация о закрытии смены ККТ Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-roznichnaq-smena-roznichnye-smeny-informaciq-o-zakrytii-smeny-kkt

func (ChequeEnd) String

func (c ChequeEnd) String() string

type ChequePrinter

type ChequePrinter struct {
	Driver            Driver       `json:"driver,omitempty"`            // Информация об используемом драйвере
	FirmwareVersion   string       `json:"firmwareVersion,omitempty"`   // Версия прошивки ККТ
	FiscalDataVersion string       `json:"fiscalDataVersion,omitempty"` // Формат фискальных данных
	FiscalMemory      FiscalMemory `json:"fiscalMemory,omitempty"`      // Информация о фискальном накопителе
	Name              string       `json:"name,omitempty"`              // Наименование ПО
	Serial            string       `json:"serial,omitempty"`            // Серийный номер
	Vendor            string       `json:"vendor,omitempty"`            // Производитель
}

ChequePrinter Данные о ККТ. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-okruzhenie-attributy-suschnosti-kkt

func (ChequePrinter) String

func (c ChequePrinter) String() string

type ChequeStart

type ChequeStart struct {
	FnNumber        string    `json:"fnNumber,omitempty"`        // Номер фискального накопителя
	KktRegNumber    string    `json:"kktRegNumber,omitempty"`    // Регистрационный номер ККТ
	FiscalDocSign   string    `json:"fiscalDocSign,omitempty"`   // Фискальный признак документа
	ShiftNumber     string    `json:"shiftNumber,omitempty"`     // Номер смены ККТ
	FiscalDocNumber string    `json:"fiscalDocNumber,omitempty"` // Номер фискального документа
	Time            Timestamp `json:"time,omitempty"`            // Дата и время открытия смены
}

ChequeStart Информация об открытии смены ККТ Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-roznichnaq-smena-roznichnye-smeny-informaciq-ob-otkrytii-smeny-kkt

func (ChequeStart) String

func (c ChequeStart) String() string

type Client

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

Client базовый клиент для взаимодействия с API МойСклад.

func NewClient

func NewClient() *Client

NewClient возвращает новый клиент для работы с API МойСклад. Данный клиент не имеет встроенных сервисов. Его необходимо передавать при создании каждого нового экземпляра сервиса.

func (*Client) Async

func (c *Client) Async() *AsyncService

func (*Client) Audit

func (c *Client) Audit() *AuditService

func (*Client) Context

func (c *Client) Context() *ContextService

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request) (*Response, error)

Do отправляет запрос в API и обрабатывает ответ. В случае получения в ответе ошибки API возвращаемая ошибка будет содержать дополнительную информацию.

func (*Client) Entity

func (c *Client) Entity() *EntityService

func (*Client) Report

func (c *Client) Report() *ReportService

func (*Client) Security

func (c *Client) Security() *SecurityService

func (*Client) WithBasicAuth

func (c *Client) WithBasicAuth(username, password string) *Client

WithBasicAuth возвращает клиент с базовой авторизацией логин/пароль.

func (*Client) WithDisabledWebhookContent

func (c *Client) WithDisabledWebhookContent(value bool) *Client

WithDisabledWebhookContent устанавливает флаг, который отвечает за формирование заголовка временного отключения уведомления вебхуков через API (X-Lognex-WebHook-Disable). Подробнее: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-vebhuki-primer-webhuka-zagolowok-wremennogo-otklucheniq-cherez-api

func (*Client) WithMaxRetries

func (c *Client) WithMaxRetries(retries int) *Client

WithMaxRetries устанавливает максимальное кол-во попыток для одного запроса.

func (*Client) WithTokenAuth

func (c *Client) WithTokenAuth(token string) *Client

WithTokenAuth возвращает клиент с авторизацией через токен.

type CommissionOverhead

type CommissionOverhead struct {
	Sum *float64 `json:"sum,omitempty"` // Сумма в копейках
}

CommissionOverhead Прочие расходы Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-poluchennyj-otchet-komissionera-poluchennye-otchety-komissionera-prochie-rashody

func (CommissionOverhead) String

func (c CommissionOverhead) String() string

type CommissionReportIn

type CommissionReportIn struct {
	AccountId                     *uuid.UUID                                   `json:"accountId,omitempty"`                     // ID учетной записи
	Agent                         *Counterparty                                `json:"agent,omitempty"`                         // Метаданные контрагента
	AgentAccount                  *AgentAccount                                `json:"agentAccount,omitempty"`                  // Метаданные счета контрагента
	Applicable                    *bool                                        `json:"applicable,omitempty"`                    // Отметка о проведении
	Attributes                    *Attributes                                  `json:"attributes,omitempty"`                    // Коллекция метаданных доп. полей. Поля объекта
	Code                          *string                                      `json:"code,omitempty"`                          // Код Полученного отчета комиссионера
	CommissionOverhead            *CommissionOverhead                          `json:"commissionOverhead,omitempty"`            // Прочие расходы
	CommissionPeriodEnd           *Timestamp                                   `json:"commissionPeriodEnd,omitempty"`           // Конец периода
	CommissionPeriodStart         *Timestamp                                   `json:"commissionPeriodStart,omitempty"`         // Начало периода
	CommitentSum                  *float64                                     `json:"commitentSum,omitempty"`                  // Сумма коммитента в установленной валюте
	Contract                      *Contract                                    `json:"contract,omitempty"`                      // Метаданные договора
	Created                       *Timestamp                                   `json:"created,omitempty"`                       // Дата создания
	Deleted                       *Timestamp                                   `json:"deleted,omitempty"`                       // Момент последнего удаления отчета комиссионера
	Description                   *string                                      `json:"description,omitempty"`                   // Комментарий отчета комиссионера
	ExternalCode                  *string                                      `json:"externalCode,omitempty"`                  // Внешний код отчета комиссионера
	Files                         *Files                                       `json:"files,omitempty"`                         // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group                         *Group                                       `json:"group,omitempty"`                         // Отдел сотрудника
	Id                            *uuid.UUID                                   `json:"id,omitempty"`                            // ID сущности
	Meta                          *Meta                                        `json:"meta,omitempty"`                          // Метаданные
	Moment                        *Timestamp                                   `json:"moment,omitempty"`                        // Дата документа
	Name                          *string                                      `json:"name,omitempty"`                          // Наименование
	Organization                  *Organization                                `json:"organization,omitempty"`                  // Метаданные юрлица
	OrganizationAccount           *AgentAccount                                `json:"organizationAccount,omitempty"`           // Метаданные счета юрлица
	Owner                         *Employee                                    `json:"owner,omitempty"`                         // Владелец (Сотрудник)
	PayedSum                      *float64                                     `json:"payedSum,omitempty"`                      // Оплаченная сумма
	Positions                     *Positions[CommissionReportInPosition]       `json:"positions,omitempty"`                     // Метаданные позиций отчета
	Printed                       *bool                                        `json:"printed,omitempty"`                       // Напечатан ли документ
	Project                       *Project                                     `json:"project,omitempty"`                       // Метаданные проекта
	Published                     *bool                                        `json:"published,omitempty"`                     // Опубликован ли документ
	Rate                          *Rate                                        `json:"rate,omitempty"`                          // Валюта
	ReturnToCommissionerPositions *Positions[CommissionReportInReturnPosition] `json:"returnToCommissionerPositions,omitempty"` // Метаданные позиций возврата на склад комиссионера Полученного отчета комиссионера
	RewardPercent                 *int                                         `json:"rewardPercent,omitempty"`                 // Процент вознаграждения (всегда 0 если вознаграждение не рассчитывается)
	RewardType                    RewardType                                   `json:"rewardType,omitempty"`                    // Тип вознаграждения
	SalesChannel                  *SalesChannel                                `json:"salesChannel,omitempty"`                  // Метаданные канала продаж
	Shared                        *bool                                        `json:"shared,omitempty"`                        // Общий доступ
	State                         *State                                       `json:"state,omitempty"`                         // Метаданные статуса отчета комиссионера
	Sum                           *float64                                     `json:"sum,omitempty"`                           // Сумма
	SyncId                        *uuid.UUID                                   `json:"syncId,omitempty"`                        // ID синхронизации. После заполнения недоступен для изменения
	Updated                       *Timestamp                                   `json:"updated,omitempty"`                       // Момент последнего обновления
	VatEnabled                    *bool                                        `json:"vatEnabled,omitempty"`                    // Учитывается ли НДС
	VatIncluded                   *bool                                        `json:"vatIncluded,omitempty"`                   // Включен ли НДС в цену
	VatSum                        *float64                                     `json:"vatSum,omitempty"`                        // Сумма включая НДС
	Payments                      *Payments                                    `json:"payments,omitempty"`                      // Массив ссылок на связанные платежи в формате Метаданных
}

CommissionReportIn Полученный отчет комиссионера. Ключевое слово: commissionreportin Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-poluchennyj-otchet-komissionera

func (CommissionReportIn) GetMeta

func (c CommissionReportIn) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (CommissionReportIn) MetaType

func (c CommissionReportIn) MetaType() MetaType

func (CommissionReportIn) String

func (c CommissionReportIn) String() string

type CommissionReportInPosition

type CommissionReportInPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID сущности
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Meta       *Meta               `json:"meta,omitempty"`       // Метаданные
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Reward     *float64            `json:"reward,omitempty"`     // Вознаграждение
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
}

CommissionReportInPosition Позиция Полученного отчета комиссионера. Ключевое слово: commissionreportinposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-poluchennyj-otchet-komissionera-poluchennye-otchety-komissionera-pozicii-poluchennogo-otcheta-komissionera

func (CommissionReportInPosition) MetaType

func (c CommissionReportInPosition) MetaType() MetaType

func (CommissionReportInPosition) String

type CommissionReportInReturnPosition

type CommissionReportInReturnPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID сущности
	Meta       *Meta               `json:"meta,omitempty"`       // Метаданные
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Reward     *float64            `json:"reward,omitempty"`     // Вознаграждение
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
}

CommissionReportInReturnPosition Позиция возврата на склад комиссионера. Ключевое слово: commissionreportinreturnedposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-poluchennyj-otchet-komissionera-poluchennye-otchety-komissionera-pozicii-poluchennogo-otcheta-komissionera-ob-ekt-pozicii-wozwrata-na-sklad-komissionera-soderzhit-sleduuschie-polq

func (CommissionReportInReturnPosition) MetaType

func (CommissionReportInReturnPosition) String

type CommissionReportInService

type CommissionReportInService struct {
	Endpoint
	// contains filtered or unexported fields
}

CommissionReportInService Сервис для работы с полученными отчётами комиссионера.

func NewCommissionReportInService

func NewCommissionReportInService(client *Client) *CommissionReportInService

func (*CommissionReportInService) Create

func (s *CommissionReportInService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CommissionReportInService) CreateAttribute

func (s *CommissionReportInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CommissionReportInService) CreateAttributes

func (s *CommissionReportInService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CommissionReportInService) CreateOrUpdatePositionTrackingCodes

func (s *CommissionReportInService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*CommissionReportInService) CreatePosition

func (s *CommissionReportInService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*CommissionReportInService) CreatePositions

func (s *CommissionReportInService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*CommissionReportInService) CreateReturnPosition

func (*CommissionReportInService) CreateUpdateMany

func (s *CommissionReportInService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CommissionReportInService) Delete

func (s *CommissionReportInService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CommissionReportInService) DeleteAttribute

func (s *CommissionReportInService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*CommissionReportInService) DeleteAttributes

func (s *CommissionReportInService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*CommissionReportInService) DeleteBySyncId

func (s *CommissionReportInService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*CommissionReportInService) DeleteMany

func (s *CommissionReportInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CommissionReportInService) DeletePosition

func (s *CommissionReportInService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*CommissionReportInService) DeletePositionTrackingCodes

func (s *CommissionReportInService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*CommissionReportInService) DeletePublication

func (s *CommissionReportInService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*CommissionReportInService) DeleteReturnPosition

func (s *CommissionReportInService) DeleteReturnPosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

func (*CommissionReportInService) Get

func (s *CommissionReportInService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*CommissionReportInService) GetAttributeById

func (s *CommissionReportInService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*CommissionReportInService) GetAttributes

func (s *CommissionReportInService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*CommissionReportInService) GetById

func (s *CommissionReportInService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*CommissionReportInService) GetBySyncId

func (s *CommissionReportInService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*CommissionReportInService) GetMetadata

func (s *CommissionReportInService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*CommissionReportInService) GetNamedFilterById

func (s *CommissionReportInService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*CommissionReportInService) GetNamedFilters

func (s *CommissionReportInService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*CommissionReportInService) GetPositionById

func (s *CommissionReportInService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*CommissionReportInService) GetPositionTrackingCodes

func (s *CommissionReportInService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*CommissionReportInService) GetPositions

func (s *CommissionReportInService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*CommissionReportInService) GetPublicationById

func (s *CommissionReportInService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*CommissionReportInService) GetPublications

func (s *CommissionReportInService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*CommissionReportInService) GetReturnPositionById

func (s *CommissionReportInService) GetReturnPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*CommissionReportInReturnPosition, *Response, error)

func (*CommissionReportInService) GetReturnPositions

func (*CommissionReportInService) Publish

func (s *CommissionReportInService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*CommissionReportInService) Remove

func (s *CommissionReportInService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*CommissionReportInService) Template

func (s *CommissionReportInService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*CommissionReportInService) Update

func (s *CommissionReportInService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*CommissionReportInService) UpdateAttribute

func (s *CommissionReportInService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*CommissionReportInService) UpdatePosition

func (s *CommissionReportInService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*CommissionReportInService) UpdateReturnPosition

func (s *CommissionReportInService) UpdateReturnPosition(ctx context.Context, id, positionId uuid.UUID, position *CommissionReportInReturnPosition, params *Params) (*CommissionReportInReturnPosition, *Response, error)

type CommissionReportOut

type CommissionReportOut struct {
	AccountId             *uuid.UUID                              `json:"accountId,omitempty"`             // ID учетной записи
	Agent                 *Counterparty                           `json:"agent,omitempty"`                 // Метаданные контрагента
	AgentAccount          *AgentAccount                           `json:"agentAccount,omitempty"`          // Метаданные счета контрагента
	Applicable            *bool                                   `json:"applicable,omitempty"`            // Отметка о проведении
	Attributes            *Attributes                             `json:"attributes,omitempty"`            // Коллекция метаданных доп. полей. Поля объекта
	Code                  *string                                 `json:"code,omitempty"`                  // Код Полученного отчета комиссионера
	CommissionPeriodEnd   *Timestamp                              `json:"commissionPeriodEnd,omitempty"`   // Конец периода
	CommissionPeriodStart *Timestamp                              `json:"commissionPeriodStart,omitempty"` // Начало периода
	CommitentSum          *float64                                `json:"commitentSum,omitempty"`          // Сумма коммитента в установленной валюте
	Contract              *Contract                               `json:"contract,omitempty"`              // Метаданные договора
	Created               *Timestamp                              `json:"created,omitempty"`               // Дата создания
	Deleted               *Timestamp                              `json:"deleted,omitempty"`               // Момент последнего удаления отчета комиссионера
	Description           *string                                 `json:"description,omitempty"`           // Комментарий отчета комиссионера
	ExternalCode          *string                                 `json:"externalCode,omitempty"`          // Внешний код отчета комиссионера
	Files                 *Files                                  `json:"files,omitempty"`                 // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group                 *Group                                  `json:"group,omitempty"`                 // Отдел сотрудника
	Id                    *uuid.UUID                              `json:"id,omitempty"`                    // ID сущности
	Meta                  *Meta                                   `json:"meta,omitempty"`                  // Метаданные
	Moment                *Timestamp                              `json:"moment,omitempty"`                // Дата документа
	Name                  *string                                 `json:"name,omitempty"`                  // Наименование
	Organization          *Organization                           `json:"organization,omitempty"`          // Метаданные юрлица
	OrganizationAccount   *AgentAccount                           `json:"organizationAccount,omitempty"`   // Метаданные счета юрлица
	Owner                 *Employee                               `json:"owner,omitempty"`                 // Владелец (Сотрудник)
	PayedSum              *float64                                `json:"payedSum,omitempty"`              // Оплаченная сумма
	Positions             *Positions[CommissionReportOutPosition] `json:"positions,omitempty"`             // Метаданные позиций отчета
	Printed               *bool                                   `json:"printed,omitempty"`               // Напечатан ли документ
	Project               *Project                                `json:"project,omitempty"`               // Метаданные проекта
	Published             *bool                                   `json:"published,omitempty"`             // Опубликован ли документ
	Rate                  *Rate                                   `json:"rate,omitempty"`                  // Валюта
	RewardPercent         *int                                    `json:"rewardPercent,omitempty"`         // Процент вознаграждения (всегда 0 если вознаграждение не рассчитывается)
	RewardType            RewardType                              `json:"rewardType,omitempty"`            // Тип вознаграждения
	SalesChannel          *SalesChannel                           `json:"salesChannel,omitempty"`          // Метаданные канала продаж
	Shared                *bool                                   `json:"shared,omitempty"`                // Общий доступ
	State                 *State                                  `json:"state,omitempty"`                 // Метаданные статуса отчета комиссионера
	Sum                   *float64                                `json:"sum,omitempty"`                   // Сумма
	SyncId                *uuid.UUID                              `json:"syncId,omitempty"`                // ID синхронизации. После заполнения недоступен для изменения
	Updated               *Timestamp                              `json:"updated,omitempty"`               // Момент последнего обновления
	VatEnabled            *bool                                   `json:"vatEnabled,omitempty"`            // Учитывается ли НДС
	VatIncluded           *bool                                   `json:"vatIncluded,omitempty"`           // Включен ли НДС в цену
	VatSum                *float64                                `json:"vatSum,omitempty"`                // Сумма включая НДС
	Payments              *Payments                               `json:"payments,omitempty"`              // Массив ссылок на связанные платежи в формате Метаданных
}

CommissionReportOut Выданный отчет комиссионера. Ключевое слово: commissionreportout Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vydannyj-otchet-komissionera

func (CommissionReportOut) GetMeta

func (c CommissionReportOut) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (CommissionReportOut) MetaType

func (c CommissionReportOut) MetaType() MetaType

func (CommissionReportOut) String

func (c CommissionReportOut) String() string

type CommissionReportOutPosition

type CommissionReportOutPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID сущности
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Meta       *Meta               `json:"meta,omitempty"`       // Метаданные
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Reward     *float64            `json:"reward,omitempty"`     // Вознаграждение
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
}

CommissionReportOutPosition Позиция Выданного отчета комиссионера. Ключевое слово: commissionreportoutposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vydannyj-otchet-komissionera-vydannye-otchety-komissionera-pozicii-vydannogo-otcheta-komissionera

func (CommissionReportOutPosition) MetaType

func (CommissionReportOutPosition) String

type CommissionReportOutService

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

CommissionReportOutService Сервис для работы с выданными отчётами комиссионера.

func NewCommissionReportOutService

func NewCommissionReportOutService(client *Client) *CommissionReportOutService

func (*CommissionReportOutService) Create

func (s *CommissionReportOutService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CommissionReportOutService) CreateAttribute

func (s *CommissionReportOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CommissionReportOutService) CreateAttributes

func (s *CommissionReportOutService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CommissionReportOutService) CreateOrUpdatePositionTrackingCodes

func (s *CommissionReportOutService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*CommissionReportOutService) CreatePosition

func (s *CommissionReportOutService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*CommissionReportOutService) CreatePositions

func (s *CommissionReportOutService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*CommissionReportOutService) CreateUpdateMany

func (s *CommissionReportOutService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CommissionReportOutService) Delete

func (s *CommissionReportOutService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CommissionReportOutService) DeleteAttribute

func (s *CommissionReportOutService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*CommissionReportOutService) DeleteAttributes

func (s *CommissionReportOutService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*CommissionReportOutService) DeleteBySyncId

func (s *CommissionReportOutService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*CommissionReportOutService) DeleteMany

func (s *CommissionReportOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CommissionReportOutService) DeletePosition

func (s *CommissionReportOutService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*CommissionReportOutService) DeletePositionTrackingCodes

func (s *CommissionReportOutService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*CommissionReportOutService) DeletePublication

func (s *CommissionReportOutService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*CommissionReportOutService) Get

func (s *CommissionReportOutService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*CommissionReportOutService) GetAttributeById

func (s *CommissionReportOutService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*CommissionReportOutService) GetAttributes

func (s *CommissionReportOutService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*CommissionReportOutService) GetById

func (s *CommissionReportOutService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*CommissionReportOutService) GetBySyncId

func (s *CommissionReportOutService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*CommissionReportOutService) GetMetadata

func (s *CommissionReportOutService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*CommissionReportOutService) GetNamedFilterById

func (s *CommissionReportOutService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*CommissionReportOutService) GetNamedFilters

func (s *CommissionReportOutService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*CommissionReportOutService) GetPositionById

func (s *CommissionReportOutService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*CommissionReportOutService) GetPositionTrackingCodes

func (s *CommissionReportOutService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*CommissionReportOutService) GetPositions

func (s *CommissionReportOutService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*CommissionReportOutService) GetPublicationById

func (s *CommissionReportOutService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*CommissionReportOutService) GetPublications

func (s *CommissionReportOutService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*CommissionReportOutService) Publish

func (s *CommissionReportOutService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*CommissionReportOutService) Remove

func (s *CommissionReportOutService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*CommissionReportOutService) Template

func (s *CommissionReportOutService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*CommissionReportOutService) Update

func (s *CommissionReportOutService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*CommissionReportOutService) UpdateAttribute

func (s *CommissionReportOutService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*CommissionReportOutService) UpdatePosition

func (s *CommissionReportOutService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type CompanySettings

type CompanySettings struct {
	Meta                     *Meta            `json:"meta,omitempty"`                     // Метаданные
	CheckMinPrice            *bool            `json:"checkMinPrice,omitempty"`            // Автоматически устанавливать минимальную цену. Если включено, при сохранении документов продажи с ценами меньше минимальных цен (указанных в карточках товара) цены будут автоматически увеличены до минимальных.
	CheckShippingStock       *bool            `json:"checkShippingStock,omitempty"`       // Запретить отгрузку отсутствующих товаров. Если запрет установлен (true значение), пользователи не смогут провести отгрузку со склада отсутствующих товаров.
	CompanyAddress           *string          `json:"companyAddress,omitempty"`           // Адрес компании для электронных писем
	Currency                 *Currency        `json:"currency,omitempty"`                 // Метаданные стандартной валюты
	DiscountStrategy         DiscountStrategy `json:"discountStrategy,omitempty"`         // Совместное применение скидок
	GlobalOperationNumbering *bool            `json:"globalOperationNumbering,omitempty"` // Использовать сквозную нумерацию документов. Если проставлен true, будет установлена сквозная нумерация за всю историю, иначе нумерация документов будет начинаться заново каждый календарный год.
	PriceTypes               *PriceTypes      `json:"priceTypes,omitempty"`               // Коллекция всех существующих типов цен
	UseCompanyAddress        *bool            `json:"useCompanyAddress,omitempty"`        // Использовать адрес компании для электронных писем. Если включено, письма будут отправляться с адреса, указанного в companyAddress, иначе письма будут отправляться с адреса пользователя.
	UseRecycleBin            *bool            `json:"useRecycleBin,omitempty"`            // Использовать корзину. Если включено, то все документы при удалении будут помещаться в корзину. Также появится возможность восстанавливать ошибочно удаленные документы.
}

CompanySettings Настройки компании. Ключевое слово: companysettings Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-nastrojki-kompanii

func (CompanySettings) MetaType

func (c CompanySettings) MetaType() MetaType

func (CompanySettings) String

func (c CompanySettings) String() string

type CompanyType

type CompanyType string

CompanyType Тип Контрагента

const (
	CompanyLegal        CompanyType = "legal"        // Юридическое лицо
	CompanyEntrepreneur CompanyType = "entrepreneur" // Индивидуальный предприниматель
	CompanyIndividual   CompanyType = "individual"   // Физическое лицо
)

type Consignment

type Consignment struct {
	AccountId    *uuid.UUID          `json:"accountId,omitempty"`    // ID учетной записи
	Barcodes     *Barcodes           `json:"barcodes,omitempty"`     // Штрихкоды
	Code         *string             `json:"code,omitempty"`         // Код
	Description  *string             `json:"description,omitempty"`  // Описание
	ExternalCode *string             `json:"externalCode,omitempty"` // Внешний код
	Id           *uuid.UUID          `json:"id,omitempty"`           // ID сущности
	Meta         *Meta               `json:"meta,omitempty"`         // Метаданные
	Name         *string             `json:"name,omitempty"`         // Наименование
	Assortment   *AssortmentPosition `json:"assortment,omitempty"`   //
	Attributes   *Attributes         `json:"attributes,omitempty"`   // Метаданные ссылки или модификации
	Image        *Image              `json:"image,omitempty"`        // Изображение товара, к которому относится данная серия
	Label        *string             `json:"label,omitempty"`        // Метка Серии
	Updated      *Timestamp          `json:"updated,omitempty"`      // Момент последнего обновления сущности
}

Consignment Серия. Ключевое слово: consignment Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-seriq

func (Consignment) ConvertToAssortmentPosition

func (c Consignment) ConvertToAssortmentPosition() (*AssortmentPosition, error)

func (Consignment) GetMeta

func (c Consignment) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Consignment) MetaType

func (c Consignment) MetaType() MetaType

func (Consignment) String

func (c Consignment) String() string

type ConsignmentService

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

ConsignmentService Сервис для работы с сериями.

func NewConsignmentService

func NewConsignmentService(client *Client) *ConsignmentService

func (*ConsignmentService) Create

func (s *ConsignmentService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ConsignmentService) CreateAttribute

func (s *ConsignmentService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ConsignmentService) CreateAttributes

func (s *ConsignmentService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ConsignmentService) CreateUpdateMany

func (s *ConsignmentService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ConsignmentService) Delete

func (s *ConsignmentService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ConsignmentService) DeleteAttribute

func (s *ConsignmentService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*ConsignmentService) DeleteAttributes

func (s *ConsignmentService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*ConsignmentService) DeleteMany

func (s *ConsignmentService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ConsignmentService) Get

func (s *ConsignmentService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ConsignmentService) GetAttributeById

func (s *ConsignmentService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*ConsignmentService) GetAttributes

func (s *ConsignmentService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*ConsignmentService) GetById

func (s *ConsignmentService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ConsignmentService) GetMetadata

func (s *ConsignmentService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*ConsignmentService) GetNamedFilterById

func (s *ConsignmentService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*ConsignmentService) GetNamedFilters

func (s *ConsignmentService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*ConsignmentService) Update

func (s *ConsignmentService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ConsignmentService) UpdateAttribute

func (s *ConsignmentService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type ContactPerson

type ContactPerson struct {
	AccountId    *uuid.UUID    `json:"accountId,omitempty"`    // ID учетной записи
	Agent        *Counterparty `json:"agent,omitempty"`        // Метаданные контрагента
	Description  *string       `json:"description,omitempty"`  // Описание контактного лица
	Email        *string       `json:"email,omitempty"`        // Адрес электронной почты контактного лица
	ExternalCode *string       `json:"externalCode,omitempty"` // Внешний код контактного лица
	Id           *uuid.UUID    `json:"id,omitempty"`           // ID сущности
	Meta         *Meta         `json:"meta,omitempty"`         // Метаданные
	Name         *string       `json:"name,omitempty"`         // Наименование
	Phone        *string       `json:"phone,omitempty"`        // Номер телефона контактного лица
	Position     *string       `json:"position,omitempty"`     // Должность контактного лица
	Updated      *Timestamp    `json:"updated,omitempty"`      // Момент последнего обновления
}

ContactPerson Контактное лицо Ключевое слово: contactperson Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-kontragenty-attributy-suschnosti-adres-kontaktnye-lica-kontragentow

func (ContactPerson) MetaType

func (c ContactPerson) MetaType() MetaType

func (ContactPerson) String

func (c ContactPerson) String() string

type Context

type Context struct {
	Employee MetaWrapper `json:"employee,omitempty"`
}

func (Context) String

func (m Context) String() string

type ContextCompanySettingsService

type ContextCompanySettingsService struct {
	Endpoint
	// contains filtered or unexported fields
}

ContextCompanySettingsService Сервис для работы с настройками компании.

func NewContextCompanySettingsService

func NewContextCompanySettingsService(client *Client) *ContextCompanySettingsService

func (*ContextCompanySettingsService) CreatePriceType

func (s *ContextCompanySettingsService) CreatePriceType(ctx context.Context, priceType *PriceType) (*Slice[PriceType], *Response, error)

CreatePriceType Создать тип цен. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tipy-cen-redaktirowanie-spiska-tipow-cen

func (*ContextCompanySettingsService) Get

func (s *ContextCompanySettingsService) Get(ctx context.Context, params *Params) (*T, *Response, error)

func (*ContextCompanySettingsService) GetMetadata

func (s *ContextCompanySettingsService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*ContextCompanySettingsService) GetPriceTypeById

func (s *ContextCompanySettingsService) GetPriceTypeById(ctx context.Context, id *uuid.UUID) (*PriceType, *Response, error)

GetPriceTypeById Получить тип цены по ID. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tipy-cen-poluchit-tip-ceny-po-id

func (*ContextCompanySettingsService) GetPriceTypeDefault

func (s *ContextCompanySettingsService) GetPriceTypeDefault(ctx context.Context) (*PriceType, *Response, error)

GetPriceTypeDefault Получить тип цены по умолчанию. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tipy-cen-poluchit-tip-ceny-po-umolchaniu

func (*ContextCompanySettingsService) GetPriceTypes

GetPriceTypes Получить список всех типов цен. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tipy-cen-poluchit-spisok-wseh-tipow-cen

func (*ContextCompanySettingsService) Update

func (s *ContextCompanySettingsService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ContextCompanySettingsService) UpdatePriceTypes

func (s *ContextCompanySettingsService) UpdatePriceTypes(ctx context.Context, priceTypes []*PriceType) (*Slice[PriceType], *Response, error)

UpdatePriceTypes Редактирование списка типов цен. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tipy-cen-redaktirowanie-spiska-tipow-cen

type ContextEmployee

type ContextEmployee struct {
	Meta         Meta      `json:"meta"`
	Id           string    `json:"id"`
	AccountId    string    `json:"accountId"`
	Owner        Employee  `json:"owner"`
	Shared       bool      `json:"shared"`
	Group        Group     `json:"group"`
	Updated      Timestamp `json:"updated"`
	Name         string    `json:"name"`
	ExternalCode string    `json:"externalCode"`
	Archived     bool      `json:"archived"`
	Created      string    `json:"created"`
	Uid          string    `json:"uid"`
	Email        string    `json:"email"`
	Phone        string    `json:"phone"`
	FirstName    string    `json:"firstName"`
	MiddleName   string    `json:"middleName"`
	LastName     string    `json:"lastName"`
	FullName     string    `json:"fullName"`
	ShortFio     string    `json:"shortFio"`
	Cashiers     Cashiers  `json:"cashiers"`
	Image        Image     `json:"image"`
	Position     string    `json:"position"`
	Permissions  struct {
		Currency struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"currency"`
		Uom struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"uom"`
		Productfolder struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"productfolder"`
		Product struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"product"`
		Bundle struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"bundle"`
		Service struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"service"`
		Consignment struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"consignment"`
		Variant struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"variant"`
		Store struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"store"`
		Counterparty struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"counterparty"`
		Organization struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"organization"`
		Employee struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"employee"`
		Settings struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"settings"`
		Contract struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"contract"`
		Project struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"project"`
		Saleschannel struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"saleschannel"`
		Country struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"country"`
		Customentity struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"customentity"`
		Demand struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"demand"`
		Customerorder struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"customerorder"`
		Internalorder struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"internalorder"`
		Invoiceout struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"invoiceout"`
		Invoicein struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"invoicein"`
		Paymentin struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"paymentin"`
		Paymentout struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"paymentout"`
		Cashin struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"cashin"`
		Cashout struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"cashout"`
		Supply struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"supply"`
		Salesreturn struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"salesreturn"`
		Purchasereturn struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"purchasereturn"`
		Retailstore struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"retailstore"`
		Receipttemplate struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"receipttemplate"`
		Retailstorestatus struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"retailstorestatus"`
		Retailshift struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"retailshift"`
		Retaildemand struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"retaildemand"`
		Retailsalesreturn struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"retailsalesreturn"`
		Retaildrawercashin struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"retaildrawercashin"`
		Retaildrawercashout struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"retaildrawercashout"`
		Prepayment struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"prepayment"`
		Prepaymentreturn struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"prepaymentreturn"`
		Purchaseorder struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"purchaseorder"`
		Move struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"move"`
		Enter struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"enter"`
		Loss struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"loss"`
		Facturein struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"facturein"`
		Factureout struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"factureout"`
		Commissionreportin struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"commissionreportin"`
		Commissionreportout struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"commissionreportout"`
		Pricelist struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"pricelist"`
		Processingplanfolder struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"processingplanfolder"`
		Processingplan struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"processingplan"`
		Processing struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"processing"`
		Processingorder struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"processingorder"`
		Counterpartyadjustment struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"counterpartyadjustment"`
		Assortment struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"assortment"`
		Inventory struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"inventory"`
		Bonustransaction struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"bonustransaction"`
		Crptorder struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"crptorder"`
		Productiontask struct {
			View    string `json:"view"`
			Create  string `json:"create"`
			Update  string `json:"update"`
			Delete  string `json:"delete"`
			Approve string `json:"approve"`
			Print   string `json:"print"`
		} `json:"productiontask"`
		Productionstagecompletion struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Print  string `json:"print"`
		} `json:"productionstagecompletion"`
		Taxrate struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"taxrate"`
		Webhook struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
		} `json:"webhook"`
		Task struct {
			View   string `json:"view"`
			Create string `json:"create"`
			Update string `json:"update"`
			Delete string `json:"delete"`
			Done   string `json:"done"`
		} `json:"task"`
		Dashboard struct {
			View string `json:"view"`
		} `json:"dashboard"`
		Stock struct {
			View string `json:"view"`
		} `json:"stock"`
		CustomAttributes struct {
			View string `json:"view"`
		} `json:"customAttributes"`
		Pnl struct {
			View string `json:"view"`
		} `json:"pnl"`
		CompanyCrm struct {
			View string `json:"view"`
		} `json:"company_crm"`
		TariffCrm struct {
			View string `json:"view"`
		} `json:"tariff_crm"`
		AuditDashboard struct {
			View string `json:"view"`
		} `json:"audit_dashboard"`
		Admin struct {
			View string `json:"view"`
		} `json:"admin"`
		DashboardMoney struct {
			View string `json:"view"`
		} `json:"dashboardMoney"`
		ViewCashFlow struct {
			View string `json:"view"`
		} `json:"viewCashFlow"`
	} `json:"permissions,omitempty"`
}

ContextEmployee Контекст сотрудника. Ключевое слово: employee Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-kontext-zaprosa-sotrudnika-poluchit-kontext-sotrudnika

func (ContextEmployee) MetaType

func (c ContextEmployee) MetaType() MetaType

func (ContextEmployee) String

func (c ContextEmployee) String() string

type ContextEmployeeService

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

ContextEmployeeService Сервис для работы с контекстом сотрудника.

func NewContextEmployeeService

func NewContextEmployeeService(client *Client) *ContextEmployeeService

func (*ContextEmployeeService) Get

func (s *ContextEmployeeService) Get(ctx context.Context, params *Params) (*T, *Response, error)

type ContextService

type ContextService struct {
	*Client
}

ContextService Сервис для работы с контекстом.

func (*ContextService) CompanySettings

func (c *ContextService) CompanySettings() *ContextCompanySettingsService

func (*ContextService) Employee

func (c *ContextService) Employee() *ContextEmployeeService

func (*ContextService) UserSettings

func (c *ContextService) UserSettings() *UserSettingsService

type Contract

type Contract struct {
	AccountId           *uuid.UUID    `json:"accountId,omitempty"`           // ID учетной записи
	Agent               *Counterparty `json:"agent,omitempty"`               // Метаданные Контрагента
	AgentAccount        *AgentAccount `json:"agentAccount,omitempty"`        // Метаданные счета контрагента
	Archived            *bool         `json:"archived,omitempty"`            // Добавлен ли Договор в архив
	Attributes          *Attributes   `json:"attributes,omitempty"`          // Коллекция доп. полей
	Code                *string       `json:"code,omitempty"`                // Код Договора
	ContractType        ContractType  `json:"contractType,omitempty"`        // Тип Договора. Возможные значения: Договор комиссии, Договор купли-продажи
	Description         *string       `json:"description,omitempty"`         // Описание Договора
	ExternalCode        *string       `json:"externalCode,omitempty"`        // Внешний код Договора
	Group               *Group        `json:"group,omitempty"`               // Метаданные отдела сотрудника
	Id                  *uuid.UUID    `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta         `json:"meta,omitempty"`                // Метаданные
	Moment              *Timestamp    `json:"moment,omitempty"`              // Дата Договора
	Name                *string       `json:"name,omitempty"`                // Наименование
	OrganizationAccount *AgentAccount `json:"organizationAccount,omitempty"` // Метаданные счета вашего юрлица
	OwnAgent            *Organization `json:"ownAgent,omitempty"`            // Метаданные вашего юрлица
	Owner               *Employee     `json:"owner,omitempty"`               // Метаданные владельца (Сотрудника)
	Rate                *Rate         `json:"rate,omitempty"`                // Метаданные валюты
	RewardPercent       *int          `json:"rewardPercent,omitempty"`       // Вознаграждение в процентах (от 0 до 100)
	RewardType          RewardType    `json:"rewardType,omitempty"`          // Тип Вознаграждения. Возможные значения: Процент от суммы продажи, Не рассчитывать
	Shared              *bool         `json:"shared,omitempty"`              // Общий доступ
	State               *State        `json:"state,omitempty"`               // Метаданные статуса договора
	Sum                 *float64      `json:"sum,omitempty"`                 // Сумма Договора
	SyncId              *uuid.UUID    `json:"syncId,omitempty"`
	Printed             *bool         `json:"printed,omitempty"`   // Напечатан ли документ
	Published           *bool         `json:"published,omitempty"` // Опубликован ли документ
	Updated             *Timestamp    `json:"updated,omitempty"`   // Момент последнего обновления сущности
}

Contract Договор. Ключевое слово: contract Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-dogowor

func (Contract) MetaType

func (c Contract) MetaType() MetaType

func (Contract) String

func (c Contract) String() string

type ContractService

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

ContractService Сервис для работы с договорами.

func NewContractService

func NewContractService(client *Client) *ContractService

func (*ContractService) Create

func (s *ContractService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ContractService) CreateAttribute

func (s *ContractService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ContractService) CreateAttributes

func (s *ContractService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ContractService) CreateUpdateMany

func (s *ContractService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ContractService) Delete

func (s *ContractService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ContractService) DeleteAttribute

func (s *ContractService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*ContractService) DeleteAttributes

func (s *ContractService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*ContractService) DeleteMany

func (s *ContractService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ContractService) DeletePublication

func (s *ContractService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*ContractService) Get

func (s *ContractService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ContractService) GetAttributeById

func (s *ContractService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*ContractService) GetAttributes

func (s *ContractService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*ContractService) GetById

func (s *ContractService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ContractService) GetMetadata

func (s *ContractService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*ContractService) GetNamedFilterById

func (s *ContractService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*ContractService) GetNamedFilters

func (s *ContractService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*ContractService) GetPublicationById

func (s *ContractService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*ContractService) GetPublications

func (s *ContractService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*ContractService) Publish

func (s *ContractService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*ContractService) Remove

func (s *ContractService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*ContractService) Update

func (s *ContractService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ContractService) UpdateAttribute

func (s *ContractService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type ContractType

type ContractType string

ContractType Тип Договора.

const (
	ContractTypeCommission ContractType = "Commission" // Договор комиссии
	ContractTypeSales      ContractType = "Sales"      // Договор купли-продажи
)

type CounterPartyAdjustment

type CounterPartyAdjustment struct {
	AccountId    *uuid.UUID    `json:"accountId,omitempty"`    // ID учетной записи
	Id           *uuid.UUID    `json:"id,omitempty"`           // ID сущности
	Name         *string       `json:"name,omitempty"`         // Наименование
	Meta         *Meta         `json:"meta,omitempty"`         // Метаданные
	Agent        *Counterparty `json:"agent,omitempty"`        // Метаданные контрагента
	Applicable   *bool         `json:"applicable,omitempty"`   // Отметка о проведении
	Attributes   *Attributes   `json:"attributes,omitempty"`   // Коллекция метаданных доп. полей. Поля объекта
	Created      *Timestamp    `json:"created,omitempty"`      // Дата создания
	Deleted      *Timestamp    `json:"deleted,omitempty"`      // Момент последнего удаления Корректировки баланса контрагента
	Description  *string       `json:"description,omitempty"`  // Комментарий Корректировки баланса контрагента
	ExternalCode *string       `json:"externalCode,omitempty"` // Внешний код Корректировки баланса контрагента
	Files        *Files        `json:"files,omitempty"`        // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group        *Group        `json:"group,omitempty"`        // Отдел сотрудника
	Moment       *Timestamp    `json:"moment,omitempty"`       // Дата документа
	Organization *Organization `json:"organization,omitempty"` // Метаданные юрлица
	Owner        *Employee     `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Printed      *bool         `json:"printed,omitempty"`      // Напечатан ли документ
	Published    *bool         `json:"published,omitempty"`    // Опубликован ли документ
	Shared       *bool         `json:"shared,omitempty"`       // Общий доступ
	Sum          *float64      `json:"sum,omitempty"`          // Сумма Корректировки баланса контрагента в копейках
	Updated      *Timestamp    `json:"updated,omitempty"`      // Момент последнего обновления Корректировки баланса контрагента
}

CounterPartyAdjustment Корректировка баланса контрагента. Ключевое слово: counterpartyadjustment Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-korrektirowka-balansa-kontragenta

func (CounterPartyAdjustment) MetaType

func (c CounterPartyAdjustment) MetaType() MetaType

func (CounterPartyAdjustment) String

func (c CounterPartyAdjustment) String() string

type CounterPartyAdjustmentService

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

CounterPartyAdjustmentService Сервис для работы с корректировками баланса контрагента.

func NewCounterPartyAdjustmentService

func NewCounterPartyAdjustmentService(client *Client) *CounterPartyAdjustmentService

func (*CounterPartyAdjustmentService) Create

func (s *CounterPartyAdjustmentService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CounterPartyAdjustmentService) CreateUpdateMany

func (s *CounterPartyAdjustmentService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CounterPartyAdjustmentService) Delete

func (s *CounterPartyAdjustmentService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CounterPartyAdjustmentService) DeleteMany

func (s *CounterPartyAdjustmentService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CounterPartyAdjustmentService) Get

func (s *CounterPartyAdjustmentService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*CounterPartyAdjustmentService) GetById

func (s *CounterPartyAdjustmentService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*CounterPartyAdjustmentService) GetMetadata

func (s *CounterPartyAdjustmentService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*CounterPartyAdjustmentService) GetNamedFilterById

func (s *CounterPartyAdjustmentService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*CounterPartyAdjustmentService) GetNamedFilters

func (s *CounterPartyAdjustmentService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*CounterPartyAdjustmentService) Remove

func (s *CounterPartyAdjustmentService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*CounterPartyAdjustmentService) Update

func (s *CounterPartyAdjustmentService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type CounterPartyOption

type CounterPartyOption struct {
	AttributesStatesCreateSharedWrapper
	Tags []string `json:"tags"`
}

type CounterpartiesMeta

type CounterpartiesMeta struct {
	Counterparties Slice[CounterpartyElement] `json:"counterparties"`
}

func (*CounterpartiesMeta) Push

func (c *CounterpartiesMeta) Push(elements ...*Counterparty)

type Counterparty

type Counterparty struct {
	AccountId          *uuid.UUID                `json:"accountId,omitempty"`          // ID учетной записи
	Accounts           *MetaArray[AgentAccount]  `json:"accounts,omitempty"`           // Массив счетов Контрагентов
	ActualAddress      *string                   `json:"actualAddress,omitempty"`      // Фактический адрес Контрагента
	ActualAddressFull  *Address                  `json:"actualAddressFull,omitempty"`  // Фактический адрес Контрагента с детализацией по отдельным полям
	Archived           *bool                     `json:"archived,omitempty"`           // Добавлен ли Контрагент в архив
	Attributes         *Attributes               `json:"attributes,omitempty"`         // Массив метаданных доп. полей
	BonusPoints        *int                      `json:"bonusPoints,omitempty"`        // Бонусные баллы по активной бонусной программе
	BonusProgram       *BonusProgram             `json:"bonusProgram,omitempty"`       // Метаданные активной Бонусной программы
	Code               *string                   `json:"code,omitempty"`               // Код Контрагента
	CompanyType        CompanyType               `json:"companyType,omitempty"`        // Тип Контрагента. В зависимости от значения данного поля набор выводимых реквизитов контрагента может меняться
	ContactPersons     *MetaArray[ContactPerson] `json:"contactpersons,omitempty"`     // Массив контактных лиц фирмы Контрагента
	Created            *Timestamp                `json:"created,omitempty"`            // Момент создания
	Description        *string                   `json:"description,omitempty"`        // Комментарий к Контрагенту
	DiscountCardNumber *string                   `json:"discountCardNumber,omitempty"` // Номер дисконтной карты Контрагента
	Discounts          *Discounts                `json:"discounts,omitempty"`          // Массив скидок Контрагента. Массив может содержать персональные и накопительные скидки. Персональная скидка выводится, если хотя бы раз изменялся процент скидки для контрагента, значение будет указано в поле personalDiscount
	Email              *string                   `json:"email,omitempty"`              // Адрес электронной почты
	ExternalCode       *string                   `json:"externalCode,omitempty"`       // Внешний код Контрагента
	Fax                *string                   `json:"fax,omitempty"`                // Номер факса
	Files              *Files                    `json:"files,omitempty"`              // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group              *Group                    `json:"group,omitempty"`              // Отдел сотрудника
	Id                 *uuid.UUID                `json:"id,omitempty"`                 // ID сущности
	Meta               *Meta                     `json:"meta,omitempty"`               // Метаданные
	Name               *string                   `json:"name,omitempty"`               // Наименование
	Notes              *MetaArray[Note]          `json:"notes,omitempty"`              // Массив событий Контрагента
	Owner              *Employee                 `json:"owner,omitempty"`              // Владелец (Сотрудник)
	Phone              *string                   `json:"phone,omitempty"`              // Номер городского телефона
	PriceType          *PriceType                `json:"priceType,omitempty"`          // Тип цены Контрагента
	SalesAmount        *float64                  `json:"salesAmount,omitempty"`        // Сумма продаж
	Shared             *bool                     `json:"shared,omitempty"`             // Общий доступ
	State              *State                    `json:"state,omitempty"`              // Метаданные Статуса Контрагента
	SyncId             *uuid.UUID                `json:"syncId,omitempty"`             // ID синхронизации
	Tags               *Tags                     `json:"tags,omitempty"`               // Группы контрагента
	Updated            *Timestamp                `json:"updated,omitempty"`            // Момент последнего обновления Контрагента
	BirthDate          *Timestamp                `json:"birthDate,omitempty"`          // Дата рождения
	CertificateDate    *Timestamp                `json:"certificateDate,omitempty"`    // Дата свидетельства
	CertificateNumber  *string                   `json:"certificateNumber,omitempty"`  // Номер свидетельства
	INN                *string                   `json:"inn,omitempty"`                // ИНН
	KPP                *string                   `json:"kpp,omitempty"`                // КПП
	LegalAddress       *string                   `json:"legalAddress,omitempty"`       // Юридический адрес
	LegalAddressFull   *Address                  `json:"legalAddressFull,omitempty"`   // Структурированный Юридический адрес
	LegalTitle         *string                   `json:"legalTitle,omitempty"`         // Полное наименование
	OGRN               *string                   `json:"ogrn,omitempty"`               // ОГРН
	OGRNIP             *string                   `json:"ogrnip,omitempty"`             // ОГРНИП
	OKPO               *string                   `json:"okpo,omitempty"`               // ОКПО
	Sex                SexType                   `json:"sex,omitempty"`                // Пол Контрагента
}

Counterparty Контрагент. Ключевое слово: counterparty Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent

func (Counterparty) GetMeta

func (c Counterparty) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Counterparty) MetaType

func (c Counterparty) MetaType() MetaType

func (Counterparty) String

func (c Counterparty) String() string

type CounterpartyData

type CounterpartyData struct {
	CompanyType  CompanyType `json:"companyType"`  // Тип контрагента
	ExternalCode string      `json:"externalCode"` // Внешний код контрагента
	Id           string      `json:"id"`           // ID Контрагента
	Meta         Meta        `json:"meta"`         // Метаданные Контрагента
	Name         string      `json:"name"`         // Наименование Контрагента
}

CounterpartyData Контрагент Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pokazateli-kontragentow-dopolnitel-nye-atributy-dostupnye-dlq-fil-tracii-kontragent

type CounterpartyElement

type CounterpartyElement struct {
	Counterparty MetaWrapper `json:"counterparty"`
}

type CounterpartyService

type CounterpartyService struct {
	Endpoint
	// contains filtered or unexported fields
}

CounterpartyService Сервис для работы с контрагентами.

func NewCounterpartyService

func NewCounterpartyService(client *Client) *CounterpartyService

func (*CounterpartyService) Create

func (s *CounterpartyService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CounterpartyService) CreateAttribute

func (s *CounterpartyService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CounterpartyService) CreateAttributes

func (s *CounterpartyService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CounterpartyService) CreateContactPerson

func (s *CounterpartyService) CreateContactPerson(ctx context.Context, id *uuid.UUID, contactPerson *ContactPerson) (*Slice[ContactPerson], *Response, error)

CreateContactPerson Создать контактное лицо. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-sozdat-kontaktnoe-lico

func (*CounterpartyService) CreateNote

func (s *CounterpartyService) CreateNote(ctx context.Context, id *uuid.UUID, note *Note) (*Slice[Note], *Response, error)

CreateNote Добавить событие. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-dobawit-sobytie

func (*CounterpartyService) CreateUpdateMany

func (s *CounterpartyService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CounterpartyService) Delete

func (s *CounterpartyService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CounterpartyService) DeleteAttribute

func (s *CounterpartyService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*CounterpartyService) DeleteAttributes

func (s *CounterpartyService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*CounterpartyService) DeleteBySyncId

func (s *CounterpartyService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*CounterpartyService) DeleteMany

func (s *CounterpartyService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CounterpartyService) DeleteNote

func (s *CounterpartyService) DeleteNote(ctx context.Context, id, noteId uuid.UUID) (bool, *Response, error)

DeleteNote Удалить событие. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-udalit-sobytie

func (*CounterpartyService) Get

func (s *CounterpartyService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*CounterpartyService) GetAccountById

func (s *CounterpartyService) GetAccountById(ctx context.Context, id, accountId uuid.UUID) (*AgentAccount, *Response, error)

GetAccountById Получить отдельный счёт Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-poluchit-schet-kontragenta

func (*CounterpartyService) GetAccounts

func (s *CounterpartyService) GetAccounts(ctx context.Context, id *uuid.UUID) (*List[AgentAccount], *Response, error)

GetAccounts Получить все счета Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-poluchit-scheta-kontragenta

func (*CounterpartyService) GetAsync

GetAsync Запрос на получения списка Контрагентов (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-poluchit-spisok-kontragentow

func (*CounterpartyService) GetAttributeById

func (s *CounterpartyService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*CounterpartyService) GetAttributes

func (s *CounterpartyService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*CounterpartyService) GetById

func (s *CounterpartyService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*CounterpartyService) GetBySyncId

func (s *CounterpartyService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*CounterpartyService) GetContactPersonById

func (s *CounterpartyService) GetContactPersonById(ctx context.Context, id, contactPersonId uuid.UUID) (*ContactPerson, *Response, error)

GetContactPersonById Получить контактное лицо. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-poluchit-kontaktnoe-lico

func (*CounterpartyService) GetContactPersons

func (s *CounterpartyService) GetContactPersons(ctx context.Context, id *uuid.UUID, params *Params) (*List[ContactPerson], *Response, error)

GetContactPersons Список контактных лиц. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-spisok-kontaktnyh-lic

func (*CounterpartyService) GetMetadata

func (s *CounterpartyService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*CounterpartyService) GetNamedFilterById

func (s *CounterpartyService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*CounterpartyService) GetNamedFilters

func (s *CounterpartyService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*CounterpartyService) GetNoteById

func (s *CounterpartyService) GetNoteById(ctx context.Context, id, noteId uuid.UUID) (*Note, *Response, error)

GetNoteById Получить событие. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-poluchit-sobytie

func (*CounterpartyService) GetNotes

func (s *CounterpartyService) GetNotes(ctx context.Context, id *uuid.UUID) (*List[Note], *Response, error)

GetNotes Список событий. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-spisok-sobytij

func (*CounterpartyService) GetSettings

func (s *CounterpartyService) GetSettings(ctx context.Context) (*T, *Response, error)

GetSettings Запрос на получение настроек справочника

func (*CounterpartyService) Update

func (s *CounterpartyService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*CounterpartyService) UpdateAccounts

func (s *CounterpartyService) UpdateAccounts(ctx context.Context, id *uuid.UUID, accounts []*AgentAccount) (*Slice[AgentAccount], *Response, error)

UpdateAccounts Изменить счета Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-jurlico-izmenit-scheta-urlica

func (*CounterpartyService) UpdateAttribute

func (s *CounterpartyService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*CounterpartyService) UpdateContactPerson

func (s *CounterpartyService) UpdateContactPerson(ctx context.Context, id, contactPersonId uuid.UUID, contactPerson *ContactPerson) (*ContactPerson, *Response, error)

UpdateContactPerson Изменить контактное лицо. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-izmenit-kontaktnoe-lico

func (*CounterpartyService) UpdateNote

func (s *CounterpartyService) UpdateNote(ctx context.Context, id, noteId uuid.UUID, note *Note) (*Note, *Response, error)

UpdateNote Изменить событие. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-izmenit-sobytie

func (*CounterpartyService) UpdateSettings

func (s *CounterpartyService) UpdateSettings(ctx context.Context, settings *T) (*T, *Response, error)

UpdateSettings Изменить настройки справочника

type CounterpartySettings

type CounterpartySettings struct {
	Meta            *Meta            `json:"meta,omitempty"`            // Метаданные
	CreateShared    *bool            `json:"createShared,omitempty"`    // Создавать новые документы с меткой «Общий»
	UniqueCodeRules *UniqueCodeRules `json:"uniqueCodeRules,omitempty"` // Настройки кодов контрагентов
}

CounterpartySettings Настройки справочника контрагентов Ключевое слово: counterpartysettings Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-nastrojki-sprawochnika-kontragentow

func (CounterpartySettings) MetaType

func (c CounterpartySettings) MetaType() MetaType

func (CounterpartySettings) String

func (c CounterpartySettings) String() string

type Country

type Country struct {
	AccountId    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	Code         *string    `json:"code,omitempty"`         // Код Страны
	Description  *string    `json:"description,omitempty"`  // Описание Страны
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код Страны
	Group        *Group     `json:"group,omitempty"`        // Отдел-владелец
	Id           *uuid.UUID `json:"id,omitempty"`           // ID сущности
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные
	Name         *string    `json:"name,omitempty"`         // Наименование
	Owner        *Employee  `json:"owner,omitempty"`        // Сотрудник-владелец
	Shared       *bool      `json:"shared,omitempty"`       // Флаг Общий доступ
	Updated      *Timestamp `json:"updated,omitempty"`      // Момент последнего обновления сущности
}

Country Страна. Ключевое слово: country Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-strana

func (Country) MetaType

func (c Country) MetaType() MetaType

func (Country) String

func (c Country) String() string

type CountryService

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

CountryService Сервис для работы со странами.

func NewCountryService

func NewCountryService(client *Client) *CountryService

func (*CountryService) Create

func (s *CountryService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CountryService) CreateUpdateMany

func (s *CountryService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CountryService) Delete

func (s *CountryService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CountryService) DeleteMany

func (s *CountryService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CountryService) Get

func (s *CountryService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*CountryService) GetById

func (s *CountryService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*CountryService) GetNamedFilterById

func (s *CountryService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*CountryService) GetNamedFilters

func (s *CountryService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*CountryService) Update

func (s *CountryService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type Currency

type Currency struct {
	Archived       *bool          `json:"archived,omitempty"`       // Добавлена ли Валюта в архив
	Code           *string        `json:"code,omitempty"`           // Цифровой код Валюты
	Default        *bool          `json:"default,omitempty"`        // Является ли валюта валютой учета
	FullName       *string        `json:"fullName,omitempty"`       // Полное наименование Валюты
	Id             *uuid.UUID     `json:"id,omitempty"`             // ID сущности
	Indirect       *bool          `json:"indirect,omitempty"`       // Признак обратного курса Валюты
	ISOCode        *string        `json:"isoCode,omitempty"`        // Буквенный код Валюты
	MajorUnit      *CurrencyUnit  `json:"majorUnit,omitempty"`      // Формы единиц целой части Валюты
	Margin         *float64       `json:"margin,omitempty"`         // Наценка при автоматическом обновлении курса
	Meta           *Meta          `json:"meta,omitempty"`           // Метаданные
	MinorUnit      *CurrencyUnit  `json:"minorUnit,omitempty"`      // Формы единиц дробной части Валюты
	Multiplicity   *int           `json:"multiplicity,omitempty"`   // Кратность курса Валюты
	Name           *string        `json:"name,omitempty"`           // Наименование
	Rate           *float64       `json:"rate,omitempty"`           // Курс Валюты
	RateUpdateType RateUpdateType `json:"rateUpdateType,omitempty"` // Способ обновления курса Валюты
	System         *bool          `json:"system,omitempty"`         // Основана ли валюта на валюте из системного справочника
}

Currency Валюта. Ключевое слово: currency Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-valuta

func (Currency) MetaType

func (c Currency) MetaType() MetaType

func (Currency) String

func (c Currency) String() string

type CurrencyService

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

CurrencyService Сервис для работы с валютами.

func NewCurrencyService

func NewCurrencyService(client *Client) *CurrencyService

func (*CurrencyService) Create

func (s *CurrencyService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CurrencyService) CreateUpdateMany

func (s *CurrencyService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CurrencyService) Delete

func (s *CurrencyService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CurrencyService) DeleteMany

func (s *CurrencyService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CurrencyService) Get

func (s *CurrencyService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*CurrencyService) GetById

func (s *CurrencyService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*CurrencyService) GetNamedFilterById

func (s *CurrencyService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*CurrencyService) GetNamedFilters

func (s *CurrencyService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*CurrencyService) Update

func (s *CurrencyService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type CurrencyUnit

type CurrencyUnit struct {
	Gender *UnitGender `json:"gender,omitempty"` // Грамматический род единицы валюты
	S1     *string     `json:"s1,omitempty'"`    // Форма единицы, используемая при числительном 1
	S2     *string     `json:"s2,omitempty"`     // Форма единицы, используемая при числительном 2
	S5     *string     `json:"s5,omitempty"`     // Форма единицы, используемая при числительном 5
}

CurrencyUnit Формы единиц. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-valuta-formy-edinic

func (CurrencyUnit) String

func (c CurrencyUnit) String() string

type CustomEntity

type CustomEntity struct {
	Id   *uuid.UUID `json:"id,omitempty"`   // ID Пользовательского справочника
	Meta *Meta      `json:"meta,omitempty"` // Метаданные Пользовательского справочника
	Name *string    `json:"name,omitempty"` // Наименование Пользовательского справочника
}

CustomEntity Пользовательский справочник. Ключевое слово: customentity Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-pol-zowatel-skij-sprawochnik

func (CustomEntity) MetaType

func (c CustomEntity) MetaType() MetaType

func (CustomEntity) String

func (c CustomEntity) String() string

type CustomEntityElement

type CustomEntityElement struct {
	AccountId    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	Code         *string    `json:"code,omitempty"`         // Код элемента Пользовательского справочника
	Description  *string    `json:"description,omitempty"`  // Описание элемента Пользовательского справочника
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код элемента Пользовательского справочника
	Id           *uuid.UUID `json:"id,omitempty"`           // ID сущности
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные
	Name         *string    `json:"name,omitempty"`         // Наименование
	Updated      *Timestamp `json:"updated,omitempty"`      // Момент последнего обновления элементе Пользовательского справочника
	Group        *Group     `json:"group,omitempty"`        // Отдел сотрудника
	Owner        *Employee  `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Shared       *bool      `json:"shared,omitempty"`       // Общий доступ
}

CustomEntityElement Элемент Пользовательского справочника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-pol-zowatel-skij-sprawochnik-jelementy-pol-zowatel-skogo-sprawochnika

func (CustomEntityElement) String

func (c CustomEntityElement) String() string

type CustomEntityService

type CustomEntityService struct {
	Endpoint
	// contains filtered or unexported fields
}

CustomEntityService Сервис для работы с пользовательскими справочниками.

func NewCustomEntityService

func NewCustomEntityService(client *Client) *CustomEntityService

func (*CustomEntityService) Create

func (s *CustomEntityService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CustomEntityService) CreateElement

CreateElement Создать элемент справочника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-pol-zowatel-skij-sprawochnik-sozdat-alement-sprawochnika

func (*CustomEntityService) Delete

func (s *CustomEntityService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CustomEntityService) DeleteElement

func (s *CustomEntityService) DeleteElement(ctx context.Context, id, elementId uuid.UUID) (bool, *Response, error)

DeleteElement Удалить элемент справочника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-pol-zowatel-skij-sprawochnik-udalit-alement-sprawochnika

func (*CustomEntityService) GetElementById

func (s *CustomEntityService) GetElementById(ctx context.Context, id, elementId uuid.UUID) (*CustomEntityElement, *Response, error)

GetElementById Получить отдельный элементы справочника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-pol-zowatel-skij-sprawochnik-poluchit-alement

func (*CustomEntityService) GetElements

GetElements Получить элементы справочника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-pol-zowatel-skij-sprawochnik-poluchit-alementy-sprawochnika

func (*CustomEntityService) Update

func (s *CustomEntityService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*CustomEntityService) UpdateElement

func (s *CustomEntityService) UpdateElement(ctx context.Context, id, elementId uuid.UUID, element *CustomEntityElement) (*CustomEntityElement, *Response, error)

UpdateElement Изменить элемент справочника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-pol-zowatel-skij-sprawochnik-izmenit-alement

type CustomTemplate

type CustomTemplate struct {
	Template
}

CustomTemplate Пользовательский Шаблон. Ключевое слово: customtemplate Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-atributy-suschnosti

func (CustomTemplate) MetaType

func (c CustomTemplate) MetaType() MetaType

func (CustomTemplate) String

func (c CustomTemplate) String() string

type CustomerOrder

type CustomerOrder struct {
	AccountId             *uuid.UUID                        `json:"accountId,omitempty"`             // ID учетной записи
	Agent                 *Counterparty                     `json:"agent,omitempty"`                 // Метаданные контрагента
	AgentAccount          *AgentAccount                     `json:"agentAccount,omitempty"`          // Метаданные счета контрагента
	Applicable            *bool                             `json:"applicable,omitempty"`            // Отметка о проведении
	Attributes            *Attributes                       `json:"attributes,omitempty"`            // Коллекция метаданных доп. полей. Поля объекта
	Code                  *string                           `json:"code,omitempty"`                  // Код Заказа покупателя
	Contract              *Contract                         `json:"contract,omitempty"`              // Метаданные договора
	Created               *Timestamp                        `json:"created,omitempty"`               // Дата создания
	Deleted               *Timestamp                        `json:"deleted,omitempty"`               // Момент последнего удаления Заказа покупателя
	DeliveryPlannedMoment *Timestamp                        `json:"deliveryPlannedMoment,omitempty"` // Планируемая дата отгрузки
	Description           *string                           `json:"description,omitempty"`           // Комментарий Заказа покупателя
	ExternalCode          *string                           `json:"externalCode,omitempty"`          // Внешний код Заказа покупателя
	Files                 *Files                            `json:"files,omitempty"`                 // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group                 *Group                            `json:"group,omitempty"`                 // Отдел сотрудника
	Id                    *uuid.UUID                        `json:"id,omitempty"`                    // ID сущности
	InvoicedSum           *float64                          `json:"invoicedSum,omitempty"`           // Сумма счетов покупателю
	Meta                  *Meta                             `json:"meta,omitempty"`                  // Метаданные
	Name                  *string                           `json:"name,omitempty"`                  // Наименование
	Moment                *Timestamp                        `json:"moment,omitempty"`                // Дата документа
	Organization          *Organization                     `json:"organization,omitempty"`          // Метаданные юрлица
	OrganizationAccount   *AgentAccount                     `json:"organizationAccount,omitempty"`   // Метаданные счета юрлица
	Owner                 *Employee                         `json:"owner,omitempty"`                 // Владелец (Сотрудник)
	PayedSum              *float64                          `json:"payedSum,omitempty"`              // Сумма входящих платежей по Заказу
	Positions             *Positions[CustomerOrderPosition] `json:"positions,omitempty"`             // Метаданные позиций Заказа покупателя
	Printed               *bool                             `json:"printed,omitempty"`               // Напечатан ли документ
	Project               *Project                          `json:"project,omitempty"`               // Метаданные проекта
	Published             *bool                             `json:"published,omitempty"`             // Опубликован ли документ
	Rate                  *Rate                             `json:"rate,omitempty"`                  // Валюта
	ReservedSum           *float64                          `json:"reservedSum,omitempty"`           // Сумма товаров в резерве
	SalesChannel          *SalesChannel                     `json:"salesChannel,omitempty"`          // Метаданные канала продаж
	Shared                *bool                             `json:"shared,omitempty"`                // Общий доступ
	ShipmentAddress       *string                           `json:"shipmentAddress,omitempty"`       // Адрес доставки Заказа покупателя
	ShipmentAddressFull   *Address                          `json:"shipmentAddressFull,omitempty"`   // Адрес доставки Заказа покупателя с детализацией по отдельным полям
	ShippedSum            *float64                          `json:"shippedSum,omitempty"`            // Сумма отгруженного
	State                 *State                            `json:"state,omitempty"`                 // Метаданные статуса заказа
	Store                 *Store                            `json:"store,omitempty"`                 // Метаданные склада
	Sum                   *float64                          `json:"sum,omitempty"`                   // Сумма
	SyncId                *uuid.UUID                        `json:"syncId,omitempty"`                // ID синхронизации. После заполнения недоступен для изменения
	TaxSystem             TaxSystem                         `json:"taxSystem,omitempty"`             // Код системы налогообложения
	Updated               *Timestamp                        `json:"updated,omitempty"`               // Момент последнего обновления
	VatEnabled            *bool                             `json:"vatEnabled,omitempty"`            // Учитывается ли НДС
	VatIncluded           *bool                             `json:"vatIncluded,omitempty"`           // Включен ли НДС в цену
	VatSum                *float64                          `json:"vatSum,omitempty"`                // Сумма НДС
	PurchaseOrders        *PurchaseOrders                   `json:"purchaseOrders,omitempty"`        // Массив ссылок на связанные заказы поставщикам в формате Метаданных
	Demands               *Demands                          `json:"demands,omitempty"`               // Массив ссылок на связанные отгрузки в формате Метаданных
	Payments              *Payments                         `json:"payments,omitempty"`              // Массив ссылок на связанные платежи в формате Метаданных
	InvoicesOut           *InvoicesOut                      `json:"invoicesOut,omitempty"`           // Массив ссылок на связанные счета покупателям в формате Метаданных
	Moves                 *Moves                            `json:"moves,omitempty"`                 // Массив ссылок на связанные перемещния в формате Метаданных
	Prepayments           *Prepayments                      `json:"prepayments,omitempty"`           // Массив ссылок на связанные предоплаты в формате Метаданных
}

CustomerOrder Заказ покупателя. Ключевое слово: customerorder Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-zakaz-pokupatelq

func (CustomerOrder) GetMeta

func (c CustomerOrder) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (CustomerOrder) MetaType

func (c CustomerOrder) MetaType() MetaType

func (CustomerOrder) String

func (c CustomerOrder) String() string

type CustomerOrderPosition

type CustomerOrderPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Discount   *float64            `json:"discount,omitempty"`   // Процент скидки или наценки. Наценка указывается отрицательным числом, т.е. -10 создаст наценку в 10%
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID сущности
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Reserve    *float64            `json:"reserve,omitempty"`    // Резерв данной позиции
	Shipped    *float64            `json:"shipped,omitempty"`    // Доставлено
	TaxSystem  GoodTaxSystem       `json:"taxSystem,omitempty"`  // Код системы налогообложения
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Stock      *Stock              `json:"stock,omitempty"`      // Остатки и себестоимость `?fields=stock&expand=positions`
}

CustomerOrderPosition Позиция Заказа покупателя. Ключевое слово: customerorderposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-zakaz-pokupatelq-zakazy-pokupatelej-pozicii-zakaza-pokupatelq

func (CustomerOrderPosition) MetaType

func (c CustomerOrderPosition) MetaType() MetaType

func (CustomerOrderPosition) String

func (c CustomerOrderPosition) String() string

type CustomerOrderService

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

CustomerOrderService Сервис для работы с заказами покупателя.

func NewCustomerOrderService

func NewCustomerOrderService(client *Client) *CustomerOrderService

func (*CustomerOrderService) Create

func (s *CustomerOrderService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*CustomerOrderService) CreateAttribute

func (s *CustomerOrderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CustomerOrderService) CreateAttributes

func (s *CustomerOrderService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*CustomerOrderService) CreateOrUpdatePositionTrackingCodes

func (s *CustomerOrderService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*CustomerOrderService) CreatePosition

func (s *CustomerOrderService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*CustomerOrderService) CreatePositions

func (s *CustomerOrderService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*CustomerOrderService) CreateUpdateMany

func (s *CustomerOrderService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CustomerOrderService) Delete

func (s *CustomerOrderService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*CustomerOrderService) DeleteAttribute

func (s *CustomerOrderService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*CustomerOrderService) DeleteAttributes

func (s *CustomerOrderService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*CustomerOrderService) DeleteBySyncId

func (s *CustomerOrderService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*CustomerOrderService) DeleteMany

func (s *CustomerOrderService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*CustomerOrderService) DeletePosition

func (s *CustomerOrderService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*CustomerOrderService) DeletePositionTrackingCodes

func (s *CustomerOrderService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*CustomerOrderService) DeletePublication

func (s *CustomerOrderService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*CustomerOrderService) Get

func (s *CustomerOrderService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*CustomerOrderService) GetAttributeById

func (s *CustomerOrderService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*CustomerOrderService) GetAttributes

func (s *CustomerOrderService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*CustomerOrderService) GetById

func (s *CustomerOrderService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*CustomerOrderService) GetBySyncId

func (s *CustomerOrderService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*CustomerOrderService) GetMetadata

func (s *CustomerOrderService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*CustomerOrderService) GetNamedFilterById

func (s *CustomerOrderService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*CustomerOrderService) GetNamedFilters

func (s *CustomerOrderService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*CustomerOrderService) GetPositionById

func (s *CustomerOrderService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*CustomerOrderService) GetPositionTrackingCodes

func (s *CustomerOrderService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*CustomerOrderService) GetPositions

func (s *CustomerOrderService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*CustomerOrderService) GetPublicationById

func (s *CustomerOrderService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*CustomerOrderService) GetPublications

func (s *CustomerOrderService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*CustomerOrderService) Publish

func (s *CustomerOrderService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*CustomerOrderService) Remove

func (s *CustomerOrderService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*CustomerOrderService) Template

func (s *CustomerOrderService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*CustomerOrderService) Update

func (s *CustomerOrderService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*CustomerOrderService) UpdateAttribute

func (s *CustomerOrderService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*CustomerOrderService) UpdatePosition

func (s *CustomerOrderService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type CustomerOrders

type CustomerOrders = Iterator[CustomerOrder]

type Dashboard

type Dashboard struct {
	Sales  DashboardSalesOrders // Вложенный объект, представляющий собой информацию о продажах за указанный период
	Orders DashboardSalesOrders // Вложенный объект, представляющий собой информацию о заказах за указанный период
	Money  DashboardMoney       // Вложенный объект, представляющий собой информацию о деньгах за указанный период
}

Dashboard Структура объекта показателей Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-struktura-ob-ekta-pokazatelej

type DashboardMoney

type DashboardMoney struct {
	Income        float64 `json:"income"`        // Доходы за период
	Outcome       float64 `json:"outcome"`       // Расходы за период
	Balance       float64 `json:"balance"`       // Текущий баланс
	TodayMovement float64 `json:"todayMovement"` // Дельта за сегодня
	Movement      float64 `json:"movement"`      // Дельта за период
}

DashboardMoney Деньги за период. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-struktura-ob-ekta-pokazatelej-den-gi-za-period

type DashboardSalesOrders

type DashboardSalesOrders struct {
	Count          float64 `json:"count"`          // Количество продаж/заказов
	Amount         float64 `json:"amount"`         // Прибыль
	MovementAmount float64 `json:"movementAmount"` // Дельта по сравнению с прошлым аналогичным периодом
}

DashboardSalesOrders Продажи/Заказы за период. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-struktura-ob-ekta-pokazatelej-prodazhi-za-period

type DataMetaTyper

type DataMetaTyper interface {
	MetaTyper
	Data() json.RawMessage
}

type DefaultScreen

type DefaultScreen string

DefaultScreen Стартовый экран. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-nastrojki-pol-zowatelq-startowyj-akran

const (
	DefaultScreenAudit                     DefaultScreen = "audit"                     // Аудит
	DefaultScreenCurrency                  DefaultScreen = "currency"                  // Валюты
	DefaultScreenEnrollOrder               DefaultScreen = "enrollorder"               // Ввод в оборот кодов маркировки
	DefaultScreenCustomersBalanceList      DefaultScreen = "customersbalancelist"      // Взаиморасчеты
	DefaultScreenRetailDrawerCashIn        DefaultScreen = "retaildrawercashin"        // Внесения
	DefaultScreenInternalOrder             DefaultScreen = "internalorder"             // Внутренние заказы
	DefaultScreenEnrollReturn              DefaultScreen = "enrollreturn"              // Возврат в оборот
	DefaultScreenRetailSalesReturn         DefaultScreen = "retailsalesreturn"         // Возвраты
	DefaultScreenSalesReturn               DefaultScreen = "salesreturn"               // Возвраты покупателей
	DefaultScreenPurchaseReturn            DefaultScreen = "purchasereturn"            // Возвраты поставщикам
	DefaultScreenPrepaymentReturn          DefaultScreen = "prepaymentreturn"          // Возвраты предоплат
	DefaultScreenPurchaseFunnel            DefaultScreen = "purchasefunnel"            // Воронка продаж
	DefaultScreenRetireOrder               DefaultScreen = "retireorder"               // Вывод из оборота
	DefaultScreenCommissionReportOut       DefaultScreen = "commissionreportout"       // Выданные отчеты комиссионера
	DefaultScreenRetailDrawerCashOut       DefaultScreen = "retaildrawercashout"       // Выплаты
	DefaultScreenCashFlow                  DefaultScreen = "cashflow"                  // Движение денежных средств
	DefaultScreenContract                  DefaultScreen = "contract"                  // Договоры
	DefaultScreenOperation                 DefaultScreen = "operation"                 // Документы
	DefaultScreenUom                       DefaultScreen = "uom"                       // Единицы измерения
	DefaultScreenCRPTLog                   DefaultScreen = "crptlog"                   // Журнал запросов в ИС МП
	DefaultScreenLoyaltyLog                DefaultScreen = "loyaltylog"                // Журнал запросов в систему лояльности
	DefaultScreenPurpose                   DefaultScreen = "purpose"                   // Задачи
	DefaultScreenCRPTDemand                DefaultScreen = "crptdemand"                // Заказ кодов маркировки
	DefaultScreenProcessingOrder           DefaultScreen = "processingorder"           // Заказы на производство
	DefaultScreenCustomerOrder             DefaultScreen = "customerorder"             // Заказы покупателей
	DefaultScreenPurchaseOrder             DefaultScreen = "purchaseorder"             // Заказы поставщикам
	DefaultScreenEvotorRequest             DefaultScreen = "evotorrequest"             // Запросы
	DefaultScreenPhoneCall                 DefaultScreen = "phonecall"                 // Звонки
	DefaultScreenCRPTPackageItemRemoval    DefaultScreen = "crptpackageitemremoval"    // Изъятие из упаковки
	DefaultScreenImport                    DefaultScreen = "import"                    // Импорт
	DefaultScreenImportGoods               DefaultScreen = "importgoods"               // Импорт из Excel
	DefaultScreenImportEdo                 DefaultScreen = "importedo"                 // Импорт приемки
	DefaultScreenImportCustom              DefaultScreen = "importcustom"              // Импорт справочника
	DefaultScreenInventory                 DefaultScreen = "inventory"                 // Инвентаризации
	DefaultScreenCompany                   DefaultScreen = "company"                   // Контрагенты
	DefaultScreenRecycleBin                DefaultScreen = "recyclebin"                // Корзина
	DefaultScreenAdjustment                DefaultScreen = "adjustment"                // Корректировки
	DefaultScreenBulkEdit                  DefaultScreen = "bulkEdit"                  // Массовое редактирование
	DefaultScreenEvotorMapping             DefaultScreen = "evotormapping"             // Настройка обмена с Эвотор
	DefaultScreenCompanySettings           DefaultScreen = "companysettings"           // Настройки
	DefaultScreenFeed                      DefaultScreen = "feed"                      // Новости
	DefaultScreenTurnover                  DefaultScreen = "turnover"                  // Обороты
	DefaultScreenBonusTransaction          DefaultScreen = "bonustransaction"          // Операции с баллами
	DefaultScreenRemainsOrder              DefaultScreen = "remainsorder"              // Описание остатков
	DefaultScreenEnter                     DefaultScreen = "enter"                     // Оприходования
	DefaultScreenStockReport               DefaultScreen = "stockreport"               // Остатки
	DefaultScreenDemand                    DefaultScreen = "demand"                    // Отгрузки
	DefaultScreenCommissionReport          DefaultScreen = "commissionreport"          // Отчеты комиссионера
	DefaultScreenFiscalEvent               DefaultScreen = "fiscalevent"               // Очередь облачных чеков
	DefaultScreenFiscalQueue               DefaultScreen = "fiscalqueue"               // Очередь облачных чеков
	DefaultScreenRemarkingOrder            DefaultScreen = "remarkingorder"            // Перемаркировка
	DefaultScreenMove                      DefaultScreen = "move"                      // Перемещения
	DefaultScreenFinance                   DefaultScreen = "finance"                   // Платежи
	DefaultScreenPayments                  DefaultScreen = "payments"                  // Подписка
	DefaultScreenDashboard                 DefaultScreen = "dashboard"                 // Показатели
	DefaultScreenCommissionReportIn        DefaultScreen = "commissionreportin"        // Полученные отчеты комиссионера
	DefaultScreenPriceList                 DefaultScreen = "pricelist"                 // Прайс-листы
	DefaultScreenPrepayment                DefaultScreen = "prepayment"                // Предоплаты
	DefaultScreenPnl3                      DefaultScreen = "pnl3"                      // Прибыли и убытки
	DefaultScreenPnl                       DefaultScreen = "pnl"                       // Прибыльность
	DefaultScreenSupply                    DefaultScreen = "supply"                    // Приемки
	DefaultScreenApps                      DefaultScreen = "apps"                      // Приложения
	DefaultScreenEmbedApps                 DefaultScreen = "embed-apps"                // Приложения
	DefaultScreenCheckEquipment            DefaultScreen = "checkequipment"            // Проверка комплектации
	DefaultScreenRetailDemand              DefaultScreen = "retaildemand"              // Продажи
	DefaultScreenProject                   DefaultScreen = "project"                   // Проекты
	DefaultScreenTrackingIdentify          DefaultScreen = "trackingidentify"          // Просмотр информации о КМ или ТУ
	DefaultScreenCRPTPackageDisaggregation DefaultScreen = "crptpackagedisaggregation" // Расформирование упаковки
	DefaultScreenOrderAssembly             DefaultScreen = "orderassembly"             // Сбор заказа
	DefaultScreenSerialNumbers             DefaultScreen = "serialnumbers"             // Сер. номера
	DefaultScreenConnectorSettings         DefaultScreen = "connectorsettings"         // Синхронизация
	DefaultScreenDiscount                  DefaultScreen = "discount"                  // Скидки
	DefaultScreenWarehouse                 DefaultScreen = "warehouse"                 // Склады
	DefaultScreenRetailShift               DefaultScreen = "retailshift"               // Смены
	DefaultScreenEvotorEvent               DefaultScreen = "evotorevent"               // События обмена с Эвотор
	DefaultScreenEmployee                  DefaultScreen = "employee"                  // Сотрудники
	DefaultScreenSpecialOffers             DefaultScreen = "specialoffers"             // Спецпредложения
	DefaultScreenCRPTCancellation          DefaultScreen = "crptcancellation"          // Списание кодов маркировки
	DefaultScreenLoss                      DefaultScreen = "loss"                      // Списания
	DefaultScreenCountry                   DefaultScreen = "country"                   // Страны
	DefaultScreenScriptTemplate            DefaultScreen = "scripttemplate"            // Сценарии
	DefaultScreenInvoiceOut                DefaultScreen = "invoiceout"                // Счета покупателям
	DefaultScreenInvoiceIn                 DefaultScreen = "invoicein"                 // Счета поставщиков
	DefaultScreenFactureOut                DefaultScreen = "factureout"                // Счета-фактуры выданные
	DefaultScreenFactureIn                 DefaultScreen = "facturein"                 // Счета-фактуры полученные
	DefaultScreenProcessingPlan            DefaultScreen = "processingplan"            // Тех. карты
	DefaultScreenProcessing                DefaultScreen = "processing"                // Тех. операции
	DefaultScreenGood                      DefaultScreen = "good"                      // Товары и услуги
	DefaultScreenCommissionGoods           DefaultScreen = "commissiongoods"           // Товары на реализации
	DefaultScreenRetailStore               DefaultScreen = "retailstore"               // Точки продаж
	DefaultScreenNotifications             DefaultScreen = "notifications"             // Уведомления
	DefaultScreenPurchaseControl           DefaultScreen = "purchasecontrol"           // Управление закупками
	DefaultScreenAccount                   DefaultScreen = "account"                   // Учетная запись
	DefaultScreenCRPTPackageCreation       DefaultScreen = "crptpackagecreation"       // Формирование упаковки
	DefaultScreenFeature                   DefaultScreen = "feature"                   // Характеристика
	DefaultScreenExport                    DefaultScreen = "export"                    // Экспорт
	DefaultScreenMyCompany                 DefaultScreen = "mycompany"                 // Юр. лица
	DefaultScreenHomePage                  DefaultScreen = "homepage"                  // Юр. лица
)

type DeleteManyResponse

type DeleteManyResponse []struct {
	Info      string    `json:"info"`
	ApiErrors ApiErrors `json:"errors"`
}

DeleteManyResponse объект ответа на запрос удаления нескольких элементов

type Demand

type Demand struct {
	AccountId               *uuid.UUID                 `json:"accountId,omitempty"`               // ID учетной записи
	Agent                   *Counterparty              `json:"agent,omitempty"`                   // Метаданные контрагента
	AgentAccount            *AgentAccount              `json:"agentAccount,omitempty"`            // Метаданные счета контрагента
	Applicable              *bool                      `json:"applicable,omitempty"`              // Отметка о проведении
	Attributes              *Attributes                `json:"attributes,omitempty"`              // Коллекция метаданных доп. полей. Поля объекта
	Code                    *string                    `json:"code,omitempty"`                    // Код Отгрузки
	Contract                *Contract                  `json:"contract,omitempty"`                // Метаданные договора
	Created                 *Timestamp                 `json:"created,omitempty"`                 // Дата создания
	Deleted                 *Timestamp                 `json:"deleted,omitempty"`                 // Момент последнего удаления Отгрузки
	Description             *string                    `json:"description,omitempty"`             // Комментарий Отгрузки
	ExternalCode            *string                    `json:"externalCode,omitempty"`            // Внешний код Отгрузки
	Files                   *Files                     `json:"files,omitempty"`                   // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group                   *Group                     `json:"group,omitempty"`                   // Отдел сотрудника
	Id                      *uuid.UUID                 `json:"id,omitempty"`                      // ID сущности
	Meta                    *Meta                      `json:"meta,omitempty"`                    // Метаданные
	Moment                  *Timestamp                 `json:"moment,omitempty"`                  // Дата документа
	Name                    *string                    `json:"name,omitempty"`                    // Наименование
	Organization            *Organization              `json:"organization,omitempty"`            // Метаданные юрлица
	OrganizationAccount     *AgentAccount              `json:"organizationAccount,omitempty"`     // Метаданные счета юрлица
	Overhead                *Overhead                  `json:"overhead,omitempty"`                // Накладные расходы. Если Позиции Отгрузки не заданы, то накладные расходы нельзя задать
	Owner                   *Employee                  `json:"owner,omitempty"`                   // Владелец (Сотрудник)
	PayedSum                *float64                   `json:"payedSum,omitempty"`                // Сумма входящих платежей по Отгрузке
	Positions               *Positions[DemandPosition] `json:"positions,omitempty"`               // Метаданные позиций Отгрузки
	Printed                 *bool                      `json:"printed,omitempty"`                 // Напечатан ли документ
	Project                 *Project                   `json:"project,omitempty"`                 // Метаданные проекта
	Published               *bool                      `json:"published,omitempty"`               // Опубликован ли документ
	Rate                    *Rate                      `json:"rate,omitempty"`                    // Валюта
	SalesChannel            *SalesChannel              `json:"salesChannel,omitempty"`            // Метаданные канала продаж
	Shared                  *bool                      `json:"shared,omitempty"`                  // Общий доступ
	ShipmentAddress         *string                    `json:"shipmentAddress,omitempty"`         // Адрес доставки Отгрузки
	ShipmentAddressFull     *Address                   `json:"shipmentAddressFull,omitempty"`     // Адрес доставки Отгрузки с детализацией по отдельным полям
	State                   *State                     `json:"state,omitempty"`                   // Метаданные статуса Отгрузки
	Store                   *Store                     `json:"store,omitempty"`                   // Метаданные склада
	Sum                     *float64                   `json:"sum,omitempty"`                     // Сумма
	SyncId                  *uuid.UUID                 `json:"syncId,omitempty"`                  // ID синхронизации. После заполнения недоступен для изменения
	Updated                 *Timestamp                 `json:"updated,omitempty"`                 // Момент последнего обновления
	VatEnabled              *bool                      `json:"vatEnabled,omitempty"`              // Учитывается ли НДС
	VatIncluded             *bool                      `json:"vatIncluded,omitempty"`             // Включен ли НДС в цену
	VatSum                  *float64                   `json:"vatSum,omitempty"`                  // Сумма включая НДС
	CustomerOrder           *CustomerOrder             `json:"customerOrder,omitempty"`           // Ссылка на Заказ Покупателя, с которым связана эта Отгрузка в формате Метаданных
	FactureOut              *FactureOut                `json:"factureOut,omitempty"`              // Ссылка на Счет-фактуру выданный, с которым связан этот платеж в формате Метаданных
	Returns                 *SalesReturns              `json:"returns,omitempty"`                 // Массив ссылок на связанные возвраты в формате Метаданных
	Payments                *Payments                  `json:"payments,omitempty"`                // Массив ссылок на связанные платежи в формате Метаданных
	InvoicesOut             *InvoicesOut               `json:"invoicesOut,omitempty"`             // Массив ссылок на связанные счета покупателям в формате Метаданных
	CargoName               *string                    `json:"cargoName,omitempty"`               // Наименование груза
	Carrier                 *Counterparty              `json:"carrier,omitempty"`                 // Метаданные перевозчика (контрагент или юрлицо)
	Consignee               *Counterparty              `json:"consignee,omitempty"`               // Метаданные грузополучателя (контрагент или юрлицо)
	GoodPackQuantity        *int                       `json:"goodPackQuantity,omitempty"`        // Всего мест
	ShippingInstructions    *string                    `json:"shippingInstructions,omitempty"`    // Указания грузоотправителя
	StateContractId         *string                    `json:"stateContractId,omitempty"`         // Идентификатор государственного контракта, договора (соглашения)
	TransportFacility       *string                    `json:"transportFacility,omitempty"`       // Транспортное средство
	TransportFacilityNumber *string                    `json:"transportFacilityNumber,omitempty"` // Номер автомобиля
}

Demand Отгрузка. Ключевое слово: demand Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-otgruzka

func (Demand) ConvertToOperation

func (d Demand) ConvertToOperation(linkedSum *float64) (*OperationIn, error)

ConvertToOperation удовлетворяет интерфейсу OperationInType

func (Demand) GetMeta

func (d Demand) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Demand) MetaType

func (d Demand) MetaType() MetaType

func (Demand) String

func (d Demand) String() string

type DemandPosition

type DemandPosition struct {
	AccountId         *uuid.UUID          `json:"accountId,omitempty"`          // ID учетной записи
	Assortment        *AssortmentPosition `json:"assortment,omitempty"`         // Метаданные товара/услуги/серии/модификации/комплекта, которую представляет собой позиция
	Cost              *int                `json:"cost,omitempty"`               // Себестоимость (только для услуг)
	Discount          *int                `json:"discount,omitempty"`           // Процент скидки или наценки. Наценка указывается отрицательным числом, т.е. -10 создаст наценку в 10%
	Id                *uuid.UUID          `json:"id,omitempty"`                 // ID сущности
	Pack              *Pack               `json:"pack,omitempty"`               // Упаковка Товара
	Price             *float64            `json:"price,omitempty"`              // Цена товара/услуги в копейках
	Quantity          *float64            `json:"quantity,omitempty"`           // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Slot              *Slot               `json:"slot,omitempty"`               // Ячейка на складе
	Things            *Things             `json:"things,omitempty"`             // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута
	TrackingCodes     *TrackingCodes      `json:"trackingCodes,omitempty"`      // Коды маркировки товаров и транспортных упаковок
	TrackingCodes1162 *TrackingCodes      `json:"trackingCodes_1162,omitempty"` // Коды маркировки товаров в формате тега 1162
	Overhead          *float64            `json:"overhead,omitempty"`           // Накладные расходы. Если Позиции Отгрузки не заданы, то накладные расходы нельзя задать
	Vat               *int                `json:"vat,omitempty"`                // НДС, которым облагается текущая позиция
	VatEnabled        *bool               `json:"vatEnabled,omitempty"`         // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Stock             *Stock              `json:"stock,omitempty"`              // Остатки и себестоимость `?fields=stock&expand=positions`
}

DemandPosition Позиция Отгрузки Ключевое слово: demandposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-otgruzka-otgruzki-pozicii-otgruzki

func (DemandPosition) MetaType

func (d DemandPosition) MetaType() MetaType

func (DemandPosition) String

func (d DemandPosition) String() string

type DemandService

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

DemandService Сервис для работы с отгрузками.

func NewDemandService

func NewDemandService(client *Client) *DemandService

func (*DemandService) Create

func (s *DemandService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*DemandService) CreateAttribute

func (s *DemandService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*DemandService) CreateAttributes

func (s *DemandService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*DemandService) CreateOrUpdatePositionTrackingCodes

func (s *DemandService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*DemandService) CreatePosition

func (s *DemandService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*DemandService) CreatePositions

func (s *DemandService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*DemandService) CreateUpdateMany

func (s *DemandService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*DemandService) Delete

func (s *DemandService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*DemandService) DeleteAttribute

func (s *DemandService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*DemandService) DeleteAttributes

func (s *DemandService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*DemandService) DeleteBySyncId

func (s *DemandService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*DemandService) DeleteMany

func (s *DemandService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*DemandService) DeletePosition

func (s *DemandService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*DemandService) DeletePositionTrackingCodes

func (s *DemandService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*DemandService) DeletePublication

func (s *DemandService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*DemandService) Get

func (s *DemandService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*DemandService) GetAttributeById

func (s *DemandService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*DemandService) GetAttributes

func (s *DemandService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*DemandService) GetById

func (s *DemandService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*DemandService) GetBySyncId

func (s *DemandService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*DemandService) GetMetadata

func (s *DemandService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*DemandService) GetNamedFilterById

func (s *DemandService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*DemandService) GetNamedFilters

func (s *DemandService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*DemandService) GetPositionById

func (s *DemandService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*DemandService) GetPositionTrackingCodes

func (s *DemandService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*DemandService) GetPositions

func (s *DemandService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*DemandService) GetPublicationById

func (s *DemandService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*DemandService) GetPublications

func (s *DemandService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*DemandService) Publish

func (s *DemandService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*DemandService) Remove

func (s *DemandService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*DemandService) Template

func (s *DemandService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*DemandService) Update

func (s *DemandService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*DemandService) UpdateAttribute

func (s *DemandService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*DemandService) UpdatePosition

func (s *DemandService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type Demands

type Demands = Iterator[Demand]

type DictionaryPermission

type DictionaryPermission struct {
	View   PermissionValue `json:"view"`
	Create PermissionValue `json:"create"`
	Update PermissionValue `json:"update"`
	Delete PermissionValue `json:"delete"`
	Print  PermissionValue `json:"print"`
}

type Discount

type Discount struct {
	Meta *Meta `json:"meta,omitempty"`
	// contains filtered or unexported fields
}

Discount Скидка. Представляет из себя структуру из полей: `Meta` для определения типа сущности `data` для хранения сырых данных AccumulationDiscount | PersonalDiscount | SpecialPriceDiscount

Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki

func (*Discount) AccumulationDiscount

func (d *Discount) AccumulationDiscount() (*AccumulationDiscount, error)

AccumulationDiscount структурирует сущность в *AccumulationDiscount Возвращает ошибку в случае неудачи

func (*Discount) Data

func (d *Discount) Data() json.RawMessage

Data удовлетворяет интерфейсу DataMetaTyper

func (*Discount) MetaType

func (d *Discount) MetaType() MetaType

MetaType удовлетворяет интерфейсу MetaTyper

func (*Discount) PersonalDiscount

func (d *Discount) PersonalDiscount() (*PersonalDiscount, error)

PersonalDiscount структурирует сущность в *PersonalDiscount Возвращает ошибку в случае неудачи

func (*Discount) SpecialPriceDiscount

func (d *Discount) SpecialPriceDiscount() (*SpecialPriceDiscount, error)

SpecialPriceDiscount структурирует сущность в *SpecialPriceDiscount Возвращает ошибку в случае неудачи

func (Discount) String

func (d Discount) String() string

func (*Discount) UnmarshalJSON

func (d *Discount) UnmarshalJSON(data []byte) error

type DiscountData

type DiscountData struct {
	Discount             *Discount `json:"discount,omitempty"`             // Скидка
	PersonalDiscount     *float64  `json:"personalDiscount,omitempty"`     // Значение персональной скидки
	DemandSumCorrection  *float64  `json:"demandSumCorrection,omitempty"`  // Коррекция суммы накоплений по скидке
	AccumulationDiscount *float64  `json:"accumulationDiscount,omitempty"` // Значение накопительной скидки
}

func (DiscountData) String

func (d DiscountData) String() string

type DiscountService

type DiscountService struct {
	Endpoint
	// contains filtered or unexported fields
}

DiscountService Сервис для работы со скидками.

func NewDiscountService

func NewDiscountService(client *Client) *DiscountService

func (*DiscountService) CreateAccumulationDiscount

func (s *DiscountService) CreateAccumulationDiscount(ctx context.Context, entity *AccumulationDiscount) (*AccumulationDiscount, *Response, error)

CreateAccumulationDiscount Создать накопительную скидку. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-sozdat-nakopitel-nuu-skidku

func (*DiscountService) CreatePersonalDiscount

func (s *DiscountService) CreatePersonalDiscount(ctx context.Context, entity *PersonalDiscount) (*PersonalDiscount, *Response, error)

CreatePersonalDiscount Создать персональную скидку. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-sozdat-personal-nuu-skidku

func (*DiscountService) CreateSpecialPriceDiscount

func (s *DiscountService) CreateSpecialPriceDiscount(ctx context.Context, entity *SpecialPriceDiscount) (*SpecialPriceDiscount, *Response, error)

CreateSpecialPriceDiscount Создать специальную цену. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-sozdat-special-nuu-cenu

func (*DiscountService) DeleteAccumulationDiscount

func (s *DiscountService) DeleteAccumulationDiscount(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAccumulationDiscount Удалить накопительную скидку. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-udalit-nakopitel-nuu-skidku

func (*DiscountService) DeletePersonalDiscount

func (s *DiscountService) DeletePersonalDiscount(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeletePersonalDiscount Удалить персональную скидку.

func (*DiscountService) DeleteSpecialPriceDiscount

func (s *DiscountService) DeleteSpecialPriceDiscount(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteSpecialPriceDiscount Удалить специальную цену. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-udalit-special-nuu-cenu

func (*DiscountService) Get

func (s *DiscountService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*DiscountService) GetAccumulationDiscounts

func (s *DiscountService) GetAccumulationDiscounts(ctx context.Context, params *Params) (*List[AccumulationDiscount], *Response, error)

GetAccumulationDiscounts Получить все накопительные скидки.

func (*DiscountService) GetByIdAccumulationDiscount

func (s *DiscountService) GetByIdAccumulationDiscount(ctx context.Context, id *uuid.UUID, params *Params) (*AccumulationDiscount, *Response, error)

GetByIdAccumulationDiscount Получить накопительную скидку. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-poluchit-nakopitel-nuu-skidku

func (*DiscountService) GetByIdPersonalDiscount

func (s *DiscountService) GetByIdPersonalDiscount(ctx context.Context, id *uuid.UUID, params *Params) (*PersonalDiscount, *Response, error)

GetByIdPersonalDiscount Получить персональную скидку. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-poluchit-personal-nuu-skidku

func (*DiscountService) GetByIdSpecialPriceDiscount

func (s *DiscountService) GetByIdSpecialPriceDiscount(ctx context.Context, id *uuid.UUID, params *Params) (*SpecialPriceDiscount, *Response, error)

GetByIdSpecialPriceDiscount Получить специальную цену. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-poluchit-special-nuu-cenu

func (*DiscountService) GetPersonalDiscounts

func (s *DiscountService) GetPersonalDiscounts(ctx context.Context, params *Params) (*List[PersonalDiscount], *Response, error)

GetPersonalDiscounts Получить все персональные скидки.

func (*DiscountService) GetSpecialPriceDiscounts

func (s *DiscountService) GetSpecialPriceDiscounts(ctx context.Context, params *Params) (*List[SpecialPriceDiscount], *Response, error)

GetSpecialPriceDiscounts Получить все специальные цены. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-udalit-personal-nuu-skidku

func (*DiscountService) UpdateAccumulationDiscount

func (s *DiscountService) UpdateAccumulationDiscount(ctx context.Context, id *uuid.UUID, entity *AccumulationDiscount) (*AccumulationDiscount, *Response, error)

UpdateAccumulationDiscount Изменить накопительную скидку. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-izmenit-nakopitel-nuu-skidku

func (*DiscountService) UpdatePersonalDiscount

func (s *DiscountService) UpdatePersonalDiscount(ctx context.Context, id *uuid.UUID, entity *PersonalDiscount) (*PersonalDiscount, *Response, error)

UpdatePersonalDiscount Изменить персональную скидку. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-izmenit-personal-nuu-skidku

func (*DiscountService) UpdateRoundOffDiscount

func (s *DiscountService) UpdateRoundOffDiscount(ctx context.Context, id *uuid.UUID, entity *RoundOffDiscount) (*RoundOffDiscount, *Response, error)

UpdateRoundOffDiscount Изменить округление копеек. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-izmenit-okruglenie-kopeek

func (*DiscountService) UpdateSpecialPriceDiscount

func (s *DiscountService) UpdateSpecialPriceDiscount(ctx context.Context, id *uuid.UUID, entity *SpecialPriceDiscount) (*SpecialPriceDiscount, *Response, error)

UpdateSpecialPriceDiscount Изменить специальную цену. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-izmenit-special-nuu-cenu

type DiscountStrategy

type DiscountStrategy string

DiscountStrategy Совместное применение скидок Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-nastrojki-kompanii-sowmestnoe-primenenie-skidok

const (
	DiscountStrategyBySum      DiscountStrategy = "bySum"      // Сумма скидок (должна действовать сумма скидок)
	DiscountStrategyByPriority DiscountStrategy = "byPriority" // Приоритетная (должна действовать одна, наиболее выгодная для покупателя скидка)
)

type Discounts

type Discounts = Iterator[Discount]

type Distribution

type Distribution string

Distribution Тип Распределения накладных расходов.

const (
	DistributionWeight Distribution = "weight" // по весу
	DistributionVolume Distribution = "volume" // по объему
	DistributionPrice  Distribution = "price"  // по цене
)

type Driver

type Driver struct {
	Name    string `json:"name,omitempty"`    // Наименование драйвера
	Version string `json:"version,omitempty"` // Версия драйвера
}

Driver Атрибуты сущности Драйвер. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-okruzhenie-attributy-suschnosti-drajwer

func (Driver) String

func (d Driver) String() string

type EmbeddedTemplate

type EmbeddedTemplate struct {
	Template
}

EmbeddedTemplate Стандартный шаблон Ключевое слово: embeddedtemplate Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-atributy-suschnosti

func (EmbeddedTemplate) MetaType

func (e EmbeddedTemplate) MetaType() MetaType

func (EmbeddedTemplate) String

func (e EmbeddedTemplate) String() string

type Employee

type Employee struct {
	AccountId    *uuid.UUID  `json:"accountId,omitempty"`    // ID учетной записи
	Archived     *bool       `json:"archived,omitempty"`     // Добавлен ли Сотрудник в архив
	Attributes   *Attributes `json:"attributes,omitempty"`   // Дополнительные поля Сотрудника
	Cashiers     *Cashiers   `json:"cashiers,omitempty"`     // Массив кассиров
	Code         *string     `json:"code,omitempty"`         // Код Сотрудника
	Created      *Timestamp  `json:"created,omitempty"`      // Момент создания Сотрудника
	Description  *string     `json:"description,omitempty"`  // Комментарий к Сотруднику
	Email        *string     `json:"email,omitempty"`        // Электронная почта сотрудника
	ExternalCode *string     `json:"externalCode,omitempty"` // Внешний код Сотрудника
	FirstName    *string     `json:"firstName,omitempty"`    // Имя
	FullName     *string     `json:"fullName,omitempty"`     // Имя Отчество Фамилия
	Group        *Group      `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID  `json:"id,omitempty"`           // ID сущности
	Image        *Image      `json:"image,omitempty"`        // Фотография сотрудника
	INN          *string     `json:"inn,omitempty"`          // ИНН сотрудника (в формате ИНН физического лица)
	LastName     *string     `json:"lastName,omitempty"`     // Фамилия
	Meta         *Meta       `json:"meta,omitempty"`         // Метаданные
	MiddleName   *string     `json:"middleName,omitempty"`   // Отчество
	Name         *string     `json:"name,omitempty"`         // Наименование
	Owner        *Employee   `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Phone        *string     `json:"phone,omitempty"`        // Телефон сотрудника
	Position     *string     `json:"position,omitempty"`     // Должность сотрудника
	Shared       *bool       `json:"shared,omitempty"`       // Общий доступ
	ShortFio     *string     `json:"shortFio,omitempty"`     // Краткое ФИО
	UID          *string     `json:"uid,omitempty"`          // Логин Сотрудника
	Updated      *Timestamp  `json:"updated,omitempty"`      // Момент последнего обновления Сотрудника
}

Employee Сотрудник. Ключевое слово: employee Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik

func (Employee) MetaType

func (e Employee) MetaType() MetaType

func (Employee) String

func (e Employee) String() string

type EmployeePermission

type EmployeePermission struct {
	AuthorizedHosts     []string `json:"authorizedHosts,omitempty"`     // Список ipv4 адресов, с которых разрешен доступ на аккаунт
	AuthorizedIpNetmask *string  `json:"authorizedIpNetmask,omitempty"` // Маска подсети с правом доступа на аккаунт
	AuthorizedIpNetwork *string  `json:"authorizedIpNetwork,omitempty"` // Ipv4 адрес, идентифицирующий соответствующую подсеть, с правом доступа на аккаунт
	Email               *string  `json:"email,omitempty"`               // Почта сотрудника
	Group               *Group   `json:"group,omitempty"`               // Метаданные Группы, а также ее идентификатор и имя
	IsActive            *bool    `json:"isActive,omitempty"`            // Доступ к сервису МойСклад
	Login               *string  `json:"login,omitempty"`               // Логин сотрудника для входа в МойСклад
	Role                *Role    `json:"role,omitempty"`                // Информация о роли Сотрудника
}

EmployeePermission Права Сотрудника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik-rabota-s-prawami-sotrudnika

func (EmployeePermission) String

func (e EmployeePermission) String() string

type EmployeePermissions

type EmployeePermissions struct {
	ApiRequest                      bool                       `json:"apiRequest"`                      // Доступ по АПИ
	DeleteFromRecycleBin            bool                       `json:"deleteFromRecycleBin"`            // Очищать корзину
	EditCurrencyRateOfDocument      bool                       `json:"editCurrencyRateOfDocument"`      // Редактировать курс валюты документа
	EditDocumentTemplates           bool                       `json:"editDocumentTemplates"`           // Редактировать шаблоны документов и отчетов
	EditDocumentsOfRestrictedPeriod bool                       `json:"editDocumentsOfRestrictedPeriod"` // Редактировать документы закрытого периода
	ExportData                      bool                       `json:"exportData"`                      // Экспортировать данные
	ImportData                      bool                       `json:"importData"`                      // Импортировать данные
	ListenCalls                     bool                       `json:"listenCalls"`                     // Прослушивание звонков
	OnlineShops                     bool                       `json:"onlineShops"`                     // Интернет магазины
	PurchaseControl                 bool                       `json:"purchaseControl"`                 // Управление закупками
	RestoreFromRecycleBin           bool                       `json:"restoreFromRecycleBin"`           // Восстанавливать документы
	SendEmail                       bool                       `json:"sendEmail"`                       // Отправлять почту
	SubscriptionControl             bool                       `json:"subscriptionControl"`             // Управление подпиской
	ViewAudit                       bool                       `json:"viewAudit"`                       // Просматривать аудит
	ViewCashFlow                    bool                       `json:"viewCashFlow"`                    // Просматривать движение денежных средств
	ViewCommissionGoods             bool                       `json:"viewCommissionGoods"`             // Просматривать товары на реализации
	ViewCompanyCRM                  bool                       `json:"viewCompanyCRM"`                  // Просматривать показатели
	ViewCustomerBalanceList         bool                       `json:"viewCustomerBalanceList"`         // Просматривать взаиморасчеты
	ViewDashboard                   bool                       `json:"viewDashboard"`                   // Просматривать показатели
	ViewMoneyDashboard              bool                       `json:"viewMoneyDashboard"`              // Видеть остатки денег
	ViewProductCostAndProfit        bool                       `json:"viewProductCostAndProfit"`        // Видеть себестоимость, цену закупки и прибыль товаров
	ViewProfitAndLoss               bool                       `json:"viewProfitAndLoss"`               // Просматривать прибыль и убытки
	ViewPurchaseFunnel              bool                       `json:"viewPurchaseFunnel"`              // Просматривать воронку продаж
	ViewRecycleBin                  bool                       `json:"viewRecycleBin"`                  // Просматривать корзину
	ViewSaleProfit                  bool                       `json:"viewSaleProfit"`                  // Просматривать прибыльность
	ViewSerialNumbers               bool                       `json:"viewSerialNumbers"`               // Просматривать серийные номера
	ViewStockReport                 bool                       `json:"viewStockReport"`                 // Просматривать остатки по товарам
	ViewTurnover                    bool                       `json:"viewTurnover"`                    // Просматривать обороты
	GTINList                        ViewCreateDeletePermission `json:"GTINList"`                        // Список GTIN
	AccountAdjustment               DictionaryPermission       `json:"accountAdjustment"`               // Корректировка остатков на счете
	BonusTransaction                OperationPermission        `json:"bonusTransaction"`                // Бонусные баллы
	CashIn                          OperationPermission        `json:"cashIn"`                          // Приходной ордер
	CashOut                         OperationPermission        `json:"cashOut"`                         // Расходной ордер
	CashBoxAdjustment               DictionaryPermission       `json:"cashboxAdjustment"`               // Корректировка остатков в кассе
	CommissionReportIn              OperationPermission        `json:"commissionReportIn"`              // Полученный отчет комиссионера
	CommissionReportOut             OperationPermission        `json:"commissionReportOut"`             // Выданный отчет комиссионер
	Company                         DictionaryPermission       `json:"company"`                         // Контрагенты
	Contract                        DictionaryPermission       `json:"contract"`                        // Договоры
	CounterpartyAdjustment          DictionaryPermission       `json:"counterpartyAdjustment"`          // Корректировка баланса контрагента
	Country                         BasePermission             `json:"country"`                         // Страны
	CRPTCancellation                DictionaryPermission       `json:"crptCancellation"`                // Списание кодов маркировки
	CRPTPackageCreation             DictionaryPermission       `json:"crptPackageCreation"`             // Формирование упаковки
	CRPTPackageDisaggregation       DictionaryPermission       `json:"crptPackageDisaggregation"`       // Расформирование упаковки
	CRPTPackageItemRemoval          DictionaryPermission       `json:"crptPackageItemRemoval"`          // Изъятие из упаковки
	Currency                        BasePermission             `json:"currency"`                        // Валюты
	CustomEntity                    BasePermission             `json:"customEntity"`                    // Элементы пользовательских справочников
	CustomerOrder                   OperationPermission        `json:"customerOrder"`                   // Заказ покупателям
	Demand                          OperationPermission        `json:"demand"`                          // Отгрузка
	EmissionOrder                   DictionaryPermission       `json:"emissionOrder"`                   // Заказ кодов маркировки
	UtilizationReport               DictionaryPermission       `json:"utilizationReport"`               // Отчет об использовании
	AtkAggregation                  DictionaryPermission       `json:"atkAggregation"`                  // Формирование АТК
	Employee                        BasePermission             `json:"employee"`                        // Сотрудники
	EnrollOrder                     DictionaryPermission       `json:"enrollOrder"`                     // Ввод в оборот кодов маркировки
	Enter                           OperationPermission        `json:"enter"`                           // Оприходование
	FactureIn                       OperationPermission        `json:"factureIn"`                       // Счета-фактуры полученные
	FactureOut                      OperationPermission        `json:"factureOut"`                      // Счета-фактуры выданные
	Good                            DictionaryPermission       `json:"good"`                            // Товары и Услуги
	InternalOrder                   OperationPermission        `json:"internalOrder"`                   // Внутренние заказы
	Inventory                       DictionaryPermission       `json:"inventory"`                       // Инвентаризация
	InvoiceIn                       OperationPermission        `json:"invoiceIn"`                       // Счет поставщика
	InvoiceOut                      OperationPermission        `json:"invoiceOut"`                      // Счет покупателю
	Loss                            OperationPermission        `json:"loss"`                            // Списание
	Move                            OperationPermission        `json:"move"`                            // Перемещение
	MyCompany                       BasePermission             `json:"myCompany"`                       // Юр. Лица
	PaymentIn                       OperationPermission        `json:"paymentIn"`                       // Входящий платеж
	PaymentOut                      OperationPermission        `json:"paymentOut"`                      // Исходящий платеж
	Prepayment                      OperationPermission        `json:"prepayment"`                      // Предоплаты
	PrepaymentReturn                OperationPermission        `json:"prepaymentReturn"`                // Возврат предоплаты
	PriceList                       OperationPermission        `json:"priceList"`                       // Прайс-лист
	Processing                      BasePermission             `json:"processing"`                      // Тех. операции
	ProcessingOrder                 OperationPermission        `json:"processingOrder"`                 // Заказ на производство
	ProcessingPlan                  BasePermission             `json:"processingPlan"`                  // Тех. Карты
	Project                         BasePermission             `json:"project"`                         // Проекты
	PurchaseOrder                   OperationPermission        `json:"purchaseOrder"`                   // Заказ поставщикам
	PurchaseReturn                  OperationPermission        `json:"purchaseReturn"`                  // Возврат поставщику
	RemainsOrder                    DictionaryPermission       `json:"remainsOrder"`                    // Описание остатков
	RemarkingOrder                  DictionaryPermission       `json:"remarkingOrder"`                  // Перемаркировка
	RetailDemand                    OperationPermission        `json:"retailDemand"`                    // Продажи
	RetailDrawerCashIn              OperationPermission        `json:"retailDrawerCashIn"`              // Внесения
	RetailDrawerCashOut             OperationPermission        `json:"retailDrawerCashOut"`             // Выплаты
	RetailSalesReturn               OperationPermission        `json:"retailSalesReturn"`               // Возвраты
	RetailShift                     DictionaryPermission       `json:"retailShift"`                     // Смены
	RetailStore                     BasePermission             `json:"retailStore"`                     // Точка продаж
	RetireOrder                     DictionaryPermission       `json:"retireOrder"`                     // Возврат в оборот
	SalesReturn                     OperationPermission        `json:"salesReturn"`                     // Возврат покупателя
	Supply                          OperationPermission        `json:"supply"`                          // Приемки
	TrackingCodeList                ViewPrintPermission        `json:"trackingCodeList"`                // Коды маркировки
	Uom                             BasePermission             `json:"uom"`                             // Единицы измерения
	Warehouse                       BasePermission             `json:"warehouse"`                       // Склады
	Script                          ScriptPermission           `json:"script"`
}

type EmployeeService

type EmployeeService struct {
	Endpoint
	// contains filtered or unexported fields
}

EmployeeService Сервис для работы с сотрудниками.

func NewEmployeeService

func NewEmployeeService(client *Client) *EmployeeService

func (*EmployeeService) Activate

Activate Активация Сотрудника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik-aktiwaciq-sotrudnika

func (*EmployeeService) Create

func (s *EmployeeService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*EmployeeService) CreateAttribute

func (s *EmployeeService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*EmployeeService) CreateAttributes

func (s *EmployeeService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*EmployeeService) CreateUpdateMany

func (s *EmployeeService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*EmployeeService) Deactivate

func (s *EmployeeService) Deactivate(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Deactivate Деактивация Сотрудника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik-deaktiwaciq-sotrudnika

func (*EmployeeService) Delete

func (s *EmployeeService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*EmployeeService) DeleteAttribute

func (s *EmployeeService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*EmployeeService) DeleteAttributes

func (s *EmployeeService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*EmployeeService) DeleteMany

func (s *EmployeeService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*EmployeeService) Get

func (s *EmployeeService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*EmployeeService) GetAttributeById

func (s *EmployeeService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*EmployeeService) GetAttributes

func (s *EmployeeService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*EmployeeService) GetById

func (s *EmployeeService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*EmployeeService) GetMetadata

func (s *EmployeeService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*EmployeeService) GetPermissions

func (s *EmployeeService) GetPermissions(ctx context.Context, id *uuid.UUID) (*EmployeePermission, *Response, error)

GetPermissions Запрос на получение информации о правах Сотрудника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik-poluchit-informaciu-o-prawah-sotrudnika

func (*EmployeeService) ResetPassword

func (s *EmployeeService) ResetPassword(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

ResetPassword Сброс пароля Сотрудника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik-sbros-parolq-sotrudnika

func (*EmployeeService) Update

func (s *EmployeeService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*EmployeeService) UpdateAttribute

func (s *EmployeeService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*EmployeeService) UpdatePermissions

func (s *EmployeeService) UpdatePermissions(ctx context.Context, id *uuid.UUID, permissions *EmployeePermission) (*EmployeePermission, *Response, error)

UpdatePermissions Запрос на изменение информации о правах Сотрудника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik-izmenit-informaciu-o-prawah-sotrudnika

type Endpoint

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

func NewEndpoint

func NewEndpoint(client *Client, uri string) Endpoint

type Enter

type Enter struct {
	AccountId    *uuid.UUID                `json:"accountId,omitempty"`    // ID учетной записи
	Applicable   *bool                     `json:"applicable,omitempty"`   // Отметка о проведении
	Attributes   *Attributes               `json:"attributes,omitempty"`   // Коллекция метаданных доп. полей. Поля объекта
	Code         *string                   `json:"code,omitempty"`         // Код Оприходования
	Created      *Timestamp                `json:"created,omitempty"`      // Дата создания
	Deleted      *Timestamp                `json:"deleted,omitempty"`      // Момент последнего удаления Оприходования
	Description  *string                   `json:"description,omitempty"`  // Комментарий Оприходования
	ExternalCode *string                   `json:"externalCode,omitempty"` // Внешний код Оприходования
	Files        *Files                    `json:"files,omitempty"`        // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group        *Group                    `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID                `json:"id,omitempty"`           // ID сущности
	Meta         *Meta                     `json:"meta,omitempty"`         // Метаданные
	Moment       *Timestamp                `json:"moment,omitempty"`       // Дата документа
	Name         *string                   `json:"name,omitempty"`         // Наименование
	Organization *Organization             `json:"organization,omitempty"` // Метаданные юрлица
	Overhead     *Overhead                 `json:"overhead,omitempty"`     // Накладные расходы. Если Позиции Оприходования не заданы, то накладные расходы нельзя задать
	Owner        *Employee                 `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Positions    *Positions[EnterPosition] `json:"positions,omitempty"`    // Метаданные позиций Оприходования
	Printed      *bool                     `json:"printed,omitempty"`      // Напечатан ли документ
	Project      *Project                  `json:"project,omitempty"`      // Метаданные проекта
	Published    *bool                     `json:"published,omitempty"`    // Опубликован ли документ
	Rate         *Rate                     `json:"rate,omitempty"`         // Валюта
	Shared       *bool                     `json:"shared,omitempty"`       // Общий доступ
	State        *State                    `json:"state,omitempty"`        // Метаданные статуса оприходования
	Store        *Store                    `json:"store,omitempty"`        // Метаданные склада
	Sum          *float64                  `json:"sum,omitempty"`          // Сумма
	SyncId       *uuid.UUID                `json:"syncId,omitempty"`       // ID синхронизации. После заполнения недоступен для изменения
	Updated      *Timestamp                `json:"updated,omitempty"`      // Момент последнего обновления
}

Enter Оприходование. Ключевое слово: enter Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-oprihodowanie

func (Enter) MetaType

func (e Enter) MetaType() MetaType

func (Enter) String

func (e Enter) String() string

type EnterPosition

type EnterPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Country    *Country            `json:"country,omitempty"`    // Метаданные страны
	GTD        *GTD                `json:"gtd,omitempty"`        // ГТД
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Overhead   *float64            `json:"overhead,omitempty"`   // Накладные расходы. Если Позиции Оприходования не заданы, то накладные расходы нельзя задать
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Reason     *string             `json:"reason,omitempty"`     // Причина оприходования данной позиции
	Slot       *Slot               `json:"slot,omitempty"`       // Ячейка на складе
	Things     *Things             `json:"things,omitempty"`     // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута.
}

EnterPosition Позиция оприходования Ключевое слово: enterposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-oprihodowanie-oprihodowaniq-pozicii-oprihodowaniq

func (EnterPosition) MetaType

func (e EnterPosition) MetaType() MetaType

func (EnterPosition) String

func (e EnterPosition) String() string

type EnterService

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

EnterService Сервис для работы с оприходованиями.

func NewEnterService

func NewEnterService(client *Client) *EnterService

func (*EnterService) Create

func (s *EnterService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*EnterService) CreateAttribute

func (s *EnterService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*EnterService) CreateAttributes

func (s *EnterService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*EnterService) CreateOrUpdatePositionTrackingCodes

func (s *EnterService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*EnterService) CreatePosition

func (s *EnterService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*EnterService) CreatePositions

func (s *EnterService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*EnterService) CreateUpdateMany

func (s *EnterService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*EnterService) Delete

func (s *EnterService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*EnterService) DeleteAttribute

func (s *EnterService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*EnterService) DeleteAttributes

func (s *EnterService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*EnterService) DeleteBySyncId

func (s *EnterService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*EnterService) DeleteMany

func (s *EnterService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*EnterService) DeletePosition

func (s *EnterService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*EnterService) DeletePositionTrackingCodes

func (s *EnterService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*EnterService) DeletePublication

func (s *EnterService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*EnterService) Get

func (s *EnterService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*EnterService) GetAttributeById

func (s *EnterService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*EnterService) GetAttributes

func (s *EnterService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*EnterService) GetById

func (s *EnterService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*EnterService) GetBySyncId

func (s *EnterService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*EnterService) GetMetadata

func (s *EnterService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*EnterService) GetNamedFilterById

func (s *EnterService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*EnterService) GetNamedFilters

func (s *EnterService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*EnterService) GetPositionById

func (s *EnterService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*EnterService) GetPositionTrackingCodes

func (s *EnterService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*EnterService) GetPositions

func (s *EnterService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*EnterService) GetPublicationById

func (s *EnterService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*EnterService) GetPublications

func (s *EnterService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*EnterService) Publish

func (s *EnterService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*EnterService) Remove

func (s *EnterService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*EnterService) Update

func (s *EnterService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*EnterService) UpdateAttribute

func (s *EnterService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*EnterService) UpdatePosition

func (s *EnterService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type EntityService

type EntityService struct {
	*Client
}

EntityService Сервис для работы с сущностями и документами.

func (*EntityService) Application

func (s *EntityService) Application() *ApplicationService

func (*EntityService) Assortment

func (s *EntityService) Assortment() *AssortmentService

func (*EntityService) BonusProgram

func (s *EntityService) BonusProgram() *BonusProgramService

func (*EntityService) BonusTransaction

func (s *EntityService) BonusTransaction() *BonusTransactionService

func (*EntityService) Bundle

func (s *EntityService) Bundle() *BundleService

func (*EntityService) CashIn

func (s *EntityService) CashIn() *CashInService

func (*EntityService) CashOut

func (s *EntityService) CashOut() *CashOutService

func (*EntityService) CommissionReportIn

func (s *EntityService) CommissionReportIn() *CommissionReportInService

func (*EntityService) CommissionReportOut

func (s *EntityService) CommissionReportOut() *CommissionReportOutService

func (*EntityService) Consignment

func (s *EntityService) Consignment() *ConsignmentService

func (*EntityService) Contract

func (s *EntityService) Contract() *ContractService

func (*EntityService) CounterPartyAdjustment

func (s *EntityService) CounterPartyAdjustment() *CounterPartyAdjustmentService

func (*EntityService) Counterparty

func (s *EntityService) Counterparty() *CounterpartyService

func (*EntityService) Country

func (s *EntityService) Country() *CountryService

func (*EntityService) Currency

func (s *EntityService) Currency() *CurrencyService

func (*EntityService) CustomEntity

func (s *EntityService) CustomEntity() *CustomEntityService

func (*EntityService) CustomerOrder

func (s *EntityService) CustomerOrder() *CustomerOrderService

func (*EntityService) Demand

func (s *EntityService) Demand() *DemandService

func (*EntityService) Discount

func (s *EntityService) Discount() *DiscountService

func (*EntityService) Employee

func (s *EntityService) Employee() *EmployeeService

func (*EntityService) Enter

func (s *EntityService) Enter() *EnterService

func (*EntityService) ExpenseItem

func (s *EntityService) ExpenseItem() *ExpenseItemService

func (*EntityService) FactureIn

func (s *EntityService) FactureIn() *FactureInService

func (*EntityService) FactureOut

func (s *EntityService) FactureOut() *FactureOutService

func (*EntityService) Group

func (s *EntityService) Group() *GroupService

func (*EntityService) InternalOrder

func (s *EntityService) InternalOrder() *InternalOrderService

func (*EntityService) Inventory

func (s *EntityService) Inventory() *InventoryService

func (*EntityService) InvoiceIn

func (s *EntityService) InvoiceIn() *InvoiceInService

func (*EntityService) InvoiceOut

func (s *EntityService) InvoiceOut() *InvoiceOutService

func (*EntityService) Loss

func (s *EntityService) Loss() *LossService

func (*EntityService) Metadata

func (s *EntityService) Metadata() *MetadataService

func (*EntityService) Move

func (s *EntityService) Move() *MoveService

func (*EntityService) Organization

func (s *EntityService) Organization() *OrganizationService

func (*EntityService) PaymentIn

func (s *EntityService) PaymentIn() *PaymentInService

func (*EntityService) PaymentOut

func (s *EntityService) PaymentOut() *PaymentOutService

func (*EntityService) Prepayment

func (s *EntityService) Prepayment() *PrepaymentService

func (*EntityService) PrepaymentReturn

func (s *EntityService) PrepaymentReturn() *PrepaymentReturnService

func (*EntityService) PriceList

func (s *EntityService) PriceList() *PriceListService

func (*EntityService) Processing

func (s *EntityService) Processing() *ProcessingService

func (*EntityService) ProcessingOrder

func (s *EntityService) ProcessingOrder() *ProcessingOrderService

func (*EntityService) ProcessingPlan

func (s *EntityService) ProcessingPlan() *ProcessingPlanService

func (*EntityService) ProcessingPlanFolder

func (s *EntityService) ProcessingPlanFolder() *ProcessingPlanFolderService

func (*EntityService) ProcessingProcess

func (s *EntityService) ProcessingProcess() *ProcessingProcessService

func (*EntityService) ProcessingStage

func (s *EntityService) ProcessingStage() *ProcessingStageService

func (*EntityService) Product

func (s *EntityService) Product() *ProductService

func (*EntityService) ProductFolder

func (s *EntityService) ProductFolder() *ProductFolderService

func (*EntityService) Project

func (s *EntityService) Project() *ProjectService

func (*EntityService) PurchaseOrder

func (s *EntityService) PurchaseOrder() *PurchaseOrderService

func (*EntityService) PurchaseReturn

func (s *EntityService) PurchaseReturn() *PurchaseReturnService

func (*EntityService) Region

func (s *EntityService) Region() *RegionService

func (*EntityService) RetailDemand

func (s *EntityService) RetailDemand() *RetailDemandService

func (*EntityService) RetailDrawerCashIn

func (s *EntityService) RetailDrawerCashIn() *RetailDrawerCashInService

func (*EntityService) RetailDrawerCashOut

func (s *EntityService) RetailDrawerCashOut() *RetailDrawerCashOutService

func (*EntityService) RetailSalesReturn

func (s *EntityService) RetailSalesReturn() *RetailSalesReturnService

func (*EntityService) RetailShift

func (s *EntityService) RetailShift() *RetailShiftService

func (*EntityService) RetailStore

func (s *EntityService) RetailStore() *RetailStoreService

func (*EntityService) Role

func (s *EntityService) Role() *RoleService

func (*EntityService) SalesChannel

func (s *EntityService) SalesChannel() *SalesChannelService

func (*EntityService) SalesReturn

func (s *EntityService) SalesReturn() *SalesReturnService

func (*EntityService) Service

func (s *EntityService) Service() *ServiceService

func (*EntityService) Store

func (s *EntityService) Store() *StoreService

func (*EntityService) Subscription

func (s *EntityService) Subscription() *SubscriptionService

func (*EntityService) Supply

func (s *EntityService) Supply() *SupplyService

func (*EntityService) Task

func (s *EntityService) Task() *TaskService

func (*EntityService) TaxRate

func (s *EntityService) TaxRate() *TaxRateService

func (*EntityService) Uom

func (s *EntityService) Uom() *UomService

func (*EntityService) Variant

func (s *EntityService) Variant() *VariantService

func (*EntityService) Webhook

func (s *EntityService) Webhook() *WebhookService

func (*EntityService) WebhookStock

func (s *EntityService) WebhookStock() *WebhookStockService

type Environment

type Environment struct {
	Device          string          `json:"device,omitempty"`          // Информация об устройстве
	OS              string          `json:"os,omitempty"`              // Информация об операционной системе
	Software        Software        `json:"software,omitempty"`        // Информация о ПО
	ChequePrinter   ChequePrinter   `json:"chequePrinter,omitempty"`   // Данные о ККТ
	PaymentTerminal PaymentTerminal `json:"paymentTerminal,omitempty"` // Информация о платежном терминале
}

Environment Информация об окружении. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-okruzhenie

func (Environment) String

func (e Environment) String() string

type ErrorHandler

type ErrorHandler func(resp *http.Response, err error, numTries int) (*http.Response, error)

ErrorHandler is called if retries are expired, containing the last status from the http library. If not specified, default behavior for the library is to close the body and return an error indicating how many tries were attempted. If overriding this, be sure to close the body if needed.

type Event

type Event struct {
	AccountId     string        `json:"accountId,omitempty"`     // ID учетной записи
	Action        WebhookAction `json:"action,omitempty"`        // Действие, которое вызвало срабатывание вебхука.
	Meta          Meta          `json:"meta,omitempty"`          // Метаданные измененной сущности
	UpdatedFields []string      `json:"updatedFields,omitempty"` // Поля сущности, измененные пользователем
}

Event Данные о событии, вызвавшем срабатывание вебхука

type ExpenseItem

type ExpenseItem struct {
	AccountId    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	Code         *string    `json:"code,omitempty"`         // Код Статьи расходов
	Description  *string    `json:"description,omitempty"`  // Описание Статьи расходов
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код Статьи расходов
	Id           *uuid.UUID `json:"id,omitempty"`           // ID Статьи расходов
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные о Статье расходов
	Name         *string    `json:"name,omitempty"`         // Наименование Статьи расходов
	Updated      *Timestamp `json:"updated,omitempty"`      // Момент последнего обновления сущности
}

ExpenseItem Статья расходов. Ключевое слово: expenseitem Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-stat-q-rashodow

func (ExpenseItem) MetaType

func (e ExpenseItem) MetaType() MetaType

func (ExpenseItem) String

func (e ExpenseItem) String() string

type ExpenseItemService

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

ExpenseItemService Сервис для работы со статьями расходов.

func NewExpenseItemService

func NewExpenseItemService(client *Client) *ExpenseItemService

func (*ExpenseItemService) Create

func (s *ExpenseItemService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ExpenseItemService) CreateUpdateMany

func (s *ExpenseItemService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ExpenseItemService) Delete

func (s *ExpenseItemService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ExpenseItemService) DeleteMany

func (s *ExpenseItemService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ExpenseItemService) Get

func (s *ExpenseItemService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ExpenseItemService) GetById

func (s *ExpenseItemService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ExpenseItemService) Remove

func (s *ExpenseItemService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*ExpenseItemService) Update

func (s *ExpenseItemService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type Extension

type Extension string
const (
	ExtensionXLS  Extension = "xls"
	ExtensionPDF  Extension = "pdf"
	ExtensionHTML Extension = "html"
	ExtensionODS  Extension = "ods"
)

type FactureIn

type FactureIn struct {
	AccountId      *uuid.UUID    `json:"accountId,omitempty"`      // ID учетной записи
	Agent          *Counterparty `json:"agent,omitempty"`          // Метаданные контрагента
	Applicable     *bool         `json:"applicable,omitempty"`     // Отметка о проведении
	Attributes     *Attributes   `json:"attributes,omitempty"`     // Коллекция метаданных доп. полей объекта
	Code           *string       `json:"code,omitempty"`           // Код выданного Счета-фактуры полученного
	Contract       *Contract     `json:"contract,omitempty"`       // Метаданные договора
	Created        *Timestamp    `json:"created,omitempty"`        // Дата создания
	Deleted        *Timestamp    `json:"deleted,omitempty"`        // Момент последнего удаления Счета-фактуры полученного
	Description    *string       `json:"description,omitempty"`    // Комментарий выданного Счета-фактуры полученного
	ExternalCode   *string       `json:"externalCode,omitempty"`   // Внешний код выданного Счета-фактуры полученного
	Files          *Files        `json:"files,omitempty"`          // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group          *Group        `json:"group,omitempty"`          // Отдел сотрудника
	Id             *uuid.UUID    `json:"id,omitempty"`             // ID сущности
	Meta           *Meta         `json:"meta,omitempty"`           // Метаданные
	Moment         *Timestamp    `json:"moment,omitempty"`         // Дата документа
	Name           *string       `json:"name,omitempty"`           // Наименование
	Organization   *Organization `json:"organization,omitempty"`   // Метаданные юрлица
	Owner          *Employee     `json:"owner,omitempty"`          // Владелец (Сотрудник)
	Printed        *bool         `json:"printed,omitempty"`        // Напечатан ли документ
	Published      *bool         `json:"published,omitempty"`      // Опубликован ли документ
	Rate           *Rate         `json:"rate,omitempty"`           // Валюта
	Shared         *bool         `json:"shared,omitempty"`         // Общий доступ
	State          *State        `json:"state,omitempty"`          // Метаданные статуса Счета-фактуры полученного
	Sum            *float64      `json:"sum,omitempty"`            // Сумма
	SyncId         *uuid.UUID    `json:"syncId,omitempty"`         // ID синхронизации. После заполнения недоступен для изменения
	Updated        *Timestamp    `json:"updated,omitempty"`        // Момент последнего обновления
	Supplies       *Supplies     `json:"supplies,omitempty"`       // Массив ссылок на связанные приемки в формате Метаданных
	Payments       *Payments     `json:"payments,omitempty"`       // Связанные исходящие платежи и расходные ордеры
	IncomingNumber *string       `json:"incomingNumber,omitempty"` // Входящий номер
	IncomingDate   *Timestamp    `json:"incomingDate,omitempty"`   // Входящая дата
}

FactureIn Счет-фактура полученный Ключевое слово: facturein Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-schet-faktura-poluchennyj

func (FactureIn) MetaType

func (f FactureIn) MetaType() MetaType

func (FactureIn) String

func (f FactureIn) String() string

type FactureInService

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

FactureInService Сервис для работы со счетами-фактурами полученными.

func NewFactureInService

func NewFactureInService(client *Client) *FactureInService

func (*FactureInService) Create

func (s *FactureInService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*FactureInService) CreateAttribute

func (s *FactureInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*FactureInService) CreateAttributes

func (s *FactureInService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*FactureInService) CreateUpdateMany

func (s *FactureInService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*FactureInService) Delete

func (s *FactureInService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*FactureInService) DeleteAttribute

func (s *FactureInService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*FactureInService) DeleteAttributes

func (s *FactureInService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*FactureInService) DeleteBySyncId

func (s *FactureInService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*FactureInService) DeleteMany

func (s *FactureInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*FactureInService) DeletePublication

func (s *FactureInService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*FactureInService) Get

func (s *FactureInService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*FactureInService) GetAttributeById

func (s *FactureInService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*FactureInService) GetAttributes

func (s *FactureInService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*FactureInService) GetById

func (s *FactureInService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*FactureInService) GetBySyncId

func (s *FactureInService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*FactureInService) GetMetadata

func (s *FactureInService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*FactureInService) GetPublicationById

func (s *FactureInService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*FactureInService) GetPublications

func (s *FactureInService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*FactureInService) Publish

func (s *FactureInService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*FactureInService) Remove

func (s *FactureInService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*FactureInService) Template

func (s *FactureInService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*FactureInService) Update

func (s *FactureInService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*FactureInService) UpdateAttribute

func (s *FactureInService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type FactureOut

type FactureOut struct {
	AccountId       *uuid.UUID       `json:"accountId,omitempty"`       // ID учетной записи
	Agent           *Counterparty    `json:"agent,omitempty"`           // Метаданные контрагента
	Applicable      *bool            `json:"applicable,omitempty"`      // Отметка о проведении
	Attributes      *Attributes      `json:"attributes,omitempty"`      // Коллекция метаданных доп. полей. Поля объекта
	Code            *string          `json:"code,omitempty"`            // Код выданного Счета-фактуры
	Contract        *Contract        `json:"contract,omitempty"`        // Метаданные договора
	Created         *Timestamp       `json:"created,omitempty"`         // Дата создания
	Deleted         *Timestamp       `json:"deleted,omitempty"`         // Момент последнего удаления Счета-фактуры
	Description     *string          `json:"description,omitempty"`     // Комментарий выданного Счета-фактуры
	ExternalCode    *string          `json:"externalCode,omitempty"`    // Внешний код выданного Счета-фактуры
	Files           *Files           `json:"files,omitempty"`           // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group           *Group           `json:"group,omitempty"`           // Отдел сотрудника
	Id              *uuid.UUID       `json:"id,omitempty"`              // ID сущности
	Meta            *Meta            `json:"meta,omitempty"`            // Метаданные
	Moment          *Timestamp       `json:"moment,omitempty"`          // Дата документа
	Name            *string          `json:"name,omitempty"`            // Наименование
	Organization    *Organization    `json:"organization,omitempty"`    // Метаданные юрлица
	Owner           *Employee        `json:"owner,omitempty"`           // Владелец (Сотрудник)
	Printed         *bool            `json:"printed,omitempty"`         // Напечатан ли документ
	Published       *bool            `json:"published,omitempty"`       // Опубликован ли документ
	Rate            *Rate            `json:"rate,omitempty"`            // Валюта
	Shared          *bool            `json:"shared,omitempty"`          // Общий доступ
	State           *State           `json:"state,omitempty"`           // Метаданные статуса Счета-фактуры
	StateContractId *string          `json:"stateContractId,omitempty"` // Идентификатор гос. контракта
	Sum             *float64         `json:"sum,omitempty"`             // Сумма
	SyncId          *uuid.UUID       `json:"syncId,omitempty"`          // ID синхронизации. После заполнения недоступен для изменения
	Updated         *Timestamp       `json:"updated,omitempty"`         // Момент последнего обновления
	Demands         Iterator[Demand] `json:"demands,omitempty"`         // Массив ссылок на связанные отгрузки в формате Метаданных
	Payments        *Payments        `json:"payments,omitempty"`        // Массив ссылок на связанные входящие платежи в формате Метаданных
	Returns         *PurchaseReturns `json:"returns,omitempty"`         // Массив ссылок на связанные возвраты поставщикам в формате Метаданных
	Consignee       *Counterparty    `json:"consignee,omitempty"`       // Грузополучатель
	PaymentNumber   *string          `json:"paymentNumber,omitempty"`   // Название платежного документа
	PaymentDate     *Timestamp       `json:"paymentDate,omitempty"`     // Дата платежного документа
}

FactureOut Счет-фактура выданный Ключевое слово: factureout Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-schet-faktura-wydannyj

func (FactureOut) MetaType

func (f FactureOut) MetaType() MetaType

func (FactureOut) String

func (f FactureOut) String() string

type FactureOutService

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

FactureOutService Сервис для работы со счетами-фактурами выданными.

func NewFactureOutService

func NewFactureOutService(client *Client) *FactureOutService

func (*FactureOutService) Create

func (s *FactureOutService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*FactureOutService) CreateAttribute

func (s *FactureOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*FactureOutService) CreateAttributes

func (s *FactureOutService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*FactureOutService) CreateUpdateMany

func (s *FactureOutService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*FactureOutService) Delete

func (s *FactureOutService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*FactureOutService) DeleteAttribute

func (s *FactureOutService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*FactureOutService) DeleteAttributes

func (s *FactureOutService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*FactureOutService) DeleteBySyncId

func (s *FactureOutService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*FactureOutService) DeleteMany

func (s *FactureOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*FactureOutService) DeletePublication

func (s *FactureOutService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*FactureOutService) Get

func (s *FactureOutService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*FactureOutService) GetAttributeById

func (s *FactureOutService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*FactureOutService) GetAttributes

func (s *FactureOutService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*FactureOutService) GetById

func (s *FactureOutService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*FactureOutService) GetBySyncId

func (s *FactureOutService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*FactureOutService) GetMetadata

func (s *FactureOutService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*FactureOutService) GetPublicationById

func (s *FactureOutService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*FactureOutService) GetPublications

func (s *FactureOutService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*FactureOutService) Publish

func (s *FactureOutService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*FactureOutService) Remove

func (s *FactureOutService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*FactureOutService) Update

func (s *FactureOutService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*FactureOutService) UpdateAttribute

func (s *FactureOutService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type File

type File struct {
	Created   *Timestamp `json:"created,omitempty"`   // Время загрузки Файла на сервер
	CreatedBy *Employee  `json:"createdBy,omitempty"` // Метаданные сотрудника, загрузившего Файл
	Content   *string    `json:"conten,omitemptyt"`   // Файл, закодированный в формате Base64.
	Filename  *string    `json:"filename,omitempty"`  // Имя Файла
	Meta      *Meta      `json:"meta,omitempty"`      // Метаданные объекта
	Miniature *Meta      `json:"miniature,omitempty"` // Метаданные миниатюры изображения (поле передается только для Файлов изображений)
	Size      *int       `json:"size,omitempty"`      // Размер Файла в байтах
	Tiny      *Meta      `json:"tiny,omitempty"`      // Метаданные уменьшенного изображения (поле передается только для Файлов изображений)
	Title     *string    `json:"title,omitempty"`     // Название Файла
}

File Файл. Ключевое слово: files Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-fajly

func NewFileFromFilepath

func NewFileFromFilepath(filePath string) (*File, error)

NewFileFromFilepath возвращает *File, на основе переданного пути до файла и ошибку, если файл не удалось найти

func (File) MetaType

func (f File) MetaType() MetaType

func (File) String

func (f File) String() string

type FileTypes

type FileTypes interface {
	File | Image
}

type Files

type Files Positions[File]

func (*Files) Iter

func (f *Files) Iter() *Iterator[File]

type FilterType

type FilterType string

FilterType Фильтрация выборки с помощью параметра filter. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-fil-traciq-wyborki-s-pomosch-u-parametra-filter

const (
	FilterEquals           FilterType = "="  // Фильтрация по значению
	FilterGreater          FilterType = ">"  // Больше
	FilterLesser           FilterType = "<"  // Меньше
	FilterGreaterOrEquals  FilterType = "=>" // Больше или равно
	FilterLesserOrEquals   FilterType = "<=" // Меньше или равно
	FilterNotEquals        FilterType = "!=" // Не равно
	FilterEquivalence      FilterType = "~"  // Подобие
	FilterEquivalenceLeft  FilterType = "~=" // Полное совпадение в начале значения
	FilterEquivalenceRight FilterType = "=~" // Полное совпадение в конце значения
	FilterNotEquivalence   FilterType = "!~" // Частичное совпадение не выводится
)

type FiscalMemory

type FiscalMemory struct {
	FiscalDataVersion  string    `json:"fiscalDataVersion,omitempty"`  // Версия фискальной памяти
	FiscalValidityDate Timestamp `json:"fiscalValidityDate,omitempty"` // Версия фискальной памяти
}

FiscalMemory Атрибуты сущности Фискальный накопитель. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-okruzhenie-attributy-suschnosti-fiskal-nyj-nakopitel

func (FiscalMemory) String

func (f FiscalMemory) String() string

type FiscalMemoryState

type FiscalMemoryState struct {
	Error                 FiscalMemoryStateError `json:"error,omitempty"`                 // Информация об ошибке ФН
	NotSendDocCount       int                    `json:"notSendDocCount,omitempty"`       // Количество неотправленных документов в ОФД
	NotSendFirstDocMoment Timestamp              `json:"notSendFirstDocMoment,omitempty"` // Дата последнего неотправленного документа (?)
}

FiscalMemoryState Информация о фискальном накопителе. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-attributy-suschnosti-status-attributy-suschnosti-fiskal-naq-pamqt

func (FiscalMemoryState) String

func (f FiscalMemoryState) String() string

type FiscalMemoryStateError

type FiscalMemoryStateError struct {
	Code    string `json:"code,omitempty"`    // Код ошибки ФН
	Message string `json:"message,omitempty"` // Описание ошибки
}

FiscalMemoryStateError Информация об ошибке ФН. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-attributy-suschnosti-status-attributy-suschnosti-oshibka

func (FiscalMemoryStateError) String

func (f FiscalMemoryStateError) String() string

type FiscalType

type FiscalType string

FiscalType Тип формирования чеков. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-tip-formirowaniq-chekow

const (
	FiscalTypeStandart FiscalType = "STANDARD" // Стандартное
	FiscalTypeMaster   FiscalType = "MASTER"   // Стандартное с обработкой облачных операций
	FiscalTypeCloud    FiscalType = "CLOUD"    // Облачное
)

type GTD

type GTD struct {
	Name *string `json:"name"` // Номер ГТД
}

GTD Грузовая таможенная декларация (ГТД). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-gruzowaq-tamozhennaq-deklaraciq-gtd

func (GTD) String

func (g GTD) String() string

type GoodTaxSystem

type GoodTaxSystem string

GoodTaxSystem Код системы налогообложения. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar-towary-atributy-suschnosti-kod-sistemy-nalogooblozheniq

const (
	GoodTaxSystemGeneralTaxSystem                 GoodTaxSystem = "GENERAL_TAX_SYSTEM"                   // ОСН
	GoodTaxSystemSimplifiedTaxSystemIncome        GoodTaxSystem = "SIMPLIFIED_TAX_SYSTEM_INCOME"         // УСН. Доход
	GoodTaxSystemSimplifiedTaxSystemIncomeOutcome GoodTaxSystem = "SIMPLIFIED_TAX_SYSTEM_INCOME_OUTCOME" // УСН. Доход-Расход
	GoodTaxSystemUnifiedAgriculturalTax           GoodTaxSystem = "UNIFIED_AGRICULTURAL_TAX"             // ЕСХН
	GoodTaxSystemPresumptiveTaxSystem             GoodTaxSystem = "PRESUMPTIVE_TAX_SYSTEM"               // ЕНВД
	GoodTaxSystemPatentBased                      GoodTaxSystem = "PATENT_BASED"                         // Патент
	GoodTaxSystemSameAsGroup                      GoodTaxSystem = "TAX_SYSTEM_SAME_AS_GROUP"             // Совпадает с группой
)

type Group

type Group struct {
	AccountId *uuid.UUID `json:"accountId,omitempty"` // ID учетной записи
	Id        *uuid.UUID `json:"id,omitempty"`        // ID Отдела
	Index     *int       `json:"index,omitempty"`     // Порядковый номер в списке отделов
	Meta      *Meta      `json:"meta,omitempty"`      // Метаданные Отдела
	Name      *string    `json:"name,omitempty"`      // Наименование Отдела
}

Group Отдел. Ключевое слово: group Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-otdel

func (Group) MetaType

func (g Group) MetaType() MetaType

func (Group) String

func (g Group) String() string

type GroupByType

type GroupByType string

GroupByType Тип группировки выдачи.

const (
	GroupByProduct     GroupByType = "product"     // Выдает только товары
	GroupByVariant     GroupByType = "variant"     // Выдает товары и модификации
	GroupByConsignment GroupByType = "consignment" // Выдает товары, модификации, серии
)

func (GroupByType) String

func (s GroupByType) String() string

type GroupService

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

GroupService Сервис для работы с отделами.

func NewGroupService

func NewGroupService(client *Client) *GroupService

func (*GroupService) Create

func (s *GroupService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*GroupService) Delete

func (s *GroupService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*GroupService) Get

func (s *GroupService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*GroupService) GetById

func (s *GroupService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*GroupService) Update

func (s *GroupService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type HasMeta

type HasMeta interface {
	MetaTyper
	GetMeta() *Meta
}

type Image

type Image struct {
	Content   *string    `json:"content,omitempty"`   // изображение, закодированное в Base64
	Filename  *string    `json:"filename,omitempty"`  // Имя файла
	Meta      *Meta      `json:"meta,omitempty"`      // Метаданные
	Miniature *Meta      `json:"miniature,omitempty"` // Метаданные миниатюры изображения
	Size      *int       `json:"size,omitempty"`      // Размер файла в байтах
	Tiny      *Meta      `json:"tiny,omitempty"`      // Метаданные уменьшенного изображения
	Title     *string    `json:"title,omitempty"`     // Название Изображения
	Updated   *Timestamp `json:"updated,omitempty"`   // Время загрузки файла на сервер
}

Image Изображение. Ключевое слово: image Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie

func NewImageFromFilepath

func NewImageFromFilepath(filePath string) (*Image, error)

NewImageFromFilepath возвращает *Image, на основе переданного пути до файла и ошибку, если файл не удалось найти

func (Image) MetaType

func (i Image) MetaType() MetaType

func (Image) String

func (i Image) String() string

type Images

type Images Positions[Image]

func (*Images) Iter

func (i *Images) Iter() *Iterator[Image]

type InternalOrder

type InternalOrder struct {
	AccountId             *uuid.UUID                        `json:"accountId,omitempty"`             // ID учетной записи
	Applicable            *bool                             `json:"applicable,omitempty"`            // Отметка о проведении
	Attributes            *Attributes                       `json:"attributes,omitempty"`            // Коллекция метаданных доп. полей. Поля объекта
	Code                  *string                           `json:"code,omitempty"`                  // Код
	Created               *Timestamp                        `json:"created,omitempty"`               // Дата создания
	Deleted               *Timestamp                        `json:"deleted,omitempty"`               // Момент последнего удаления
	DeliveryPlannedMoment *Timestamp                        `json:"deliveryPlannedMoment,omitempty"` // Планируемая дата приемки
	Description           *string                           `json:"description,omitempty"`           // Комментарий
	ExternalCode          *string                           `json:"externalCode,omitempty"`          // Внешний код
	Files                 *Files                            `json:"files,omitempty"`                 // Метаданные массива Файлов
	Group                 *Group                            `json:"group,omitempty"`                 // Отдел сотрудника
	Id                    *uuid.UUID                        `json:"id,omitempty"`                    // ID сущности
	Meta                  *Meta                             `json:"meta,omitempty"`                  // Метаданные
	Moment                *Timestamp                        `json:"moment,omitempty"`                // Дата документа
	Moves                 Iterator[Move]                    `json:"moves,omitempty"`                 // Коллекция метаданных на связанные заказы перемещения
	Name                  *string                           `json:"name,omitempty"`                  // Наименование
	Organization          *Organization                     `json:"organization,omitempty"`          // Метаданные юрлица
	Owner                 *Employee                         `json:"owner,omitempty"`                 // Владелец (Сотрудник)
	Positions             *Positions[InternalOrderPosition] `json:"positions,omitempty"`             // Метаданные позиций Внутреннего заказа
	Printed               *bool                             `json:"printed,omitempty"`               // Напечатан ли документ
	Project               *Project                          `json:"project,omitempty"`               // Метаданные проекта
	Published             *bool                             `json:"published,omitempty"`             // Опубликован ли документ
	PurchaseOrders        *PurchaseOrders                   `json:"purchaseOrders,omitempty"`        // Коллекция метаданных на связанные заказы поставщику
	Rate                  *Rate                             `json:"rate,omitempty"`                  // Валюта
	Shared                *bool                             `json:"shared,omitempty"`                // Общий доступ
	State                 *State                            `json:"state,omitempty"`                 // Метаданные статуса
	Store                 *Store                            `json:"store,omitempty"`                 // Метаданные склада
	Sum                   *float64                          `json:"sum,omitempty"`                   // Сумма
	SyncId                *uuid.UUID                        `json:"syncId,omitempty"`                // ID синхронизации. После заполнения недоступен для изменения
	Updated               *Timestamp                        `json:"updated,omitempty"`               // Момент последнего обновления
	VatEnabled            *bool                             `json:"vatEnabled,omitempty"`            // Учитывается ли НДС
	VatIncluded           *bool                             `json:"vatIncluded,omitempty"`           // Включен ли НДС в цену
	VatSum                *float64                          `json:"vatSum,omitempty"`                // Сумма включая НДС
}

InternalOrder Внутренний заказ. Ключевое слово: internalorder Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vnutrennij-zakaz

func (InternalOrder) MetaType

func (i InternalOrder) MetaType() MetaType

func (InternalOrder) String

func (i InternalOrder) String() string

type InternalOrderPosition

type InternalOrderPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
}

InternalOrderPosition Позиция Внутреннего заказа. Ключевое слово: internalorderposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vnutrennij-zakaz-vnutrennie-zakazy-pozicii-vnutrennego-zakaza

func (InternalOrderPosition) MetaType

func (i InternalOrderPosition) MetaType() MetaType

func (InternalOrderPosition) String

func (i InternalOrderPosition) String() string

type InternalOrderService

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

InternalOrderService Сервис для работы с внутренними заказами.

func NewInternalOrderService

func NewInternalOrderService(client *Client) *InternalOrderService

func (*InternalOrderService) Create

func (s *InternalOrderService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*InternalOrderService) CreateAttribute

func (s *InternalOrderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*InternalOrderService) CreateAttributes

func (s *InternalOrderService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*InternalOrderService) CreateOrUpdatePositionTrackingCodes

func (s *InternalOrderService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*InternalOrderService) CreatePosition

func (s *InternalOrderService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*InternalOrderService) CreatePositions

func (s *InternalOrderService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*InternalOrderService) CreateUpdateMany

func (s *InternalOrderService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*InternalOrderService) Delete

func (s *InternalOrderService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*InternalOrderService) DeleteAttribute

func (s *InternalOrderService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*InternalOrderService) DeleteAttributes

func (s *InternalOrderService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*InternalOrderService) DeleteBySyncId

func (s *InternalOrderService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*InternalOrderService) DeleteMany

func (s *InternalOrderService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*InternalOrderService) DeletePosition

func (s *InternalOrderService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*InternalOrderService) DeletePositionTrackingCodes

func (s *InternalOrderService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*InternalOrderService) DeletePublication

func (s *InternalOrderService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*InternalOrderService) Get

func (s *InternalOrderService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*InternalOrderService) GetAttributeById

func (s *InternalOrderService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*InternalOrderService) GetAttributes

func (s *InternalOrderService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*InternalOrderService) GetById

func (s *InternalOrderService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*InternalOrderService) GetBySyncId

func (s *InternalOrderService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*InternalOrderService) GetMetadata

func (s *InternalOrderService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*InternalOrderService) GetPositionById

func (s *InternalOrderService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*InternalOrderService) GetPositionTrackingCodes

func (s *InternalOrderService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*InternalOrderService) GetPositions

func (s *InternalOrderService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*InternalOrderService) GetPublicationById

func (s *InternalOrderService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*InternalOrderService) GetPublications

func (s *InternalOrderService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*InternalOrderService) Publish

func (s *InternalOrderService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*InternalOrderService) Remove

func (s *InternalOrderService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*InternalOrderService) Template

func (s *InternalOrderService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*InternalOrderService) Update

func (s *InternalOrderService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*InternalOrderService) UpdateAttribute

func (s *InternalOrderService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*InternalOrderService) UpdatePosition

func (s *InternalOrderService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type Interval

type Interval string
const (
	IntervalHour  Interval = "hour"
	IntervalDay   Interval = "day"
	IntervalMonth Interval = "month"
)

func (Interval) String

func (i Interval) String() string

type Inventory

type Inventory struct {
	AccountId    *uuid.UUID                    `json:"accountId,omitempty"`    // ID учетной записи
	Attributes   *Attributes                   `json:"attributes,omitempty"`   // Коллекция метаданных доп. полей. Поля объекта
	Code         *string                       `json:"code,omitempty"`         // Код выданного
	Created      *Timestamp                    `json:"created,omitempty"`      // Дата создания
	Deleted      *Timestamp                    `json:"deleted,omitempty"`      // Момент последнего удаления Счета-фактуры полученного
	Description  *string                       `json:"description,omitempty"`  // Комментарий выданного Счета-фактуры полученного
	ExternalCode *string                       `json:"externalCode,omitempty"` // Внешний код выданного Счета-фактуры полученного
	Files        *Files                        `json:"files,omitempty"`        // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group        *Group                        `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID                    `json:"id,omitempty"`           // ID сущности
	Meta         *Meta                         `json:"meta,omitempty"`         // Метаданные
	Moment       *Timestamp                    `json:"moment,omitempty"`       // Дата документа
	Name         *string                       `json:"name,omitempty"`         // Наименование
	Organization *Organization                 `json:"organization,omitempty"` // Метаданные юрлица
	Owner        *Employee                     `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Positions    *Positions[InventoryPosition] `json:"positions,omitempty"`    // Метаданные позиций Инвентаризации
	Printed      *bool                         `json:"printed,omitempty"`      // Напечатан ли документ
	Published    *bool                         `json:"published,omitempty"`    // Опубликован ли документ
	Shared       *bool                         `json:"shared,omitempty"`       // Общий доступ
	State        *State                        `json:"state,omitempty"`        // Метаданные статуса
	Store        *Store                        `json:"store,omitempty"`        // Метаданные склада
	Sum          *float64                      `json:"sum,omitempty"`          // Сумма
	SyncId       *uuid.UUID                    `json:"syncId,omitempty"`       // ID синхронизации. После заполнения недоступен для изменения
	Updated      *Timestamp                    `json:"updated,omitempty"`      // Момент последнего обновления
}

Inventory Инвентаризация. Ключевое слово: inventory Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-inwentarizaciq

func (Inventory) MetaType

func (i Inventory) MetaType() MetaType

func (Inventory) String

func (i Inventory) String() string

type InventoryPosition

type InventoryPosition struct {
	AccountId          *uuid.UUID          `json:"accountId,omitempty"`          // ID учетной записи
	Assortment         *AssortmentPosition `json:"assortment,omitempty"`         // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	CalculatedQuantity *float64            `json:"calculatedQuantity,omitempty"` // расчетный остаток
	CorrectionAmount   *float64            `json:"correctionAmount,omitempty"`   // разница между расчетным остатком и фактическимх
	CorrectionSum      *float64            `json:"correctionSum,omitempty"`      // избыток/недостача
	Id                 *uuid.UUID          `json:"id,omitempty"`                 // ID сущности
	Pack               *Pack               `json:"pack,omitempty"`               // Упаковка Товара
	Price              *float64            `json:"price,omitempty"`              // Цена товара/услуги в копейках
	Quantity           *float64            `json:"quantity,omitempty"`           // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
}

InventoryPosition Позиция Инвентаризации. Ключевое слово: inventoryposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-inwentarizaciq-inwentarizaciq-pozicii-inwentarizacii

func (InventoryPosition) MetaType

func (i InventoryPosition) MetaType() MetaType

func (InventoryPosition) String

func (i InventoryPosition) String() string

type InventoryService

type InventoryService struct {
	Endpoint
	// contains filtered or unexported fields
}

InventoryService Сервис для работы с инвентаризациями.

func NewInventoryService

func NewInventoryService(client *Client) *InventoryService

func (*InventoryService) Create

func (s *InventoryService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*InventoryService) CreateAttribute

func (s *InventoryService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*InventoryService) CreateAttributes

func (s *InventoryService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*InventoryService) CreateOrUpdatePositionTrackingCodes

func (s *InventoryService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*InventoryService) CreatePosition

func (s *InventoryService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*InventoryService) CreatePositions

func (s *InventoryService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*InventoryService) CreateUpdateMany

func (s *InventoryService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*InventoryService) Delete

func (s *InventoryService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*InventoryService) DeleteAttribute

func (s *InventoryService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*InventoryService) DeleteAttributes

func (s *InventoryService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*InventoryService) DeleteBySyncId

func (s *InventoryService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*InventoryService) DeleteMany

func (s *InventoryService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*InventoryService) DeletePosition

func (s *InventoryService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*InventoryService) DeletePositionTrackingCodes

func (s *InventoryService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*InventoryService) Get

func (s *InventoryService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*InventoryService) GetAttributeById

func (s *InventoryService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*InventoryService) GetAttributes

func (s *InventoryService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*InventoryService) GetById

func (s *InventoryService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*InventoryService) GetBySyncId

func (s *InventoryService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*InventoryService) GetMetadata

func (s *InventoryService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*InventoryService) GetPositionById

func (s *InventoryService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*InventoryService) GetPositionTrackingCodes

func (s *InventoryService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*InventoryService) GetPositions

func (s *InventoryService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*InventoryService) Recalculate

func (s *InventoryService) Recalculate(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Recalculate Запрос на пересчёт расчётных остатков у позиций инвентаризации. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-pereschet-raschetnogo-ostatka-w-inwentarizacii

func (*InventoryService) Remove

func (s *InventoryService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*InventoryService) Template

func (s *InventoryService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*InventoryService) Update

func (s *InventoryService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*InventoryService) UpdateAttribute

func (s *InventoryService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*InventoryService) UpdatePosition

func (s *InventoryService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type InvoiceIn

type InvoiceIn struct {
	AccountId            *uuid.UUID                  `json:"accountId,omitempty"`            // ID учетной записи
	Agent                *Counterparty               `json:"agent,omitempty"`                // Метаданные контрагента
	AgentAccount         *AgentAccount               `json:"agentAccount,omitempty"`         // Метаданные счета контрагента
	Applicable           *bool                       `json:"applicable,omitempty"`           // Отметка о проведении
	Attributes           *Attributes                 `json:"attributes,omitempty"`           // Коллекция метаданных доп. полей
	Code                 *string                     `json:"code,omitempty"`                 // Код
	Contract             *Contract                   `json:"contract,omitempty"`             // Метаданные договора
	Created              *Timestamp                  `json:"created,omitempty"`              // Дата создания
	Deleted              *Timestamp                  `json:"deleted,omitempty"`              // Момент последнего удаления
	Description          *string                     `json:"description,omitempty"`          // Комментарий
	ExternalCode         *string                     `json:"externalCode,omitempty"`         // Внешний код
	Files                *Files                      `json:"files,omitempty"`                // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group                *Group                      `json:"group,omitempty"`                // Отдел сотрудника
	Id                   *uuid.UUID                  `json:"id,omitempty"`                   // ID сущности
	IncomingDate         *Timestamp                  `json:"incomingDate,omitempty"`         // Входящая дата
	IncomingNumber       *string                     `json:"incomingNumber,omitempty"`       // Входящий номер
	Meta                 *Meta                       `json:"meta,omitempty"`                 // Метаданные
	Moment               *Timestamp                  `json:"moment,omitempty"`               // Дата документа
	Name                 *string                     `json:"name,omitempty"`                 // Наименование
	Organization         *Organization               `json:"organization,omitempty"`         // Метаданные юрлица
	OrganizationAccount  *AgentAccount               `json:"organizationAccount,omitempty"`  // Метаданные счета юрлица
	Owner                *Employee                   `json:"owner,omitempty"`                // Владелец (Сотрудник)
	PayedSum             *float64                    `json:"payedSum,omitempty"`             // Сумма входящих платежей по Счету
	PaymentPlannedMoment *Timestamp                  `json:"paymentPlannedMoment,omitempty"` // Планируемая дата оплаты
	Positions            *Positions[InvoicePosition] `json:"positions,omitempty"`            // Метаданные позиций
	Printed              *bool                       `json:"printed,omitempty"`              // Напечатан ли документ
	Project              *Project                    `json:"project,omitempty"`              // Проект
	Published            *bool                       `json:"published,omitempty"`            // Опубликован ли документ
	Rate                 *Rate                       `json:"rate,omitempty"`                 // Валюта
	Shared               *bool                       `json:"shared,omitempty"`               // Общий доступ
	ShippedSum           *float64                    `json:"shippedSum,omitempty"`           // Сумма отгруженного
	State                *State                      `json:"state,omitempty"`                // Метаданные статуса
	Store                *Store                      `json:"store,omitempty"`                // Метаданные склада
	Sum                  *float64                    `json:"sum,omitempty"`                  // Сумма
	SyncId               *uuid.UUID                  `json:"syncId,omitempty"`               // ID синхронизации. После заполнения недоступен для изменения
	Updated              *Timestamp                  `json:"updated,omitempty"`              // Момент последнего обновления
	VatEnabled           *bool                       `json:"vatEnabled,omitempty"`           // Учитывается ли НДС
	VatIncluded          *bool                       `json:"vatIncluded,omitempty"`          // Включен ли НДС в цену
	VatSum               *float64                    `json:"vatSum,omitempty"`               // Сумма включая НДС
	Payments             *Payments                   `json:"payments,omitempty"`             // Массив ссылок на связанные операции в формате Метаданных
	PurchaseOrder        *PurchaseOrder              `json:"purchaseOrder,omitempty"`        // Ссылка на связанный заказ поставщику в формате Метаданных
	Supplies             Iterator[Supply]            `json:"supplies,omitempty"`             // Ссылки на связанные приемки в формате Метаданных
}

InvoiceIn Счет поставщика. Ключевое слово: invoicein Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-schet-postawschika

func (InvoiceIn) GetMeta

func (i InvoiceIn) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (InvoiceIn) MetaType

func (i InvoiceIn) MetaType() MetaType

func (InvoiceIn) String

func (i InvoiceIn) String() string

type InvoiceInPosition

type InvoiceInPosition struct {
	InvoicePosition
}

InvoiceInPosition Позиция Счета поставщика. Ключевое слово: invoiceposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-schet-postawschika-scheta-postawschikow-pozicii-scheta-postawschika

func (InvoiceInPosition) MetaType

func (i InvoiceInPosition) MetaType() MetaType

func (InvoiceInPosition) String

func (i InvoiceInPosition) String() string

type InvoiceInService

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

InvoiceInService Сервис для работы со счетами поставщиков.

func NewInvoiceInService

func NewInvoiceInService(client *Client) *InvoiceInService

func (*InvoiceInService) Create

func (s *InvoiceInService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*InvoiceInService) CreateAttribute

func (s *InvoiceInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*InvoiceInService) CreateAttributes

func (s *InvoiceInService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*InvoiceInService) CreateOrUpdatePositionTrackingCodes

func (s *InvoiceInService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*InvoiceInService) CreatePosition

func (s *InvoiceInService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*InvoiceInService) CreatePositions

func (s *InvoiceInService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*InvoiceInService) CreateUpdateMany

func (s *InvoiceInService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*InvoiceInService) Delete

func (s *InvoiceInService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*InvoiceInService) DeleteAttribute

func (s *InvoiceInService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*InvoiceInService) DeleteAttributes

func (s *InvoiceInService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*InvoiceInService) DeleteBySyncId

func (s *InvoiceInService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*InvoiceInService) DeleteMany

func (s *InvoiceInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*InvoiceInService) DeletePosition

func (s *InvoiceInService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*InvoiceInService) DeletePositionTrackingCodes

func (s *InvoiceInService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*InvoiceInService) DeletePublication

func (s *InvoiceInService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*InvoiceInService) Get

func (s *InvoiceInService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*InvoiceInService) GetAttributeById

func (s *InvoiceInService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*InvoiceInService) GetAttributes

func (s *InvoiceInService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*InvoiceInService) GetById

func (s *InvoiceInService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*InvoiceInService) GetBySyncId

func (s *InvoiceInService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*InvoiceInService) GetMetadata

func (s *InvoiceInService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*InvoiceInService) GetPositionById

func (s *InvoiceInService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*InvoiceInService) GetPositionTrackingCodes

func (s *InvoiceInService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*InvoiceInService) GetPositions

func (s *InvoiceInService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*InvoiceInService) GetPublicationById

func (s *InvoiceInService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*InvoiceInService) GetPublications

func (s *InvoiceInService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*InvoiceInService) Publish

func (s *InvoiceInService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*InvoiceInService) Remove

func (s *InvoiceInService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*InvoiceInService) Template

func (s *InvoiceInService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*InvoiceInService) Update

func (s *InvoiceInService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*InvoiceInService) UpdateAttribute

func (s *InvoiceInService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*InvoiceInService) UpdatePosition

func (s *InvoiceInService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type InvoiceOut

type InvoiceOut struct {
	AccountId            *uuid.UUID                  `json:"accountId,omitempty"`            // ID учетной записи
	Agent                *Counterparty               `json:"agent,omitempty"`                // Метаданные контрагента
	AgentAccount         *AgentAccount               `json:"agentAccount,omitempty"`         // Метаданные счета контрагента
	Applicable           *bool                       `json:"applicable,omitempty"`           // Отметка о проведении
	Attributes           *Attributes                 `json:"attributes,omitempty"`           // Коллекция метаданных доп. полей
	Code                 *string                     `json:"code,omitempty"`                 // Код
	Contract             *Contract                   `json:"contract,omitempty"`             // Метаданные договора
	Created              *Timestamp                  `json:"created,omitempty"`              // Дата создания
	Deleted              *Timestamp                  `json:"deleted,omitempty"`              // Момент последнего удаления
	Description          *string                     `json:"description,omitempty"`          // Комментарий
	ExternalCode         *string                     `json:"externalCode,omitempty"`         // Внешний код
	Files                *Files                      `json:"files,omitempty"`                // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group                *Group                      `json:"group,omitempty"`                // Отдел сотрудника
	Id                   *uuid.UUID                  `json:"id,omitempty"`                   // ID сущности
	Meta                 *Meta                       `json:"meta,omitempty"`                 // Метаданные
	Moment               *Timestamp                  `json:"moment,omitempty"`               // Дата документа
	Name                 *string                     `json:"name,omitempty"`                 // Наименование
	Organization         *Organization               `json:"organization,omitempty"`         // Метаданные юрлица
	OrganizationAccount  *AgentAccount               `json:"organizationAccount,omitempty"`  // Метаданные счета юрлица
	Owner                *Employee                   `json:"owner,omitempty"`                // Владелец (Сотрудник)
	PayedSum             *float64                    `json:"payedSum,omitempty"`             // Сумма входящих платежей по Счету
	PaymentPlannedMoment *Timestamp                  `json:"paymentPlannedMoment,omitempty"` // Планируемая дата оплаты
	Positions            *Positions[InvoicePosition] `json:"positions,omitempty"`            // Метаданные позиций
	Printed              *bool                       `json:"printed,omitempty"`              // Напечатан ли документ
	Project              *Project                    `json:"project,omitempty"`              // Проект
	Published            *bool                       `json:"published,omitempty"`            // Опубликован ли документ
	Rate                 *Rate                       `json:"rate,omitempty"`                 // Валюта
	Shared               *bool                       `json:"shared,omitempty"`               // Общий доступ
	ShippedSum           *float64                    `json:"shippedSum,omitempty"`           // Сумма отгруженного
	State                *State                      `json:"state,omitempty"`                // Метаданные статуса
	Store                *Store                      `json:"store,omitempty"`                // Метаданные склада
	Sum                  *float64                    `json:"sum,omitempty"`                  // Сумма
	SyncId               *uuid.UUID                  `json:"syncId,omitempty"`               // ID синхронизации. После заполнения недоступен для изменения
	Updated              *Timestamp                  `json:"updated,omitempty"`              // Момент последнего обновления
	VatEnabled           *bool                       `json:"vatEnabled,omitempty"`           // Учитывается ли НДС
	VatIncluded          *bool                       `json:"vatIncluded,omitempty"`          // Включен ли НДС в цену
	VatSum               *float64                    `json:"vatSum,omitempty"`               // Сумма включая НДС
	CustomerOrder        *CustomerOrder              `json:"customerOrder,omitempty"`        // Ссылка на Заказ Покупателя, с которым связан этот Счет покупателю в формате Метаданных
	Payments             *Payments                   `json:"payments,omitempty"`             // Массив ссылок на связанные операции в формате Метаданных
	Demands              Iterator[Demand]            `json:"demands,omitempty"`              // Массив ссылок на связанные отгрузки в формате Метаданных
}

InvoiceOut Счет покупателю. Ключевое слово: invoiceout Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-schet-pokupatelu

func (InvoiceOut) ConvertToOperation

func (i InvoiceOut) ConvertToOperation(linkedSum *float64) (*OperationIn, error)

ConvertToOperation удовлетворяет интерфейсу OperationInType

func (InvoiceOut) GetMeta

func (i InvoiceOut) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (InvoiceOut) MetaType

func (i InvoiceOut) MetaType() MetaType

func (InvoiceOut) String

func (i InvoiceOut) String() string

type InvoiceOutPosition

type InvoiceOutPosition struct {
	InvoicePosition
}

InvoiceOutPosition Позиция Счета покупателю. Ключевое слово: invoiceposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-schet-pokupatelu-scheta-pokupatelqm-pozicii-scheta-pokupatelu

func (InvoiceOutPosition) MetaType

func (i InvoiceOutPosition) MetaType() MetaType

func (InvoiceOutPosition) String

func (i InvoiceOutPosition) String() string

type InvoiceOutService

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

InvoiceOutService Сервис для работы со счетами покупателей.

func NewInvoiceOutService

func NewInvoiceOutService(client *Client) *InvoiceOutService

func (*InvoiceOutService) Create

func (s *InvoiceOutService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*InvoiceOutService) CreateAttribute

func (s *InvoiceOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*InvoiceOutService) CreateAttributes

func (s *InvoiceOutService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*InvoiceOutService) CreateOrUpdatePositionTrackingCodes

func (s *InvoiceOutService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*InvoiceOutService) CreatePosition

func (s *InvoiceOutService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*InvoiceOutService) CreatePositions

func (s *InvoiceOutService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*InvoiceOutService) CreateUpdateMany

func (s *InvoiceOutService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*InvoiceOutService) Delete

func (s *InvoiceOutService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*InvoiceOutService) DeleteAttribute

func (s *InvoiceOutService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*InvoiceOutService) DeleteAttributes

func (s *InvoiceOutService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*InvoiceOutService) DeleteBySyncId

func (s *InvoiceOutService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*InvoiceOutService) DeleteMany

func (s *InvoiceOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*InvoiceOutService) DeletePosition

func (s *InvoiceOutService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*InvoiceOutService) DeletePositionTrackingCodes

func (s *InvoiceOutService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*InvoiceOutService) DeletePublication

func (s *InvoiceOutService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*InvoiceOutService) Get

func (s *InvoiceOutService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*InvoiceOutService) GetAttributeById

func (s *InvoiceOutService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*InvoiceOutService) GetAttributes

func (s *InvoiceOutService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*InvoiceOutService) GetById

func (s *InvoiceOutService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*InvoiceOutService) GetBySyncId

func (s *InvoiceOutService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*InvoiceOutService) GetMetadata

func (s *InvoiceOutService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*InvoiceOutService) GetPositionById

func (s *InvoiceOutService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*InvoiceOutService) GetPositionTrackingCodes

func (s *InvoiceOutService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*InvoiceOutService) GetPositions

func (s *InvoiceOutService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*InvoiceOutService) GetPublicationById

func (s *InvoiceOutService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*InvoiceOutService) GetPublications

func (s *InvoiceOutService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*InvoiceOutService) Publish

func (s *InvoiceOutService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*InvoiceOutService) Remove

func (s *InvoiceOutService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*InvoiceOutService) Template

func (s *InvoiceOutService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*InvoiceOutService) Update

func (s *InvoiceOutService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*InvoiceOutService) UpdateAttribute

func (s *InvoiceOutService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*InvoiceOutService) UpdatePosition

func (s *InvoiceOutService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type InvoicePosition

type InvoicePosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Discount   *float64            `json:"discount,omitempty"`   // Процент скидки или наценки. Наценка указывается отрицательным числом, т.е. -10 создаст наценку в 10%
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID сущности
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Meta       *Meta               `json:"meta,omitempty"`       // Метаданные
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Stock      *Stock              `json:"stock,omitempty"`      // Остатки и себестоимость `?fields=stock&expand=positions`
}

InvoicePosition общие поля для счетов.

func (InvoicePosition) String

func (i InvoicePosition) String() string

type InvoicesIn

type InvoicesIn = Iterator[InvoiceIn]

type InvoicesOut

type InvoicesOut = Iterator[InvoiceOut]

type Iterator

type Iterator[E any] struct {
	// contains filtered or unexported fields
}

Iterator структура итератора

func (Iterator[E]) HasNext

func (r Iterator[E]) HasNext() bool

HasNext возвращает true, если текущее значение счётчика меньше длины среза

func (Iterator[E]) Len

func (r Iterator[E]) Len() int

Len возвращает количество элементов

func (Iterator[E]) MarshalJSON

func (r Iterator[E]) MarshalJSON() ([]byte, error)

func (*Iterator[E]) Next

func (r *Iterator[E]) Next() *E

Next возвращает следующий элемент среза или nil, если элемент отсутствует

func (*Iterator[E]) Push

func (r *Iterator[E]) Push(elements ...E) error

Push добавляет элементы в срез

func (*Iterator[E]) PushPtr

func (r *Iterator[E]) PushPtr(elements ...*E) error

PushPtr добавляет элементы в срез

func (*Iterator[E]) Slice

func (r *Iterator[E]) Slice() Slice[E]

Slice возвращает срез элементов

func (*Iterator[E]) Stop

func (r *Iterator[E]) Stop()

Stop сбрасывает текущее значение индекса

func (*Iterator[E]) UnmarshalJSON

func (r *Iterator[E]) UnmarshalJSON(data []byte) error

type LastOperation

type LastOperation struct {
	Entity MetaType `json:"entity,omitempty"` // Ключевое слово, обозначающее тип последней операции
	Name   string   `json:"name,omitempty"`   // Наименование (номер) последней операции
}

LastOperation Последняя операция. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-poslednie-operacii

func (LastOperation) String

func (l LastOperation) String() string

type LastOperations

type LastOperations = Iterator[LastOperation]

type LenReader

type LenReader interface {
	Len() int
}

LenReader is an interface implemented by many in-memory io.Reader's. Used for automatically sending the right Content-Length header when possible.

type LeveledLogger

type LeveledLogger interface {
	Error(msg string, keysAndValues ...any)
	Info(msg string, keysAndValues ...any)
	Debug(msg string, keysAndValues ...any)
	Warn(msg string, keysAndValues ...any)
}

LeveledLogger is an interface that can be implemented by any logger or a logger wrapper to provide leveled logging. The methods accept a message string and a variadic number of key-value pairs. For log.Printf style formatting where message string contains a format specifier, use Logger interface.

type Levels

type Levels = Iterator[AccumulationLevel]

type List

type List[T any] struct {
	Context Context        `json:"context"`
	Meta    MetaCollection `json:"meta"`
	Rows    Slice[T]       `json:"rows"`
}

func (List[T]) String

func (l List[T]) String() string

type Locale

type Locale string
const (
	LocaleRu Locale = "ru_RU"
	LocaleEn Locale = "en_US"
)

type Logger

type Logger interface {
	Printf(string, ...any)
}

Logger interface allows to use other loggers than standard log.Logger.

type Loss

type Loss struct {
	AccountId    *uuid.UUID               `json:"accountId,omitempty"`    // ID учетной записи
	Applicable   *bool                    `json:"applicable,omitempty"`   // Отметка о проведении
	Attributes   *Attributes              `json:"attributes,omitempty"`   // Коллекция метаданных доп. полей. Поля объекта
	Code         *string                  `json:"code,omitempty"`         // Код
	Created      *Timestamp               `json:"created,omitempty"`      // Дата создания
	Deleted      *Timestamp               `json:"deleted,omitempty"`      // Момент последнего удаления
	Description  *string                  `json:"description,omitempty"`  // Комментарий
	ExternalCode *string                  `json:"externalCode,omitempty"` // Внешний код
	Files        *Files                   `json:"files,omitempty"`        // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group        *Group                   `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID               `json:"id,omitempty"`           // ID сущности
	Meta         *Meta                    `json:"meta,omitempty"`         // Метаданные
	Moment       *Timestamp               `json:"moment,omitempty"`       // Дата документа
	Name         *string                  `json:"name,omitempty"`         // Наименование
	Organization *Organization            `json:"organization,omitempty"` // Метаданные юрлица
	Owner        *Employee                `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Positions    *Positions[LossPosition] `json:"positions,omitempty"`    // Метаданные позиций Списания
	Printed      *bool                    `json:"printed,omitempty"`      // Напечатан ли документ
	Project      *Project                 `json:"project,omitempty"`      // Проект
	Published    *bool                    `json:"published,omitempty"`    // Опубликован ли документ
	Rate         *Rate                    `json:"rate,omitempty"`         // Валюта
	Shared       *bool                    `json:"shared,omitempty"`       // Общий доступ
	State        *State                   `json:"state,omitempty"`        // Метаданные статуса
	Store        *Store                   `json:"store,omitempty"`        // Метаданные склада
	Sum          *float64                 `json:"sum,omitempty"`          // Сумма
	SyncId       *uuid.UUID               `json:"syncId,omitempty"`       // ID синхронизации. После заполнения недоступен для изменения
	Updated      *Timestamp               `json:"updated,omitempty"`      // Момент последнего обновления
	SalesReturn  *SalesReturn             `json:"salesReturn,omitempty"`  // Ссылка на связанный со списанием возврат покупателя в формате Метаданных
}

Loss Списание. Ключевое слово: loss Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-spisanie

func (Loss) MetaType

func (l Loss) MetaType() MetaType

func (Loss) String

func (l Loss) String() string

type LossPosition

type LossPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID сущности
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Reason     *string             `json:"reason,omitempty"`     // Причина списания данной позиции
	Slot       *Slot               `json:"slot,omitempty"`       // Ячейка на складе
	Things     *Things             `json:"things,omitempty"`     // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута.
}

LossPosition Позиция Списания. Ключевое слово: lossposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-spisanie-spisaniq-pozicii-spisaniq

func (LossPosition) MetaType

func (l LossPosition) MetaType() MetaType

func (LossPosition) String

func (l LossPosition) String() string

type LossService

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

LossService Сервис для работы со списаниями.

func NewLossService

func NewLossService(client *Client) *LossService

func (*LossService) Create

func (s *LossService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*LossService) CreateAttribute

func (s *LossService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*LossService) CreateAttributes

func (s *LossService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*LossService) CreateOrUpdatePositionTrackingCodes

func (s *LossService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*LossService) CreatePosition

func (s *LossService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*LossService) CreatePositions

func (s *LossService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*LossService) CreateUpdateMany

func (s *LossService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*LossService) Delete

func (s *LossService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*LossService) DeleteAttribute

func (s *LossService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*LossService) DeleteAttributes

func (s *LossService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*LossService) DeleteBySyncId

func (s *LossService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*LossService) DeleteMany

func (s *LossService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*LossService) DeletePosition

func (s *LossService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*LossService) DeletePositionTrackingCodes

func (s *LossService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*LossService) DeletePublication

func (s *LossService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*LossService) Get

func (s *LossService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*LossService) GetAttributeById

func (s *LossService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*LossService) GetAttributes

func (s *LossService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*LossService) GetById

func (s *LossService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*LossService) GetBySyncId

func (s *LossService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*LossService) GetMetadata

func (s *LossService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*LossService) GetPositionById

func (s *LossService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*LossService) GetPositionTrackingCodes

func (s *LossService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*LossService) GetPositions

func (s *LossService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*LossService) GetPublicationById

func (s *LossService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*LossService) GetPublications

func (s *LossService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*LossService) Publish

func (s *LossService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*LossService) Remove

func (s *LossService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*LossService) Template

func (s *LossService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*LossService) Update

func (s *LossService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*LossService) UpdateAttribute

func (s *LossService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*LossService) UpdatePosition

func (s *LossService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type Losses

type Losses = Iterator[Loss]

type MailActivationRequired

type MailActivationRequired struct {
	MailActivationRequired bool `json:"mailActivationRequired"`
}

MailActivationRequired структура ответа на запрос активации сотрудника Если поле равно true и сотрудник ранее не был активен, это означает, что на указанную у сотрудника почту было выслано письмо со ссылкой на вход для сотрудника. Если поле равно false, то можно использовать ранее заданный пароль для данного пользователя

type MarkingSellingMode

type MarkingSellingMode string

MarkingSellingMode Продажа маркированных товаров. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-prodazha-markirowannyh-towarow

const (
	MarkingSellingModeCorrectMarksOnly MarkingSellingMode = "CORRECT_MARKS_ONLY" // Только с правильными кодами маркировки
	MarkingSellingModeWithoutErrors    MarkingSellingMode = "WITHOUT_ERRORS"     // С правильными кодами и те, которые не удалось проверить
	MarkingSellingModeAll              MarkingSellingMode = "ALL"                // Все – независимо от результатов проверки кодов маркировки
)

type Meta

type Meta struct {
	Href         *string  `json:"href,omitempty"`         // Ссылка на объект
	MetadataHref *string  `json:"metadataHref,omitempty"` // Ссылка на метаданные сущности (Другой вид метаданных. Присутствует не во всех сущностях)
	Type         MetaType `json:"type,omitempty"`         // Тип объекта
	MediaType    *string  `json:"mediaType,omitempty"`    // Тип данных, который приходят в ответ от сервиса, либо отправляется в теле запроса
	UUIDHref     *string  `json:"uuidHref,omitempty"`     // Ссылка на объект на UI. Присутствует не во всех сущностях. Может быть использована для получения uuid
	DownloadHref *string  `json:"downloadHref,omitempty"` // Ссылка на скачивание Изображения и миниатюр изображений. Данный параметр указывается только в meta для Изображения у Товара или Комплекта, а также в поле miniature везде, где используются изображения. Если миниатюра не была создана, то значение данного поля равно null. Для создания миниатюры нужно перейти по ссылке, указанной в href в миниатюре.
}

Meta Метаданные объекта. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-ob-ekta

func (Meta) String

func (m Meta) String() string

type MetaArray

type MetaArray[T any] struct {
	Meta MetaCollection `json:"meta,omitempty"`
	Rows Slice[T]       `json:"rows,omitempty"`
}

MetaArray Объект с полями meta и rows, где rows - массив объектов

func (MetaArray[T]) String

func (m MetaArray[T]) String() string

type MetaCollection

type MetaCollection struct {
	Href         string `json:"href,omitempty"`         // Ссылка на объект
	Type         string `json:"type,omitempty"`         // Тип объекта
	MediaType    string `json:"mediaType,omitempty"`    // Тип данных, который приходят в ответ от сервиса, либо отправляется в теле запроса
	Size         int    `json:"size,omitempty"`         // Количество элементов в коллекции
	Limit        int    `json:"limit,omitempty"`        // Максимальное число элементов в коллекции, возвращаемых за один запрос
	Offset       int    `json:"offset,omitempty"`       // Смещение выборки коллекции от первого элемента
	NextHref     string `json:"nextHref,omitempty"`     // Ссылка на следующую страницу коллекции
	PreviousHref string `json:"previousHref,omitempty"` // Ссылка на предыдущую страницу коллекции
}

MetaCollection Метаданные коллекции. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-kollekcii

func (MetaCollection) String

func (m MetaCollection) String() string

type MetaName

type MetaName struct {
	Meta Meta   `json:"meta"`
	Name string `json:"name"`
}

type MetaType

type MetaType string
const (
	MetaTypeAccount                          MetaType = "account"
	MetaTypeAccumulationDiscount             MetaType = "accumulationdiscount"
	MetaTypeApplication                      MetaType = "application"
	MetaTypeAssortment                       MetaType = "assortment"
	MetaTypeAssortmentSettings               MetaType = "assortmentsettings"
	MetaTypeAsync                            MetaType = "async"
	MetaTypeAttribute                        MetaType = "attributemetadata"
	MetaTypeAudit                            MetaType = "audit"
	MetaTypeAuditEvent                       MetaType = "auditevent"
	MetaTypeBonusProgram                     MetaType = "bonusprogram"
	MetaTypeBonusTransaction                 MetaType = "bonustransaction"
	MetaTypeBundle                           MetaType = "bundle"
	MetaTypeBundleComponent                  MetaType = "bundlecomponent"
	MetaTypeCashier                          MetaType = "cashier"
	MetaTypeCashIn                           MetaType = "cashin"
	MetaTypeCashOut                          MetaType = "cashout"
	MetaTypeCharacteristic                   MetaType = "attributemetadata"
	MetaTypeCommissionReportIn               MetaType = "commissionreportin"
	MetaTypeCommissionReportInPosition       MetaType = "commissionreportinposition"
	MetaTypeCommissionReportInReturnPosition MetaType = "commissionreportinreturnedposition"
	MetaTypeCommissionReportOut              MetaType = "commissionreportout"
	MetaTypeCommissionReportOutPosition      MetaType = "commissionreportoutposition"
	MetaTypeCompanySettings                  MetaType = "companysettings"
	MetaTypeConsignment                      MetaType = "consignment"
	MetaTypeContactPerson                    MetaType = "contactperson"
	MetaTypeContract                         MetaType = "contract"
	MetaTypeCounterparty                     MetaType = "counterparty"
	MetaTypeCounterPartyAdjustment           MetaType = "counterpartyadjustment"
	MetaTypeCountry                          MetaType = "country"
	MetaTypeCurrency                         MetaType = "currency"
	MetaTypeCustomerOrder                    MetaType = "customerorder"
	MetaTypeCustomerOrderPosition            MetaType = "customerorderposition"
	MetaTypeCustomEntity                     MetaType = "customentity"
	MetaTypeCustomTemplate                   MetaType = "customtemplate"
	MetaTypeDemand                           MetaType = "demand"
	MetaTypeDemandPosition                   MetaType = "demandposition"
	MetaTypeDiscount                         MetaType = "discount"
	MetaTypeEmbeddedTemplate                 MetaType = "embeddedtemplate"
	MetaTypeEmployee                         MetaType = "employee"
	MetaTypeEmployeeContext                  MetaType = "employee"
	MetaTypeEnter                            MetaType = "enter"
	MetaTypeEnterPosition                    MetaType = "enterposition"
	MetaTypeExpenseItem                      MetaType = "expenseitem"
	MetaTypeFactureIn                        MetaType = "facturein"
	MetaTypeFactureOut                       MetaType = "factureout"
	MetaTypeFiles                            MetaType = "files"
	MetaTypeGroup                            MetaType = "group"
	MetaTypeImage                            MetaType = "image"
	MetaTypeInternalOrder                    MetaType = "internalorder"
	MetaTypeInternalOrderPosition            MetaType = "internalorderposition"
	MetaTypeInventory                        MetaType = "inventory"
	MetaTypeInventoryPosition                MetaType = "inventoryposition"
	MetaTypeInvoiceIn                        MetaType = "invoicein"
	MetaTypeInvoiceOut                       MetaType = "invoiceout"
	MetaTypeInvoicePosition                  MetaType = "invoiceposition"
	MetaTypeLoss                             MetaType = "loss"
	MetaTypeLossPosition                     MetaType = "lossposition"
	MetaTypeNamedFilter                      MetaType = "namedfilter"
	MetaTypeMove                             MetaType = "move"
	MetaTypeMovePosition                     MetaType = "moveposition"
	MetaTypeNote                             MetaType = "note"
	MetaTypeNotification                     MetaType = "notification"
	MetaTypePublication                      MetaType = "operationpublication"
	MetaTypeOrganization                     MetaType = "organization"
	MetaTypePaymentIn                        MetaType = "paymentin"
	MetaTypePaymentOut                       MetaType = "paymentout"
	MetaTypePersonalDiscount                 MetaType = "personaldiscount"
	MetaTypePrepayment                       MetaType = "prepayment"
	MetaTypePrepaymentPosition               MetaType = "prepaymentposition"
	MetaTypePrepaymentReturn                 MetaType = "prepaymentreturn"
	MetaTypePrepaymentReturnPosition         MetaType = "prepaymentreturnposition"
	MetaTypePriceList                        MetaType = "pricelist"
	MetaTypePriceListPosition                MetaType = "pricelistrow"
	MetaTypePriceType                        MetaType = "pricetype"
	MetaTypeProcessing                       MetaType = "processing"
	MetaTypeProcessingOrder                  MetaType = "processingorder"
	MetaTypeProcessingOrderPosition          MetaType = "processingorderposition"
	MetaTypeProcessingPlan                   MetaType = "processingplan"
	MetaTypeProcessingPlanMaterial           MetaType = "processingplanmaterial"
	MetaTypeProcessingPlanProduct            MetaType = "processingplanresult"
	MetaTypeProcessingPositionMaterial       MetaType = "processingpositionmaterial"
	MetaTypeProcessingPositionProduct        MetaType = "processingpositionresult"
	MetaTypeProcessingProcess                MetaType = "processingprocess"
	MetaTypeProcessingProcessPosition        MetaType = "processingprocessposition"
	MetaTypeProcessingStage                  MetaType = "processingstage"
	MetaTypeProduct                          MetaType = "product"
	MetaTypeProductFolder                    MetaType = "productfolder"
	MetaTypeProject                          MetaType = "project"
	MetaTypePurchaseOrder                    MetaType = "purchaseorder"
	MetaTypePurchaseOrderPosition            MetaType = "purchaseorderposition"
	MetaTypePurchaseReturn                   MetaType = "purchasereturn"
	MetaTypePurchaseReturnPosition           MetaType = "purchasereturnposition"
	MetaTypeReceiptTemplate                  MetaType = "receipttemplate"
	MetaTypeRegion                           MetaType = "region"
	MetaTypeRetailDemand                     MetaType = "demand"
	MetaTypeRetailDemandPosition             MetaType = "demandposition"
	MetaTypeRetailDrawerCashIn               MetaType = "retaildrawercashin"
	MetaTypeRetailDrawerCashOut              MetaType = "retaildrawercashout"
	MetaTypeRetailSalesReturn                MetaType = "retailsalesreturn"
	MetaTypeRetailSalesReturnPosition        MetaType = "salesreturnposition"
	MetaTypeRetailShift                      MetaType = "retailshift"
	MetaTypeRetailStore                      MetaType = "retailstore"
	MetaTypeRoundOffDiscount                 MetaType = "discount"
	MetaTypeSalesReturn                      MetaType = "salesreturn"
	MetaTypeSalesReturnPosition              MetaType = "salesreturnposition"
	MetaTypeService                          MetaType = "service"
	MetaTypeSlot                             MetaType = "slot"
	MetaTypeSpecialPriceDiscount             MetaType = "specialpricediscount"
	MetaTypeState                            MetaType = "state"
	MetaTypeStore                            MetaType = "store"
	MetaTypeStoreZone                        MetaType = "storezone"
	MetaTypeSupply                           MetaType = "supply"
	MetaTypeSupplyPosition                   MetaType = "supplyposition"
	MetaTypeTask                             MetaType = "task"
	MetaTypeTaskNote                         MetaType = "tasknote"
	MetaTypeUom                              MetaType = "uom"
	MetaTypeVariant                          MetaType = "variant"
	MetaTypeWebhook                          MetaType = "webhook"
	MetaTypeCounterpartySettings             MetaType = "counterpartysettings"
	MetaTypeRole                             MetaType = "role"
	MetaTypeSystemRole                       MetaType = "systemrole"
	MetaTypeIndividualRole                   MetaType = "individualrole"
	MetaTypeCustomRole                       MetaType = "customrole"
	MetaTypeUserSettings                     MetaType = "usersettings"
	MetaTypeSubscription                     MetaType = "subscription"
	MetaTypeSalesChannel                     MetaType = "saleschannel"
	MetaTypeMetadata                         MetaType = "metadata"
	MetaTypeTaxRate                          MetaType = "taxrate"
	MetaTypeToken                            MetaType = "token"
	MetaTypeReportStock                      MetaType = "stock"
	MetaTypeReportStockByOperation           MetaType = "stockbyoperation"
	MetaTypeReportStockByStore               MetaType = "stockbystore"
	MetaTypeReportMoney                      MetaType = "money"
	MetaTypeReportMoneyPlotSeries            MetaType = "moneyplotseries"
	MetaTypeReportProfitByCounterparty       MetaType = "salesbyCounterparty"
	MetaTypeReportProfitByEmployee           MetaType = "salesbyemployee"
	MetaTypeReportProfitByProduct            MetaType = "salesbyproduct"
	MetaTypeReportProfitBySalesChannel       MetaType = "salesbysaleschannel"
	MetaTypeReportProfitByVariant            MetaType = "salesbyvariant"
	MetaTypeReportOrders                     MetaType = "ordersplotseries"
	MetaTypeReportSales                      MetaType = "salesplotseries"
	MetaTypeReportTurnover                   MetaType = "turnover"
	MetaTypeReportDashboard                  MetaType = "dashboard"
	MetaTypeReportCounterparty               MetaType = "counterparty"
	MetaTypeWebhookStock                     MetaType = "webhookstock"
	MetaTypeProcessingPlanFolder             MetaType = "processingplanfolder"
)

func MetaTypeFromEntity

func MetaTypeFromEntity(v any) (MetaType, error)

func (MetaType) String

func (m MetaType) String() string

type MetaTyper

type MetaTyper interface {
	MetaType() MetaType
}

type MetaWrapper

type MetaWrapper struct {
	Meta Meta `json:"meta"`
}

func (MetaWrapper) String

func (m MetaWrapper) String() string

type Metadata

type Metadata struct {
	CustomerOrder             AttributesStatesCreateSharedWrapper `json:"customerorder"`
	InvoiceIn                 AttributesCreateSharedWrapper       `json:"invoicein"`
	InvoiceOut                AttributesCreateSharedWrapper       `json:"invoiceout"`
	Inventory                 AttributesCreateSharedWrapper       `json:"inventory"`
	Prepayment                AttributesCreateSharedWrapper       `json:"prepayment"`
	RetailSalesReturn         AttributesCreateSharedWrapper       `json:"retailsalesreturn"`
	Consignment               AttributesWrapper                   `json:"consignment"`
	Bundle                    MetadataAttributeShared             `json:"bundle"`
	Product                   MetadataAttributeShared             `json:"product"`
	Service                   MetadataAttributeShared             `json:"service"`
	Store                     AttributesCreateSharedWrapper       `json:"store"`
	BonusTransaction          AttributesCreateSharedWrapper       `json:"bonustransaction"`
	PriceList                 AttributesCreateSharedWrapper       `json:"pricelist"`
	PaymentIn                 AttributesCreateSharedWrapper       `json:"paymentin"`
	Supply                    AttributesCreateSharedWrapper       `json:"supply"`
	Enter                     AttributesCreateSharedWrapper       `json:"enter"`
	Counterparty              CounterPartyOption                  `json:"counterparty"`
	Variant                   MetadataVariant                     `json:"variant"`
	RetailDemand              AttributesCreateSharedWrapper       `json:"retaildemand"`
	FactureOut                AttributesCreateSharedWrapper       `json:"factureout"`
	PurchaseOrder             AttributesCreateSharedWrapper       `json:"purchaseorder"`
	CrptOrder                 AttributesCreateSharedWrapper       `json:"crptorder"`
	RetailDrawerCashIn        AttributesCreateSharedWrapper       `json:"retaildrawercashin"`
	Assortment                Meta                                `json:"assortment"`
	ProductFolder             MetaWrapper                         `json:"productfolder"`
	Loss                      AttributesCreateSharedWrapper       `json:"loss"`
	SalesReturn               AttributesCreateSharedWrapper       `json:"salesreturn"`
	Application               MetaWrapper                         `json:"application"`
	Organization              AttributesCreateSharedWrapper       `json:"organization"`
	CompanySettings           MetadataCompanySettings             `json:"companysettings"`
	Demand                    AttributesCreateSharedWrapper       `json:"demand"`
	PaymentOut                AttributesCreateSharedWrapper       `json:"paymentout"`
	CounterpartyAdjustment    AttributesCreateSharedWrapper       `json:"counterpartyadjustment"`
	ProductionTask            AttributesCreateSharedWrapper       `json:"productiontask"`
	Processing                AttributesCreateSharedWrapper       `json:"processing"`
	CashOut                   AttributesCreateSharedWrapper       `json:"cashout"`
	PurchaseReturn            AttributesCreateSharedWrapper       `json:"purchasereturn"`
	ProcessingPlan            AttributesWrapper                   `json:"processingplan"`
	ProcessingOrder           AttributesCreateSharedWrapper       `json:"processingorder"`
	Project                   AttributesCreateSharedWrapper       `json:"project"`
	BonusProgram              AttributesWrapper                   `json:"bonusprogram"`
	CashIn                    AttributesCreateSharedWrapper       `json:"cashin"`
	Contract                  AttributesCreateSharedWrapper       `json:"contract"`
	FactureOn                 AttributesCreateSharedWrapper       `json:"facturein"`
	ProcessingPlanFolder      MetaWrapper                         `json:"processingplanfolder"`
	Move                      AttributesCreateSharedWrapper       `json:"move"`
	RetailDrawerCashOut       AttributesCreateSharedWrapper       `json:"retaildrawercashout"`
	Employee                  AttributesCreateSharedWrapper       `json:"employee"`
	CommissionReportIn        AttributesCreateSharedWrapper       `json:"commissionreportin"`
	ProductionsTageCompletion AttributesCreateSharedWrapper       `json:"productionstagecompletion"`
	CommissionReportOut       AttributesCreateSharedWrapper       `json:"commissionreportout"`
	InternalOrder             AttributesCreateSharedWrapper       `json:"internalorder"`
	RetailShift               AttributesCreateSharedWrapper       `json:"retailshift"`
	PrepaymentReturn          AttributesCreateSharedWrapper       `json:"prepaymentreturn"`
}

Metadata Глобальные метаданные. Ключевое слово: metadata

func (Metadata) MetaType

func (m Metadata) MetaType() MetaType

type MetadataAttribute

type MetadataAttribute struct {
	Meta       Meta                 `json:"meta"`
	Attributes MetaArray[Attribute] `json:"attributes"`
}

type MetadataAttributeShared

type MetadataAttributeShared struct {
	MetadataAttribute
	CreateShared bool `json:"createShared"`
}

type MetadataAttributeSharedPriceTypes

type MetadataAttributeSharedPriceTypes struct {
	MetadataAttributeShared
	PriceTypes []struct {
		Name string `json:"name,omitempty"` // Наименование
	} `json:"priceTypes"`
}

type MetadataAttributeSharedStates

type MetadataAttributeSharedStates struct {
	MetadataAttributeShared
	States []State `json:"states"`
}

type MetadataCompanySettings

type MetadataCompanySettings struct {
	MetadataAttribute
	CustomEntities []CustomEntityElement `json:"customEntities"`
}

type MetadataCounterparty

type MetadataCounterparty struct {
	MetadataAttributeShared
	Tags []string `json:"tags"`
}

type MetadataService

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

MetadataService Сервис для работы с метаданными.

func NewMetadataService

func NewMetadataService(client *Client) *MetadataService

func (*MetadataService) Get

func (s *MetadataService) Get(ctx context.Context, params *Params) (*T, *Response, error)

type MetadataVariant

type MetadataVariant struct {
	Meta            Meta             `json:"meta"`            // Метаданные
	Characteristics []Characteristic `json:"characteristics"` // Коллекция всех созданных характеристик Модификаций
}

type MinPrice

type MinPrice struct {
	Value    *float64  `json:"value,omitempty"`    // Значение цены
	Currency *Currency `json:"currency,omitempty"` // Ссылка на валюту в формате Метаданных
}

MinPrice Минимальная цена. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar-towary-atributy-wlozhennyh-suschnostej-minimal-naq-cena

func (MinPrice) String

func (m MinPrice) String() string

type MinionToMaster

type MinionToMaster string

MinionToMaster Стратегия выбора кассы для фискализации облачных чеков. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-strategiq-wybora-kassy-dlq-fiskalizacii-oblachnyh-chekow

const (
	MinionToMasterAny       MinionToMaster = "ANY"        // Любая мастер касса
	MinionToMasterSameGroup MinionToMaster = "SAME_GROUP" // Только кассы из того же отдела
	MinionToMasterChosen    MinionToMaster = "CHOSEN"     // Выбранные кассы из списка в поле masterRetailStores
)

type Money

type Money struct {
	Account      MetaName `json:"account"`      // Счет организации (не выводится для остатка кассы, так как касса одна на организацию)
	Organization MetaName `json:"organization"` // Организация
	Balance      float64  `json:"balance"`      // Текущий остаток денежных средств
}

Money Остатки денежных средств. Ключевое слово: moneyreport Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-den-gi-ostatki-denezhnyh-sredstw

func (Money) MetaType

func (m Money) MetaType() MetaType

type MoneyPlotSeries

type MoneyPlotSeries struct {
	Context Context             `json:"context"`
	Meta    Meta                `json:"meta"`
	Credit  float64             `json:"credit"` // Доход
	Debit   float64             `json:"debit"`  // Расход
	Series  []PlotSeriesElement `json:"series"` // Массив показателей
}

MoneyPlotSeries Движение денежных средств Ключевое слово: moneyplotseries Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-den-gi-dwizhenie-denezhnyh-sredstw

func (MoneyPlotSeries) MetaType

func (m MoneyPlotSeries) MetaType() MetaType

type Move

type Move struct {
	AccountId     *uuid.UUID               `json:"accountId,omitempty"`     // ID учетной записи
	Applicable    *bool                    `json:"applicable,omitempty"`    // Отметка о проведении
	Attributes    *Attributes              `json:"attributes,omitempty"`    // Коллекция метаданных доп. полей. Поля объекта
	Code          *string                  `json:"code,omitempty"`          // Код
	Created       *Timestamp               `json:"created,omitempty"`       // Дата создания
	Deleted       *Timestamp               `json:"deleted,omitempty"`       // Момент последнего удаления
	Description   *string                  `json:"description,omitempty"`   // Комментарий
	ExternalCode  *string                  `json:"externalCode,omitempty"`  // Внешний код
	Files         *Files                   `json:"files,omitempty"`         // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group         *Group                   `json:"group,omitempty"`         // Отдел сотрудника
	Id            *uuid.UUID               `json:"id,omitempty"`            // ID сущности
	InternalOrder *InternalOrder           `json:"internalOrder,omitempty"` // Метаданные Внутреннего заказа, связанного с Перемещением
	CustomerOrder *CustomerOrder           `json:"customerOrder,omitempty"` // Метаданные Заказа покупателя, связанного с Перемещением
	Meta          *Meta                    `json:"meta,omitempty"`          // Метаданные
	Moment        *Timestamp               `json:"moment,omitempty"`        // Дата документа
	Name          *string                  `json:"name,omitempty"`          // Наименование
	Organization  *Organization            `json:"organization,omitempty"`  // Метаданные юрлица
	Overhead      *Overhead                `json:"overhead,omitempty"`      // Накладные расходы. Если Позиции Перемещения не заданы, то накладные расходы нельзя задать
	Owner         *Employee                `json:"owner,omitempty"`         // Владелец (Сотрудник)
	Positions     *Positions[MovePosition] `json:"positions,omitempty"`     // Метаданные позиций Перемещения
	Printed       *bool                    `json:"printed,omitempty"`       // Напечатан ли документ
	Project       *Project                 `json:"project,omitempty"`       // Проект
	Published     *bool                    `json:"published,omitempty"`     // Опубликован ли документ
	Rate          *Rate                    `json:"rate,omitempty"`          // Валюта
	Shared        *bool                    `json:"shared,omitempty"`        // Общий доступ
	SourceStore   *Store                   `json:"sourceStore,omitempty"`   // Метаданные склада, с которого совершается перемещение
	State         *State                   `json:"state,omitempty"`         // Метаданные статуса
	Sum           *float64                 `json:"sum,omitempty"`           // Сумма
	SyncId        *uuid.UUID               `json:"syncId,omitempty"`        // ID синхронизации. После заполнения недоступен для изменения
	TargetStore   *Store                   `json:"targetStore,omitempty"`   // Метаданные склада, на который совершается перемещение
	Updated       *Timestamp               `json:"updated,omitempty"`       // Момент последнего обновления
}

Move Перемещение. Ключевое слово: move Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-peremeschenie

func (Move) MetaType

func (m Move) MetaType() MetaType

func (Move) String

func (m Move) String() string

type MovePosition

type MovePosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Overhead   *float64            `json:"overhead,omitempty"`   // Накладные расходы. Если Позиции Перемещения не заданы, то накладные расходы нельзя задать
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе
	SourceSlot *Slot               `json:"sourceSlot,omitempty"` // Ячейка на складе, с которого совершается перемещение
	TargetSlot *Slot               `json:"targetSlot,omitempty"` // Ячейка на складе, на который совершается перемещение
	Things     *Things             `json:"things,omitempty"`     // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута
}

MovePosition Позиция перемещения. Ключевое слово: moveposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-peremeschenie-peremescheniq-pozicii-peremescheniq

func (MovePosition) MetaType

func (m MovePosition) MetaType() MetaType

func (MovePosition) String

func (m MovePosition) String() string

type MoveService

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

MoveService Сервис для работы со перемещениями.

func NewMoveService

func NewMoveService(client *Client) *MoveService

func (*MoveService) Create

func (s *MoveService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*MoveService) CreateAttribute

func (s *MoveService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*MoveService) CreateAttributes

func (s *MoveService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*MoveService) CreateOrUpdatePositionTrackingCodes

func (s *MoveService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*MoveService) CreatePosition

func (s *MoveService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*MoveService) CreatePositions

func (s *MoveService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*MoveService) CreateUpdateMany

func (s *MoveService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*MoveService) Delete

func (s *MoveService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*MoveService) DeleteAttribute

func (s *MoveService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*MoveService) DeleteAttributes

func (s *MoveService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*MoveService) DeleteBySyncId

func (s *MoveService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*MoveService) DeleteMany

func (s *MoveService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*MoveService) DeletePosition

func (s *MoveService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*MoveService) DeletePositionTrackingCodes

func (s *MoveService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*MoveService) DeletePublication

func (s *MoveService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*MoveService) Get

func (s *MoveService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*MoveService) GetAttributeById

func (s *MoveService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*MoveService) GetAttributes

func (s *MoveService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*MoveService) GetById

func (s *MoveService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*MoveService) GetBySyncId

func (s *MoveService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*MoveService) GetMetadata

func (s *MoveService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*MoveService) GetPositionById

func (s *MoveService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*MoveService) GetPositionTrackingCodes

func (s *MoveService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*MoveService) GetPositions

func (s *MoveService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*MoveService) GetPublicationById

func (s *MoveService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*MoveService) GetPublications

func (s *MoveService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*MoveService) Publish

func (s *MoveService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*MoveService) Remove

func (s *MoveService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*MoveService) Template

func (s *MoveService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*MoveService) Update

func (s *MoveService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*MoveService) UpdateAttribute

func (s *MoveService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*MoveService) UpdatePosition

func (s *MoveService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type Moves

type Moves = Iterator[Move]

type NamedFilter

type NamedFilter struct {
	AccountId *uuid.UUID `json:"accountId,omitempty"` // ID учетной записи
	Id        *uuid.UUID `json:"id,omitempty"`        // ID сущности
	Meta      *Meta      `json:"meta,omitempty"`      // Метаданные
	Name      *string    `json:"name,omitempty"`      // Наименование
	Owner     *Employee  `json:"owner,omitempty"`     // Владелец (Сотрудник)
}

NamedFilter Сохраненный фильтр. Ключевое слово: namedfilter Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try

func (NamedFilter) MetaType

func (n NamedFilter) MetaType() MetaType

func (NamedFilter) String

func (n NamedFilter) String() string

type Note

type Note struct {
	AccountId         *uuid.UUID    `json:"accountId,omitempty"`         // ID учетной записи
	Agent             *Counterparty `json:"agent,omitempty"`             // Метаданные Контрагента
	Author            *Employee     `json:"author,omitempty"`            // Метаданные Сотрудника - создателя события (администратор аккаунта, если автор - приложение)
	AuthorApplication *Application  `json:"authorApplication,omitempty"` // Метаданные Приложения - создателя события
	Created           *Timestamp    `json:"created,omitempty"`           // Момент создания события Контрагента
	Description       *string       `json:"description,omitempty"`       // Текст события Контрагента
	Id                *uuid.UUID    `json:"id,omitempty"`                // ID сущности
	Meta              *Meta         `json:"meta,omitempty"`              // Метаданные
}

Note Событие Контрагента. Ключевое слово: note Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-kontragenty-attributy-suschnosti-adres-sobytiq-kontragenta

func (Note) MetaType

func (n Note) MetaType() MetaType

func (Note) String

func (n Note) String() string

type Notification

type Notification struct {
	AccountId   uuid.UUID `json:"accountId"`   // ID учетной записи
	Created     Timestamp `json:"created"`     // Дата и время формирования Уведомления
	Description string    `json:"description"` // Описание уведомления
	Id          uuid.UUID `json:"id"`          // ID Уведомления
	Meta        Meta      `json:"meta"`        // Метаданные объекта. Содержит тип конкретного уведомления
	Read        bool      `json:"read"`        // Признак того, было ли Уведомление прочитано
	Title       string    `json:"title"`       // Краткий текст уведомления
}

Notification TODO: Общие атрибуты уведомлений. https://dev.moysklad.ru/doc/api/remap/1.2/notification/#uwedomleniq-lenta-uwedomlenij-obschie-atributy-uwedomlenij

func (Notification) MetaType

func (n Notification) MetaType() MetaType

func (Notification) String

func (n Notification) String() string

type NotificationService

type NotificationService struct {
	Endpoint
	// contains filtered or unexported fields
}

NotificationService Сервис для работы с уведомлениями.

func NewNotificationService

func NewNotificationService(client *Client) *NotificationService

func (*NotificationService) Delete

func (s *NotificationService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*NotificationService) Get

func (s *NotificationService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*NotificationService) GetById

func (s *NotificationService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*NotificationService) MarkAsRead

func (s *NotificationService) MarkAsRead(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

MarkAsRead Отметить Уведомление как прочитанное. https://dev.moysklad.ru/doc/api/remap/1.2/notification/#uwedomleniq-uwedomlenie-otmetit-uwedomlenie-kak-prochitannoe

func (*NotificationService) MarkAsReadAll

func (s *NotificationService) MarkAsReadAll(ctx context.Context) (bool, *Response, error)

MarkAsReadAll Отметить все Уведомления как прочитанные. https://dev.moysklad.ru/doc/api/remap/1.2/notification/#uwedomleniq-uwedomlenie-otmetit-wse-uwedomleniq-kak-prochitannye

type Operation

type Operation struct {
	Meta      *Meta    `json:"meta,omitempty"`      // Метаданные
	LinkedSum *float64 `json:"linkedSum,omitempty"` // Сумма, оплаченная по данному документу
	// contains filtered or unexported fields
}

Operation операция, к которой привязан платёж Представляет из себя структуру из полей: `Meta` для определения типа сущности `LinkedSum` для хранения суммы по операции `data` для хранения сырых данных

func (*Operation) CommissionReportIn

func (o *Operation) CommissionReportIn() (*CommissionReportIn, error)

CommissionReportIn структурирует сущность в *CommissionReportIn Возвращает ошибку в случае неудачи

func (*Operation) CommissionReportOut

func (o *Operation) CommissionReportOut() (*CommissionReportOut, error)

CommissionReportOut структурирует сущность в *CommissionReportOut Возвращает ошибку в случае неудачи

func (*Operation) Counterparty

func (o *Operation) Counterparty() (*Counterparty, error)

Counterparty структурирует сущность в *Counterparty Возвращает ошибку в случае неудачи

func (*Operation) CustomerOrder

func (o *Operation) CustomerOrder() (*CustomerOrder, error)

CustomerOrder структурирует сущность в *CustomerOrder Возвращает ошибку в случае неудачи

func (*Operation) Data

func (o *Operation) Data() json.RawMessage

Data удовлетворяет интерфейсу DataMetaTyper

func (*Operation) Demand

func (o *Operation) Demand() (*Demand, error)

Demand структурирует сущность в *Demand Возвращает ошибку в случае неудачи

func (*Operation) InvoiceIn

func (o *Operation) InvoiceIn() (*InvoiceIn, error)

InvoiceIn структурирует сущность в *InvoiceIn Возвращает ошибку в случае неудачи

func (*Operation) InvoiceOut

func (o *Operation) InvoiceOut() (*InvoiceOut, error)

InvoiceOut структурирует сущность в *InvoiceOut Возвращает ошибку в случае неудачи

func (*Operation) MetaType

func (o *Operation) MetaType() MetaType

MetaType удовлетворяет интерфейсу MetaTyper

func (*Operation) Organization

func (o *Operation) Organization() (*Organization, error)

Organization структурирует сущность в *Organization Возвращает ошибку в случае неудачи

func (*Operation) Prepayment

func (o *Operation) Prepayment() (*Prepayment, error)

Prepayment структурирует сущность в *Prepayment Возвращает ошибку в случае неудачи

func (*Operation) PrepaymentReturn

func (o *Operation) PrepaymentReturn() (*PrepaymentReturn, error)

PrepaymentReturn структурирует сущность в *PrepaymentReturn Возвращает ошибку в случае неудачи

func (*Operation) PurchaseOrder

func (o *Operation) PurchaseOrder() (*PurchaseOrder, error)

PurchaseOrder структурирует сущность в *PurchaseOrder Возвращает ошибку в случае неудачи

func (*Operation) PurchaseReturn

func (o *Operation) PurchaseReturn() (*PurchaseReturn, error)

PurchaseReturn структурирует сущность в *PurchaseReturn Возвращает ошибку в случае неудачи

func (*Operation) RetailDemand

func (o *Operation) RetailDemand() (*RetailDemand, error)

RetailDemand структурирует сущность в *RetailDemand Возвращает ошибку в случае неудачи

func (*Operation) RetailDrawerCashIn

func (o *Operation) RetailDrawerCashIn() (*RetailDrawerCashIn, error)

RetailDrawerCashIn структурирует сущность в *RetailDrawerCashIn Возвращает ошибку в случае неудачи

func (*Operation) RetailDrawerCashOut

func (o *Operation) RetailDrawerCashOut() (*RetailDrawerCashOut, error)

RetailDrawerCashOut структурирует сущность в *RetailDrawerCashOut Возвращает ошибку в случае неудачи

func (*Operation) RetailSalesReturn

func (o *Operation) RetailSalesReturn() (*RetailSalesReturn, error)

RetailSalesReturn структурирует сущность в *RetailSalesReturn Возвращает ошибку в случае неудачи

func (*Operation) RetailShift

func (o *Operation) RetailShift() (*RetailShift, error)

RetailShift структурирует сущность в *RetailShift Возвращает ошибку в случае неудачи

func (*Operation) SalesReturn

func (o *Operation) SalesReturn() (*SalesReturn, error)

SalesReturn структурирует сущность в *SalesReturn Возвращает ошибку в случае неудачи

func (Operation) String

func (o Operation) String() string

func (*Operation) Supply

func (o *Operation) Supply() (*Supply, error)

Supply структурирует сущность в *Supply Возвращает ошибку в случае неудачи

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

type OperationIn

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

OperationIn операция входящего платежа/приходного ордера

func (OperationIn) GetMeta

func (o OperationIn) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (*OperationIn) UnmarshalJSON

func (o *OperationIn) UnmarshalJSON(data []byte) (err error)

type OperationInType

type OperationInType interface {
	HasMeta
	ConvertToOperation(*float64) (*OperationIn, error)
}

type OperationOut

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

OperationOut операция исходящего платежа/расходного ордера

func (*OperationOut) UnmarshalJSON

func (o *OperationOut) UnmarshalJSON(data []byte) (err error)

type OperationOutTypes

type OperationOutTypes interface {
	SalesReturn | Supply | InvoiceIn | PurchaseOrder | CommissionReportOut
	HasMeta
}

type OperationPermission

type OperationPermission struct {
	View    PermissionValue `json:"view"`
	Create  PermissionValue `json:"create"`
	Update  PermissionValue `json:"update"`
	Delete  PermissionValue `json:"delete"`
	Approve PermissionValue `json:"approve"`
	Print   PermissionValue `json:"print"`
}

type OperationTypes

type OperationTypes interface {
	OperationIn | OperationOut
	HasMeta
	// contains filtered or unexported methods
}

type OperationsIn

type OperationsIn []*OperationIn

func (*OperationsIn) Bind

func (o *OperationsIn) Bind(element OperationInType, linkedSum *float64) error

type OperationsOut

type OperationsOut []*OperationOut

type OrderDirection

type OrderDirection string

OrderDirection Направление сортировки.

const (
	OrderDirectionDefault OrderDirection = ""     // По умолчанию
	OrderDirectionAsc     OrderDirection = "asc"  // По возрастанию (Значение по умолчанию)
	OrderDirectionDesc    OrderDirection = "desc" // По убыванию
)

type OrdersPlotSeries

type OrdersPlotSeries struct {
	Context Context         `json:"context"`
	Meta    Meta            `json:"meta"`
	Series  []SeriesElement `json:"series"` // Массив показателей
}

OrdersPlotSeries Показатели заказов. Ключевое слово: ordersplotseries Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-prodazh-i-zakazow-pokazateli-zakazow

func (OrdersPlotSeries) MetaType

func (o OrdersPlotSeries) MetaType() MetaType

type Organization

type Organization struct {
	AccountId              *uuid.UUID     `json:"accountId,omitempty"`              // ID учетной записи
	ActualAddress          *string        `json:"actualAddress,omitempty"`          // Фактический адрес Юрлица
	ActualAddressFull      *Address       `json:"actualAddressFull,omitempty"`      // Фактический адрес Юрлица с детализацией по отдельным полям
	Archived               *bool          `json:"archived,omitempty"`               // Добавлено ли Юрлицо в архив
	BonusPoints            *int           `json:"bonusPoints,omitempty"`            // Бонусные баллы по активной бонусной программе
	BonusProgram           *BonusProgram  `json:"bonusProgram,omitempty"`           // Метаданные активной бонусной программы
	Code                   *string        `json:"code,omitempty"`                   // Код Юрлица
	CompanyType            CompanyType    `json:"companyType,omitempty"`            // Тип Юрлица . В зависимости от значения данного поля набор выводимых реквизитов контрагента может меняться
	Created                *Timestamp     `json:"created,omitempty"`                // Дата создания
	Description            *string        `json:"description,omitempty"`            // Комментарий к Юрлицу
	ExternalCode           *string        `json:"externalCode,omitempty"`           // Внешний код Юрлица
	Group                  *Group         `json:"group,omitempty"`                  // Отдел сотрудника
	Id                     *uuid.UUID     `json:"id,omitempty"`                     // ID сущности
	Meta                   *Meta          `json:"meta,omitempty"`                   // Метаданные
	Name                   *string        `json:"name,omitempty"`                   // Наименование
	Owner                  *Employee      `json:"owner,omitempty"`                  // Владелец (Сотрудник)
	Shared                 *bool          `json:"shared,omitempty"`                 // Общий доступ
	SyncId                 *uuid.UUID     `json:"syncId,omitempty"`                 // ID синхронизации
	TrackingContractDate   *Timestamp     `json:"trackingContractDate,omitempty"`   // Дата договора с ЦРПТ
	TrackingContractNumber *string        `json:"trackingContractNumber,omitempty"` // Номер договора с ЦРПТ
	Updated                *Timestamp     `json:"updated,omitempty"`                // Момент последнего обновления Юрлица
	Accounts               *AgentAccounts `json:"accounts,omitempty"`               // Метаданные счетов юрлица
	Attributes             *Attributes    `json:"attributes,omitempty"`             // Массив метаданных дополнительных полей юрлица
	CertificateDate        *Timestamp     `json:"certificateDate,omitempty"`        // Дата свидетельства
	CertificateNumber      *string        `json:"certificateNumber,omitempty"`      // Номер свидетельства
	ChiefAccountSign       *Image         `json:"chiefAccountSign,omitempty"`       // Подпись главного бухгалтера
	ChiefAccountant        *string        `json:"chiefAccountant,omitempty"`        // Главный бухгалтер
	Director               *string        `json:"director,omitempty"`               // Руководитель
	DirectorPosition       *string        `json:"directorPosition,omitempty"`       // Должность руководителя
	DirectorSign           *Image         `json:"directorSign,omitempty"`           // Подпись руководителя
	Email                  *string        `json:"email,omitempty"`                  // Электронная почта
	Fax                    *string        `json:"fax,omitempty"`                    // Факс
	FSRARId                *string        `json:"fsrarId,omitempty"`                // Идентификатор в ФСРАР
	INN                    *string        `json:"inn,omitempty"`                    // ИНН
	IsEGAISEnable          *bool          `json:"isEgaisEnable,omitempty"`          // Включен ли ЕГАИС для данного юрлица
	KPP                    *string        `json:"kpp,omitempty"`                    // КПП
	LegalAddress           *string        `json:"legalAddress,omitempty"`           // Юридический адрес юрлица
	LegalAddressFull       *Address       `json:"legalAddressFull,omitempty"`       // Структурированный Юридический адрес юрлица
	LegalFirstName         *string        `json:"legalFirstName,omitempty"`         // Имя для Юрлица типа [Индивидуальный предприниматель, Физическое лицо]. Игнорируется для Юрлиц типа [Юридическое лицо]
	LegalLastName          *string        `json:"legalLastName,omitempty"`          // Фамилия для Юрлица типа [Индивидуальный предприниматель, Физическое лицо]. Игнорируется для Юрлиц типа [Юридическое лицо]
	LegalMiddleName        *string        `json:"legalMiddleName,omitempty"`        // Отчество для Юрлица типа [Индивидуальный предприниматель, Физическое лицо]. Игнорируется для Юрлиц типа [Юридическое лицо]
	LegalTitle             *string        `json:"legalTitle,omitempty"`             // Полное наименование. Игнорируется, если передано одно из значений для ФИО. Формируется автоматически на основе получаемых ФИО Юрлица
	OGRN                   *string        `json:"ogrn,omitempty"`                   // ОГРН
	OGRNIP                 *string        `json:"ogrnip,omitempty"`                 // ОГРНИП
	OKPO                   *string        `json:"okpo,omitempty"`                   // ОКПО
	PayerVat               *bool          `json:"payerVat,omitempty"`               // Является ли данное юрлицо плательщиком НДС
	Phone                  *string        `json:"phone,omitempty"`                  // Телефон
	Stamp                  *Image         `json:"stamp,omitempty"`                  // Печать
	UTMUrl                 *string        `json:"utmUrl,omitempty"`                 // IP-адрес УТМ
}

Organization Юрлицо. Ключевое слово: organization Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-jurlico

func (Organization) GetMeta

func (o Organization) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Organization) MetaType

func (o Organization) MetaType() MetaType

func (Organization) String

func (o Organization) String() string

type OrganizationService

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

OrganizationService Сервис для работы с юридическими лицами.

func NewOrganizationService

func NewOrganizationService(client *Client) *OrganizationService

func (*OrganizationService) Create

func (s *OrganizationService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*OrganizationService) CreateAttribute

func (s *OrganizationService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*OrganizationService) CreateAttributes

func (s *OrganizationService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*OrganizationService) CreateUpdateMany

func (s *OrganizationService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*OrganizationService) Delete

func (s *OrganizationService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*OrganizationService) DeleteAttribute

func (s *OrganizationService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*OrganizationService) DeleteAttributes

func (s *OrganizationService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*OrganizationService) DeleteBySyncId

func (s *OrganizationService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*OrganizationService) DeleteMany

func (s *OrganizationService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*OrganizationService) Get

func (s *OrganizationService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*OrganizationService) GetAccountById

func (s *OrganizationService) GetAccountById(ctx context.Context, id, accountId uuid.UUID) (*AgentAccount, *Response, error)

GetAccountById Получить отдельный счёт Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-poluchit-schet-kontragenta

func (*OrganizationService) GetAccounts

func (s *OrganizationService) GetAccounts(ctx context.Context, id *uuid.UUID) (*List[AgentAccount], *Response, error)

GetAccounts Получить все счета Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-poluchit-scheta-kontragenta

func (*OrganizationService) GetAttributeById

func (s *OrganizationService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*OrganizationService) GetAttributes

func (s *OrganizationService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*OrganizationService) GetById

func (s *OrganizationService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*OrganizationService) GetBySyncId

func (s *OrganizationService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*OrganizationService) GetMetadata

func (s *OrganizationService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*OrganizationService) Update

func (s *OrganizationService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*OrganizationService) UpdateAccounts

func (s *OrganizationService) UpdateAccounts(ctx context.Context, id *uuid.UUID, accounts []*AgentAccount) (*Slice[AgentAccount], *Response, error)

UpdateAccounts Изменить счета Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-jurlico-izmenit-scheta-urlica

func (*OrganizationService) UpdateAttribute

func (s *OrganizationService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type Overhead

type Overhead struct {
	Sum          *float64     `json:"sum,omitempty"`          // Сумма в копейках
	Distribution Distribution `json:"distribution,omitempty"` // Распределение накладных расходов
}

Overhead Накладные расходы. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-priemka-priemki-nakladnye-rashody

func (Overhead) String

func (o Overhead) String() string

type Pack

type Pack struct {
	Barcodes *Barcodes  `json:"barcodes,omitempty"` // Массив штрихкодов упаковок товаров. Данный массив может содержать не более одного штрихкода. Если штрихкод в массиве отсутствует, то данное поле не выводится
	Id       *uuid.UUID `json:"id,omitempty"`       // ID упаковки товара
	Quantity *float64   `json:"quantity,omitempty"` // Количество Товаров в упаковке данного вида
	Uom      *Uom       `json:"uom,omitempty"`      // Метаданные единиц измерения
}

Pack Упаковка Товара. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar-towary-atributy-wlozhennyh-suschnostej-upakowki-towara

func (Pack) String

func (p Pack) String() string

type Packs

type Packs = Iterator[Pack]

type Params

type Params struct {
	Limit       int         `url:"limit,omitempty"`
	Offset      int         `url:"offset,omitempty"`
	Filter      []string    `url:"filter,omitempty" del:";"`
	Expand      []string    `url:"expand,omitempty" del:","`
	Search      string      `url:"search,omitempty"`
	Order       []string    `url:"order,omitempty" del:";"`
	GroupBy     GroupByType `url:"groupBy,omitempty"`
	StockType   StockType   `url:"stockType,omitempty"`
	NamedFilter string      `url:"namedfilter,omitempty"`
	MomentFrom  string      `url:"momentFrom,omitempty"`
	MomentTo    string      `url:"momentTo,omitempty"`
	Interval    Interval    `url:"interval,omitempty"`
	Async       bool        `url:"async,omitempty"`
	Fields      string      `url:"fields,omitempty"`
}

Params структура параметров запроса.

func (*Params) QueryString

func (p *Params) QueryString() string

func (*Params) WithExpand

func (p *Params) WithExpand(fieldName string) *Params

WithExpand Замена ссылок объектами. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-chto-takoe-expand Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-zamena-ssylok-ob-ektami-s-pomosch-u-expand

func (*Params) WithFilterArchived

func (p *Params) WithFilterArchived(value bool) *Params

WithFilterArchived Фильтрация по архивным сущностям. archived=true

func (*Params) WithFilterDeleted

func (p *Params) WithFilterDeleted(value bool) *Params

WithFilterDeleted Фильтрация по удалённым документам.

func (*Params) WithFilterEquals

func (p *Params) WithFilterEquals(key, value string) *Params

WithFilterEquals Фильтрация по значению. key=value

func (*Params) WithFilterEquivalence

func (p *Params) WithFilterEquivalence(key, value string) *Params

WithFilterEquivalence Частичное совпадение. key~value

func (*Params) WithFilterEquivalenceLeft

func (p *Params) WithFilterEquivalenceLeft(key, value string) *Params

WithFilterEquivalenceLeft Полное совпадение в начале значения. key~=value

func (*Params) WithFilterEquivalenceRight

func (p *Params) WithFilterEquivalenceRight(key, value string) *Params

WithFilterEquivalenceRight Полное совпадение в конце значения. key=~value

func (*Params) WithFilterGreater

func (p *Params) WithFilterGreater(key, value string) *Params

WithFilterGreater Больше. key>value

func (*Params) WithFilterGreaterOrEquals

func (p *Params) WithFilterGreaterOrEquals(key, value string) *Params

WithFilterGreaterOrEquals Больше или равно. key=>value

func (*Params) WithFilterLesser

func (p *Params) WithFilterLesser(key, value string) *Params

WithFilterLesser Меньше. key<value

func (*Params) WithFilterLesserOrEquals

func (p *Params) WithFilterLesserOrEquals(key, value string) *Params

WithFilterLesserOrEquals Меньше или равно. key<=value

func (*Params) WithFilterNotEquals

func (p *Params) WithFilterNotEquals(key, value string) *Params

WithFilterNotEquals Не равно. key!=value

func (*Params) WithFilterNotEquivalence

func (p *Params) WithFilterNotEquivalence(key, value string) *Params

WithFilterNotEquivalence Частичное совпадение не выводится. key!~value

func (*Params) WithFilterPrinted

func (p *Params) WithFilterPrinted(value bool) *Params

WithFilterPrinted Фильтрация по напечатанным документам. printed=true

func (*Params) WithFilterPublished

func (p *Params) WithFilterPublished(value bool) *Params

WithFilterPublished Фильтрация по опубликованным документам. published=true

func (*Params) WithGroupBy

func (p *Params) WithGroupBy(value GroupByType) *Params

WithGroupBy Группировка выдачи.

func (*Params) WithInterval

func (p *Params) WithInterval(interval Interval) *Params

WithInterval Интервал, с которым будет построен отчет.

func (*Params) WithLimit

func (p *Params) WithLimit(limit int) *Params

WithLimit Количество элементов на странице. От 1 до 1000

func (*Params) WithMomentFrom

func (p *Params) WithMomentFrom(momentFrom time.Time) *Params

WithMomentFrom Начало периода.

func (*Params) WithMomentTo

func (p *Params) WithMomentTo(momentTo time.Time) *Params

WithMomentTo Конец периода.

func (*Params) WithNamedFilter

func (p *Params) WithNamedFilter(filter *NamedFilter) *Params

WithNamedFilter позволяет использовать сохранённый фильтр в качестве параметра.

func (*Params) WithOffset

func (p *Params) WithOffset(offset int) *Params

WithOffset Смещение от первого элемента.

func (*Params) WithOrder

func (p *Params) WithOrder(fieldName string) *Params

WithOrder сортирует объекты по полю fieldName, по возрастанию (asc).

func (*Params) WithOrderAsc

func (p *Params) WithOrderAsc(fieldName string) *Params

WithOrderAsc сортирует объекты по полю fieldName, по возрастанию (asc).

func (*Params) WithOrderDesc

func (p *Params) WithOrderDesc(fieldName string) *Params

WithOrderDesc сортирует объекты по полю fieldName, по убыванию (desc).

func (*Params) WithSearch

func (p *Params) WithSearch(search string) *Params

WithSearch Контекстный поиск. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-fil-traciq-listanie-poisk-i-sortirowka-poisk Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-kontextnyj-poisk

func (*Params) WithStockFiled

func (p *Params) WithStockFiled() *Params

WithStockFiled Остатки и себестоимость в позициях документов. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-obschie-swedeniq-ostatki-i-sebestoimost-w-poziciqh-dokumentow

func (*Params) WithStockType

func (p *Params) WithStockType(stockType StockType) *Params

WithStockType Параметром stockType выбирается тип остатка, который необходимо рассчитать.

type PaymentDocument

type PaymentDocument struct {
	Meta *Meta `json:"meta"`
	// contains filtered or unexported fields
}

PaymentDocument Любой платежный документ

func (*PaymentDocument) UnmarshalJSON

func (p *PaymentDocument) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON анмаршалит любой платежный документ, при expand=payments

type PaymentIn

type PaymentIn struct {
	AccountId           *uuid.UUID    `json:"accountId,omitempty"`           // ID учетной записи
	Agent               *Counterparty `json:"agent,omitempty"`               // Метаданные контрагента
	AgentAccount        *AgentAccount `json:"agentAccount,omitempty"`        // Метаданные счета контрагента
	Applicable          *bool         `json:"applicable,omitempty"`          // Отметка о проведении
	Attributes          *Attributes   `json:"attributes,omitempty"`          // Коллекция метаданных доп. полей. Поля объекта
	Code                *string       `json:"code,omitempty"`                // Код
	Contract            *Contract     `json:"contract,omitempty"`            // Метаданные договора
	Created             *Timestamp    `json:"created,omitempty"`             // Дата создания
	Deleted             *Timestamp    `json:"deleted,omitempty"`             // Момент последнего удаления
	Description         *string       `json:"description,omitempty"`         // Комментарий
	ExternalCode        *string       `json:"externalCode,omitempty"`        // Внешний код
	Files               *Files        `json:"files,omitempty"`               // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group               *Group        `json:"group,omitempty"`               // Отдел сотрудника
	Id                  *uuid.UUID    `json:"id,omitempty"`                  // ID сущности
	IncomingDate        *Timestamp    `json:"incomingDate,omitempty"`        // Входящая дата
	IncomingNumber      *string       `json:"incomingNumber,omitempty"`      // Входящий номер
	Meta                *Meta         `json:"meta,omitempty"`                // Метаданные
	Moment              *Timestamp    `json:"moment,omitempty"`              // Дата документа
	Name                *string       `json:"name,omitempty"`                // Наименование
	Organization        *Organization `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Owner               *Employee     `json:"owner,omitempty"`               // Владелец (Сотрудник)
	PaymentPurpose      *string       `json:"paymentPurpose,omitempty"`      // Назначение платежа
	Printed             *bool         `json:"printed,omitempty"`             // Напечатан ли документ
	Project             *Project      `json:"project,omitempty"`             // Проект
	Published           *bool         `json:"published,omitempty"`           // Опубликован ли документ
	Rate                *Rate         `json:"rate,omitempty"`                // Валюта
	Shared              *bool         `json:"shared,omitempty"`              // Общий доступ
	SalesChannel        *SalesChannel `json:"salesChannel,omitempty"`        // Метаданные канала продаж
	State               *State        `json:"state,omitempty"`               // Метаданные статуса
	Sum                 *float64      `json:"sum,omitempty"`                 // Сумма
	SyncId              *uuid.UUID    `json:"syncId,omitempty"`              // ID синхронизации. После заполнения недоступен для изменения
	Updated             *Timestamp    `json:"updated,omitempty"`             // Момент последнего обновления
	FactureOut          *FactureOut   `json:"factureOut,omitempty"`          // Ссылка на Счет-фактуру выданный, с которым связан этот платеж в формате Метаданных

}

PaymentIn Входящий платеж. Ключевое слово: paymentin Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vhodqschij-platezh

func (PaymentIn) MetaType

func (p PaymentIn) MetaType() MetaType

func (PaymentIn) String

func (p PaymentIn) String() string

type PaymentInDocument

type PaymentInDocument struct {
	Meta *Meta `json:"meta"`
	// contains filtered or unexported fields
}

PaymentInDocument Входящий платеж, Приходный ордер

func (*PaymentInDocument) UnmarshalJSON

func (p *PaymentInDocument) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON анмаршалит Входящий платеж, Приходный ордер, при expand=payments

type PaymentInService

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

PaymentInService Сервис для работы с входящими платежами.

func NewPaymentInService

func NewPaymentInService(client *Client) *PaymentInService

func (*PaymentInService) Create

func (s *PaymentInService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*PaymentInService) CreateAttribute

func (s *PaymentInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PaymentInService) CreateAttributes

func (s *PaymentInService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PaymentInService) CreateUpdateMany

func (s *PaymentInService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PaymentInService) Delete

func (s *PaymentInService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*PaymentInService) DeleteAttribute

func (s *PaymentInService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*PaymentInService) DeleteAttributes

func (s *PaymentInService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*PaymentInService) DeleteBySyncId

func (s *PaymentInService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*PaymentInService) DeleteMany

func (s *PaymentInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PaymentInService) DeletePublication

func (s *PaymentInService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*PaymentInService) Get

func (s *PaymentInService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*PaymentInService) GetAttributeById

func (s *PaymentInService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*PaymentInService) GetAttributes

func (s *PaymentInService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*PaymentInService) GetById

func (s *PaymentInService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*PaymentInService) GetBySyncId

func (s *PaymentInService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*PaymentInService) GetMetadata

func (s *PaymentInService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*PaymentInService) GetPublicationById

func (s *PaymentInService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*PaymentInService) GetPublications

func (s *PaymentInService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*PaymentInService) Publish

func (s *PaymentInService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*PaymentInService) Remove

func (s *PaymentInService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*PaymentInService) Template

func (s *PaymentInService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*PaymentInService) Update

func (s *PaymentInService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*PaymentInService) UpdateAttribute

func (s *PaymentInService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type PaymentItem

type PaymentItem string

PaymentItem Признак предмета расчета. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar-towary-atributy-suschnosti-priznak-predmeta-rascheta

const (
	PaymentItemGood                PaymentItem = "GOOD"                  // Товар
	PaymentItemExcisableGood       PaymentItem = "EXCISABLE_GOOD"        // Подакцизный товар
	PaymentItemCompoundPaymentItem PaymentItem = "COMPOUND_PAYMENT_ITEM" // Составной предмет расчета
	PaymentItemAnotherPaymentItem  PaymentItem = "ANOTHER_PAYMENT_ITEM"  // Иной предмет расчета
)

type PaymentOut

type PaymentOut struct {
	AccountId           *uuid.UUID    `json:"accountId,omitempty"`           // ID учетной записи
	Agent               *Counterparty `json:"agent,omitempty"`               // Метаданные контрагента
	AgentAccount        *AgentAccount `json:"agentAccount,omitempty"`        // Метаданные счета контрагента
	Applicable          *bool         `json:"applicable,omitempty"`          // Отметка о проведении
	Attributes          *Attributes   `json:"attributes,omitempty"`          // Коллекция метаданных доп. полей. Поля объекта
	Code                *string       `json:"code,omitempty"`                // Код выданного
	Contract            *Contract     `json:"contract,omitempty"`            // Метаданные договора
	Created             *Timestamp    `json:"created,omitempty"`             // Дата создания
	Deleted             *Timestamp    `json:"deleted,omitempty"`             // Момент последнего удаления
	Description         *string       `json:"description,omitempty"`         // Комментарий
	ExpenseItem         *ExpenseItem  `json:"expenseItem,omitempty"`         // Метаданные Статьи расходов
	ExternalCode        *string       `json:"externalCode,omitempty"`        // Внешний код
	Files               *Files        `json:"files,omitempty"`               // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group               *Group        `json:"group,omitempty"`               // Отдел сотрудника
	Id                  *uuid.UUID    `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta         `json:"meta,omitempty"`                // Метаданные
	Moment              *Timestamp    `json:"moment,omitempty"`              // Дата документа
	Name                *string       `json:"name,omitempty"`                // Наименование
	Organization        *Organization `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Owner               *Employee     `json:"owner,omitempty"`               // Владелец (Сотрудник)
	PaymentPurpose      *string       `json:"paymentPurpose,omitempty"`      // Назначение платежа
	Printed             *bool         `json:"printed,omitempty"`             // Напечатан ли документ
	Project             *Project      `json:"project,omitempty"`             // Проект
	Published           *bool         `json:"published,omitempty"`           // Опубликован ли документ
	Rate                *Rate         `json:"rate,omitempty"`                // Валюта
	SalesChannel        *SalesChannel `json:"salesChannel,omitempty"`        // Метаданные канала продаж
	Shared              *bool         `json:"shared,omitempty"`              // Общий доступ
	State               *State        `json:"state,omitempty"`               // Метаданные статуса
	Sum                 *float64      `json:"sum,omitempty"`                 // Сумма
	SyncId              *uuid.UUID    `json:"syncId,omitempty"`              // ID синхронизации. После заполнения недоступен для изменения
	Updated             *Timestamp    `json:"updated,omitempty"`             // Момент последнего обновления
	VatSum              *float64      `json:"vatSum,omitempty"`              // Сумма включая НДС
	FactureIn           *FactureIn    `json:"factureIn,omitempty"`           // Ссылка на Счет-фактуру

}

PaymentOut Исходящий платеж. Ключевое слово: paymentout Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-ishodqschij-platezh

func (PaymentOut) MetaType

func (p PaymentOut) MetaType() MetaType

func (PaymentOut) String

func (p PaymentOut) String() string

type PaymentOutDocument

type PaymentOutDocument struct {
	Meta *Meta `json:"meta"`
	// contains filtered or unexported fields
}

PaymentOutDocument Исходящий платеж, Расходный ордер

func (*PaymentOutDocument) UnmarshalJSON

func (p *PaymentOutDocument) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON анмаршалит Исходящий платеж, Расходный ордер, при expand=payments

type PaymentOutService

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

PaymentOutService Сервис для работы с исходящими платежами.

func NewPaymentOutService

func NewPaymentOutService(client *Client) *PaymentOutService

func (*PaymentOutService) Create

func (s *PaymentOutService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*PaymentOutService) CreateAttribute

func (s *PaymentOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PaymentOutService) CreateAttributes

func (s *PaymentOutService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PaymentOutService) CreateUpdateMany

func (s *PaymentOutService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PaymentOutService) Delete

func (s *PaymentOutService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*PaymentOutService) DeleteAttribute

func (s *PaymentOutService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*PaymentOutService) DeleteAttributes

func (s *PaymentOutService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*PaymentOutService) DeleteBySyncId

func (s *PaymentOutService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*PaymentOutService) DeleteMany

func (s *PaymentOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PaymentOutService) DeletePublication

func (s *PaymentOutService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*PaymentOutService) Get

func (s *PaymentOutService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*PaymentOutService) GetAttributeById

func (s *PaymentOutService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*PaymentOutService) GetAttributes

func (s *PaymentOutService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*PaymentOutService) GetById

func (s *PaymentOutService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*PaymentOutService) GetBySyncId

func (s *PaymentOutService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*PaymentOutService) GetMetadata

func (s *PaymentOutService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*PaymentOutService) GetPublicationById

func (s *PaymentOutService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*PaymentOutService) GetPublications

func (s *PaymentOutService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*PaymentOutService) Publish

func (s *PaymentOutService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*PaymentOutService) Remove

func (s *PaymentOutService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*PaymentOutService) Template

func (s *PaymentOutService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*PaymentOutService) Update

func (s *PaymentOutService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*PaymentOutService) UpdateAttribute

func (s *PaymentOutService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type PaymentTerminal

type PaymentTerminal struct {
	AcquiringType string `json:"acquiringType,omitempty"` // Информация о типе эквайера (например: inpas/payme)
}

PaymentTerminal Информация о платежном терминале. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-attributy-suschnosti-status-attributy-suschnosti-platezhnyj-terminal

func (PaymentTerminal) String

func (p PaymentTerminal) String() string

type Payments

type Payments []PaymentDocument

Payments срез всех типов платежей

type PaymentsIn

type PaymentsIn []PaymentInDocument

PaymentsIn Входящие платежи, Приходные ордеры

type PaymentsOut

type PaymentsOut []PaymentOutDocument

PaymentsOut Исходящие платежи, Расходные ордеры

type PermissionValue

type PermissionValue string
const (
	PermissionNo             PermissionValue = "NO"               // Ни на кого
	PermissionOwn            PermissionValue = "OWN"              // Только свои
	PermissionOwnShared      PermissionValue = "OWN_SHARED"       // Свои и общие
	PermissionOwnGroup       PermissionValue = "OWN_GROUP"        // Свои и отдела
	PermissionOwnGroupShared PermissionValue = "OWN_GROUP_SHARED" // Свои, отдела и общие
	PermissionAll            PermissionValue = "ALL"              // Все
)

type PersonalDiscount

type PersonalDiscount struct {
	AccountId      *uuid.UUID      `json:"accountId,omitempty"`      // ID учетной записи
	Id             *uuid.UUID      `json:"id,omitempty"`             // ID сущности
	Name           *string         `json:"name,omitempty"`           // Наименование Скидки
	Meta           *Meta           `json:"meta,omitempty"`           // Метаданные
	Active         *bool           `json:"active,omitempty"`         // Индикатор, является ли скидка активной на данный момент
	AgentTags      *Tags           `json:"agentTags,omitempty"`      // Тэги контрагентов, к которым применяется скидка, если применяется не ко всем контрагентам
	AllProducts    *bool           `json:"allProducts,omitempty"`    // Индикатор, действует ли скидка на все товары
	AllAgents      *bool           `json:"allAgents,omitempty"`      // Индикатор, действует ли скидка на всех агентов
	Assortment     *Assortment     `json:"assortment,omitempty"`     // Массив метаданных Товаров и Услуг, которые были выбраны для применения скидки, если та применяется не ко всем товарам
	ProductFolders *ProductFolders `json:"productFolders,omitempty"` // Группы товаров которые были выбраны для применения скидки (если применяется не ко всем товарам)
}

PersonalDiscount Персональная скидка. Ключевое слово: personaldiscount

func (PersonalDiscount) MetaType

func (p PersonalDiscount) MetaType() MetaType

func (PersonalDiscount) String

func (p PersonalDiscount) String() string

type PlotSeriesElement

type PlotSeriesElement struct {
	Date    string  `json:"date"`    // Дата
	Credit  float64 `json:"credit"`  // Доход за период
	Debit   float64 `json:"debit"`   // Расход за период
	Balance float64 `json:"balance"` // Баланс (доход-расход)
}

PlotSeriesElement Показатели (series) Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-den-gi-dwizhenie-denezhnyh-sredstw-pokazateli-series

type Positions

type Positions[T PositionTypes] MetaArray[T]

func NewPositions

func NewPositions[T PositionTypes]() *Positions[T]

func (*Positions[T]) Iter

func (p *Positions[T]) Iter() *Iterator[T]

func (*Positions[T]) Push

func (p *Positions[T]) Push(elements ...T)

func (*Positions[T]) Set

func (p *Positions[T]) Set(elements Slice[T])

type Prepayment

type Prepayment struct {
	AccountId     *uuid.UUID                     `json:"accountId,omitempty"`     // ID учетной записи
	Agent         *Counterparty                  `json:"agent,omitempty"`         // Ссылка на контрагента
	Applicable    *bool                          `json:"applicable,omitempty"`    // Отметка о проведении
	Attributes    *Attributes                    `json:"attributes,omitempty"`    // Коллекция метаданных доп. полей. Поля объекта
	CashSum       *float64                       `json:"cashSum,omitempty"`       // Оплачено наличными
	Code          *string                        `json:"code,omitempty"`          // Код
	Created       *Timestamp                     `json:"created,omitempty"`       // Дата создания
	CustomerOrder *CustomerOrder                 `json:"customerOrder,omitempty"` // Метаданные Заказа Покупателя
	Deleted       *Timestamp                     `json:"deleted,omitempty"`       // Момент последнего удаления
	Description   *string                        `json:"description,omitempty"`   // Комментарий
	ExternalCode  *string                        `json:"externalCode,omitempty"`  // Внешний код
	Files         *Files                         `json:"files,omitempty"`         // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group         *Group                         `json:"group,omitempty"`         // Отдел сотрудника
	Id            *uuid.UUID                     `json:"id,omitempty"`            // ID сущности
	Meta          *Meta                          `json:"meta,omitempty"`          // Метаданные
	Moment        *Timestamp                     `json:"moment,omitempty"`        // Дата документа
	Name          *string                        `json:"name,omitempty"`          // Наименование
	NoCashSum     *float64                       `json:"noCashSum,omitempty"`     // Оплачено картой
	Organization  *Organization                  `json:"organization,omitempty"`  // Метаданные юрлица
	Owner         *Employee                      `json:"owner,omitempty"`         // Владелец (Сотрудник)
	Positions     *Positions[PrepaymentPosition] `json:"positions,omitempty"`     // Метаданные позиций Предоплаты
	Printed       *bool                          `json:"printed,omitempty"`       // Напечатан ли документ
	Published     *bool                          `json:"published,omitempty"`     // Опубликован ли документ
	QRSum         *float64                       `json:"qrSum,omitempty"`         // Оплачено по QR-коду
	Rate          *Rate                          `json:"rate,omitempty"`          // Валюта
	RetailShift   *RetailShift                   `json:"retailShift,omitempty"`   // Метаданные Розничной смены
	RetailStore   *RetailStore                   `json:"retailStore,omitempty"`   // Метаданные Точки продаж
	Returns       *PrepaymentReturns             `json:"returns,omitempty"`       // Коллекция метаданных на связанные возвраты
	Shared        *bool                          `json:"shared,omitempty"`        // Общий доступ
	State         *State                         `json:"state,omitempty"`         // Метаданные статуса
	Sum           *float64                       `json:"sum,omitempty"`           // Сумма
	SyncId        *uuid.UUID                     `json:"syncId,omitempty"`        // ID синхронизации. После заполнения недоступен для изменения
	TaxSystem     TaxSystem                      `json:"taxSystem,omitempty"`     // Код системы налогообложения
	Updated       *Timestamp                     `json:"updated,omitempty"`       // Момент последнего обновления
	VatEnabled    *bool                          `json:"vatEnabled,omitempty"`    // Учитывается ли НДС
	VatIncluded   *bool                          `json:"vatIncluded,omitempty"`   // Включен ли НДС в цену
	VatSum        *float64                       `json:"vatSum,omitempty"`        // Сумма включая НДС
}

Prepayment Предоплата. Ключевое слово: prepayment Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-predoplata

func (Prepayment) GetMeta

func (p Prepayment) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Prepayment) MetaType

func (p Prepayment) MetaType() MetaType

func (Prepayment) String

func (p Prepayment) String() string

type PrepaymentPosition

type PrepaymentPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Discount   *float64            `json:"discount,omitempty"`   // Процент скидки или наценки. Наценка указывается отрицательным числом, т.е. -10 создаст наценку в 10%
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
}

PrepaymentPosition Позиция Предоплаты. Ключевое слово: prepaymentposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-predoplata-predoplaty-pozicii-predoplaty

func (PrepaymentPosition) MetaType

func (p PrepaymentPosition) MetaType() MetaType

func (PrepaymentPosition) String

func (p PrepaymentPosition) String() string

type PrepaymentReturn

type PrepaymentReturn struct {
	AccountId    *uuid.UUID                           `json:"accountId,omitempty"`    // ID учетной записи
	Agent        *Counterparty                        `json:"agent,omitempty"`        // Ссылка на контрагента
	Applicable   *bool                                `json:"applicable,omitempty"`   // Отметка о проведении
	Attributes   *Attributes                          `json:"attributes,omitempty"`   // Коллекция метаданных доп. полей. Поля объекта
	CashSum      *float64                             `json:"cashSum,omitempty"`      // Оплачено наличными
	Code         *string                              `json:"code,omitempty"`         // Код
	Created      *Timestamp                           `json:"created,omitempty"`      // Дата создания
	Deleted      *Timestamp                           `json:"deleted,omitempty"`      // Момент последнего удаления
	Description  *string                              `json:"description,omitempty"`  // Комментарий
	ExternalCode *string                              `json:"externalCode,omitempty"` // Внешний код
	Files        *Files                               `json:"files,omitempty"`        // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group        *Group                               `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID                           `json:"id,omitempty"`           // ID сущности
	Meta         *Meta                                `json:"meta,omitempty"`         // Метаданные
	Moment       *Timestamp                           `json:"moment,omitempty"`       // Дата документа
	Name         *string                              `json:"name,omitempty"`         // Наименование
	NoCashSum    *float64                             `json:"noCashSum,omitempty"`    // Оплачено картой
	Organization *Organization                        `json:"organization,omitempty"` // Метаданные юрлица
	Owner        *Employee                            `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Positions    *Positions[PrepaymentReturnPosition] `json:"positions,omitempty"`    // Метаданные позиций
	Prepayment   *Prepayment                          `json:"prepayment,omitempty"`   // Метаданные Предоплаты
	Printed      *bool                                `json:"printed,omitempty"`      // Напечатан ли документ
	Published    *bool                                `json:"published,omitempty"`    // Опубликован ли документ
	QRSum        *float64                             `json:"qrSum,omitempty"`        // Оплачено по QR-коду
	Rate         *Rate                                `json:"rate,omitempty"`         // Валюта
	RetailShift  *RetailShift                         `json:"retailShift,omitempty"`  // Метаданные Розничной смены
	RetailStore  *RetailStore                         `json:"retailStore,omitempty"`  // Метаданные Точки продаж
	Shared       *bool                                `json:"shared,omitempty"`       // Общий доступ
	State        *State                               `json:"state,omitempty"`        // Метаданные статуса
	Sum          *float64                             `json:"sum,omitempty"`          // Сумма
	SyncId       *uuid.UUID                           `json:"syncId,omitempty"`       // ID синхронизации. После заполнения недоступен для изменения
	TaxSystem    TaxSystem                            `json:"taxSystem,omitempty"`    // Код системы налогообложения
	Updated      *Timestamp                           `json:"updated,omitempty"`      // Момент последнего обновления
	VatEnabled   *bool                                `json:"vatEnabled,omitempty"`   // Учитывается ли НДС
	VatIncluded  *bool                                `json:"vatIncluded,omitempty"`  // Включен ли НДС в цену
	VatSum       *float64                             `json:"vatSum,omitempty"`       // Сумма включая НДС
}

PrepaymentReturn Возврат предоплаты. Ключевое слово: prepaymentreturn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vozwrat-predoplaty

func (PrepaymentReturn) GetMeta

func (p PrepaymentReturn) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (PrepaymentReturn) MetaType

func (p PrepaymentReturn) MetaType() MetaType

func (PrepaymentReturn) String

func (p PrepaymentReturn) String() string

type PrepaymentReturnPosition

type PrepaymentReturnPosition struct {
	PrepaymentPosition
}

PrepaymentReturnPosition Позиция Возврата предоплаты. Ключевое слово: prepaymentreturnposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vozwrat-predoplaty-atributy-suschnosti-pozicii-vozwrata-predoplaty

func (PrepaymentReturnPosition) MetaType

func (p PrepaymentReturnPosition) MetaType() MetaType

func (PrepaymentReturnPosition) String

func (p PrepaymentReturnPosition) String() string

type PrepaymentReturnService

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

PrepaymentReturnService Сервис для работы с возвратами предоплат.

func NewPrepaymentReturnService

func NewPrepaymentReturnService(client *Client) *PrepaymentReturnService

func (*PrepaymentReturnService) CreateAttribute

func (s *PrepaymentReturnService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PrepaymentReturnService) CreateAttributes

func (s *PrepaymentReturnService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PrepaymentReturnService) CreateOrUpdatePositionTrackingCodes

func (s *PrepaymentReturnService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*PrepaymentReturnService) CreatePosition

func (s *PrepaymentReturnService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*PrepaymentReturnService) CreatePositions

func (s *PrepaymentReturnService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*PrepaymentReturnService) DeleteAttribute

func (s *PrepaymentReturnService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*PrepaymentReturnService) DeleteAttributes

func (s *PrepaymentReturnService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*PrepaymentReturnService) DeleteBySyncId

func (s *PrepaymentReturnService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*PrepaymentReturnService) DeletePosition

func (s *PrepaymentReturnService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*PrepaymentReturnService) DeletePositionTrackingCodes

func (s *PrepaymentReturnService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*PrepaymentReturnService) Get

func (s *PrepaymentReturnService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*PrepaymentReturnService) GetAttributeById

func (s *PrepaymentReturnService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*PrepaymentReturnService) GetAttributes

func (s *PrepaymentReturnService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*PrepaymentReturnService) GetById

func (s *PrepaymentReturnService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*PrepaymentReturnService) GetBySyncId

func (s *PrepaymentReturnService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*PrepaymentReturnService) GetMetadata

func (s *PrepaymentReturnService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*PrepaymentReturnService) GetPositionById

func (s *PrepaymentReturnService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PrepaymentReturnService) GetPositionTrackingCodes

func (s *PrepaymentReturnService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*PrepaymentReturnService) GetPositions

func (s *PrepaymentReturnService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PrepaymentReturnService) Remove

func (s *PrepaymentReturnService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*PrepaymentReturnService) UpdateAttribute

func (s *PrepaymentReturnService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*PrepaymentReturnService) UpdatePosition

func (s *PrepaymentReturnService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type PrepaymentReturns

type PrepaymentReturns = Iterator[PrepaymentReturn]

type PrepaymentService

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

PrepaymentService Сервис для работы с предоплатами.

func NewPrepaymentService

func NewPrepaymentService(client *Client) *PrepaymentService

func (*PrepaymentService) CreateAttribute

func (s *PrepaymentService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PrepaymentService) CreateAttributes

func (s *PrepaymentService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PrepaymentService) CreateOrUpdatePositionTrackingCodes

func (s *PrepaymentService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*PrepaymentService) CreatePosition

func (s *PrepaymentService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*PrepaymentService) CreatePositions

func (s *PrepaymentService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*PrepaymentService) Delete

func (s *PrepaymentService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*PrepaymentService) DeleteAttribute

func (s *PrepaymentService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*PrepaymentService) DeleteAttributes

func (s *PrepaymentService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*PrepaymentService) DeleteBySyncId

func (s *PrepaymentService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*PrepaymentService) DeletePosition

func (s *PrepaymentService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*PrepaymentService) DeletePositionTrackingCodes

func (s *PrepaymentService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*PrepaymentService) Get

func (s *PrepaymentService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*PrepaymentService) GetAttributeById

func (s *PrepaymentService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*PrepaymentService) GetAttributes

func (s *PrepaymentService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*PrepaymentService) GetById

func (s *PrepaymentService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*PrepaymentService) GetBySyncId

func (s *PrepaymentService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*PrepaymentService) GetMetadata

func (s *PrepaymentService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*PrepaymentService) GetPositionById

func (s *PrepaymentService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PrepaymentService) GetPositionTrackingCodes

func (s *PrepaymentService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*PrepaymentService) GetPositions

func (s *PrepaymentService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PrepaymentService) Remove

func (s *PrepaymentService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*PrepaymentService) UpdateAttribute

func (s *PrepaymentService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*PrepaymentService) UpdatePosition

func (s *PrepaymentService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type Prepayments

type Prepayments = Iterator[Prepayment]

type PriceList

type PriceList struct {
	AccountId    *uuid.UUID                    `json:"accountId,omitempty"`    // ID учетной записи
	Applicable   *bool                         `json:"applicable,omitempty"`   // Отметка о проведении
	Attributes   *Attributes                   `json:"attributes,omitempty"`   // Коллекция метаданных доп. полей
	Code         *string                       `json:"code,omitempty"`         // Код
	Columns      *PriceListColumns             `json:"columns,omitempty"`      // Массив столбцов описания таблицы
	Created      *Timestamp                    `json:"created,omitempty"`      // Дата создания
	Deleted      *Timestamp                    `json:"deleted,omitempty"`      // Момент последнего удаления
	Description  *string                       `json:"description,omitempty"`  // Комментарий
	ExternalCode *string                       `json:"externalCode,omitempty"` // Внешний код
	Files        *Files                        `json:"files,omitempty"`        // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group        *Group                        `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID                    `json:"id,omitempty"`           // ID сущности
	Meta         *Meta                         `json:"meta,omitempty"`         // Метаданные
	Moment       *Timestamp                    `json:"moment,omitempty"`       // Дата документа
	Name         *string                       `json:"name,omitempty"`         // Наименование
	Organization *Organization                 `json:"organization,omitempty"` // Метаданные юрлица
	Owner        *Employee                     `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Positions    *Positions[PriceListPosition] `json:"positions,omitempty"`    // Метаданные позиций Прайс-листа
	PriceType    *PriceType                    `json:"priceType,omitempty"`    // Объект типа цены
	Printed      *bool                         `json:"printed,omitempty"`      // Напечатан ли документ
	Published    *bool                         `json:"published,omitempty"`    // Опубликован ли документ
	Shared       *bool                         `json:"shared,omitempty"`       // Общий доступ
	State        *State                        `json:"state,omitempty"`        // Метаданные статуса Прайс-листа
	SyncId       *uuid.UUID                    `json:"syncId,omitempty"`       // ID синхронизации. После заполнения недоступен для изменения
	Updated      *Timestamp                    `json:"updated,omitempty"`      // Момент последнего обновления
}

PriceList Прайс-лист. Ключевое слово: pricelist Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-prajs-list

func (PriceList) MetaType

func (p PriceList) MetaType() MetaType

func (PriceList) String

func (p PriceList) String() string

type PriceListCell

type PriceListCell struct {
	Column *string  `json:"column,omitempty"` // Название столбца, к которому относится данная ячейка
	Sum    *float64 `json:"sum,omitempty"`    // Числовое значение ячейки
}

PriceListCell Ячейка прайс листа. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-prajs-list-prajs-listy-yachejki

func (PriceListCell) String

func (p PriceListCell) String() string

type PriceListCells

type PriceListCells = Iterator[PriceListCell]

type PriceListColumn

type PriceListColumn struct {
	Name               *string `json:"name,omitempty"`               // Название столбца
	PercentageDiscount *int    `json:"percentageDiscount,omitempty"` // Процентная наценка или скидка по умолчанию для столбца
}

PriceListColumn Столбец прайс листа. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-prajs-list-prajs-listy-stolbcy

func (PriceListColumn) String

func (p PriceListColumn) String() string

type PriceListColumns

type PriceListColumns = Iterator[PriceListColumn]

type PriceListPosition

type PriceListPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Товар/услуга/модификация, которую представляет собой позиция
	Cells      *PriceListCells     `json:"cells,omitempty"`      // Значения столбцов
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка товара
}

PriceListPosition Позиция прайс листа. Ключевое слово: pricelistrow Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-prajs-list-prajs-listy-pozicii-prajs-lista

func (PriceListPosition) MetaType

func (p PriceListPosition) MetaType() MetaType

func (PriceListPosition) String

func (p PriceListPosition) String() string

type PriceListService

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

PriceListService Сервис для работы с прайс-листами.

func NewPriceListService

func NewPriceListService(client *Client) *PriceListService

func (*PriceListService) Create

func (s *PriceListService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*PriceListService) CreateAttribute

func (s *PriceListService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PriceListService) CreateAttributes

func (s *PriceListService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PriceListService) CreateOrUpdatePositionTrackingCodes

func (s *PriceListService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*PriceListService) CreatePosition

func (s *PriceListService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*PriceListService) CreatePositions

func (s *PriceListService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*PriceListService) CreateUpdateMany

func (s *PriceListService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PriceListService) Delete

func (s *PriceListService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*PriceListService) DeleteAttribute

func (s *PriceListService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*PriceListService) DeleteAttributes

func (s *PriceListService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*PriceListService) DeleteBySyncId

func (s *PriceListService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*PriceListService) DeleteMany

func (s *PriceListService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PriceListService) DeletePosition

func (s *PriceListService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*PriceListService) DeletePositionTrackingCodes

func (s *PriceListService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*PriceListService) Get

func (s *PriceListService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*PriceListService) GetAttributeById

func (s *PriceListService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*PriceListService) GetAttributes

func (s *PriceListService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*PriceListService) GetById

func (s *PriceListService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*PriceListService) GetBySyncId

func (s *PriceListService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*PriceListService) GetMetadata

func (s *PriceListService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*PriceListService) GetPositionById

func (s *PriceListService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PriceListService) GetPositionTrackingCodes

func (s *PriceListService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*PriceListService) GetPositions

func (s *PriceListService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PriceListService) Remove

func (s *PriceListService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*PriceListService) Update

func (s *PriceListService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*PriceListService) UpdateAttribute

func (s *PriceListService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*PriceListService) UpdatePosition

func (s *PriceListService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type PriceType

type PriceType struct {
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код Типа цены
	Id           *uuid.UUID `json:"id,omitempty"`           // ID типа цены
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные Типа цены
	Name         *string    `json:"name,omitempty"`         // Наименование Типа цены
}

PriceType Тип цены. Ключевое слово: pricetype Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tipy-cen

func (PriceType) MetaType

func (p PriceType) MetaType() MetaType

func (PriceType) String

func (p PriceType) String() string

type PriceTypes

type PriceTypes = Iterator[PriceType]

type PrintDocRequest

type PrintDocRequest struct {
	Template  *MetaWrapper             `json:"template,omitempty"`
	Templates *Slice[PrintDocTemplate] `json:"templates,omitempty"`
	Extension Extension                `json:"extension,omitempty"`
}

type PrintDocTemplate

type PrintDocTemplate struct {
	Template *MetaWrapper `json:"template,omitempty"`
	Count    int          `json:"count,omitempty"`
}

type PrintFile

type PrintFile struct {
	*bytes.Buffer
	FileName string
}

func GetFileFromResponse

func GetFileFromResponse(resp *Response) (*PrintFile, error)

func (*PrintFile) SaveToFile

func (f *PrintFile) SaveToFile(filename string) error

type PrintFormat

type PrintFormat string
const (
	PrintFormatPDF           PrintFormat = "pdf"        // Скачать в формате PDF
	PrintFormatXLS           PrintFormat = "xls"        // Скачать в формате Excel
	PrintFormatODS           PrintFormat = "ods"        // Скачать в формате Open Office Calc
	PrintFormatDefault       PrintFormat = ""           // Предлагать выбор
	PrintFormatOpenInBrowser PrintFormat = "individual" // Открыть в браузере
)

type PrintPriceRequest

type PrintPriceRequest struct {
	Organization MetaWrapper                       `json:"organization,omitempty"` // Метаданные Юрлица
	Count        int                               `json:"count,omitempty"`        // Количество ценников/термоэтикеток
	SalePrice    PrintPriceRequestPriceTypeWrapper `json:"salePrice,omitempty"`    // Цена продажи
	Template     MetaWrapper                       `json:"template,omitempty"`     // Метаданные Шаблона печати
}

type PrintPriceRequestPriceTypeWrapper

type PrintPriceRequestPriceTypeWrapper struct {
	PriceType MetaWrapper `json:"priceType,omitempty"` // Метаданные типа цены
}

type PriorityOfdSend

type PriorityOfdSend string

PriorityOfdSend Приоритет отправки электронного чека. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-prioritet-otprawki-alektronnogo-cheka

const (
	PriorityOfdSendPhone PriorityOfdSend = "phone" // Приоритет отправки на телефон
	PriorityOfdSendEmail PriorityOfdSend = "email" // Приоритет отправки на e-mail
	PriorityOfdSendNone  PriorityOfdSend = "none"  // Отсутствие отправки чека
)

type Processing

type Processing struct {
	AccountId           *uuid.UUID                        `json:"accountId,omitempty"`           // ID учетной записи
	Applicable          *bool                             `json:"applicable,omitempty"`          // Отметка о проведении
	Attributes          *Attributes                       `json:"attributes,omitempty"`          // Коллекция метаданных доп. полей. Поля объекта
	Code                *string                           `json:"code,omitempty"`                // Код
	Created             *Timestamp                        `json:"created,omitempty"`             // Дата создания
	Deleted             *Timestamp                        `json:"deleted,omitempty"`             // Момент последнего удаления
	Description         *string                           `json:"description,omitempty"`         // Комментарий
	ExternalCode        *string                           `json:"externalCode,omitempty"`        // Внешний код
	Files               *Files                            `json:"files,omitempty"`               // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group               *Group                            `json:"group,omitempty"`               // Отдел сотрудника
	Id                  *uuid.UUID                        `json:"id,omitempty"`                  // ID сущности
	Materials           Slice[ProcessingPositionMaterial] `json:"materials,omitempty"`           // Список Метаданных материалов Тех. операции
	MaterialsStore      *Store                            `json:"materialsStore,omitempty"`      // Метаданные склада для материалов
	Meta                *Meta                             `json:"meta,omitempty"`                // Метаданные
	Moment              *Timestamp                        `json:"moment,omitempty"`              // Дата документа
	Name                *string                           `json:"name,omitempty"`                // Наименование
	Organization        *Organization                     `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount                     `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Owner               *Employee                         `json:"owner,omitempty"`               // Владелец (Сотрудник)
	Printed             *bool                             `json:"printed,omitempty"`             // Напечатан ли документ
	ProcessingPlan      *ProcessingPlan                   `json:"processingPlan,omitempty"`      // Метаданные Тех. операции
	ProcessingSum       *float64                          `json:"processingSum,omitempty"`       // Затраты на производство
	Products            Slice[ProcessingPositionProduct]  `json:"products,omitempty"`            // Список Метаданных готовых продуктов Тех. операции
	ProductsStore       *Store                            `json:"productsStore,omitempty"`       // Метаданные склада для продукции
	Project             *Project                          `json:"project,omitempty"`             // Метаданные проекта
	Published           *bool                             `json:"published,omitempty"`           // Опубликован ли документ
	Quantity            *float64                          `json:"quantity,omitempty"`            // Объем производства
	Shared              *bool                             `json:"shared,omitempty"`              // Общий доступ
	State               *State                            `json:"state,omitempty"`               // Метаданные статуса
	SyncId              *uuid.UUID                        `json:"syncId,omitempty"`              // ID синхронизации. После заполнения недоступен для изменения
	Updated             *Timestamp                        `json:"updated,omitempty"`             // Момент последнего обновления
	ProcessingOrder     *ProcessingOrder                  `json:"processingOrder,omitempty"`     // Ссылка на заказ на производство в формате Метаданных
}

Processing Техоперация. Ключевое слово: processing Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-tehoperaciq

func (Processing) MetaType

func (p Processing) MetaType() MetaType

func (Processing) String

func (p Processing) String() string

type ProcessingOrder

type ProcessingOrder struct {
	AccountId             *uuid.UUID                          `json:"accountId,omitempty"`             // ID учетной записи
	Applicable            *bool                               `json:"applicable,omitempty"`            // Отметка о проведении
	Attributes            *Attributes                         `json:"attributes,omitempty"`            // Коллекция метаданных доп. полей. Поля объекта
	Code                  *string                             `json:"code,omitempty"`                  // Код
	Created               *Timestamp                          `json:"created,omitempty"`               // Дата создания
	Deleted               *Timestamp                          `json:"deleted,omitempty"`               // Момент последнего удаления
	DeliveryPlannedMoment *Timestamp                          `json:"deliveryPlannedMoment,omitempty"` // Планируемая дата производства
	Description           *string                             `json:"description,omitempty"`           // Комментарий
	ExternalCode          *string                             `json:"externalCode,omitempty"`          // Внешний код
	Files                 *Files                              `json:"files,omitempty"`                 // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group                 *Group                              `json:"group,omitempty"`                 // Отдел сотрудника
	Id                    *uuid.UUID                          `json:"id,omitempty"`                    // ID сущности
	Meta                  *Meta                               `json:"meta,omitempty"`                  // Метаданные
	Moment                *Timestamp                          `json:"moment,omitempty"`                // Дата документа
	Name                  *string                             `json:"name,omitempty"`                  // Наименование
	Organization          *Organization                       `json:"organization,omitempty"`          // Метаданные юрлица
	OrganizationAccount   *AgentAccount                       `json:"organizationAccount,omitempty"`   // Метаданные счета юрлица
	Owner                 *Employee                           `json:"owner,omitempty"`                 // Владелец (Сотрудник)
	Positions             *Positions[ProcessingOrderPosition] `json:"positions,omitempty"`             // Метаданные позиций Заказа на производство
	Printed               *bool                               `json:"printed,omitempty"`               // Напечатан ли документ
	ProcessingPlan        *ProcessingPlan                     `json:"processingPlan,omitempty"`        // Метаданные Тех. плана
	Project               *Project                            `json:"project,omitempty"`               // Метаданные проекта
	Published             *bool                               `json:"published,omitempty"`             // Опубликован ли документ
	Quantity              *float64                            `json:"quantity,omitempty"`              // Объем производства
	Shared                *bool                               `json:"shared,omitempty"`                // Общий доступ
	State                 *State                              `json:"state,omitempty"`                 // Метаданные статуса
	Store                 *Store                              `json:"store,omitempty"`                 // Метаданные склада
	SyncId                *uuid.UUID                          `json:"syncId,omitempty"`                // ID синхронизации. После заполнения недоступен для изменения
	Updated               *Timestamp                          `json:"updated,omitempty"`               // Момент последнего обновления
	Processings           *Processings                        `json:"processings,omitempty"`           // Массив ссылок на связанные тех. операции в формате Метаданных
}

ProcessingOrder Заказ на производство. Ключевое слово: processingorder Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-zakaz-na-proizwodstwo

func (ProcessingOrder) MetaType

func (p ProcessingOrder) MetaType() MetaType

func (ProcessingOrder) String

func (p ProcessingOrder) String() string

type ProcessingOrderPosition

type ProcessingOrderPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Reserve    *float64            `json:"reserve,omitempty"`    // Резерв данной позиции
}

ProcessingOrderPosition Позиция Заказа на производство. Ключевое слово: processingorderposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-zakaz-na-proizwodstwo-zakazy-na-proizwodstwo-pozicii-zakaza-na-proizwodstwo

func (ProcessingOrderPosition) MetaType

func (p ProcessingOrderPosition) MetaType() MetaType

func (ProcessingOrderPosition) String

func (p ProcessingOrderPosition) String() string

type ProcessingOrderService

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

ProcessingOrderService Сервис для работы с заказами на производство.

func NewProcessingOrderService

func NewProcessingOrderService(client *Client) *ProcessingOrderService

func (*ProcessingOrderService) Create

func (s *ProcessingOrderService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ProcessingOrderService) CreateAttribute

func (s *ProcessingOrderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProcessingOrderService) CreateAttributes

func (s *ProcessingOrderService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProcessingOrderService) CreateOrUpdatePositionTrackingCodes

func (s *ProcessingOrderService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*ProcessingOrderService) CreatePosition

func (s *ProcessingOrderService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*ProcessingOrderService) CreatePositions

func (s *ProcessingOrderService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*ProcessingOrderService) CreateUpdateMany

func (s *ProcessingOrderService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingOrderService) Delete

func (s *ProcessingOrderService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ProcessingOrderService) DeleteAttribute

func (s *ProcessingOrderService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*ProcessingOrderService) DeleteAttributes

func (s *ProcessingOrderService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*ProcessingOrderService) DeleteBySyncId

func (s *ProcessingOrderService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*ProcessingOrderService) DeleteMany

func (s *ProcessingOrderService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingOrderService) DeletePosition

func (s *ProcessingOrderService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*ProcessingOrderService) DeletePositionTrackingCodes

func (s *ProcessingOrderService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*ProcessingOrderService) Get

func (s *ProcessingOrderService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ProcessingOrderService) GetAttributeById

func (s *ProcessingOrderService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*ProcessingOrderService) GetAttributes

func (s *ProcessingOrderService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*ProcessingOrderService) GetById

func (s *ProcessingOrderService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ProcessingOrderService) GetBySyncId

func (s *ProcessingOrderService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*ProcessingOrderService) GetMetadata

func (s *ProcessingOrderService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*ProcessingOrderService) GetPositionById

func (s *ProcessingOrderService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*ProcessingOrderService) GetPositionTrackingCodes

func (s *ProcessingOrderService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*ProcessingOrderService) GetPositions

func (s *ProcessingOrderService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*ProcessingOrderService) Remove

func (s *ProcessingOrderService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*ProcessingOrderService) Template

func (s *ProcessingOrderService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*ProcessingOrderService) Update

func (s *ProcessingOrderService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ProcessingOrderService) UpdateAttribute

func (s *ProcessingOrderService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*ProcessingOrderService) UpdatePosition

func (s *ProcessingOrderService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type ProcessingPlan

type ProcessingPlan struct {
	AccountId         *uuid.UUID                         `json:"accountId,omitempty"`         // ID учетной записи
	Archived          *bool                              `json:"archived,omitempty"`          // Добавлена ли Тех. карта в архив
	Code              *string                            `json:"code,omitempty"`              // Код Тех. карты
	Cost              *float64                           `json:"cost,omitempty"`              // Стоимость производства
	ExternalCode      *string                            `json:"externalCode,omitempty"`      // Внешний код
	Group             *Group                             `json:"group,omitempty"`             // Отдел сотрудника
	Id                *uuid.UUID                         `json:"id,omitempty"`                // ID сущности
	Stages            *MetaArray[ProcessingStage]        `json:"stages,omitempty"`            // Коллекция метаданных этапов Тех. карты
	Materials         *Positions[ProcessingPlanMaterial] `json:"materials,omitempty"`         // Список Метаданных материалов Тех. операции
	Meta              *Meta                              `json:"meta,omitempty"`              // Метаданные
	Name              *string                            `json:"name,omitempty"`              // Наименование
	Owner             *Employee                          `json:"owner,omitempty"`             // Владелец (Сотрудник)
	Parent            *Group                             `json:"parent,omitempty"`            // Метаданные группы Тех. карты
	PathName          *string                            `json:"pathName,omitempty"`          // Наименование группы, в которую входит Тех. карта
	ProcessingProcess *ProcessingProcess                 `json:"processingProcess,omitempty"` // Метаданные Тех. процесса
	Products          *Positions[ProcessingPlanProduct]  `json:"products,omitempty"`          // Коллекция метаданных готовых продуктов Тех. карты
	Shared            *bool                              `json:"shared,omitempty"`            // Общий доступ
	Updated           *Timestamp                         `json:"updated,omitempty"`           // Момент последнего обновления
}

ProcessingPlan Техкарта. Ключевое слово: processingplan Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tehkarta-tehkarty

func (ProcessingPlan) MetaType

func (p ProcessingPlan) MetaType() MetaType

func (ProcessingPlan) String

func (p ProcessingPlan) String() string

type ProcessingPlanFolder

type ProcessingPlanFolder struct {
	AccountId    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	Archived     *bool      `json:"archived,omitempty"`     // Добавлена ли Группа тех. карт в архив
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код Группы тех. карт
	Code         *string    `json:"code,omitempty"`         // Код Группы тех. карт
	Description  *string    `json:"description,omitempty"`  // Описание Группы тех. карт
	Group        *Group     `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID `json:"id,omitempty"`           // ID Группы тех. карт
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные
	Name         *string    `json:"name,omitempty"`         // Наименование
	Owner        *Employee  `json:"owner,omitempty"`        // Владелец (Сотрудник)
	PathName     *string    `json:"pathName,omitempty"`     // Наименование Группы тех. карт, в которую входит данная Группа тех. карт
	Shared       *bool      `json:"shared,omitempty"`       // Общий доступ
	Updated      *Timestamp `json:"updated,omitempty"`      // Момент последнего обновления сущности
}

ProcessingPlanFolder Группа тех. карт. Ключевое слово: processingplanfolder Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-gruppa-teh-kart

func (ProcessingPlanFolder) MetaType

func (p ProcessingPlanFolder) MetaType() MetaType

func (ProcessingPlanFolder) String

func (p ProcessingPlanFolder) String() string

type ProcessingPlanFolderService

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

ProcessingPlanFolderService Сервис для работы с группами техкарт.

func NewProcessingPlanFolderService

func NewProcessingPlanFolderService(client *Client) *ProcessingPlanFolderService

func (*ProcessingPlanFolderService) Create

func (s *ProcessingPlanFolderService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ProcessingPlanFolderService) Delete

func (s *ProcessingPlanFolderService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ProcessingPlanFolderService) Get

func (s *ProcessingPlanFolderService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ProcessingPlanFolderService) GetById

func (s *ProcessingPlanFolderService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ProcessingPlanFolderService) GetMetadata

func (s *ProcessingPlanFolderService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*ProcessingPlanFolderService) GetNamedFilterById

func (s *ProcessingPlanFolderService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*ProcessingPlanFolderService) GetNamedFilters

func (s *ProcessingPlanFolderService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*ProcessingPlanFolderService) Remove

func (s *ProcessingPlanFolderService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*ProcessingPlanFolderService) Update

func (s *ProcessingPlanFolderService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type ProcessingPlanMaterial

type ProcessingPlanMaterial struct {
	AccountId                 *uuid.UUID          `json:"accountId,omitempty"`                 // ID учетной записи
	Assortment                *AssortmentPosition `json:"assortment,omitempty"`                // Метаданные товара или модификации позиции
	Id                        *uuid.UUID          `json:"id,omitempty"`                        // ID позиции
	Product                   *Product            `json:"product,omitempty"`                   // Метаданные товара позиции. В случае, если в поле assortment указана модификация, то это поле содержит товар, к которому относится эта модификация
	Quantity                  *float64            `json:"quantity,omitempty"`                  // Количество товаров данного вида в позиции
	ProcessingProcessPosition *Meta               `json:"processingProcessPosition,omitempty"` // Метаданные позиции Тех. процесса
}

ProcessingPlanMaterial Материал Тех. карты. Ключевое слово: processingplanmaterial Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-teh-karty-materialy-teh-karty

func (ProcessingPlanMaterial) MetaType

func (p ProcessingPlanMaterial) MetaType() MetaType

func (ProcessingPlanMaterial) String

func (p ProcessingPlanMaterial) String() string

type ProcessingPlanProduct

type ProcessingPlanProduct struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара или модификации позиции
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Product    *Product            `json:"product,omitempty"`    // Метаданные товара позиции. В случае, если в поле assortment указана модификация, то это поле содержит товар, к которому относится эта модификация
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров данного вида в позиции
}

ProcessingPlanProduct Продукт Тех. карты. Ключевое слово: processingplanresult Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-teh-karty-produkty-teh-karty

func (ProcessingPlanProduct) MetaType

func (p ProcessingPlanProduct) MetaType() MetaType

func (ProcessingPlanProduct) String

func (p ProcessingPlanProduct) String() string

type ProcessingPlanService

type ProcessingPlanService struct {
	Endpoint
	// contains filtered or unexported fields
}

ProcessingPlanService Сервис для работы с тех картами.

func NewProcessingPlanService

func NewProcessingPlanService(client *Client) *ProcessingPlanService

func (*ProcessingPlanService) Create

func (s *ProcessingPlanService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ProcessingPlanService) CreateMaterial

func (*ProcessingPlanService) CreateOrUpdatePositionTrackingCodes

func (s *ProcessingPlanService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*ProcessingPlanService) CreatePosition

func (s *ProcessingPlanService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*ProcessingPlanService) CreatePositions

func (s *ProcessingPlanService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*ProcessingPlanService) CreateProduct

func (*ProcessingPlanService) CreateUpdateMany

func (s *ProcessingPlanService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingPlanService) Delete

func (s *ProcessingPlanService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ProcessingPlanService) DeleteMany

func (s *ProcessingPlanService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingPlanService) DeleteMaterial

func (s *ProcessingPlanService) DeleteMaterial(ctx context.Context, id, materialId uuid.UUID) (bool, *Response, error)

func (*ProcessingPlanService) DeletePosition

func (s *ProcessingPlanService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*ProcessingPlanService) DeletePositionTrackingCodes

func (s *ProcessingPlanService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*ProcessingPlanService) DeleteProduct

func (s *ProcessingPlanService) DeleteProduct(ctx context.Context, id, productId uuid.UUID) (bool, *Response, error)

func (*ProcessingPlanService) Get

func (s *ProcessingPlanService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ProcessingPlanService) GetById

func (s *ProcessingPlanService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ProcessingPlanService) GetMaterialById

func (s *ProcessingPlanService) GetMaterialById(ctx context.Context, id, materialId uuid.UUID) (*ProcessingPlanMaterial, *Response, error)

func (*ProcessingPlanService) GetMaterials

func (*ProcessingPlanService) GetPositionById

func (s *ProcessingPlanService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*ProcessingPlanService) GetPositionTrackingCodes

func (s *ProcessingPlanService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*ProcessingPlanService) GetPositions

func (s *ProcessingPlanService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*ProcessingPlanService) GetProductById

func (s *ProcessingPlanService) GetProductById(ctx context.Context, id, productId uuid.UUID) (*ProcessingPlanProduct, *Response, error)

func (*ProcessingPlanService) GetProducts

func (*ProcessingPlanService) GetStageById

func (s *ProcessingPlanService) GetStageById(ctx context.Context, id, stageId uuid.UUID) (*ProcessingStage, *Response, error)

func (*ProcessingPlanService) GetStages

func (*ProcessingPlanService) Remove

func (s *ProcessingPlanService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*ProcessingPlanService) Update

func (s *ProcessingPlanService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ProcessingPlanService) UpdateMaterial

func (s *ProcessingPlanService) UpdateMaterial(ctx context.Context, id, materialId uuid.UUID, material *ProcessingPlanMaterial) (*ProcessingPlanMaterial, *Response, error)

func (*ProcessingPlanService) UpdatePosition

func (s *ProcessingPlanService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*ProcessingPlanService) UpdateProduct

func (s *ProcessingPlanService) UpdateProduct(ctx context.Context, id, productId uuid.UUID, product *ProcessingPlanProduct) (*ProcessingPlanProduct, *Response, error)

func (*ProcessingPlanService) UpdateStage

func (s *ProcessingPlanService) UpdateStage(ctx context.Context, id, stageId uuid.UUID, stage *ProcessingStage) (*ProcessingStage, *Response, error)

type ProcessingPosition

type ProcessingPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/серии/модификации, которую представляет собой позиция
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров данного вида в позиции
}

ProcessingPosition общие поля для материала тех.операции и продукта тех.операции

func (ProcessingPosition) String

func (p ProcessingPosition) String() string

type ProcessingPositionMaterial

type ProcessingPositionMaterial struct {
	ProcessingPosition
}

ProcessingPositionMaterial Материал Техоперации. Ключевое слово: processingpositionmaterial Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-tehoperaciq-tehoperacii-materialy-tehoperacii

func (ProcessingPositionMaterial) MetaType

func (p ProcessingPositionMaterial) MetaType() MetaType

func (ProcessingPositionMaterial) String

type ProcessingPositionProduct

type ProcessingPositionProduct struct {
	ProcessingPosition
}

ProcessingPositionProduct Продукт Техоперации. Ключевое слово: processingpositionresult Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-tehoperaciq-tehoperacii-produkty-tehoperacii

func (ProcessingPositionProduct) MetaType

func (p ProcessingPositionProduct) MetaType() MetaType

func (ProcessingPositionProduct) String

func (p ProcessingPositionProduct) String() string

type ProcessingProcess

type ProcessingProcess struct {
	AccountId    *uuid.UUID                            `json:"accountId,omitempty"`    // ID учетной записи
	Archived     *bool                                 `json:"archived,omitempty"`     // Добавлен ли Тех. процесс в архив
	Description  *string                               `json:"description,omitempty"`  // Комментарий Тех. процесса
	ExternalCode *string                               `json:"externalCode,omitempty"` // Внешний код Тех. процесса
	Group        *Group                                `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID                            `json:"id,omitempty"`           // ID Тех. процесса
	Meta         *Meta                                 `json:"meta,omitempty"`         // Метаданные Тех. процесса
	Name         *string                               `json:"name,omitempty"`         // Наименование Тех. процесса
	Owner        *Employee                             `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Positions    *Positions[ProcessingProcessPosition] `json:"positions,omitempty"`    // Метаданные позиций Тех. процесса
	Shared       *bool                                 `json:"shared,omitempty"`       // Общий доступ
	Updated      *Timestamp                            `json:"updated,omitempty"`      // Момент последнего обновления сущности
}

ProcessingProcess Техпроцесс. Ключевое слово: processingprocess Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tehprocess

func (ProcessingProcess) MetaType

func (p ProcessingProcess) MetaType() MetaType

func (ProcessingProcess) String

func (p ProcessingProcess) String() string

type ProcessingProcessPosition

type ProcessingProcessPosition struct {
	AccountId       *uuid.UUID       `json:"accountId,omitempty"`       // ID учетной записи
	Id              *uuid.UUID       `json:"id,omitempty"`              // ID позиции
	Meta            *Meta            `json:"meta,omitempty"`            // Метаданные позиции Тех. процесса
	ProcessingStage *ProcessingStage `json:"processingstage,omitempty"` // Метаданные этапа, который представляет собой позиция
}

ProcessingProcessPosition Позиция Тех. процесса. Ключевое слово: processingprocessposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-process-teh-processy-atributy-wlozhennyh-suschnostej-pozicii-teh-processa

func (ProcessingProcessPosition) MetaType

func (p ProcessingProcessPosition) MetaType() MetaType

func (ProcessingProcessPosition) String

func (p ProcessingProcessPosition) String() string

type ProcessingProcessService

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

ProcessingProcessService Сервис для работы с тех процессами.

func NewProcessingProcessService

func NewProcessingProcessService(client *Client) *ProcessingProcessService

func (*ProcessingProcessService) Create

func (s *ProcessingProcessService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ProcessingProcessService) CreateOrUpdatePositionTrackingCodes

func (s *ProcessingProcessService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*ProcessingProcessService) CreatePosition

func (s *ProcessingProcessService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*ProcessingProcessService) CreatePositions

func (s *ProcessingProcessService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*ProcessingProcessService) CreateUpdateMany

func (s *ProcessingProcessService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingProcessService) Delete

func (s *ProcessingProcessService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ProcessingProcessService) DeleteMany

func (s *ProcessingProcessService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingProcessService) DeletePosition

func (s *ProcessingProcessService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*ProcessingProcessService) DeletePositionTrackingCodes

func (s *ProcessingProcessService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*ProcessingProcessService) Get

func (s *ProcessingProcessService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ProcessingProcessService) GetById

func (s *ProcessingProcessService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ProcessingProcessService) GetNamedFilterById

func (s *ProcessingProcessService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*ProcessingProcessService) GetNamedFilters

func (s *ProcessingProcessService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*ProcessingProcessService) GetPositionById

func (s *ProcessingProcessService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*ProcessingProcessService) GetPositionTrackingCodes

func (s *ProcessingProcessService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*ProcessingProcessService) GetPositions

func (s *ProcessingProcessService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*ProcessingProcessService) Remove

func (s *ProcessingProcessService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*ProcessingProcessService) Update

func (s *ProcessingProcessService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ProcessingProcessService) UpdatePosition

func (s *ProcessingProcessService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type ProcessingService

type ProcessingService struct {
	Endpoint
	// contains filtered or unexported fields
}

ProcessingService Сервис для работы с Техоперациями.

func NewProcessingService

func NewProcessingService(client *Client) *ProcessingService

func (*ProcessingService) Create

func (s *ProcessingService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ProcessingService) CreateAttribute

func (s *ProcessingService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProcessingService) CreateAttributes

func (s *ProcessingService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProcessingService) CreateMaterial

CreateMaterial Создать материал Тех. карты. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-sozdat-material-teh-karty

func (*ProcessingService) CreateMaterials

func (s *ProcessingService) CreateMaterials(ctx context.Context, id *uuid.UUID, materials []*ProcessingPlanMaterial) (*Slice[ProcessingPlanMaterial], *Response, error)

CreateMaterials Создать несколько материалов Тех. карты.

func (*ProcessingService) CreateProduct

CreateProduct Создать продукт Тех. карты. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-sozdat-produkt-teh-karty

func (*ProcessingService) CreateProducts

func (s *ProcessingService) CreateProducts(ctx context.Context, id *uuid.UUID, products []*ProcessingPlanProduct) (*Slice[ProcessingPlanProduct], *Response, error)

CreateProducts Создать несколько продуктов Тех. карты.

func (*ProcessingService) CreateUpdateMany

func (s *ProcessingService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingService) Delete

func (s *ProcessingService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ProcessingService) DeleteAttribute

func (s *ProcessingService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*ProcessingService) DeleteAttributes

func (s *ProcessingService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*ProcessingService) DeleteBySyncId

func (s *ProcessingService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*ProcessingService) DeleteMany

func (s *ProcessingService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingService) DeleteMaterial

func (s *ProcessingService) DeleteMaterial(ctx context.Context, id, materialId uuid.UUID) (bool, *Response, error)

DeleteMaterial Удалить материал. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-udalit-material

func (*ProcessingService) DeleteProduct

func (s *ProcessingService) DeleteProduct(ctx context.Context, id, productId uuid.UUID) (bool, *Response, error)

DeleteProduct Удалить продукт. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-udalit-produkt

func (*ProcessingService) Get

func (s *ProcessingService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ProcessingService) GetAttributeById

func (s *ProcessingService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*ProcessingService) GetAttributes

func (s *ProcessingService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*ProcessingService) GetById

func (s *ProcessingService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ProcessingService) GetBySyncId

func (s *ProcessingService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*ProcessingService) GetMaterialById

func (s *ProcessingService) GetMaterialById(ctx context.Context, id, materialId uuid.UUID) (*ProcessingPlanMaterial, *Response, error)

GetMaterialById Получить материал. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-poluchit-material

func (*ProcessingService) GetMaterials

GetMaterials Получить материалы Тех. карты. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-poluchit-materialy-teh-karty

func (*ProcessingService) GetMetadata

func (s *ProcessingService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*ProcessingService) GetProductById

func (s *ProcessingService) GetProductById(ctx context.Context, id, productId uuid.UUID) (*ProcessingPlanProduct, *Response, error)

GetProductById Получить продукт. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-poluchit-produkt

func (*ProcessingService) GetProducts

GetProducts Получить продукты Тех. карты. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-poluchit-produkty-teh-karty

func (*ProcessingService) Remove

func (s *ProcessingService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*ProcessingService) Template

func (s *ProcessingService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*ProcessingService) Update

func (s *ProcessingService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ProcessingService) UpdateAttribute

func (s *ProcessingService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*ProcessingService) UpdateMaterial

func (s *ProcessingService) UpdateMaterial(ctx context.Context, id, materialId uuid.UUID, material *ProcessingPlanMaterial) (*ProcessingPlanMaterial, *Response, error)

UpdateMaterial Изменить материал. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-izmenit-material

func (*ProcessingService) UpdateProduct

func (s *ProcessingService) UpdateProduct(ctx context.Context, id, productId uuid.UUID, product *ProcessingPlanProduct) (*ProcessingPlanProduct, *Response, error)

UpdateProduct Изменить продукт. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-teh-karta-izmenit-produkt

type ProcessingStage

type ProcessingStage struct {
	AccountId    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	Archived     *bool      `json:"archived,omitempty"`     // Добавлен ли Этап в архив
	Description  *string    `json:"description,omitempty"`  // Комментарий Этапа
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код Этапа
	Group        *Group     `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID `json:"id,omitempty"`           // ID Этапа
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные Этапа
	Name         *string    `json:"name,omitempty"`         // Наименование Этапа
	Owner        *Employee  `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Shared       *bool      `json:"shared,omitempty"`       // Общий доступ
	Updated      *Timestamp `json:"updated,omitempty"`      // Момент последнего обновления сущности
}

ProcessingStage Этап производства. Ключевое слово: processingstage Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-jetap-proizwodstwa

func (ProcessingStage) MetaType

func (p ProcessingStage) MetaType() MetaType

func (ProcessingStage) String

func (p ProcessingStage) String() string

type ProcessingStageService

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

ProcessingStageService Сервис для работы с этапами производства.

func NewProcessingStageService

func NewProcessingStageService(client *Client) *ProcessingStageService

func (*ProcessingStageService) Create

func (s *ProcessingStageService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ProcessingStageService) CreateUpdateMany

func (s *ProcessingStageService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingStageService) Delete

func (s *ProcessingStageService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ProcessingStageService) DeleteMany

func (s *ProcessingStageService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProcessingStageService) Get

func (s *ProcessingStageService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ProcessingStageService) GetById

func (s *ProcessingStageService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ProcessingStageService) GetNamedFilterById

func (s *ProcessingStageService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*ProcessingStageService) GetNamedFilters

func (s *ProcessingStageService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*ProcessingStageService) Remove

func (s *ProcessingStageService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*ProcessingStageService) Update

func (s *ProcessingStageService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type Processings

type Processings = Iterator[Processing]

type Product

type Product struct {
	AccountId           *uuid.UUID     `json:"accountId,omitempty"`           // ID учетной записи
	Barcodes            *Barcodes      `json:"barcodes,omitempty"`            // Штрихкоды
	Code                *string        `json:"code,omitempty"`                // Код
	Description         *string        `json:"description,omitempty"`         // Описание
	ExternalCode        *string        `json:"externalCode,omitempty"`        // Внешний код
	Id                  *uuid.UUID     `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta          `json:"meta,omitempty"`                // Метаданные
	Name                *string        `json:"name,omitempty"`                // Наименование
	Alcoholic           *Alcoholic     `json:"alcoholic,omitempty"`           // Объект, содержащий поля алкогольной продукции
	Archived            *bool          `json:"archived,omitempty"`            // Добавлен ли Товар в архив
	Article             *string        `json:"article,omitempty"`             // Артикул
	Attributes          *Attributes    `json:"attributes,omitempty"`          // Коллекция доп. полей
	BuyPrice            *BuyPrice      `json:"buyPrice,omitempty"`            // Закупочная цена
	Country             *Country       `json:"country,omitempty"`             // Метаданные Страны
	DiscountProhibited  *bool          `json:"discountProhibited,omitempty"`  // Признак запрета скидок
	EffectiveVat        *int           `json:"effectiveVat,omitempty"`        // Реальный НДС %
	EffectiveVatEnabled *bool          `json:"effectiveVatEnabled,omitempty"` // Дополнительный признак для определения разграничения реального НДС = 0 или "без НДС". (effectiveVat = 0, effectiveVatEnabled = false) -> "без НДС", (effectiveVat = 0, effectiveVatEnabled = true) -> 0%.
	Files               *Files         `json:"files,omitempty"`               // Метаданные массива Файлов
	Group               *Group         `json:"group,omitempty"`               // Метаданные отдела сотрудника
	Images              *Images        `json:"images,omitempty"`              // Массив метаданных Изображений (Максимальное количество изображений - 10)
	IsSerialTrackable   *bool          `json:"isSerialTrackable,omitempty"`   // Учет по серийным номерам. Данная отметка не сочетается с признаками weighed, alcoholic, ppeType, trackingType, onTap.
	MinPrice            *MinPrice      `json:"minPrice,omitempty"`            // Минимальная цена
	MinimumBalance      *float64       `json:"minimumBalance,omitempty"`      // Неснижаемый остаток
	OnTap               *bool          `json:"onTap,omitempty"`               // Флаг разливного товара
	Owner               *Employee      `json:"owner,omitempty"`               // Метаданные владельца (Сотрудника)
	Packs               *Packs         `json:"packs,omitempty"`               // Упаковки Товара
	PartialDisposal     *bool          `json:"partialDisposal,omitempty"`     // Управление состоянием частичного выбытия маркированного товара. «true» - возможность включена.
	PathName            *string        `json:"pathName,omitempty"`            // Наименование группы, в которую входит Товар
	PaymentItemType     PaymentItem    `json:"paymentItemType,omitempty"`     // Признак предмета расчета
	PpeType             *string        `json:"ppeType,omitempty"`             // Код вида номенклатурной классификации медицинских средств индивидуальной защиты (EAN-13)
	ProductFolder       *ProductFolder `json:"productFolder,omitempty"`       // Метаданные группы
	SalePrices          *SalePrices    `json:"salePrices,omitempty"`          // Цены продажи
	Shared              *bool          `json:"shared,omitempty"`              // Общий доступ
	Supplier            *Counterparty  `json:"supplier,omitempty"`            // Метаданные контрагента-поставщика
	SyncId              *uuid.UUID     `json:"syncId,omitempty"`              // ID синхронизации
	TaxSystem           GoodTaxSystem  `json:"taxSystem,omitempty"`           // Код системы налогообложения
	Things              *Things        `json:"things,omitempty"`              // Серийные номера
	Tnved               *string        `json:"tnved,omitempty"`               // Код ТН ВЭД
	TrackingType        TrackingType   `json:"trackingType,omitempty"`        // Тип маркируемой продукции
	Uom                 *Uom           `json:"uom,omitempty"`                 // Единицы измерения
	Updated             *Timestamp     `json:"updated,omitempty"`             // Момент последнего обновления сущности
	UseParentVat        *bool          `json:"useParentVat,omitempty"`        // Используется ли ставка НДС родительской группы. Если true для единицы ассортимента будет применена ставка, установленная для родительской группы.
	VariantsCount       *int           `json:"variantsCount,omitempty"`       // Количество модификаций у данного товара
	Vat                 *int           `json:"vat,omitempty"`                 // НДС %
	VatEnabled          *bool          `json:"vatEnabled,omitempty"`          // Включен ли НДС для товара. С помощью этого флага для товара можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Volume              *float64       `json:"volume,omitempty"`              // Объём
	Weight              *float64       `json:"weight,omitempty"`              // Вес
}

Product Товар. Ключевое слово: product Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar

func (Product) ConvertToAssortmentPosition

func (p Product) ConvertToAssortmentPosition() (*AssortmentPosition, error)

func (Product) GetMeta

func (p Product) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Product) MetaType

func (p Product) MetaType() MetaType

func (Product) String

func (p Product) String() string

type ProductFolder

type ProductFolder struct {
	AccountId           *uuid.UUID     `json:"accountId,omitempty"`           // ID учетной записи
	Archived            *bool          `json:"archived,omitempty"`            // Добавлена ли Группа товаров в архив
	Code                *string        `json:"code,omitempty"`                // Код Группы товаров
	Description         *string        `json:"description,omitempty"`         // Описание Группы товаров
	EffectiveVat        *int           `json:"effectiveVat,omitempty"`        // Реальный НДС %
	EffectiveVatEnabled *bool          `json:"effectiveVatEnabled,omitempty"` // Дополнительный признак для определения разграничения реального НДС = 0 или "без НДС". (effectiveVat = 0, effectiveVatEnabled = false) -> "без НДС", (effectiveVat = 0, effectiveVatEnabled = true) -> 0%.
	ExternalCode        *string        `json:"externalCode,omitempty"`        // Внешний код Группы товаров
	Group               *Group         `json:"group,omitempty"`               // Метаданные отдела сотрудника
	Id                  *uuid.UUID     `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta          `json:"meta,omitempty"`                // Метаданные
	Name                *string        `json:"name,omitempty"`                // Название
	Owner               *Employee      `json:"owner,omitempty"`               // Метаданные владельца (Сотрудника)
	PathName            *string        `json:"pathName,omitempty"`            // Наименование Группы товаров, в которую входит данная Группа товаров
	ProductFolder       *ProductFolder `json:"productFolder,omitempty"`       // Ссылка на Группу товаров, в которую входит данная Группа товаров, в формате Метаданных
	Shared              *bool          `json:"shared,omitempty"`              // Общий доступ
	TaxSystem           GoodTaxSystem  `json:"taxSystem,omitempty"`           // Код системы налогообложения
	Updated             *Timestamp     `json:"updated,omitempty"`             // Момент последнего обновления сущности
	UseParentVat        *bool          `json:"useParentVat,omitempty"`        // Используется ли ставка НДС родительской группы. Если true для единицы ассортимента будет применена ставка, установленная для родительской группы.
	Vat                 *int           `json:"vat,omitempty"`                 // НДС %
	VatEnabled          *bool          `json:"vatEnabled,omitempty"`          // Включен ли НДС для группы. С помощью этого флага для группы можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
}

ProductFolder Группа товаров. Ключевое слово: productfolder Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-gruppa-towarow

func (ProductFolder) MetaType

func (p ProductFolder) MetaType() MetaType

func (ProductFolder) String

func (p ProductFolder) String() string

type ProductFolderService

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

ProductFolderService Сервис для работы с группами товаров.

func NewProductFolderService

func NewProductFolderService(client *Client) *ProductFolderService

func (*ProductFolderService) Create

func (s *ProductFolderService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ProductFolderService) CreateAttribute

func (s *ProductFolderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProductFolderService) CreateAttributes

func (s *ProductFolderService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProductFolderService) CreateUpdateMany

func (s *ProductFolderService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProductFolderService) Delete

func (s *ProductFolderService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ProductFolderService) DeleteAttribute

func (s *ProductFolderService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*ProductFolderService) DeleteAttributes

func (s *ProductFolderService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*ProductFolderService) DeleteMany

func (s *ProductFolderService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProductFolderService) Get

func (s *ProductFolderService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ProductFolderService) GetAttributeById

func (s *ProductFolderService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*ProductFolderService) GetAttributes

func (s *ProductFolderService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*ProductFolderService) GetById

func (s *ProductFolderService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ProductFolderService) GetMetadata

func (s *ProductFolderService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*ProductFolderService) Update

func (s *ProductFolderService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ProductFolderService) UpdateAttribute

func (s *ProductFolderService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type ProductFolders

type ProductFolders MetaArray[ProductFolder]

type ProductService

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

ProductService Сервис для работы с товарами.

func NewProductService

func NewProductService(client *Client) *ProductService

func (*ProductService) Create

func (s *ProductService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ProductService) CreateAttribute

func (s *ProductService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProductService) CreateAttributes

func (s *ProductService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProductService) CreateImage

func (s *ProductService) CreateImage(ctx context.Context, id *uuid.UUID, image *Image) (*Slice[Image], *Response, error)

CreateImage Добавить Изображение Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-dobawit-izobrazhenie-k-towaru-komplektu-ili-modifikacii

func (*ProductService) CreateUpdateMany

func (s *ProductService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProductService) Delete

func (s *ProductService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ProductService) DeleteAttribute

func (s *ProductService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*ProductService) DeleteAttributes

func (s *ProductService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*ProductService) DeleteBySyncId

func (s *ProductService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*ProductService) DeleteImage

func (s *ProductService) DeleteImage(ctx context.Context, id, imageId uuid.UUID) (bool, *Response, error)

DeleteImage Удалить Изображение Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-udalit-izobrazhenie

func (*ProductService) DeleteImages

func (s *ProductService) DeleteImages(ctx context.Context, id *uuid.UUID, images []*Image) (*DeleteManyResponse, *Response, error)

DeleteImages Удалить несколько Изображений Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-udalit-gruppu-izobrazhenij

func (*ProductService) Get

func (s *ProductService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ProductService) GetAttributeById

func (s *ProductService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*ProductService) GetAttributes

func (s *ProductService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*ProductService) GetAudit

func (s *ProductService) GetAudit(ctx context.Context, id *uuid.UUID, params *Params) (*List[AuditEvent], *Response, error)

GetAudit Запрос на получение событий по сущности с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-poluchit-sobytiq-po-suschnosti

func (*ProductService) GetById

func (s *ProductService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ProductService) GetBySyncId

func (s *ProductService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*ProductService) GetImages

func (s *ProductService) GetImages(ctx context.Context, id *uuid.UUID) (*MetaArray[Image], *Response, error)

GetImages Получить список Изображений Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-poluchit-spisok-izobrazhenij-towara-komplekta-i-modifikacii

func (*ProductService) GetMetadata

func (s *ProductService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*ProductService) GetNamedFilterById

func (s *ProductService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*ProductService) GetNamedFilters

func (s *ProductService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*ProductService) PrintPrice

func (s *ProductService) PrintPrice(ctx context.Context, id *uuid.UUID, printPriceRequest *PrintPriceRequest) (*PrintFile, *Response, error)

PrintPrice Запрос на печать этикеток и ценников. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-pechat-atiketok-i-cennikow

func (*ProductService) Update

func (s *ProductService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ProductService) UpdateAttribute

func (s *ProductService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*ProductService) UpdateImages

func (s *ProductService) UpdateImages(ctx context.Context, id *uuid.UUID, images []*Image) (*Slice[Image], *Response, error)

UpdateImages Изменение списка Изображений Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-izmenenie-spiska-izobrazhenij-u-towara-komplekta-ili-modifikacii

type Profit

type Profit struct {
	Margin         float64 `json:"margin"`         // Рентабельность
	Profit         float64 `json:"profit"`         // Прибыль
	ReturnAvgCheck float64 `json:"returnAvgCheck"` // Средний чек возврата
	ReturnCostSum  float64 `json:"returnCostSum"`  // Сумма себестоимостей возвратов
	ReturnCount    float64 `json:"returnCount"`    // Количество возвратов
	ReturnSum      float64 `json:"returnSum"`      // Сумма возвратов
	SalesAvgCheck  float64 `json:"salesAvgCheck"`  // Средний чек продаж
	SalesCount     float64 `json:"salesCount"`     // Количество продаж
	SellCostSum    float64 `json:"sellCostSum"`    // Сумма себестоимостей продаж
	SellSum        float64 `json:"sellSum"`        // Сумма продаж
}

Profit общие поля для структур отчёта "Прибыльность"

type ProfitByAssortment

type ProfitByAssortment struct {
	Assortment     ProfitReportAssortment `json:"assortment"`     // Краткое представление Товара или Услуги в отчете
	Margin         float64                `json:"margin"`         // Рентабельность
	Profit         float64                `json:"profit"`         // Прибыль
	ReturnCost     float64                `json:"returnCost"`     // Себестоимость возвратов
	ReturnCostSum  float64                `json:"returnCostSum"`  // Сумма себестоимостей возвратов
	ReturnPrice    float64                `json:"returnPrice"`    // Цена возвратов
	ReturnQuantity float64                `json:"returnQuantity"` // Количество возвратов
	ReturnSum      float64                `json:"returnSum"`      // Сумма возвратов
	SellCost       float64                `json:"sellCost"`       // Себестоимость
	SellCostSum    float64                `json:"sellCostSum"`    // Сумма себестоимостей продаж
	SellPrice      float64                `json:"SellPrice"`      // Цена продаж (средняя)
	SellQuantity   float64                `json:"sellQuantity"`   // Проданное количество
	SellSum        float64                `json:"sellSum"`        // Сумма продаж
}

ProfitByAssortment Прибыльность по товарам Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-towaram

type ProfitByCounterparty

type ProfitByCounterparty struct {
	Counterparty MetaName `json:"counterparty"`
	Profit
}

ProfitByCounterparty Прибыльность по покупателям Ключевое слово: salesbyCounterparty Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-pokupatelqm

func (ProfitByCounterparty) MetaType

func (r ProfitByCounterparty) MetaType() MetaType

type ProfitByEmployee

type ProfitByEmployee struct {
	Employee MetaName `json:"employee"`
	Profit
}

ProfitByEmployee Прибыльность по сотрудникам Ключевое слово: salesbyemployee Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-sotrudnikam

func (ProfitByEmployee) MetaType

func (r ProfitByEmployee) MetaType() MetaType

type ProfitByProduct

type ProfitByProduct struct {
	ProfitByAssortment
}

ProfitByProduct Прибыльность по товарам Ключевое слово: salesbyproduct Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-towaram

func (ProfitByProduct) MetaType

func (r ProfitByProduct) MetaType() MetaType

type ProfitBySalesChannel

type ProfitBySalesChannel struct {
	SalesChannel struct {
		Meta Meta             `json:"meta"`
		Name string           `json:"name"`
		Type SalesChannelType `json:"type"`
	} `json:"salesChannel"`
	Profit
}

ProfitBySalesChannel Прибыльность по каналам продаж Ключевое слово: salesbysaleschannel Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-kanalam-prodazh

func (ProfitBySalesChannel) MetaType

func (r ProfitBySalesChannel) MetaType() MetaType

type ProfitByVariant

type ProfitByVariant struct {
	ProfitByAssortment
}

ProfitByVariant Прибыльность по модификациям Ключевое слово: salesbyvariant Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-modifikaciqm

func (ProfitByVariant) MetaType

func (r ProfitByVariant) MetaType() MetaType

type ProfitReportAssortment

type ProfitReportAssortment struct {
	MetaName          // Метаданные/Наименование Товара или Услуги
	Code     string   `json:"code"`          // Код товара или услуги
	Uom      MetaName `json:"uom,omitempty"` // Единица измерения
	Article  string   `json:"article"`       // Артикул товара
	Image    Meta     `json:"image"`         // Изображение товара
}

ProfitReportAssortment Структура объекта assortment Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-struktura-ob-ekta-assortment

type Project

type Project struct {
	AccountId    *uuid.UUID  `json:"accountId,omitempty"`    // ID учетной записи
	Archived     *bool       `json:"archived,omitempty"`     // Добавлен ли Проект в архив
	Attributes   *Attributes `json:"attributes,omitempty"`   // Коллекция доп. полей
	Code         *string     `json:"code,omitempty"`         // Код Проекта
	Description  *string     `json:"description,omitempty"`  // Описание Проекта
	ExternalCode *string     `json:"externalCode,omitempty"` // Внешний код Проекта
	Group        *Group      `json:"group,omitempty"`        // Метаданные отдела сотрудника
	Id           *uuid.UUID  `json:"id,omitempty"`           // ID сущности
	Meta         *Meta       `json:"meta,omitempty"`         // Метаданные
	Name         *string     `json:"name,omitempty"`         // Наименование Проекта
	Owner        *Employee   `json:"owner,omitempty"`        // Метаданные владельца (Сотрудника)
	Shared       *bool       `json:"shared,omitempty"`       // Общий доступ
	Updated      *Timestamp  `json:"updated,omitempty"`      // Момент последнего обновления сущности
}

Project Проект. Ключевое слово: project Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-proekt

func (Project) MetaType

func (p Project) MetaType() MetaType

func (Project) String

func (p Project) String() string

type ProjectService

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

ProjectService Сервис для работы с проектами.

func NewProjectService

func NewProjectService(client *Client) *ProjectService

func (*ProjectService) Create

func (s *ProjectService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ProjectService) CreateAttribute

func (s *ProjectService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProjectService) CreateAttributes

func (s *ProjectService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*ProjectService) CreateUpdateMany

func (s *ProjectService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProjectService) Delete

func (s *ProjectService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ProjectService) DeleteAttribute

func (s *ProjectService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*ProjectService) DeleteAttributes

func (s *ProjectService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*ProjectService) DeleteMany

func (s *ProjectService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ProjectService) Get

func (s *ProjectService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ProjectService) GetAttributeById

func (s *ProjectService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*ProjectService) GetAttributes

func (s *ProjectService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*ProjectService) GetById

func (s *ProjectService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ProjectService) GetMetadata

func (s *ProjectService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*ProjectService) GetNamedFilterById

func (s *ProjectService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*ProjectService) GetNamedFilters

func (s *ProjectService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*ProjectService) Update

func (s *ProjectService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*ProjectService) UpdateAttribute

func (s *ProjectService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type Publication

type Publication struct {
	Meta     *Meta        `json:"meta,omitempty"`     // Метаданные Публикации
	Template *MetaWrapper `json:"template,omitempty"` // Метаданные Шаблона печати
	Href     *string      `json:"href,omitempty"`     // Ссылка на страницу Публикации
}

Publication Публикация документов. Ключевое слово: operationpublication Публикации доступны только для следующих типов: Заказ покупателя, Счет покупателю, Отгрузка, Заказ поставщику, Счет поставщика, Приемка, Входящий платеж, Приходный ордер, Исходящий платеж, Расходный ордер, Внутренний заказ, Перемещение, Оприходование, Списание, Счет-фактура выданный, Счет-фактура полученный, Возврат поставщику, Возврат покупателя, Выплата денег, Внесение денег, Розничный возврат, Розничная продажа, Договор, Розничная смена, Заказ на производство, Полученный отчет комиссионера, Выданный отчет комиссионера, Инвентаризация, Техоперация. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow

func (Publication) MetaType

func (p Publication) MetaType() MetaType

func (*Publication) SetTemplate

func (p *Publication) SetTemplate(template *Templater) *Publication

func (Publication) String

func (p Publication) String() string

type PurchaseOrder

type PurchaseOrder struct {
	AccountId             *uuid.UUID                        `json:"accountId,omitempty"`             // ID учетной записи
	Agent                 *Counterparty                     `json:"agent,omitempty"`                 // Метаданные контрагента
	AgentAccount          *AgentAccount                     `json:"agentAccount,omitempty"`          // Метаданные счета контрагента
	Applicable            *bool                             `json:"applicable,omitempty"`            // Отметка о проведении
	Attributes            *Attributes                       `json:"attributes,omitempty"`            // Коллекция метаданных доп. полей. Поля объекта
	Code                  *string                           `json:"code,omitempty"`                  // Код
	Contract              *Contract                         `json:"contract,omitempty"`              // Метаданные договора
	Created               *Timestamp                        `json:"created,omitempty"`               // Дата создания
	Deleted               *Timestamp                        `json:"deleted,omitempty"`               // Момент последнего удаления
	DeliveryPlannedMoment *Timestamp                        `json:"deliveryPlannedMoment,omitempty"` // Планируемая дата отгрузки
	Description           *string                           `json:"description,omitempty"`           // Комментарий
	ExternalCode          *string                           `json:"externalCode,omitempty"`          // Внешний код
	Files                 *Files                            `json:"files,omitempty"`                 // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group                 *Group                            `json:"group,omitempty"`                 // Отдел сотрудника
	Id                    *uuid.UUID                        `json:"id,omitempty"`                    // ID сущности
	InvoicedSum           *float64                          `json:"invoicedSum,omitempty"`           // Сумма счетов поставщику
	Meta                  *Meta                             `json:"meta,omitempty"`                  // Метаданные
	Moment                *Timestamp                        `json:"moment,omitempty"`                // Дата документа
	Name                  *string                           `json:"name,omitempty"`                  // Наименование
	Organization          *Organization                     `json:"organization,omitempty"`          // Метаданные юрлица
	OrganizationAccount   *AgentAccount                     `json:"organizationAccount,omitempty"`   // Метаданные счета юрлица
	Owner                 *Employee                         `json:"owner,omitempty"`                 // Владелец (Сотрудник)
	PayedSum              *float64                          `json:"payedSum,omitempty"`              // Сумма входящих платежей по Счету поставщика
	Positions             *Positions[PurchaseOrderPosition] `json:"positions,omitempty"`             // Метаданные позиций Заказа поставщику
	Printed               *bool                             `json:"printed,omitempty"`               // Напечатан ли документ
	Project               *Project                          `json:"project,omitempty"`               // Проект
	Published             *bool                             `json:"published,omitempty"`             // Опубликован ли документ
	Rate                  *Rate                             `json:"rate,omitempty"`                  // Валюта
	Shared                *bool                             `json:"shared,omitempty"`                // Общий доступ
	ShippedSum            *float64                          `json:"shippedSum,omitempty"`            // Сумма отгруженного
	State                 *State                            `json:"state,omitempty"`                 // Метаданные статуса
	Store                 *Store                            `json:"store,omitempty"`                 // Метаданные склада
	Sum                   *float64                          `json:"sum,omitempty"`                   // Сумма
	SyncId                *uuid.UUID                        `json:"syncId,omitempty"`                // ID синхронизации. После заполнения недоступен для изменения
	Updated               *Timestamp                        `json:"updated,omitempty"`               // Момент последнего обновления
	VatEnabled            *bool                             `json:"vatEnabled,omitempty"`            // Учитывается ли НДС
	VatIncluded           *bool                             `json:"vatIncluded,omitempty"`           // Включен ли НДС в цену
	VatSum                *float64                          `json:"vatSum,omitempty"`                // Сумма включая НДС
	WaitSum               *float64                          `json:"waitSum,omitempty"`               // Сумма товаров в пути
	CustomerOrders        *CustomerOrders                   `json:"customerOrders,omitempty"`        // Массив ссылок на связанные заказы покупателей в формате Метаданных
	InvoicesIn            *InvoicesIn                       `json:"invoicesIn,omitempty"`            // Массив ссылок на связанные счета поставщиков в формате Метаданных
	Payments              *Payments                         `json:"payments,omitempty"`              // Массив ссылок на связанные платежи в формате Метаданных
	Supplies              Iterator[Supply]                  `json:"supplies,omitempty"`              // Массив ссылок на связанные приемки в формате Метаданных
	InternalOrder         *InternalOrder                    `json:"internalOrder,omitempty"`         // Внутренний заказ, связанный с заказом поставщику, в формате Метаданных
}

PurchaseOrder Заказ поставщику. Ключевое слово: purchaseorder Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-zakaz-postawschiku

func (PurchaseOrder) ConvertToOperation

func (p PurchaseOrder) ConvertToOperation(linkedSum *float64) (*OperationIn, error)

ConvertToOperation удовлетворяет интерфейсу OperationInType

func (PurchaseOrder) GetMeta

func (p PurchaseOrder) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (PurchaseOrder) MetaType

func (p PurchaseOrder) MetaType() MetaType

func (PurchaseOrder) String

func (p PurchaseOrder) String() string

type PurchaseOrderPosition

type PurchaseOrderPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Discount   *float64            `json:"discount,omitempty"`   // Процент скидки или наценки. Наценка указывается отрицательным числом, т.е. -10 создаст наценку в 10%
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Shipped    *float64            `json:"shipped,omitempty"`    // Принято
	InTransit  *float64            `json:"inTransit,omitempty"`  // Ожидание
	Vat        *float64            `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Wait       *bool               `json:"wait,omitempty"`       // Ожидается данной позиции
	Stock      *Stock              `json:"stock,omitempty"`      // Остатки и себестоимость `?fields=stock&expand=positions`
}

PurchaseOrderPosition Позиция Заказа поставщику. Ключевое слово: purchaseorderposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-zakaz-postawschiku-zakazy-postawschikam-pozicii-zakaza-postawschiku

func (PurchaseOrderPosition) MetaType

func (p PurchaseOrderPosition) MetaType() MetaType

func (PurchaseOrderPosition) String

func (p PurchaseOrderPosition) String() string

type PurchaseOrderService

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

PurchaseOrderService Сервис для работы с заказами поставщикам.

func NewPurchaseOrderService

func NewPurchaseOrderService(client *Client) *PurchaseOrderService

func (*PurchaseOrderService) Create

func (s *PurchaseOrderService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*PurchaseOrderService) CreateAttribute

func (s *PurchaseOrderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PurchaseOrderService) CreateAttributes

func (s *PurchaseOrderService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PurchaseOrderService) CreateOrUpdatePositionTrackingCodes

func (s *PurchaseOrderService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*PurchaseOrderService) CreatePosition

func (s *PurchaseOrderService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*PurchaseOrderService) CreatePositions

func (s *PurchaseOrderService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*PurchaseOrderService) CreateUpdateMany

func (s *PurchaseOrderService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PurchaseOrderService) Delete

func (s *PurchaseOrderService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*PurchaseOrderService) DeleteAttribute

func (s *PurchaseOrderService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*PurchaseOrderService) DeleteAttributes

func (s *PurchaseOrderService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*PurchaseOrderService) DeleteBySyncId

func (s *PurchaseOrderService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*PurchaseOrderService) DeleteMany

func (s *PurchaseOrderService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PurchaseOrderService) DeletePosition

func (s *PurchaseOrderService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*PurchaseOrderService) DeletePositionTrackingCodes

func (s *PurchaseOrderService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*PurchaseOrderService) DeletePublication

func (s *PurchaseOrderService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*PurchaseOrderService) Get

func (s *PurchaseOrderService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*PurchaseOrderService) GetAttributeById

func (s *PurchaseOrderService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*PurchaseOrderService) GetAttributes

func (s *PurchaseOrderService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*PurchaseOrderService) GetById

func (s *PurchaseOrderService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*PurchaseOrderService) GetBySyncId

func (s *PurchaseOrderService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*PurchaseOrderService) GetMetadata

func (s *PurchaseOrderService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*PurchaseOrderService) GetNamedFilterById

func (s *PurchaseOrderService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*PurchaseOrderService) GetNamedFilters

func (s *PurchaseOrderService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*PurchaseOrderService) GetPositionById

func (s *PurchaseOrderService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PurchaseOrderService) GetPositionTrackingCodes

func (s *PurchaseOrderService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*PurchaseOrderService) GetPositions

func (s *PurchaseOrderService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PurchaseOrderService) GetPublicationById

func (s *PurchaseOrderService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*PurchaseOrderService) GetPublications

func (s *PurchaseOrderService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*PurchaseOrderService) Publish

func (s *PurchaseOrderService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*PurchaseOrderService) Remove

func (s *PurchaseOrderService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*PurchaseOrderService) Template

func (s *PurchaseOrderService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*PurchaseOrderService) Update

func (s *PurchaseOrderService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*PurchaseOrderService) UpdateAttribute

func (s *PurchaseOrderService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*PurchaseOrderService) UpdatePosition

func (s *PurchaseOrderService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type PurchaseOrders

type PurchaseOrders = Iterator[PurchaseOrder]

type PurchaseReturn

type PurchaseReturn struct {
	AccountId           *uuid.UUID                         `json:"accountId,omitempty"`           // ID учетной записи
	Agent               *Counterparty                      `json:"agent,omitempty"`               // Метаданные контрагента
	AgentAccount        *AgentAccount                      `json:"agentAccount,omitempty"`        // Метаданные счета контрагента
	Applicable          *bool                              `json:"applicable,omitempty"`          // Отметка о проведении
	Attributes          *Attributes                        `json:"attributes,omitempty"`          // Коллекция метаданных доп. полей. Поля объекта
	Code                *string                            `json:"code,omitempty"`                // Код
	Contract            *Contract                          `json:"contract,omitempty"`            // Метаданные договора
	Created             *Timestamp                         `json:"created,omitempty"`             // Дата создания
	Deleted             *Timestamp                         `json:"deleted,omitempty"`             // Момент последнего удаления
	Description         *string                            `json:"description,omitempty"`         // Комментарий
	ExternalCode        *string                            `json:"externalCode,omitempty"`        // Внешний код
	Files               *Files                             `json:"files,omitempty"`               // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group               *Group                             `json:"group,omitempty"`               // Отдел сотрудника
	Id                  *uuid.UUID                         `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta                              `json:"meta,omitempty"`                // Метаданные
	Moment              *Timestamp                         `json:"moment,omitempty"`              // Дата документа
	Name                *string                            `json:"name,omitempty"`                // Наименование
	Organization        *Organization                      `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount                      `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Owner               *Employee                          `json:"owner,omitempty"`               // Владелец (Сотрудник)
	Printed             *bool                              `json:"printed,omitempty"`             // Напечатан ли документ
	Project             *Project                           `json:"project,omitempty"`             // Проект
	Published           *bool                              `json:"published,omitempty"`           // Опубликован ли документ
	Rate                *Rate                              `json:"rate,omitempty"`                // Валюта
	Shared              *bool                              `json:"shared,omitempty"`              // Общий доступ
	State               *State                             `json:"state,omitempty"`               // Метаданные статуса
	Store               *Store                             `json:"store,omitempty"`               // Метаданные склада
	Sum                 *float64                           `json:"sum,omitempty"`                 // Сумма
	SyncId              *uuid.UUID                         `json:"syncId,omitempty"`              // ID синхронизации. После заполнения недоступен для изменения
	Updated             *Timestamp                         `json:"updated,omitempty"`             // Момент последнего обновления
	VatEnabled          *bool                              `json:"vatEnabled,omitempty"`          // Учитывается ли НДС
	VatIncluded         *bool                              `json:"vatIncluded,omitempty"`         // Включен ли НДС в цену
	VatSum              *float64                           `json:"vatSum,omitempty"`              // Сумма включая НДС
	Positions           *Positions[PurchaseReturnPosition] `json:"positions,omitempty"`           // Метаданные позиций Заказа поставщику
	Supply              *Supply                            `json:"supply,omitempty"`              // Ссылка на приемку, по которой произошел возврат в формате Метаданных Поле является необходимым для возврата с основанием.
	FactureIn           *FactureIn                         `json:"factureIn,omitempty"`           // Ссылка на Счет-фактуру полученный в формате Метаданных
	FactureOut          *FactureOut                        `json:"factureOut,omitempty"`          // Ссылка на Счет-фактуру выданный в формате Метаданных
	InvoicedSum         *float64                           `json:"invoicedSum,omitempty"`         // Сумма счетов поставщику
	PayedSum            *float64                           `json:"payedSum,omitempty"`            // Сумма входящих платежей по Счету поставщика
	Payments            *Payments                          `json:"payments,omitempty"`            // Массив ссылок на связанные платежи в формате Метаданных
}

PurchaseReturn Возврат поставщику. Ключевое слово: purchasereturn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vozwrat-postawschiku

func (PurchaseReturn) GetMeta

func (p PurchaseReturn) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (PurchaseReturn) MetaType

func (p PurchaseReturn) MetaType() MetaType

func (PurchaseReturn) String

func (p PurchaseReturn) String() string

type PurchaseReturnPosition

type PurchaseReturnPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Discount   *float64            `json:"discount,omitempty"`   // Процент скидки или наценки. Наценка указывается отрицательным числом, т.е. -10 создаст наценку в 10%
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Slot       *Slot               `json:"slot,omitempty"`       // Ячейка на складе
	Things     *Things             `json:"things,omitempty"`     // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута.
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Stock      *Stock              `json:"stock,omitempty"`      // Остатки и себестоимость `?fields=stock&expand=positions`
}

PurchaseReturnPosition Позиция Возврата поставщику. Ключевое слово: purchasereturnposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vozwrat-postawschiku-vozwraty-postawschikam-pozicii-vozwrata-postawschiku

func (PurchaseReturnPosition) MetaType

func (p PurchaseReturnPosition) MetaType() MetaType

func (PurchaseReturnPosition) String

func (p PurchaseReturnPosition) String() string

type PurchaseReturnService

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

PurchaseReturnService Сервис для работы с возвратами поставщикам.

func NewPurchaseReturnService

func NewPurchaseReturnService(client *Client) *PurchaseReturnService

func (*PurchaseReturnService) Create

func (s *PurchaseReturnService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*PurchaseReturnService) CreateAttribute

func (s *PurchaseReturnService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PurchaseReturnService) CreateAttributes

func (s *PurchaseReturnService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*PurchaseReturnService) CreateOrUpdatePositionTrackingCodes

func (s *PurchaseReturnService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*PurchaseReturnService) CreatePosition

func (s *PurchaseReturnService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*PurchaseReturnService) CreatePositions

func (s *PurchaseReturnService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*PurchaseReturnService) CreateUpdateMany

func (s *PurchaseReturnService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PurchaseReturnService) Delete

func (s *PurchaseReturnService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*PurchaseReturnService) DeleteAttribute

func (s *PurchaseReturnService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*PurchaseReturnService) DeleteAttributes

func (s *PurchaseReturnService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*PurchaseReturnService) DeleteBySyncId

func (s *PurchaseReturnService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*PurchaseReturnService) DeleteMany

func (s *PurchaseReturnService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*PurchaseReturnService) DeletePosition

func (s *PurchaseReturnService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*PurchaseReturnService) DeletePositionTrackingCodes

func (s *PurchaseReturnService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*PurchaseReturnService) DeletePublication

func (s *PurchaseReturnService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*PurchaseReturnService) Get

func (s *PurchaseReturnService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*PurchaseReturnService) GetAttributeById

func (s *PurchaseReturnService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*PurchaseReturnService) GetAttributes

func (s *PurchaseReturnService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*PurchaseReturnService) GetById

func (s *PurchaseReturnService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*PurchaseReturnService) GetBySyncId

func (s *PurchaseReturnService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*PurchaseReturnService) GetMetadata

func (s *PurchaseReturnService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*PurchaseReturnService) GetNamedFilterById

func (s *PurchaseReturnService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*PurchaseReturnService) GetNamedFilters

func (s *PurchaseReturnService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*PurchaseReturnService) GetPositionById

func (s *PurchaseReturnService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PurchaseReturnService) GetPositionTrackingCodes

func (s *PurchaseReturnService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*PurchaseReturnService) GetPositions

func (s *PurchaseReturnService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*PurchaseReturnService) GetPublicationById

func (s *PurchaseReturnService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*PurchaseReturnService) GetPublications

func (s *PurchaseReturnService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*PurchaseReturnService) Publish

func (s *PurchaseReturnService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*PurchaseReturnService) Remove

func (s *PurchaseReturnService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*PurchaseReturnService) Template

func (s *PurchaseReturnService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*PurchaseReturnService) Update

func (s *PurchaseReturnService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*PurchaseReturnService) UpdateAttribute

func (s *PurchaseReturnService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*PurchaseReturnService) UpdatePosition

func (s *PurchaseReturnService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type PurchaseReturns

type PurchaseReturns = Iterator[PurchaseReturn]

type Rate

type Rate struct {
	Currency *Currency `json:"currency,omitempty"` // Метаданные валюты
	Value    *float64  `json:"value,omitempty"`    // Курс валюты в этом документе (содержится в ответе, если значение курса отлично от 1)
}

Rate Валюта в документах Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-valuta-w-dokumentah

func (Rate) String

func (r Rate) String() string

type RateUpdateType

type RateUpdateType string

RateUpdateType Способ обновления курса.

const (
	RateUpdateTypeAuto   RateUpdateType = "auto"   // Автоматический
	RateUpdateTypeManual RateUpdateType = "manual" // Ручной
)

type ReaderFunc

type ReaderFunc func() (io.Reader, error)

ReaderFunc is the type of function that can be given natively to NewRequest

type ReceiptTemplate

type ReceiptTemplate struct {
	AccountId *uuid.UUID `json:"accountId,omitempty"` // ID учетной записи
	Id        *uuid.UUID `json:"id,omitempty"`        // ID сущности
	Name      *string    `json:"name,omitempty"`      // Наименование
	Meta      *Meta      `json:"meta,omitempty"`      // Метаданные
	Header    *string    `json:"header,omitempty"`
	Footer    *string    `json:"footer,omitempty"`
}

ReceiptTemplate Шаблон печати кассовых чеков TODO: сервис не распознает тип сущности 'receipttemplate'

func (ReceiptTemplate) String

func (r ReceiptTemplate) String() string

type Region

type Region struct {
	AccountId    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	Code         *string    `json:"code,omitempty"`         // Код Региона
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код Региона
	Id           *uuid.UUID `json:"id,omitempty"`           // ID Региона
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные
	Name         *string    `json:"name,omitempty"`         // Наименование
	Updated      *Timestamp `json:"updated,omitempty"`      // Момент последнего обновления сущности
	Version      *int       `json:"version,omitempty"`      // Версия сущности
}

Region Регион. Ключевое слово: region Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-region

func (Region) MetaType

func (r Region) MetaType() MetaType

func (Region) String

func (r Region) String() string

type RegionService

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

RegionService Сервис для работы с регионами.

func NewRegionService

func NewRegionService(client *Client) *RegionService

func (*RegionService) Get

func (s *RegionService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*RegionService) GetById

func (s *RegionService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

type ReportCounterparty

type ReportCounterparty struct {
	AverageReceipt  float64          `json:"averageReceipt"`  // Средний чек
	Balance         float64          `json:"balance"`         // Баланс
	BonusBalance    float64          `json:"bonusBalance"`    // Баллы
	Counterparty    CounterpartyData `json:"counterparty"`    // Контрагент
	DemandsCount    int              `json:"demandsCount"`    // Количество продаж
	DemandsSum      float64          `json:"demandsSum"`      // Сумма продаж
	DiscountsSum    float64          `json:"discountsSum"`    // Сумма скидок
	FirstDemandDate Timestamp        `json:"firstDemandDate"` // Дата первой продажи
	LastDemandDate  Timestamp        `json:"lastDemandDate"`  // Дата последней продажи
	LastEventDate   Timestamp        `json:"lastEventDate"`   // Дата последнего события
	LastEventText   string           `json:"lastEventText"`   // Текст последнего события
	Meta            Meta             `json:"meta"`            // Метаданные Отчета по данному контрагенту
	Profit          float64          `json:"profit"`          // Прибыль
	ReturnsCount    int              `json:"returnsCount"`    // Количество возвратов
	ReturnsSum      float64          `json:"returnsSum"`      // Сумма возвратов
	Updated         Timestamp        `json:"updated"`         // Момент последнего изменения контрагента
}

ReportCounterparty Показатели контрагентов. Ключевое слово: counterparty Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pokazateli-kontragentow-pokazateli-kontragentow

func (ReportCounterparty) MetaType

func (r ReportCounterparty) MetaType() MetaType

type ReportCounterpartyService

type ReportCounterpartyService struct {
	Endpoint
}

ReportCounterpartyService Сервис для работы с показателями контрагентов.

func NewReportCounterpartyService

func NewReportCounterpartyService(client *Client) *ReportCounterpartyService

func (*ReportCounterpartyService) GetByCounterparties

GetByCounterparties Пример запроса отчетов для нескольких контрагентов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pokazateli-kontragentow-vyborochnye-pokazateli-kontragentow

func (*ReportCounterpartyService) GetByCounterpartyId

func (s *ReportCounterpartyService) GetByCounterpartyId(ctx context.Context, id *uuid.UUID) (*ReportCounterparty, *Response, error)

GetByCounterpartyId Запрос на получение отчета по контрагенту с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pokazateli-kontragentow-pokazateli-kontragenta

func (*ReportCounterpartyService) GetList

GetList Запрос на получение отчета по контрагентам Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pokazateli-kontragentow-poluchit-pokazateli-kontragentow

func (*ReportCounterpartyService) GetListAsync

GetListAsync Запрос на получение отчета по контрагентам (асинхронно) Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pokazateli-kontragentow-poluchit-pokazateli-kontragentow

type ReportDashboardService

type ReportDashboardService struct {
	Endpoint
}

func NewReportDashboardService

func NewReportDashboardService(client *Client) *ReportDashboardService

func (*ReportDashboardService) GetByDay

GetByDay Запрос на получение показателей за день. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-den

func (*ReportDashboardService) GetByDayAsync

GetByDayAsync Запрос на получение показателей за день (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-den

func (*ReportDashboardService) GetByMonth

func (s *ReportDashboardService) GetByMonth(ctx context.Context) (*Dashboard, *Response, error)

GetByMonth Запрос на получение показателей за месяц. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-mesqc

func (*ReportDashboardService) GetByMonthAsync

GetByMonthAsync Запрос на получение показателей за месяц (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-mesqc

func (*ReportDashboardService) GetByWeek

GetByWeek Запрос на получение показателей за неделю. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-nedelu

func (*ReportDashboardService) GetByWeekAsync

GetByWeekAsync Запрос на получение показателей за неделю (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-den

type ReportMoneyService

type ReportMoneyService struct {
	Endpoint
}

ReportMoneyService Сервис для работы с отчётом "Деньги".

func NewReportMoneyService

func NewReportMoneyService(client *Client) *ReportMoneyService

func (*ReportMoneyService) GetMoney

func (s *ReportMoneyService) GetMoney(ctx context.Context) (*List[Money], *Response, error)

GetMoney Запрос на получение остатков денежных средств по кассам и счетам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-den-gi-ostatki-denezhnyh-sredstw

func (*ReportMoneyService) GetMoneyReportAsync

func (s *ReportMoneyService) GetMoneyReportAsync(ctx context.Context) (*AsyncResultService[List[Money]], *Response, error)

GetMoneyReportAsync Запрос на получение остатков денежных средств по кассам и счетам (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-den-gi-ostatki-denezhnyh-sredstw

func (*ReportMoneyService) GetPlotSeries

func (s *ReportMoneyService) GetPlotSeries(ctx context.Context, params *Params) (*MoneyPlotSeries, *Response, error)

GetPlotSeries Запрос на получение графика движения денежных средств. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-den-gi-dwizhenie-denezhnyh-sredstw

func (*ReportMoneyService) GetPlotSeriesAsync

func (s *ReportMoneyService) GetPlotSeriesAsync(ctx context.Context, params *Params) (*AsyncResultService[MoneyPlotSeries], *Response, error)

GetPlotSeriesAsync Запрос на получение графика движения денежных средств (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-den-gi-dwizhenie-denezhnyh-sredstw

type ReportOrdersService

type ReportOrdersService struct {
	Endpoint
}

ReportOrdersService Сервис для работы с отчётом "Показатели заказов".

func NewReportOrdersService

func NewReportOrdersService(client *Client) *ReportOrdersService

func (*ReportOrdersService) GetPlotSeries

func (s *ReportOrdersService) GetPlotSeries(ctx context.Context, params *Params) (*OrdersPlotSeries, *Response, error)

GetPlotSeries Запрос на получение показателей заказов. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-prodazh-i-zakazow-pokazateli-zakazow

func (*ReportOrdersService) GetPlotSeriesAsync

func (s *ReportOrdersService) GetPlotSeriesAsync(ctx context.Context, params *Params) (*AsyncResultService[OrdersPlotSeries], *Response, error)

GetPlotSeriesAsync Запрос на получение показателей заказов (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-prodazh-i-zakazow-pokazateli-zakazow

type ReportProfitService

type ReportProfitService struct {
	Endpoint
}

ReportProfitService Сервис для работы с отчётом "Прибыльность".

func NewReportProfitService

func NewReportProfitService(client *Client) *ReportProfitService

func (*ReportProfitService) GetByCounterparty

func (s *ReportProfitService) GetByCounterparty(ctx context.Context) (*List[ProfitByCounterparty], *Response, error)

GetByCounterparty Запрос на получение отчета "Прибыльность по покупателям". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-pokupatelqm

func (*ReportProfitService) GetByCounterpartyAsync

GetByCounterpartyAsync Запрос на получение отчета "Прибыльность по покупателям" (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-pokupatelqm

func (*ReportProfitService) GetByEmployee

func (s *ReportProfitService) GetByEmployee(ctx context.Context) (*List[ProfitByEmployee], *Response, error)

GetByEmployee Запрос на получение отчета "Прибыльность по сотрудникам". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-sotrudnikam

func (*ReportProfitService) GetByEmployeeAsync

GetByEmployeeAsync Запрос на получение отчета "Прибыльность по сотрудникам" (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-sotrudnikam

func (*ReportProfitService) GetByProduct

GetByProduct Запрос на получение отчета "Прибыльность по товарам". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-towaram

func (*ReportProfitService) GetByProductAsync

GetByProductAsync Запрос на получение отчета "Прибыльность по товарам" (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-towaram

func (*ReportProfitService) GetBySalesChannel

func (s *ReportProfitService) GetBySalesChannel(ctx context.Context) (*List[ProfitBySalesChannel], *Response, error)

GetBySalesChannel Запрос на получение отчета "Прибыльность по каналам продаж". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-kanalam-prodazh

func (*ReportProfitService) GetBySalesChannelAsync

GetBySalesChannelAsync Запрос на получение отчета "Прибыльность по каналам продаж" (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-kanalam-prodazh

func (*ReportProfitService) GetByVariant

GetByVariant Запрос на получение отчета "Прибыльность по модификациям". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-modifikaciqm

func (*ReportProfitService) GetByVariantAsync

GetByVariantAsync Запрос на получение отчета "Прибыльность по модификациям" (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-modifikaciqm

type ReportSalesService

type ReportSalesService struct {
	Endpoint
}

ReportSalesService Сервис для работы с отчётом "Показатели продаж".

func NewReportSalesService

func NewReportSalesService(client *Client) *ReportSalesService

func (*ReportSalesService) GetPlotSeries

func (s *ReportSalesService) GetPlotSeries(ctx context.Context, params *Params) (*SalesPlotSeries, *Response, error)

GetPlotSeries Запрос на получение показателей продаж. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-prodazh-i-zakazow-pokazateli-zakazow

func (*ReportSalesService) GetPlotSeriesAsync

func (s *ReportSalesService) GetPlotSeriesAsync(ctx context.Context, params *Params) (*AsyncResultService[SalesPlotSeries], *Response, error)

GetPlotSeriesAsync Запрос на получение показателей продаж (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-prodazh-i-zakazow-pokazateli-zakazow

type ReportService

type ReportService struct {
	*Client
}

ReportService Сервис для работы с отчётами.

func (*ReportService) Counterparty

func (s *ReportService) Counterparty() *ReportCounterpartyService

func (*ReportService) Dashboard

func (s *ReportService) Dashboard() *ReportDashboardService

func (*ReportService) Money

func (s *ReportService) Money() *ReportMoneyService

func (*ReportService) Orders

func (s *ReportService) Orders() *ReportOrdersService

func (*ReportService) Profit

func (s *ReportService) Profit() *ReportProfitService

func (*ReportService) Sales

func (s *ReportService) Sales() *ReportSalesService

func (*ReportService) Stock

func (s *ReportService) Stock() *ReportStockService

func (*ReportService) Turnover

func (s *ReportService) Turnover() *ReportTurnoverService

type ReportStockService

type ReportStockService struct {
	Endpoint
}

ReportStockService Сервис для работы с отчётом "Остатки".

func NewReportStockService

func NewReportStockService(client *Client) *ReportStockService

func (*ReportStockService) GetAll

GetAll Запрос на получение Расширенного отчета об остатках. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-rasshirennyj-otchet-ob-ostatkah

func (*ReportStockService) GetAllAsync

GetAllAsync Запрос на получение Расширенного отчета об остатках (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-rasshirennyj-otchet-ob-ostatkah

func (*ReportStockService) GetByOperationId

func (s *ReportStockService) GetByOperationId(ctx context.Context, operationId uuid.UUID) (*List[StockByOperation], *Response, error)

GetByOperationId Запрос на получение отчёта "Остатки по документу" Данный запрос работает со следующими типами документов: – Отгрузка – Заказ покупателя – Розничная продажа – Счет поставщика – Розничная продажа – Заказ поставщику – Приемка – Розничный возврат – Возврат поставщику – Возврат покупателя Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-ostatki-po-dokumentu

func (*ReportStockService) GetByStore

func (s *ReportStockService) GetByStore(ctx context.Context) (*List[StockByStore], *Response, error)

GetByStore Запрос на получение отчета "Остатки по складам". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-ostatki-po-skladam

func (*ReportStockService) GetByStoreAsync

GetByStoreAsync Запрос на получение отчета "Остатки по складам" (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-ostatki-po-skladam

func (*ReportStockService) GetCurrentAll

func (s *ReportStockService) GetCurrentAll(ctx context.Context) (*Slice[StockCurrentAll], *Response, error)

GetCurrentAll Запрос на получение текущих остатков без разбиения по складам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-kratkij-otchet-ob-ostatkah

func (*ReportStockService) GetCurrentByStore

func (s *ReportStockService) GetCurrentByStore(ctx context.Context) (*Slice[StockCurrentByStore], *Response, error)

GetCurrentByStore Запрос на получение текущих остатков без разбиения по складам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-kratkij-otchet-ob-ostatkah

type ReportTurnoverService

type ReportTurnoverService struct {
	Endpoint
}

ReportTurnoverService Сервис для работы с отчётом "Обороты".

func NewReportTurnoverService

func NewReportTurnoverService(client *Client) *ReportTurnoverService

func (*ReportTurnoverService) GetAll

GetAll Запрос на получение отчета "Обороты по товарам". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-poluchit-oboroty-po-towaram

func (*ReportTurnoverService) GetByOperationsWithProduct

func (s *ReportTurnoverService) GetByOperationsWithProduct(ctx context.Context, product *Product) (*List[TurnoverByOperation], *Response, error)

GetByOperationsWithProduct Запрос на получение отчета Обороты по товару с детализацией по документам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-poluchit-oboroty-po-towaru-s-detalizaciej-po-dokumentam

func (*ReportTurnoverService) GetByOperationsWithVariant

func (s *ReportTurnoverService) GetByOperationsWithVariant(ctx context.Context, variant *Variant) (*List[TurnoverByOperation], *Response, error)

GetByOperationsWithVariant Запрос на получение отчета Обороты по модификации с детализацией по документам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-poluchit-oboroty-po-towaru-s-detalizaciej-po-dokumentam

func (*ReportTurnoverService) GetByStoreWithProduct

func (s *ReportTurnoverService) GetByStoreWithProduct(ctx context.Context, product *Product) (*List[TurnoverByOperation], *Response, error)

GetByStoreWithProduct Отчет обороты по товару и его модификациям с детализацией по складам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaru-s-detalizaciej-po-skladam

func (*ReportTurnoverService) GetByStoreWithVariant

func (s *ReportTurnoverService) GetByStoreWithVariant(ctx context.Context, variant *Variant) (*List[TurnoverByOperation], *Response, error)

GetByStoreWithVariant Отчет обороты по модификации с детализацией по складам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaru-s-detalizaciej-po-skladam

type Request

type Request struct {

	// Embed an HTTP request directly. This makes a *Request act exactly
	// like an *http.Request so that all meta methods are supported.
	*http.Request
	// contains filtered or unexported fields
}

Request wraps the metadata needed to create HTTP requests.

func FromRequest

func FromRequest(r *http.Request) (*Request, error)

FromRequest wraps an http.Request in a retryablehttp.Request

type RequestBuilder

type RequestBuilder[T any] struct {
	// contains filtered or unexported fields
}

func NewRequestBuilder

func NewRequestBuilder[T any](e Endpoint, ctx context.Context) *RequestBuilder[T]

func (*RequestBuilder[T]) Async

func (rb *RequestBuilder[T]) Async() (*AsyncResultService[T], *Response, error)

Async Отправляет запрос на создание асинхронной операции. Возвращает сервис *AsyncResultService, который можно использовать для получения результата выполнения асинхронного запроса.

func (*RequestBuilder[T]) Delete

func (rb *RequestBuilder[T]) Delete() (bool, *Response, error)

Delete Отправляет DELETE запрос Возвращает true в случае успешного удаления

func (*RequestBuilder[T]) Get

func (rb *RequestBuilder[T]) Get() (*T, *Response, error)

Get Отправляет GET запрос и парсит ответ

func (*RequestBuilder[T]) Post

func (rb *RequestBuilder[T]) Post() (*T, *Response, error)

Post Отправляет POST запрос и парсит ответ

func (*RequestBuilder[T]) Put

func (rb *RequestBuilder[T]) Put() (*T, *Response, error)

Put Отправляет PUT запрос и парсит ответ

func (*RequestBuilder[T]) WithBody

func (rb *RequestBuilder[T]) WithBody(body any) *RequestBuilder[T]

func (*RequestBuilder[T]) WithContext

func (rb *RequestBuilder[T]) WithContext(ctx context.Context) *RequestBuilder[T]

func (*RequestBuilder[T]) WithParams

func (rb *RequestBuilder[T]) WithParams(params *Params) *RequestBuilder[T]

func (*RequestBuilder[T]) WithPath

func (rb *RequestBuilder[T]) WithPath(path string) *RequestBuilder[T]

func (*RequestBuilder[T]) WithURL

func (rb *RequestBuilder[T]) WithURL(url *url.URL) *RequestBuilder[T]

type RequestLogHook

type RequestLogHook func(Logger, *http.Request, int)

RequestLogHook allows a function to run before each retry. The HTTP request which will be made, and the retry number (0 for the initial request) are available to users. The internal logger is exposed to consumers.

type Response

type Response struct {
	*http.Response
}

Response Ответ от API МойСклад. Оборачивает стандартный http.Response, полученный от API МойСклад.

type ResponseHandlerFunc

type ResponseHandlerFunc func(*http.Response) error

ResponseHandlerFunc is a type of function that takes in a Response, and does something with it. The ResponseHandlerFunc is called when the HTTP client successfully receives a response and the CheckRetry function indicates that a retry of the base request is not necessary. If an error is returned from this function, the CheckRetry policy will be used to determine whether to retry the whole request (including this handler).

Make sure to check status codes! Even if the request was completed it may have a non-2xx status code.

The response body is not automatically closed. It must be closed either by the ResponseHandlerFunc or by the caller out-of-band. Failure to do so will result in a memory leak.

type ResponseLogHook

type ResponseLogHook func(Logger, *http.Response)

ResponseLogHook is like RequestLogHook, but allows running a function on each HTTP response. This function will be invoked at the end of every HTTP request executed, regardless of whether a subsequent retry needs to be performed or not. If the response body is read or closed from this method, this will affect the response returned from Do().

type RetailDemand

type RetailDemand struct {
	AccountId           *uuid.UUID                 `json:"accountId,omitempty"`           // ID учетной записи
	Agent               *Counterparty              `json:"agent,omitempty"`               // Метаданные контрагента
	AgentAccount        *AgentAccount              `json:"agentAccount,omitempty"`        // Метаданные счета контрагента
	Applicable          *bool                      `json:"applicable,omitempty"`          // Отметка о проведении
	Attributes          *Attributes                `json:"attributes,omitempty"`          // Коллекция метаданных доп. полей. Поля объекта
	CashSum             *float64                   `json:"cashSum,omitempty"`             // Оплачено наличными
	CheckNumber         *string                    `json:"checkNumber,omitempty"`         // Номер чека
	CheckSum            *float64                   `json:"checkSum,omitempty"`            // Сумма Чека
	Code                *string                    `json:"code,omitempty"`                // Код Розничной продажи
	Contract            *Contract                  `json:"contract,omitempty"`            // Метаданные договора
	Created             *Timestamp                 `json:"created,omitempty"`             // Дата создания
	CustomerOrder       *CustomerOrder             `json:"customerOrder,omitempty"`       // Метаданные Заказа Покупателя
	Deleted             *Timestamp                 `json:"deleted,omitempty"`             // Момент последнего удаления Розничной продажи
	Description         *string                    `json:"description,omitempty"`         // Комментарий Розничной продажи
	DocumentNumber      *string                    `json:"documentNumber,omitempty"`      // Номер документа
	ExternalCode        *string                    `json:"externalCode,omitempty"`        // Внешний код Розничной продажи
	Files               *Files                     `json:"files,omitempty"`               // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Fiscal              *bool                      `json:"fiscal,omitempty"`              // Отметка о том, был ли использован ФР
	FiscalPrinterInfo   *string                    `json:"fiscalPrinterInfo,omitempty"`   // Информация о фискальном регистраторе
	Group               *Group                     `json:"group,omitempty"`               // Отдел сотрудника
	Id                  *uuid.UUID                 `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta                      `json:"meta,omitempty"`                // Метаданные
	Moment              *Timestamp                 `json:"moment,omitempty"`              // Дата документа
	Name                *string                    `json:"name,omitempty"`                // Наименование
	NoCashSum           *float64                   `json:"noCashSum,omitempty"`           // Оплачено картой
	OfdCode             *string                    `json:"ofdCode,omitempty"`             // Код оператора фискальных данных
	Organization        *Organization              `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount              `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Owner               *Employee                  `json:"owner,omitempty"`               // Владелец (Сотрудник)
	PayedSum            *float64                   `json:"payedSum,omitempty"`            // Сумма входящих платежей
	Positions           *Positions[RetailPosition] `json:"positions,omitempty"`           // Метаданные позиций Розничной продажи
	PrepaymentCashSum   *float64                   `json:"prepaymentCashSum,omitempty"`   // Предоплата наличными
	PrepaymentNoCashSum *float64                   `json:"prepaymentNoCashSum,omitempty"` // Предоплата картой
	PrepaymentQRSum     *float64                   `json:"prepaymentQrSum,omitempty"`     // Предоплата по QR-коду
	Printed             *bool                      `json:"printed,omitempty"`             // Напечатан ли документ
	Project             *Project                   `json:"project,omitempty"`             // Метаданные проекта
	Published           *bool                      `json:"published,omitempty"`           // Опубликован ли документ
	QRSum               *float64                   `json:"qrSum,omitempty"`               // Оплачено по QR-коду
	Rate                *Rate                      `json:"rate,omitempty"`                // Валюта
	RetailShift         *RetailShift               `json:"retailShift,omitempty"`         // Метаданные Розничной смены
	RetailStore         *RetailStore               `json:"retailStore,omitempty"`         // Метаданные Точки продаж
	SessionNumber       *string                    `json:"sessionNumber,omitempty"`       // Номер сессии
	Shared              *bool                      `json:"shared,omitempty"`              // Общий доступ
	State               *State                     `json:"state,omitempty"`               // Метаданные статуса Розничной продажи
	Store               *Store                     `json:"store,omitempty"`               // Метаданные склада
	Sum                 *float64                   `json:"sum,omitempty"`                 // Сумма
	SyncId              *uuid.UUID                 `json:"syncId,omitempty"`              // ID синхронизации. После заполнения недоступен для изменения
	TaxSystem           TaxSystem                  `json:"taxSystem,omitempty"`           // Код системы налогообложения
	Updated             *Timestamp                 `json:"updated,omitempty"`             // Момент последнего обновления
	VatEnabled          *bool                      `json:"vatEnabled,omitempty"`          // Учитывается ли НДС
	VatIncluded         *bool                      `json:"vatIncluded,omitempty"`         // Включен ли НДС в цену
	VatSum              *float64                   `json:"vatSum,omitempty"`              // Сумма включая НДС
}

RetailDemand Розничная продажа. Ключевое слово: retaildemand Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-roznichnaq-prodazha

func (RetailDemand) GetMeta

func (r RetailDemand) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (RetailDemand) MetaType

func (r RetailDemand) MetaType() MetaType

func (RetailDemand) String

func (r RetailDemand) String() string

type RetailDemandPosition

type RetailDemandPosition struct {
	RetailPosition
}

RetailDemandPosition позиция розничной продажи. Ключевое слово: demandposition

func (RetailDemandPosition) MetaType

func (r RetailDemandPosition) MetaType() MetaType

type RetailDemandService

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

RetailDemandService Сервис для работы с розничными продажами.

func NewRetailDemandService

func NewRetailDemandService(client *Client) *RetailDemandService

func (*RetailDemandService) Create

func (s *RetailDemandService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*RetailDemandService) CreateAttribute

func (s *RetailDemandService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailDemandService) CreateAttributes

func (s *RetailDemandService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailDemandService) CreateOrUpdatePositionTrackingCodes

func (s *RetailDemandService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*RetailDemandService) CreatePosition

func (s *RetailDemandService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*RetailDemandService) CreatePositions

func (s *RetailDemandService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*RetailDemandService) CreateUpdateMany

func (s *RetailDemandService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailDemandService) Delete

func (s *RetailDemandService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*RetailDemandService) DeleteAttribute

func (s *RetailDemandService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*RetailDemandService) DeleteAttributes

func (s *RetailDemandService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*RetailDemandService) DeleteBySyncId

func (s *RetailDemandService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*RetailDemandService) DeleteMany

func (s *RetailDemandService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailDemandService) DeletePosition

func (s *RetailDemandService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*RetailDemandService) DeletePositionTrackingCodes

func (s *RetailDemandService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*RetailDemandService) DeletePublication

func (s *RetailDemandService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*RetailDemandService) Get

func (s *RetailDemandService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*RetailDemandService) GetAttributeById

func (s *RetailDemandService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*RetailDemandService) GetAttributes

func (s *RetailDemandService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*RetailDemandService) GetById

func (s *RetailDemandService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*RetailDemandService) GetBySyncId

func (s *RetailDemandService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*RetailDemandService) GetMetadata

func (s *RetailDemandService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*RetailDemandService) GetNamedFilterById

func (s *RetailDemandService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*RetailDemandService) GetNamedFilters

func (s *RetailDemandService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*RetailDemandService) GetPositionById

func (s *RetailDemandService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*RetailDemandService) GetPositionTrackingCodes

func (s *RetailDemandService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*RetailDemandService) GetPositions

func (s *RetailDemandService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*RetailDemandService) GetPublicationById

func (s *RetailDemandService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*RetailDemandService) GetPublications

func (s *RetailDemandService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*RetailDemandService) Publish

func (s *RetailDemandService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*RetailDemandService) Remove

func (s *RetailDemandService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*RetailDemandService) Template

func (s *RetailDemandService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*RetailDemandService) Update

func (s *RetailDemandService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*RetailDemandService) UpdateAttribute

func (s *RetailDemandService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*RetailDemandService) UpdatePosition

func (s *RetailDemandService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type RetailDrawerCashIn

type RetailDrawerCashIn struct {
	AccountId    *uuid.UUID    `json:"accountId,omitempty"`    // ID учетной записи
	Agent        *Counterparty `json:"agent,omitempty"`        // Метаданные контрагента
	Applicable   *bool         `json:"applicable,omitempty"`   // Отметка о проведении
	Attributes   *Attributes   `json:"attributes,omitempty"`   // Коллекция метаданных доп. полей
	Created      *Timestamp    `json:"created,omitempty"`      // Дата создания
	Deleted      *Timestamp    `json:"deleted,omitempty"`      // Момент последнего удаления Внесения денег
	Description  *string       `json:"description,omitempty"`  // Комментарий Внесения денег
	ExternalCode *string       `json:"externalCode,omitempty"` // Внешний код Внесения денег
	Files        *Files        `json:"files,omitempty"`        // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group        *Group        `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID    `json:"id,omitempty"`           // ID сущности
	Meta         *Meta         `json:"meta,omitempty"`         // Метаданные
	Moment       *Timestamp    `json:"moment,omitempty"`       // Дата документа
	Name         *string       `json:"name,omitempty"`         // Наименование
	Organization *Organization `json:"organization,omitempty"` // Метаданные юрлица
	Owner        *Employee     `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Printed      *bool         `json:"printed,omitempty"`      // Напечатан ли документ
	Published    *bool         `json:"published,omitempty"`    // Опубликован ли документ
	Rate         *Rate         `json:"rate,omitempty"`         // Валюта
	Shared       *bool         `json:"shared,omitempty"`       // Общий доступ
	State        *State        `json:"state,omitempty"`        // Метаданные статуса Внесения денег
	Sum          *float64      `json:"sum,omitempty"`          // Сумма
	SyncId       *uuid.UUID    `json:"syncId,omitempty"`       // ID синхронизации. После заполнения недоступен для изменения
	Updated      *Timestamp    `json:"updated,omitempty"`      // Момент последнего обновления
	RetailShift  *RetailShift  `json:"retailShift,omitempty"`  // Ссылка на розничную смену
}

RetailDrawerCashIn Внесение денег. Ключевое слово: retaildrawercashin Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vnesenie-deneg

func (RetailDrawerCashIn) GetMeta

func (r RetailDrawerCashIn) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (RetailDrawerCashIn) MetaType

func (r RetailDrawerCashIn) MetaType() MetaType

func (RetailDrawerCashIn) String

func (r RetailDrawerCashIn) String() string

type RetailDrawerCashInService

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

RetailDrawerCashInService Сервис для работы с внесениями денег.

func NewRetailDrawerCashInService

func NewRetailDrawerCashInService(client *Client) *RetailDrawerCashInService

func (*RetailDrawerCashInService) Create

func (s *RetailDrawerCashInService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*RetailDrawerCashInService) CreateAttribute

func (s *RetailDrawerCashInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailDrawerCashInService) CreateAttributes

func (s *RetailDrawerCashInService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailDrawerCashInService) CreateUpdateMany

func (s *RetailDrawerCashInService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailDrawerCashInService) Delete

func (s *RetailDrawerCashInService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*RetailDrawerCashInService) DeleteAttribute

func (s *RetailDrawerCashInService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*RetailDrawerCashInService) DeleteAttributes

func (s *RetailDrawerCashInService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*RetailDrawerCashInService) DeleteBySyncId

func (s *RetailDrawerCashInService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*RetailDrawerCashInService) DeleteMany

func (s *RetailDrawerCashInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailDrawerCashInService) DeletePublication

func (s *RetailDrawerCashInService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*RetailDrawerCashInService) Get

func (s *RetailDrawerCashInService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*RetailDrawerCashInService) GetAttributeById

func (s *RetailDrawerCashInService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*RetailDrawerCashInService) GetAttributes

func (s *RetailDrawerCashInService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*RetailDrawerCashInService) GetById

func (s *RetailDrawerCashInService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*RetailDrawerCashInService) GetBySyncId

func (s *RetailDrawerCashInService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*RetailDrawerCashInService) GetMetadata

func (s *RetailDrawerCashInService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*RetailDrawerCashInService) GetNamedFilterById

func (s *RetailDrawerCashInService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*RetailDrawerCashInService) GetNamedFilters

func (s *RetailDrawerCashInService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*RetailDrawerCashInService) GetPublicationById

func (s *RetailDrawerCashInService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*RetailDrawerCashInService) GetPublications

func (s *RetailDrawerCashInService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*RetailDrawerCashInService) Publish

func (s *RetailDrawerCashInService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*RetailDrawerCashInService) Remove

func (s *RetailDrawerCashInService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*RetailDrawerCashInService) Template

func (s *RetailDrawerCashInService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*RetailDrawerCashInService) Update

func (s *RetailDrawerCashInService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*RetailDrawerCashInService) UpdateAttribute

func (s *RetailDrawerCashInService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type RetailDrawerCashOut

type RetailDrawerCashOut struct {
	AccountId    *uuid.UUID    `json:"accountId,omitempty"`    // ID учетной записи
	Agent        *Counterparty `json:"agent,omitempty"`        // Метаданные контрагента
	Applicable   *bool         `json:"applicable,omitempty"`   // Отметка о проведении
	Attributes   *Attributes   `json:"attributes,omitempty"`   // Коллекция метаданных доп. полей
	Code         *string       `json:"code,omitempty"`         // Код Выплаты денег
	Created      *Timestamp    `json:"created,omitempty"`      // Дата создания
	Deleted      *Timestamp    `json:"deleted,omitempty"`      // Момент последнего удаления Выплаты денег
	Description  *string       `json:"description,omitempty"`  // Комментарий Выплаты денег
	ExternalCode *string       `json:"externalCode,omitempty"` // Внешний код Выплаты денег
	Files        *Files        `json:"files,omitempty"`        // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group        *Group        `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID    `json:"id,omitempty"`           // ID сущности
	Meta         *Meta         `json:"meta,omitempty"`         // Метаданные
	Moment       *Timestamp    `json:"moment,omitempty"`       // Дата документа
	Name         *string       `json:"name,omitempty"`         // Наименование
	Organization *Organization `json:"organization,omitempty"` // Метаданные юрлица
	Owner        *Employee     `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Printed      *bool         `json:"printed,omitempty"`      // Напечатан ли документ
	Published    *bool         `json:"published,omitempty"`    // Опубликован ли документ
	Rate         *Rate         `json:"rate,omitempty"`         // Валюта
	Shared       *bool         `json:"shared,omitempty"`       // Общий доступ
	State        *State        `json:"state,omitempty"`        // Метаданные статуса Выплаты денег
	Sum          *float64      `json:"sum,omitempty"`          // Сумма Выплаты денег установленной валюте
	SyncId       *uuid.UUID    `json:"syncId,omitempty"`       // ID синхронизации. После заполнения недоступен для изменения
	Updated      *Timestamp    `json:"updated,omitempty"`      // Момент последнего обновления
	RetailShift  *RetailShift  `json:"retailShift,omitempty"`  // Ссылка на розничную смену, в рамках которой было выполнено Внесение денег в формате Метаданных
}

RetailDrawerCashOut Выплата денег. Ключевое слово: retaildrawercashout Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vyplata-deneg

func (RetailDrawerCashOut) GetMeta

func (r RetailDrawerCashOut) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (RetailDrawerCashOut) MetaType

func (r RetailDrawerCashOut) MetaType() MetaType

func (RetailDrawerCashOut) String

func (r RetailDrawerCashOut) String() string

type RetailDrawerCashOutService

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

RetailDrawerCashOutService Сервис для работы с выплатами денег.

func NewRetailDrawerCashOutService

func NewRetailDrawerCashOutService(client *Client) *RetailDrawerCashOutService

func (*RetailDrawerCashOutService) Create

func (s *RetailDrawerCashOutService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*RetailDrawerCashOutService) CreateAttribute

func (s *RetailDrawerCashOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailDrawerCashOutService) CreateAttributes

func (s *RetailDrawerCashOutService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailDrawerCashOutService) CreateUpdateMany

func (s *RetailDrawerCashOutService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailDrawerCashOutService) Delete

func (s *RetailDrawerCashOutService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*RetailDrawerCashOutService) DeleteAttribute

func (s *RetailDrawerCashOutService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*RetailDrawerCashOutService) DeleteAttributes

func (s *RetailDrawerCashOutService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*RetailDrawerCashOutService) DeleteBySyncId

func (s *RetailDrawerCashOutService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*RetailDrawerCashOutService) DeleteMany

func (s *RetailDrawerCashOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailDrawerCashOutService) DeletePublication

func (s *RetailDrawerCashOutService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*RetailDrawerCashOutService) Get

func (s *RetailDrawerCashOutService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*RetailDrawerCashOutService) GetAttributeById

func (s *RetailDrawerCashOutService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*RetailDrawerCashOutService) GetAttributes

func (s *RetailDrawerCashOutService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*RetailDrawerCashOutService) GetById

func (s *RetailDrawerCashOutService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*RetailDrawerCashOutService) GetBySyncId

func (s *RetailDrawerCashOutService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*RetailDrawerCashOutService) GetMetadata

func (s *RetailDrawerCashOutService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*RetailDrawerCashOutService) GetNamedFilterById

func (s *RetailDrawerCashOutService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*RetailDrawerCashOutService) GetNamedFilters

func (s *RetailDrawerCashOutService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*RetailDrawerCashOutService) GetPublicationById

func (s *RetailDrawerCashOutService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*RetailDrawerCashOutService) GetPublications

func (s *RetailDrawerCashOutService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*RetailDrawerCashOutService) Publish

func (s *RetailDrawerCashOutService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*RetailDrawerCashOutService) Remove

func (s *RetailDrawerCashOutService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*RetailDrawerCashOutService) Template

func (s *RetailDrawerCashOutService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*RetailDrawerCashOutService) Update

func (s *RetailDrawerCashOutService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*RetailDrawerCashOutService) UpdateAttribute

func (s *RetailDrawerCashOutService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type RetailPosition

type RetailPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Cost       *float64            `json:"cost,omitempty"`       // Себестоимость (выводится, если документ был создан без основания)
	Discount   *float64            `json:"discount,omitempty"`   // Процент скидки или наценки. Наценка указывается отрицательным числом, т.е. -10 создаст наценку в 10%
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Things     *Things             `json:"things,omitempty"`     // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута.
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Stock      *Stock              `json:"stock,omitempty"`      // Остатки и себестоимость `?fields=stock&expand=positions`
}

RetailPosition Позиция розничного документа

func (RetailPosition) String

func (r RetailPosition) String() string

type RetailSalesReturn

type RetailSalesReturn struct {
	AccountId           *uuid.UUID                 `json:"accountId,omitempty"`           // ID учетной записи
	Agent               *Counterparty              `json:"agent,omitempty"`               // Метаданные контрагента
	AgentAccount        *AgentAccount              `json:"agentAccount,omitempty"`        // Метаданные счета контрагента
	Applicable          *bool                      `json:"applicable,omitempty"`          // Отметка о проведении
	Attributes          *Attributes                `json:"attributes,omitempty"`          // Коллекция метаданных доп. полей. Поля объекта
	CashSum             *float64                   `json:"cashSum,omitempty"`             // Оплачено наличными
	Code                *string                    `json:"code,omitempty"`                // Код Розничного возврата
	Contract            *Contract                  `json:"contract,omitempty"`            // Метаданные договора
	Created             *Timestamp                 `json:"created,omitempty"`             // Дата создания
	Deleted             *Timestamp                 `json:"deleted,omitempty"`             // Момент последнего удаления Розничного возврата
	Demand              *RetailDemand              `json:"demand,omitempty"`              // Метаданные позиций Розничного возврата, по которой произошел возврат
	Description         *string                    `json:"description,omitempty"`         // Комментарий Розничного возврата
	ExternalCode        *string                    `json:"externalCode,omitempty"`        // Внешний код Розничного возврата
	Group               *Group                     `json:"group,omitempty"`               // Отдел сотрудника
	Id                  *uuid.UUID                 `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta                      `json:"meta,omitempty"`                // Метаданные
	Moment              *Timestamp                 `json:"moment,omitempty"`              // Дата документа
	Name                *string                    `json:"name,omitempty"`                // Наименование
	NoCashSum           *float64                   `json:"noCashSum,omitempty"`           // Оплачено картой
	Organization        *Organization              `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount              `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Owner               *Employee                  `json:"owner,omitempty"`               // Владелец (Сотрудник)
	Positions           *Positions[RetailPosition] `json:"positions,omitempty"`           // Метаданные позиций Розничного возврата
	Printed             *bool                      `json:"printed,omitempty"`             // Напечатан ли документ
	Project             *Project                   `json:"project,omitempty"`             // Метаданные проекта
	Published           *bool                      `json:"published,omitempty"`           // Опубликован ли документ
	QrSum               *float64                   `json:"qrSum,omitempty"`               // Оплачено по QR-коду
	Rate                *Rate                      `json:"rate,omitempty"`                // Валюта
	RetailShift         *RetailShift               `json:"retailShift,omitempty"`         // Метаданные Розничной смены
	RetailStore         *RetailStore               `json:"retailStore,omitempty"`         // Метаданные Точки продаж
	Shared              *bool                      `json:"shared,omitempty"`              // Общий доступ
	State               *State                     `json:"state,omitempty"`               // Метаданные статуса Розничного возврата
	Store               *Store                     `json:"store,omitempty"`               // Метаданные склада
	Sum                 *float64                   `json:"sum,omitempty"`                 // Сумма
	SyncId              *uuid.UUID                 `json:"syncId,omitempty"`              // ID синхронизации. После заполнения недоступен для изменения
	TaxSystem           TaxSystem                  `json:"taxSystem,omitempty"`           // Код системы налогообложения
	Updated             *Timestamp                 `json:"updated,omitempty"`             // Момент последнего обновления
	VatEnabled          *bool                      `json:"vatEnabled,omitempty"`          // Учитывается ли НДС
	VatIncluded         *bool                      `json:"vatIncluded,omitempty"`         // Включен ли НДС в цену
	VatSum              *float64                   `json:"vatSum,omitempty"`              // Сумма включая НДС
}

RetailSalesReturn Розничный возврат. Ключевое слово: retailsalesreturn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-roznichnyj-wozwrat

func (RetailSalesReturn) GetMeta

func (r RetailSalesReturn) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (RetailSalesReturn) MetaType

func (r RetailSalesReturn) MetaType() MetaType

func (RetailSalesReturn) String

func (r RetailSalesReturn) String() string

type RetailSalesReturnPosition

type RetailSalesReturnPosition struct {
	RetailPosition
}

RetailSalesReturnPosition позиция розничного возврата. Ключевое слово: salesreturnposition

func (RetailSalesReturnPosition) MetaType

func (r RetailSalesReturnPosition) MetaType() MetaType

type RetailSalesReturnService

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

RetailSalesReturnService Сервис для работы с розничными возвратами.

func NewRetailSalesReturnService

func NewRetailSalesReturnService(client *Client) *RetailSalesReturnService

func (*RetailSalesReturnService) Create

func (s *RetailSalesReturnService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*RetailSalesReturnService) CreateAttribute

func (s *RetailSalesReturnService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailSalesReturnService) CreateAttributes

func (s *RetailSalesReturnService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailSalesReturnService) CreateOrUpdatePositionTrackingCodes

func (s *RetailSalesReturnService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*RetailSalesReturnService) CreatePosition

func (s *RetailSalesReturnService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*RetailSalesReturnService) CreatePositions

func (s *RetailSalesReturnService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*RetailSalesReturnService) CreateUpdateMany

func (s *RetailSalesReturnService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailSalesReturnService) Delete

func (s *RetailSalesReturnService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*RetailSalesReturnService) DeleteAttribute

func (s *RetailSalesReturnService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*RetailSalesReturnService) DeleteAttributes

func (s *RetailSalesReturnService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*RetailSalesReturnService) DeleteBySyncId

func (s *RetailSalesReturnService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*RetailSalesReturnService) DeleteMany

func (s *RetailSalesReturnService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailSalesReturnService) DeletePosition

func (s *RetailSalesReturnService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*RetailSalesReturnService) DeletePositionTrackingCodes

func (s *RetailSalesReturnService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*RetailSalesReturnService) DeletePublication

func (s *RetailSalesReturnService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*RetailSalesReturnService) Get

func (s *RetailSalesReturnService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*RetailSalesReturnService) GetAttributeById

func (s *RetailSalesReturnService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*RetailSalesReturnService) GetAttributes

func (s *RetailSalesReturnService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*RetailSalesReturnService) GetById

func (s *RetailSalesReturnService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*RetailSalesReturnService) GetBySyncId

func (s *RetailSalesReturnService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*RetailSalesReturnService) GetMetadata

func (s *RetailSalesReturnService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*RetailSalesReturnService) GetNamedFilterById

func (s *RetailSalesReturnService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*RetailSalesReturnService) GetNamedFilters

func (s *RetailSalesReturnService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*RetailSalesReturnService) GetPositionById

func (s *RetailSalesReturnService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*RetailSalesReturnService) GetPositionTrackingCodes

func (s *RetailSalesReturnService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*RetailSalesReturnService) GetPositions

func (s *RetailSalesReturnService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*RetailSalesReturnService) GetPublicationById

func (s *RetailSalesReturnService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*RetailSalesReturnService) GetPublications

func (s *RetailSalesReturnService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*RetailSalesReturnService) Publish

func (s *RetailSalesReturnService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*RetailSalesReturnService) Remove

func (s *RetailSalesReturnService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*RetailSalesReturnService) Template

func (s *RetailSalesReturnService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*RetailSalesReturnService) Update

func (s *RetailSalesReturnService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*RetailSalesReturnService) UpdateAttribute

func (s *RetailSalesReturnService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*RetailSalesReturnService) UpdatePosition

func (s *RetailSalesReturnService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type RetailShift

type RetailShift struct {
	AccountId      *uuid.UUID    `json:"accountId,omitempty"`     // ID учетной записи
	Acquire        *Counterparty `json:"acquire,omitempty"`       // Метаданные Банка-эквайера по операциям по карте
	AgentAccount   *AgentAccount `json:"agentAccount,omitempty"`  // Метаданные счета контрагента
	Attributes     *Attributes   `json:"attributes,omitempty"`    // Коллекция метаданных доп. полей. Поля объекта
	BankCommission *float64      `json:"bankComission,omitempty"` // Сумма комиссии эквайера за проведение безналичных платежей по банковской карте. Не может превышать общую сумму безналичных платежей по карте. Если не указано, заполняется 0 автоматически.
	BankPercent    *float64      `json:"bankPercent,omitempty"`   // Комиссия банка-эквайера по операциям по карте (в процентах)
	Cheque         *Cheque       `json:"cheque,omitempty"`        // Информация о смене ККТ
	CloseDate      *Timestamp    `json:"closeDate,omitempty"`     // Дата закрытия смены
	Contract       *Contract     `json:"contract,omitempty"`      // Метаданные договора
	Created        *Timestamp    `json:"created,omitempty"`       // Дата создания
	Deleted        *Timestamp    `json:"deleted,omitempty"`       // Момент последнего удаления Розничной смены
	Description    *string       `json:"description,omitempty"`   // Комментарий Розничной смены
	ExternalCode   *string       `json:"externalCode,omitempty"`  // Внешний код Розничной смены
	Files          *Files        `json:"files,omitempty"`         // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group          *Group        `json:"group,omitempty"`         // Отдел сотрудника
	Id             *uuid.UUID    `json:"id,omitempty"`            // ID сущности
	Meta           *Meta         `json:"meta,omitempty"`          // Метаданные
	Moment         *Timestamp    `json:"moment,omitempty"`        // Дата документа
	Name           *string       `json:"name,omitempty"`          // Наименование
	//Operations          *Operations              `json:"operations,omitempty"`          // Коллекция метаданных связанных операций
	Organization        *Organization            `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount            `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Owner               *Employee                `json:"owner,omitempty"`               // Владелец (Сотрудник)
	PaymentOperations   Slice[PaymentInDocument] `json:"paymentOperations,omitempty"`   // Коллекция метаданных платежных операций
	Printed             *bool                    `json:"printed,omitempty"`             // Напечатан ли документ
	ProceedsCash        *float64                 `json:"proceedsCash,omitempty"`        // Выручка наличными
	ProceedsNoCash      *float64                 `json:"proceedsNoCash,omitempty"`      // Выручка безнал
	Published           *bool                    `json:"published,omitempty"`           // Опубликован ли документ
	QRAcquire           *Counterparty            `json:"qrAcquire,omitempty"`           // Метаданные Банка-эквайера по операциям по QR-коду
	QRBankCommission    *float64                 `json:"qrBankComission,omitempty"`     // Сумма комиссии эквайера за проведение безналичных платежей по QR-коду. Не может превышать общую сумму безналичных платежей по QR-коду. Если не указано, заполняется 0 автоматически.
	QRBankPercent       *float64                 `json:"qrBankPercent,omitempty"`       // Комиссия банка-эквайера по операция по QR-коду (в процентах)
	ReceivedCash        *float64                 `json:"receivedCash,omitempty"`        // Получено наличными
	ReceivedNoCash      *float64                 `json:"receivedNoCash,omitempty"`      // Получено безнал
	RetailStore         *RetailStore             `json:"retailStore,omitempty"`         // Метаданные точки продаж
	Shared              *bool                    `json:"shared,omitempty"`              // Общий доступ
	Store               *Store                   `json:"store,omitempty"`               // Метаданные склада. Если не указано, заполняется с точки продаж автоматически
	SyncId              *uuid.UUID               `json:"syncId,omitempty"`              // ID синхронизации. После заполнения недоступен для изменения
	Updated             *Timestamp               `json:"updated,omitempty"`             // Момент последнего обновления
	VatEnabled          *bool                    `json:"vatEnabled,omitempty"`          // Учитывается ли НДС
	VatIncluded         *bool                    `json:"vatIncluded,omitempty"`         // Включен ли НДС в цену
}

RetailShift Розничная смена. Ключевое слово: retailshift Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-roznichnaq-smena

func (RetailShift) ConvertToOperation

func (r RetailShift) ConvertToOperation(linkedSum *float64) (*OperationIn, error)

ConvertToOperation удовлетворяет интерфейсу OperationInType

func (RetailShift) GetMeta

func (r RetailShift) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (RetailShift) MetaType

func (r RetailShift) MetaType() MetaType

func (RetailShift) String

func (r RetailShift) String() string

type RetailShiftService

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

RetailShiftService Сервис для работы с розничными сменами.

func NewRetailShiftService

func NewRetailShiftService(client *Client) *RetailShiftService

func (*RetailShiftService) Create

func (s *RetailShiftService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*RetailShiftService) CreateAttribute

func (s *RetailShiftService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailShiftService) CreateAttributes

func (s *RetailShiftService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*RetailShiftService) Delete

func (s *RetailShiftService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*RetailShiftService) DeleteAttribute

func (s *RetailShiftService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*RetailShiftService) DeleteAttributes

func (s *RetailShiftService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*RetailShiftService) DeleteBySyncId

func (s *RetailShiftService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*RetailShiftService) Get

func (s *RetailShiftService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*RetailShiftService) GetAttributeById

func (s *RetailShiftService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*RetailShiftService) GetAttributes

func (s *RetailShiftService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*RetailShiftService) GetById

func (s *RetailShiftService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*RetailShiftService) GetBySyncId

func (s *RetailShiftService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*RetailShiftService) GetMetadata

func (s *RetailShiftService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*RetailShiftService) GetNamedFilterById

func (s *RetailShiftService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*RetailShiftService) GetNamedFilters

func (s *RetailShiftService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*RetailShiftService) Remove

func (s *RetailShiftService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*RetailShiftService) Update

func (s *RetailShiftService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*RetailShiftService) UpdateAttribute

func (s *RetailShiftService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

type RetailStore

type RetailStore struct {
	AccountId                           *uuid.UUID            `json:"accountId,omitempty"`                           // ID учетной записи
	Acquire                             *Counterparty         `json:"acquire,omitempty"`                             // Метаданные Банка-эквайера по операциям по карте
	Active                              *bool                 `json:"active,omitempty"`                              // Состояние точки продаж (Включена/Отключена)
	Address                             *string               `json:"address,omitempty"`                             // Адрес Точки продаж
	AddressFull                         *Address              `json:"addressFull,omitempty"`                         // Адрес с детализацией по отдельным полям
	AllowCreateProducts                 *bool                 `json:"allowCreateProducts,omitempty"`                 // Контроль остатков. Не может быть true, если controlShippingStock имеет значение true
	AllowCustomPrice                    *bool                 `json:"allowCustomPrice,omitempty"`                    // Разрешить продажу по свободной цене
	AllowDeleteReceiptPositions         *bool                 `json:"allowDeleteReceiptPositions,omitempty"`         // Разрешить удалять позиции в чеке
	AllowSellTobaccoWithoutMRC          *bool                 `json:"allowSellTobaccoWithoutMRC,omitempty"`          // Разрешить продавать табачную продукцию не по МРЦ
	Archived                            *bool                 `json:"archived,omitempty"`                            // Добавлена ли Точка продаж в архив
	AuthTokenAttached                   *bool                 `json:"authTokenAttached,omitempty"`                   // Создан ли токен для точки продаж
	BankPercent                         *float64              `json:"bankPercent,omitempty"`                         // Комиссия банка-эквайера по операциям по карте (в процентах)
	Cashiers                            *Cashiers             `json:"cashiers,omitempty"`                            // Метаданные Кассиров
	ControlCashierChoice                *bool                 `json:"controlCashierChoice,omitempty"`                // Выбор продавца
	ControlShippingStock                *bool                 `json:"controlShippingStock,omitempty"`                // Контроль остатков. Не может быть true, если AllowCreateProducts имеет значение true
	CreateAgentsTags                    *Tags                 `json:"createAgentsTags,omitempty"`                    // Коллекция групп покупателей, представленных в формате строк. Определяет группы, в которые добавляются новые покупатели. Значения null игнорируются
	CreateCashInOnRetailShiftClosing    *bool                 `json:"createCashInOnRetailShiftClosing,omitempty"`    // Создавать ПКО при закрытии смены
	CreateOrderWithState                *State                `json:"createOrderWithState,omitempty"`                // Метаданные статуса, который будет указан при создании заказа
	CreatePaymentInOnRetailShiftClosing *bool                 `json:"createPaymentInOnRetailShiftClosing,omitempty"` // Создавать входящий платеж при закрытии смены
	CustomerOrderStates                 *States               `json:"customerOrderStates,omitempty"`                 // Метаданные статусов, в которых выгружаются заказы в точку продаж (если указано)
	DefaultTaxSystem                    TaxSystem             `json:"defaulTaxSystem,omitempty"`                     // Код системы налогообложения по умолчанию
	DemandPrefix                        *string               `json:"demandPrefix,omitempty"`                        // Префикс номера продаж
	Description                         *string               `json:"description,omitempty"`                         // Комментарий к Точке продаж
	DiscountEnable                      *bool                 `json:"discountEnable,omitempty"`                      // Разрешить скидки
	DiscountMaxPercent                  *float64              `json:"discountMaxPercent,omitempty"`                  // Максимальная скидка (в процентах)
	EnableReturnsWithNoReason           *bool                 `json:"enableReturnsWithNoReason,omitempty"`           // Разрешить возвраты без основания
	Environment                         *Environment          `json:"environment,omitempty"`                         // Информация об окружении
	ExternalCode                        *string               `json:"externalCode,omitempty"`                        // Внешний код Точки продаж
	FilterAgentsTags                    *Tags                 `json:"filterAgentsTags,omitempty"`                    // Коллекция групп покупателей, представленных в формате строк. Определяет группы, из которых выгружаются покупатели. Значения null игнорируются
	FiscalType                          FiscalType            `json:"fiscalType,omitempty"`                          // Тип формирования чеков
	Group                               *Group                `json:"group,omitempty"`                               // Отдел сотрудника
	Id                                  *uuid.UUID            `json:"id,omitempty"`                                  // ID сущности
	IdQR                                *string               `json:"idQR,omitempty"`                                // Идентификатор устройства QR (IdQR) для приложения оплаты по QR
	IssueOrders                         *bool                 `json:"issueOrders,omitempty"`                         // Выдача заказов
	LastOperationNames                  *LastOperations       `json:"lastOperationNames,omitempty"`                  // Последние операции
	MarkingSellingMode                  MarkingSellingMode    `json:"markingSellingMode,omitempty"`                  // Режим продажи маркированной продукции, если используется формат фискальных документов версии 1.2
	MasterRetailStores                  *RetailStores         `json:"masterRetailStores,omitempty"`                  // Ссылка на точки продаж, которые могут фискализировать операции с текущей точки продаж, если minionToMaster = CHOSEN
	Meta                                *Meta                 `json:"meta,omitempty"`                                // Метаданные
	MinionToMasterType                  MinionToMaster        `json:"minionToMasterType,omitempty"`                  // Стратегия выбора кассы для фискализации облачных чеков
	Name                                *string               `json:"name,omitempty"`                                // Название
	OFDEnabled                          *bool                 `json:"ofdEnabled,omitempty"`                          // Отправлять электронный чек через ОФД
	OnlyInStock                         *bool                 `json:"onlyInStock,omitempty"`                         // Выгружать только товары в наличии. Доступно только при активном контроле остатков. Влияет только на выгрузку остатков в POS API
	OrderTaxSystem                      TaxSystem             `json:"orderTaxSystem,omitempty"`                      // Код системы налогообложения для заказов
	OrderToState                        *State                `json:"orderToState,omitempty"`                        // Метаданные статуса, который проставится заказу после проведения продажи на его основании (если указано)
	Organization                        *Organization         `json:"organization,omitempty"`                        // Метаданные Юрлица
	Owner                               *Employee             `json:"owner,omitempty"`                               // Владелец (Сотрудник)
	PriceType                           *PriceType            `json:"priceType,omitempty"`                           // Тип цен, с которыми будут продаваться товары в рознице
	PrintAlways                         *bool                 `json:"printAlways,omitempty"`                         // Всегда печатать кассовые чеки
	PriorityOFDSend                     PriorityOfdSend       `json:"priorityOfdSend,omitempty"`                     // Приоритет отправки электронного чека. Активен только, когда отправка электронных чеков через ОФД включена
	ProductFolders                      *ProductFolders       `json:"productFolders,omitempty"`                      // Коллекция Метаданных групп товаров, из которых можно выгружать товары
	QRAcquire                           *Counterparty         `json:"qrAcquire,omitempty"`                           // Метаданные Банка-эквайера по операциям по QR-коду
	QRBankPercent                       *float64              `json:"qrBankPercent,omitempty"`                       // Комиссия банка-эквайера по операция по QR-коду (в процентах)
	QRPayEnabled                        *bool                 `json:"qrPayEnabled,omitempty"`                        // Возможность оплаты по QR-коду на точке продаж
	QRTerminalId                        *string               `json:"qrTerminalId,omitempty"`                        // Идентификатор терминала (TerminalID) для приложения оплаты по QR
	ReceiptTemplate                     *Meta                 `json:"receiptTemplate,omitempty"`                     // Метаданные шаблона печати кассовых чеков TODO: expand не работает
	RequiredFio                         *bool                 `json:"requiredFio,omitempty"`                         // Обязательность поля ФИО при создании контрагента
	RequiredPhone                       *bool                 `json:"requiredPhone,omitempty"`                       // Обязательность поля телефон при создании контрагента
	RequiredEmail                       *bool                 `json:"requiredEmail,omitempty"`                       // Обязательность поля эл. почта при создании контрагента
	RequiredBirthdate                   *bool                 `json:"RequiredBirthdate,omitempty"`                   // Обязательность поля дата рождения при создании контрагента
	RequiredSex                         *bool                 `json:"requiredSex,omitempty"`                         // Обязательность поля пол при создании контрагента
	RequiredDiscountCardNumber          *bool                 `json:"requiredDiscountCardNumber,omitempty"`          // Обязательность поля номер бонусной карты при создании контрагента
	ReservePrepaidGoods                 *bool                 `json:"reservePrepaidGoods,omitempty"`                 // Резервировать товары, за которые внесена предоплата
	ReturnFromClosedShiftEnabled        *bool                 `json:"returnFromClosedShiftEnabled,omitempty"`        // Разрешить возвраты в закрытых сменах
	SellReserves                        *bool                 `json:"sellReserves,omitempty"`                        // Учёт резервов
	SendMarksForCheck                   *bool                 `json:"sendMarksForCheck,omitempty"`                   // Для облачных точек — до продажи отправлять коды маркировки на проверку на точку с ККТ
	Shared                              *bool                 `json:"shared,omitempty"`                              // Общий доступ
	State                               *RetailStoreState     `json:"state,omitempty"`                               // Информация статусе точки продаж
	Store                               *Store                `json:"store,omitempty"`                               // Метаданные Склада
	TobaccoMRCControlType               TobaccoMRCControlType `json:"tobaccoMrcControlType,omitempty"`               // Контроль МРЦ для табачной продукции
	Updated                             *Timestamp            `json:"updated,omitempty"`                             // Момент последнего обновления Точки продаж
}

RetailStore Точка продаж. Ключевое слово: retailstore Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh

func (RetailStore) MetaType

func (r RetailStore) MetaType() MetaType

func (RetailStore) String

func (r RetailStore) String() string

type RetailStoreService

type RetailStoreService struct {
	Endpoint
	// contains filtered or unexported fields
}

RetailStoreService Сервис для работы с точками продаж.

func NewRetailStoreService

func NewRetailStoreService(client *Client) *RetailStoreService

func (*RetailStoreService) Create

func (s *RetailStoreService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*RetailStoreService) CreateUpdateMany

func (s *RetailStoreService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailStoreService) Delete

func (s *RetailStoreService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*RetailStoreService) DeleteMany

func (s *RetailStoreService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*RetailStoreService) Get

func (s *RetailStoreService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*RetailStoreService) GetById

func (s *RetailStoreService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*RetailStoreService) GetCashierById

func (s *RetailStoreService) GetCashierById(ctx context.Context, id, cashierId uuid.UUID) (*Cashier, *Response, error)

GetCashierById Получить Кассира. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kassir-poluchit-kassira

func (*RetailStoreService) GetCashiers

func (s *RetailStoreService) GetCashiers(ctx context.Context, id *uuid.UUID) (*MetaArray[Cashier], *Response, error)

GetCashiers Получить Кассиров. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kassir-poluchit-kassirow

func (*RetailStoreService) GetNamedFilterById

func (s *RetailStoreService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*RetailStoreService) GetNamedFilters

func (s *RetailStoreService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*RetailStoreService) Update

func (s *RetailStoreService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type RetailStoreState

type RetailStoreState struct {
	Sync            RetailStoreStateSync `json:"sync,omitempty"`         // Состояние синхронизации
	LastCheckMoment Timestamp            `json:"lastCheckMoment,"`       // Дата и время последней синхронизации
	FiscalMemory    FiscalMemoryState    `json:"fiscalMemory,omitempty"` // Информация о фискальном накопителе
}

RetailStoreState Информация статусе точки продаж Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-attributy-suschnosti-status

func (RetailStoreState) String

func (r RetailStoreState) String() string

type RetailStoreStateSync

type RetailStoreStateSync struct {
	Message           string    `json:"message,omitempty"`          // Состояние синхронизации
	LastAttemptMoment Timestamp `json:"lastAttempMoment,omitempty"` // Дата последней сихронизации (не обязательно успешной)
}

RetailStoreStateSync Состояние синхронизации. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-attributy-suschnosti-status-attributy-suschnosti-sinhronizaciq

func (RetailStoreStateSync) String

func (r RetailStoreStateSync) String() string

type RetailStores

type RetailStores = Iterator[RetailStore]

type RetryableClient

type RetryableClient struct {
	HTTPClient *http.Client // Internal HTTP client.
	Logger     any          // Customer logger instance. Can be either Logger or LeveledLogger

	RetryWaitMin time.Duration // Minimum time to wait
	RetryWaitMax time.Duration // Maximum time to wait
	RetryMax     int           // Maximum number of retries

	// RequestLogHook allows a user-supplied function to be called
	// before each retry.
	RequestLogHook RequestLogHook

	// ResponseLogHook allows a user-supplied function to be called
	// with the response from each HTTP request executed.
	ResponseLogHook ResponseLogHook

	// CheckRetry specifies the policy for handling retries, and is called
	// after each request. The default policy is DefaultRetryPolicy.
	CheckRetry CheckRetry

	// Backoff specifies the policy for how long to wait between retries
	Backoff Backoff

	// ErrorHandler specifies the custom error handler to use, if any
	ErrorHandler ErrorHandler
	// contains filtered or unexported fields
}

RetryableClient is used to make HTTP requests. It adds additional functionality like automatic retries to tolerate minor outages.

func (*RetryableClient) Do

func (c *RetryableClient) Do(req *Request) (*http.Response, error)

Do wraps calling an HTTP method with retries.

type RewardType

type RewardType string

RewardType Тип Вознаграждения.

const (
	RewardTypePercentOfSales RewardType = "PercentOfSales" // Процент от суммы продажи
	RewardTypeNone           RewardType = "None"           // Не рассчитывать
)

type Role

type Role struct {
	Id          *uuid.UUID           `json:"id,omitempty"`          // ID пользовательской роли
	Meta        *Meta                `json:"meta,omitempty"`        // Метаданные пользовательской роли
	Name        *string              `json:"name,omitempty"`        // Наименование пользовательской роли
	Permissions *EmployeePermissions `json:"permissions,omitempty"` // Список пермиссий
}

Role Пользовательская роль. Ключевое слово: role Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-pol-zowatel-skie-roli

func (Role) MetaType

func (r Role) MetaType() MetaType

func (Role) String

func (r Role) String() string

type RoleService

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

RoleService Сервис для работы с ролями и правами сотрудников.

func NewRoleService

func NewRoleService(client *Client) *RoleService

TODO: запросы на получение роли

func (*RoleService) Create

func (s *RoleService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*RoleService) Delete

func (s *RoleService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*RoleService) Get

func (s *RoleService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*RoleService) GetById

func (s *RoleService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*RoleService) Update

func (s *RoleService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type RoundOffDiscount

type RoundOffDiscount struct {
	Meta      *Meta      `json:"meta,omitempty"`
	Id        *uuid.UUID `json:"id,omitempty"`
	AccountId *uuid.UUID `json:"accountId,omitempty"`
	Name      *string    `json:"name,omitempty"`
	Active    *bool      `json:"active,omitempty"`
	AllAgents *bool      `json:"allAgents,omitempty"`
	AgentTags *Tags      `json:"agentTags,omitempty"`
}

RoundOffDiscount Округление копеек.

func (RoundOffDiscount) MetaType

func (r RoundOffDiscount) MetaType() MetaType

func (RoundOffDiscount) String

func (r RoundOffDiscount) String() string

type SalePrice

type SalePrice struct {
	Value     *float64   `json:"value,omitempty"`     // Значение цены
	Currency  *Currency  `json:"currency,omitempty"`  // Ссылка на валюту в формате Метаданных
	PriceType *PriceType `json:"priceType,omitempty"` // Тип цены
}

SalePrice Цена продажи Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar-towary-atributy-wlozhennyh-suschnostej-ceny-prodazhi

func (SalePrice) String

func (s SalePrice) String() string

type SalePrices

type SalePrices = Iterator[SalePrice]

type SalesChannel

type SalesChannel struct {
	AccountId        *uuid.UUID       `json:"accountId,omitempty"`    // ID учетной записи
	Archived         *bool            `json:"archived,omitempty"`     // Добавлен ли Канал продаж в архив
	Code             *string          `json:"code,omitempty"`         // Код Канала продаж
	Description      *string          `json:"description,omitempty"`  // Описание Канала продаж
	ExternalCode     *string          `json:"externalCode,omitempty"` // Внешний код Канала продаж
	Group            *Group           `json:"group,omitempty"`        // Метаданные отдела сотрудника
	Id               *uuid.UUID       `json:"id,omitempty"`           // ID Канала продаж
	Meta             *Meta            `json:"meta,omitempty"`         // Метаданные
	Name             *string          `json:"name,omitempty"`         // Наименование Канала продаж
	Owner            *Employee        `json:"owner,omitempty"`        // Метаданные владельца (Сотрудника)
	Shared           *bool            `json:"shared,omitempty"`       // Общий доступ
	SalesChannelType SalesChannelType `json:"type,omitempty"`         // Тип Канала продаж
	Updated          *Timestamp       `json:"update,omitempty"`       // Момент последнего обновления сущности
}

SalesChannel Канал продаж. Ключевое слово: saleschannel Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kanal-prodazh

func (SalesChannel) MetaType

func (s SalesChannel) MetaType() MetaType

func (SalesChannel) String

func (s SalesChannel) String() string

type SalesChannelService

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

SalesChannelService Сервис для работы с каналами продаж.

func NewSalesChannelService

func NewSalesChannelService(client *Client) *SalesChannelService

func (*SalesChannelService) Create

func (s *SalesChannelService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*SalesChannelService) CreateUpdateMany

func (s *SalesChannelService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*SalesChannelService) Delete

func (s *SalesChannelService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*SalesChannelService) DeleteMany

func (s *SalesChannelService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*SalesChannelService) Get

func (s *SalesChannelService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*SalesChannelService) GetById

func (s *SalesChannelService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*SalesChannelService) Update

func (s *SalesChannelService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type SalesChannelType

type SalesChannelType string

SalesChannelType Тип канала продаж. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kanal-prodazh-kanaly-prodazh-tip-kanala-prodazh

const (
	SalesChannelTypeMessenger     SalesChannelType = "MESSENGER"      // Мессенджер
	SalesChannelTypeSocialNetwork SalesChannelType = "SOCIAL_NETWORK" // Социальная сеть
	SalesChannelTypeMarketplace   SalesChannelType = "MARKETPLACE"    // Маркетплейс
	SalesChannelTypeEcommerce     SalesChannelType = "ECOMMERCE"      // Интернет-магазин
	SalesChannelTypeClassifiedAds SalesChannelType = "CLASSIFIED_ADS" // Доска объявлений
	SalesChannelTypeDirectSales   SalesChannelType = "DIRECT_SALES"   // Прямые продажи
	SalesChannelTypeOther         SalesChannelType = "OTHER"          // Другое
)

type SalesPlotSeries

type SalesPlotSeries struct {
	Context Context         `json:"context"`
	Meta    Meta            `json:"meta"`
	Series  []SeriesElement `json:"series"` // Массив показателей
}

SalesPlotSeries Показатели продаж. Ключевое слово: salesplotseries Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-prodazh-i-zakazow-pokazateli-prodazh

func (SalesPlotSeries) MetaType

func (s SalesPlotSeries) MetaType() MetaType

type SalesReturn

type SalesReturn struct {
	AccountId           *uuid.UUID                      `json:"accountId,omitempty"`           // ID учетной записи
	Agent               *Counterparty                   `json:"agent,omitempty"`               // Метаданные контрагента
	AgentAccount        *AgentAccount                   `json:"agentAccount,omitempty"`        // Метаданные счета контрагента
	Applicable          *bool                           `json:"applicable,omitempty"`          // Отметка о проведении
	Attributes          *Attributes                     `json:"attributes,omitempty"`          // Коллекция метаданных доп. полей. Поля объекта
	Code                *string                         `json:"code,omitempty"`                // Код Возврата Покупателя
	Contract            *Contract                       `json:"contract,omitempty"`            // Метаданные договора
	Created             *Timestamp                      `json:"created,omitempty"`             // Дата создания
	Deleted             *Timestamp                      `json:"deleted,omitempty"`             // Момент последнего удаления Возврата Покупателя
	Description         *string                         `json:"description,omitempty"`         // Комментарий Возврата Покупателя
	ExternalCode        *string                         `json:"externalCode,omitempty"`        // Внешний код Возврата Покупателя
	Files               *Files                          `json:"files,omitempty"`               // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group               *Group                          `json:"group,omitempty"`               // Отдел сотрудника
	Id                  *uuid.UUID                      `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta                           `json:"meta,omitempty"`                // Метаданные
	Moment              *Timestamp                      `json:"moment,omitempty"`              // Дата документа
	Name                *string                         `json:"name,omitempty"`                // Наименование
	Organization        *Organization                   `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount                   `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Owner               *Employee                       `json:"owner,omitempty"`               // Владелец (Сотрудник)
	Positions           *Positions[SalesReturnPosition] `json:"positions,omitempty"`           // Метаданные позиций Возврата Покупателя
	Printed             *bool                           `json:"printed,omitempty"`             // Напечатан ли документ
	Project             *Project                        `json:"project,omitempty"`             // Метаданные проекта
	Published           *bool                           `json:"published,omitempty"`           // Опубликован ли документ
	Rate                *Rate                           `json:"rate,omitempty"`                // Валюта
	SalesChannel        *SalesChannel                   `json:"salesChannel,omitempty"`        // Метаданные канала продаж
	Shared              *bool                           `json:"shared,omitempty"`              // Общий доступ
	State               *State                          `json:"state,omitempty"`               // Метаданные статуса Возврата Покупателя
	Store               *Store                          `json:"store,omitempty"`               // Метаданные склада
	Sum                 *float64                        `json:"sum,omitempty"`                 // Сумма
	SyncId              *uuid.UUID                      `json:"syncId,omitempty"`              // ID синхронизации. После заполнения недоступен для изменения
	Updated             *Timestamp                      `json:"updated,omitempty"`             // Момент последнего обновления
	VatEnabled          *bool                           `json:"vatEnabled,omitempty"`          // Учитывается ли НДС
	VatIncluded         *bool                           `json:"vatIncluded,omitempty"`         // Включен ли НДС в цену
	VatSum              *float64                        `json:"vatSum,omitempty"`              // Сумма включая НДС
	Demand              *Demand                         `json:"demand,omitempty"`              // Ссылка на отгрузку, по которой произошел возврат в формате Метаданных
	Losses              *Losses                         `json:"losses,omitempty"`              // Массив ссылок на связанные списания в формате Метаданных
	Payments            *Payments                       `json:"payments,omitempty"`            // Массив ссылок на связанные операции в формате Метаданных
	PayedSum            *float64                        `json:"payedSum,omitempty"`            // Сумма исходящих платежей по возврату покупателя
	FactureOut          *FactureOut                     `json:"factureOut,omitempty"`          // Ссылка на Счет-фактуру выданный, с которым связан этот возврат, в формате Метаданных
}

SalesReturn Возврат покупателя. Ключевое слово: salesreturn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vozwrat-pokupatelq

func (SalesReturn) GetMeta

func (s SalesReturn) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (SalesReturn) MetaType

func (s SalesReturn) MetaType() MetaType

func (SalesReturn) String

func (s SalesReturn) String() string

type SalesReturnPosition

type SalesReturnPosition struct {
	AccountId  *uuid.UUID          `json:"accountId,omitempty"`  // ID учетной записи
	Assortment *AssortmentPosition `json:"assortment,omitempty"` // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Cost       *float64            `json:"cost,omitempty"`       // Себестоимость (выводится, если документ был создан без основания)
	Country    *Country            `json:"country,omitempty"`    // Метаданные Страны
	Discount   *float64            `json:"discount,omitempty"`   // Процент скидки или наценки. Наценка указывается отрицательным числом, т.е. -10 создаст наценку в 10%
	GTD        *GTD                `json:"gtd,omitempty"`        // ГТД
	Id         *uuid.UUID          `json:"id,omitempty"`         // ID позиции
	Pack       *Pack               `json:"pack,omitempty"`       // Упаковка Товара
	Price      *float64            `json:"price,omitempty"`      // Цена товара/услуги в копейках
	Quantity   *float64            `json:"quantity,omitempty"`   // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Slot       *Slot               `json:"slot,omitempty"`       // Метаданные
	Things     *Things             `json:"things,omitempty"`     // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута.
	Vat        *int                `json:"vat,omitempty"`        // НДС, которым облагается текущая позиция
	VatEnabled *bool               `json:"vatEnabled,omitempty"` // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Stock      *Stock              `json:"stock,omitempty"`      // Остатки и себестоимость `?fields=stock&expand=positions`
}

SalesReturnPosition Позиция Возврата покупателя. Ключевое слово: salesreturnposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vozwrat-pokupatelq-vozwraty-pokupatelej-pozicii-vozwrata-pokupatelq

func (SalesReturnPosition) MetaType

func (s SalesReturnPosition) MetaType() MetaType

func (SalesReturnPosition) String

func (s SalesReturnPosition) String() string

type SalesReturnService

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

SalesReturnService Сервис для работы с возвратами покупателей.

func NewSalesReturnService

func NewSalesReturnService(client *Client) *SalesReturnService

func (*SalesReturnService) Create

func (s *SalesReturnService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*SalesReturnService) CreateAttribute

func (s *SalesReturnService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*SalesReturnService) CreateAttributes

func (s *SalesReturnService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*SalesReturnService) CreateOrUpdatePositionTrackingCodes

func (s *SalesReturnService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*SalesReturnService) CreatePosition

func (s *SalesReturnService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*SalesReturnService) CreatePositions

func (s *SalesReturnService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*SalesReturnService) CreateUpdateMany

func (s *SalesReturnService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*SalesReturnService) Delete

func (s *SalesReturnService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*SalesReturnService) DeleteAttribute

func (s *SalesReturnService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*SalesReturnService) DeleteAttributes

func (s *SalesReturnService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*SalesReturnService) DeleteBySyncId

func (s *SalesReturnService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*SalesReturnService) DeleteMany

func (s *SalesReturnService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*SalesReturnService) DeletePosition

func (s *SalesReturnService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*SalesReturnService) DeletePositionTrackingCodes

func (s *SalesReturnService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*SalesReturnService) DeletePublication

func (s *SalesReturnService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*SalesReturnService) Get

func (s *SalesReturnService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*SalesReturnService) GetAttributeById

func (s *SalesReturnService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*SalesReturnService) GetAttributes

func (s *SalesReturnService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*SalesReturnService) GetById

func (s *SalesReturnService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*SalesReturnService) GetBySyncId

func (s *SalesReturnService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*SalesReturnService) GetMetadata

func (s *SalesReturnService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*SalesReturnService) GetNamedFilterById

func (s *SalesReturnService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*SalesReturnService) GetNamedFilters

func (s *SalesReturnService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*SalesReturnService) GetPositionById

func (s *SalesReturnService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*SalesReturnService) GetPositionTrackingCodes

func (s *SalesReturnService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*SalesReturnService) GetPositions

func (s *SalesReturnService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*SalesReturnService) GetPublicationById

func (s *SalesReturnService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*SalesReturnService) GetPublications

func (s *SalesReturnService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*SalesReturnService) Publish

func (s *SalesReturnService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*SalesReturnService) Remove

func (s *SalesReturnService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*SalesReturnService) Template

func (s *SalesReturnService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*SalesReturnService) Update

func (s *SalesReturnService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*SalesReturnService) UpdateAttribute

func (s *SalesReturnService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*SalesReturnService) UpdatePosition

func (s *SalesReturnService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

type SalesReturns

type SalesReturns = Iterator[SalesReturn]

type ScriptPermission

type ScriptPermission struct {
	View   ScriptPermissionValue `json:"view"`
	Create ScriptPermissionValue `json:"create"`
	Update ScriptPermissionValue `json:"update"`
	Delete ScriptPermissionValue `json:"delete"`
	Done   ScriptPermissionValue `json:"done"`
}

type ScriptPermissionValue

type ScriptPermissionValue string
const (
	ScriptPermissionValueNo                ScriptPermissionValue = "NO"                 // Нет прав ни на какие задачи
	ScriptPermissionValueAuthor            ScriptPermissionValue = "AUTHOR"             // Созданные пользователем
	ScriptPermissionValueAssignee          ScriptPermissionValue = "ASSIGNEE"           // Назначенные
	ScriptPermissionValueOAuthorOrAssignee ScriptPermissionValue = "AUTHOR_OR_ASSIGNEE" // Созданные пользователем и назначенные ему
	ScriptPermissionValueAll               ScriptPermissionValue = "ALL"                // Возможность совершать действие над любыми задачами
)

type SecurityService

type SecurityService struct {
	Token *SecurityTokenService
}

func NewSecurityService

func NewSecurityService(client *Client) *SecurityService

type SecurityTokenService

type SecurityTokenService struct {
	Endpoint
}

SecurityTokenService Сервис для получения нового токена

func NewSecurityTokenService

func NewSecurityTokenService(client *Client) *SecurityTokenService

func (*SecurityTokenService) GetNewToken

func (s *SecurityTokenService) GetNewToken(ctx context.Context) (*Token, *Response, error)

GetNewToken Запрос на получение нового токена. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-obschie-swedeniq-autentifikaciq-poluchenie-nowogo-tokena

type SeriesElement

type SeriesElement struct {
	Date     Timestamp `json:"date"`     // Дата
	Quantity float64   `json:"quantity"` // Количество
	Sum      float64   `json:"sum"`      // Сумма
}

SeriesElement Показатели (series). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-prodazh-i-zakazow-pokazateli-series

type Service

type Service struct {
	AccountId           *uuid.UUID     `json:"accountId,omitempty"`           // ID учетной записи
	Barcodes            *Barcodes      `json:"barcodes,omitempty"`            // Штрихкоды
	Code                *string        `json:"code,omitempty"`                // Код
	Description         *string        `json:"description,omitempty"`         // Описание
	ExternalCode        *string        `json:"externalCode,omitempty"`        // Внешний код
	Id                  *uuid.UUID     `json:"id,omitempty"`                  // ID сущности
	Meta                *Meta          `json:"meta,omitempty"`                // Метаданные
	Name                *string        `json:"name,omitempty"`                // Наименование
	Archived            *bool          `json:"archived,omitempty"`            // Добавлена ли Услуга в архив
	Attributes          *Attributes    `json:"attributes,omitempty"`          // Коллекция доп. полей
	BuyPrice            *BuyPrice      `json:"buyPrice,omitempty"`            // Закупочная цена
	DiscountProhibited  *bool          `json:"discountProhibited,omitempty"`  // Признак запрета скидок
	EffectiveVat        *int           `json:"effectiveVat,omitempty"`        // Реальный НДС %
	EffectiveVatEnabled *bool          `json:"effectiveVatEnabled,omitempty"` // Дополнительный признак для определения разграничения реального НДС = 0 или "без НДС". (effectiveVat = 0, effectiveVatEnabled = false) -> "без НДС", (effectiveVat = 0, effectiveVatEnabled = true) -> 0%.
	Files               *Files         `json:"files,omitempty"`               // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group               *Group         `json:"group,omitempty"`               // Метаданные отдела сотрудника
	MinPrice            *MinPrice      `json:"minPrice,omitempty"`            // Минимальная цена
	Owner               *Employee      `json:"owner,omitempty"`               // Метаданные владельца (Сотрудника)
	PathName            *string        `json:"pathName,omitempty"`            // Наименование группы, в которую входит Услуга
	PaymentItemType     PaymentItem    `json:"paymentItemType,omitempty"`     // Признак предмета расчета
	ProductFolder       *ProductFolder `json:"productFolder,omitempty"`       // Метаданные группы
	SalePrices          *SalePrices    `json:"salePrices,omitempty"`          // Цены продажи
	Shared              *bool          `json:"shared,omitempty"`              // Общий доступ
	SyncId              *uuid.UUID     `json:"syncId,omitempty"`              // ID синхронизации
	TaxSystem           TaxSystem      `json:"taxSystem,omitempty"`           // Код системы налогообложения
	Uom                 *Uom           `json:"uom,omitempty"`                 // Единицы измерения
	Updated             *Timestamp     `json:"updated,omitempty"`             // Момент последнего обновления сущности
	UseParentVat        *bool          `json:"useParentVat,omitempty"`        // Используется ли ставка НДС родительской группы. Если true для единицы ассортимента будет применена ставка, установленная для родительской группы.
	Vat                 *int           `json:"vat,omitempty"`                 // НДС %
	VatEnabled          *bool          `json:"vatEnabled,omitempty"`          // Включен ли НДС для услуги. С помощью этого флага для услуги можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
}

Service Услуга. Ключевое слово: service Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-usluga

func (Service) ConvertToAssortmentPosition

func (s Service) ConvertToAssortmentPosition() (*AssortmentPosition, error)

func (Service) GetMeta

func (s Service) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Service) MetaType

func (s Service) MetaType() MetaType

func (Service) String

func (s Service) String() string

type ServiceService

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

ServiceService Сервис для работы с услугами.

func NewServiceService

func NewServiceService(client *Client) *ServiceService

func (*ServiceService) Create

func (s *ServiceService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*ServiceService) CreateUpdateMany

func (s *ServiceService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ServiceService) Delete

func (s *ServiceService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*ServiceService) DeleteBySyncId

func (s *ServiceService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*ServiceService) DeleteMany

func (s *ServiceService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*ServiceService) Get

func (s *ServiceService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*ServiceService) GetById

func (s *ServiceService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*ServiceService) GetBySyncId

func (s *ServiceService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*ServiceService) GetNamedFilterById

func (s *ServiceService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*ServiceService) GetNamedFilters

func (s *ServiceService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*ServiceService) Update

func (s *ServiceService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type SexType

type SexType string

SexType Пол Контрагента Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kontragent-kontragenty-pol-kontragenta

const (
	SexMale   SexType = "MALE"   // Мужской
	SexFemale SexType = "FEMALE" // Женский
)

type Slice

type Slice[E any] []E

func (Slice[E]) Iter

func (s Slice[E]) Iter(opt ...int) *Iterator[E]

Iter возвращает итератор

type Slot

type Slot struct {
	AccountId    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код Ячейки
	Id           *uuid.UUID `json:"id,omitempty"`           // ID Ячейки
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные Ячейки
	Name         *string    `json:"name,omitempty"`         // Наименование Ячейки
	Updated      *Timestamp `json:"updated,omitempty"`      // Момент последнего обновления Ячейки
	Zone         *Zone      `json:"zone,omitempty"`         // Зона ячейки
}

Slot Ячейка склада. Ключевое слово: slot Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-yachejki-sklada

func (Slot) MetaType

func (s Slot) MetaType() MetaType

func (Slot) String

func (s Slot) String() string

type Software

type Software struct {
	Name    string `json:"name,omitempty"`    // Наименование ПО
	Vendor  string `json:"vendor,omitempty"`  // Производитель
	Version string `json:"version,omitempty"` // Версия ПО
}

Software Аттрибуты сущности ПО Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-okruzhenie-attributy-suschnosti-po

func (Software) String

func (s Software) String() string

type SpecialPrice

type SpecialPrice struct {
	PriceType *PriceType `json:"priceType,omitempty"` // Тип цены
	Value     *int       `json:"value,omitempty"`     // Значение цены, если выбрано фиксированное значение
}

SpecialPrice Спец. цена Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-specialprice

func (SpecialPrice) String

func (s SpecialPrice) String() string

type SpecialPriceDiscount

type SpecialPriceDiscount struct {
	AccountId      *uuid.UUID      `json:"accountId,omitempty"`      // ID учетной записи
	Id             *uuid.UUID      `json:"id,omitempty"`             // ID сущности
	Name           *string         `json:"name,omitempty"`           // Наименование Скидки
	Meta           *Meta           `json:"meta,omitempty"`           // Метаданные
	Active         *bool           `json:"active,omitempty"`         // Индикатор, является ли скидка активной на данный момент
	AgentTags      *Tags           `json:"agentTags,omitempty"`      // Тэги контрагентов, к которым применяется скидка, если применяется не ко всем контрагентам
	AllProducts    *bool           `json:"allProducts,omitempty"`    // Индикатор, действует ли скидка на все товары
	AllAgents      *bool           `json:"allAgents,omitempty"`      // Индикатор, действует ли скидка на всех агентов
	UsePriceType   *bool           `json:"usePriceType,omitempty"`   // Использовать специальную цену
	Assortment     *Assortment     `json:"assortment,omitempty"`     // Массив метаданных Товаров и Услуг, которые были выбраны для применения скидки, если та применяется не ко всем товарам
	ProductFolders *ProductFolders `json:"productFolders,omitempty"` // Группы товаров которые были выбраны для применения скидки (если применяется не ко всем товарам)
	Discount       *float64        `json:"discount,omitempty"`       // Процент скидки если выбран фиксированный процент
	SpecialPrice   *SpecialPrice   `json:"specialPrice,omitempty"`   // Спец. цена (если выбран тип цен)
}

SpecialPriceDiscount Специальная цена. Ключевое слово: specialpricediscount Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-polq-spec-cen

func (SpecialPriceDiscount) MetaType

func (s SpecialPriceDiscount) MetaType() MetaType

func (SpecialPriceDiscount) String

func (s SpecialPriceDiscount) String() string

type State

type State struct {
	AccountId  *uuid.UUID `json:"accountId,omitempty"`  // ID учетной записи
	Color      *uint64    `json:"color,omitempty"`      // Цвет Статуса
	EntityType *string    `json:"entityType,omitempty"` // Тип сущности, к которой относится Статус (ключевое слово в рамках JSON API)
	Id         *uuid.UUID `json:"id,omitempty"`         // ID сущности
	Meta       *Meta      `json:"meta,omitempty"`       // Метаданные
	Name       *string    `json:"name,omitempty"`       // Наименование Статуса
	StateType  StateType  `json:"stateType,omitempty"`  // Тип Статуса
}

State Статус документов. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-statusy-dokumentow

func (State) String

func (s State) String() string

type StateType

type StateType string

StateType Тип статуса. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-statusy-dokumentow-statusy-atributy-suschnosti-tip-statusa

const (
	StateTypeRegular      StateType = "Regular"      // Обычный (значение по умолчанию)
	StateTypeSuccessful   StateType = "Successful"   // Финальный положительный
	StateTypeUnsuccessful StateType = "Unsuccessful" // Финальный отрицательный
)

type States

type States = Iterator[State]

type StatesElement

type StatesElement struct {
	Meta       Meta   `json:"meta"`
	Color      int    `json:"color"`
	EntityType string `json:"entityType"`
	StateType  string `json:"stateType"`
}

type Stock

type Stock struct {
	Cost      float64 `json:"cost"`
	Quantity  float64 `json:"quantity"`
	Reserve   float64 `json:"reserve"`
	InTransit float64 `json:"intransit"`
	Available float64 `json:"available"`
}

Stock Остатки и себестоимость в позициях документов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-obschie-swedeniq-ostatki-i-sebestoimost-w-poziciqh-dokumentow

func (Stock) String

func (s Stock) String() string

type StockAll

type StockAll struct {
	Article      string      `json:"article"`      // Артикул
	Code         string      `json:"code"`         // Код
	ExternalCode string      `json:"externalCode"` // Внешний код сущности, по которой выводится остаток
	Folder       StockFolder `json:"folder"`       // Группа Товара/Модификации/Серии
	Image        Meta        `json:"image"`        // Метаданные изображения Товара/Модификации/Серии
	InTransit    float64     `json:"inTransit"`    // Ожидание
	Meta         Meta        `json:"meta"`         // Метаданные Товара/Модификации/Серии по которой выдается остаток
	Name         string      `json:"name"`         // Наименование
	Price        float64     `json:"price"`        // Себестоимость
	Quantity     float64     `json:"quantity"`     // Доступно
	Reserve      float64     `json:"reserve"`      // Резерв
	SalePrice    float64     `json:"salePrice"`    // Цена продажи
	Stock        float64     `json:"stock"`        // Остаток
	StockDays    int         `json:"stockDays"`    // Количество дней на складе
	Uom          MetaName    `json:"uom"`          // Единица измерения
}

StockAll Расширенный отчет об остатках. Ключевое слово: stock Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-rasshirennyj-otchet-ob-ostatkah

func (StockAll) MetaType

func (s StockAll) MetaType() MetaType

type StockByOperation

type StockByOperation struct {
	Meta      Meta                       `json:"meta"`      // Метаданные, представляющие собой ссылку на документ, по которому выдаются Остатки
	Positions []StockByOperationPosition `json:"positions"` // Массив объектов, представляющий собой Остаток по каждой из позиций
}

StockByOperation Остатки по документам. Ключевое слово: stockbyoperation Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-ostatki-po-dokumentam

func (StockByOperation) MetaType

func (s StockByOperation) MetaType() MetaType

type StockByOperationPosition

type StockByOperationPosition struct {
	Meta      Meta    `json:"meta"`      // Метаданные склада, по которому выводится Остаток
	Name      string  `json:"name"`      // Наименование склада
	Stock     float64 `json:"stock"`     // Остаток
	Cost      float64 `json:"cost"`      // Себестоимость
	InTransit float64 `json:"inTransit"` // Ожидание
	Reserve   float64 `json:"reserve"`   // Резерв
	Quantity  float64 `json:"quantity"`  // Доступно
}

StockByOperationPosition Остатки по документам (позиция) Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-ostatki-po-dokumentam-atributy-pozicii

type StockByStore

type StockByStore struct {
	Meta         Meta                   `json:"meta"`         // Метаданные позиции, по которой выдается Остаток
	StockByStore []StockByStorePosition `json:"stockByStore"` // Остатки по складам
}

StockByStore Остатки по складам. Ключевое слово: stockbystore Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-ostatki-po-skladam

func (StockByStore) MetaType

func (s StockByStore) MetaType() MetaType

type StockByStorePosition

type StockByStorePosition struct {
	Meta      Meta    `json:"meta"`      // Метаданные склада, по которому выводится Остаток
	Stock     float64 `json:"stock"`     // Остаток
	InTransit float64 `json:"inTransit"` // Ожидание
	Reserve   float64 `json:"reserve"`   // Резерв
	Name      string  `json:"name"`      // Наименование склада
}

StockByStorePosition Остатки по складам (позиция) Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-ostatki-po-skladam-ostatki-po-skladam

type StockCurrentAll

type StockCurrentAll struct {
	AssortmentId string `json:"assortmentId"`
	Stock        int    `json:"stock"`
	Quantity     int    `json:"quantity"`
}

StockCurrentAll Краткий отчет об остатках Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-kratkij-otchet-ob-ostatkah

type StockCurrentByStore

type StockCurrentByStore struct {
	AssortmentId string  `json:"assortmentId"` // Выдать в отчёте только указанные товары, модификации и серии
	StoreId      string  `json:"storeId"`      // ID склада
	Stock        float64 `json:"stock"`        // Физический остаток на складах, без учёта резерва и ожидания
	FreeStock    float64 `json:"freeStock"`    // Остаток на складах за вычетом резерва
	Quantity     float64 `json:"quantity"`     // Доступно. Учитывает резерв и ожидания
}

StockCurrentByStore Краткий отчет об остатках Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-kratkij-otchet-ob-ostatkah

type StockFolder

type StockFolder struct {
	Meta     Meta   `json:"meta"`     // Метаданные группы товара
	Name     string `json:"name"`     // Наименование группы
	PathName string `json:"pathName"` // Наименование родительской группы
}

StockFolder Группа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-rasshirennyj-otchet-ob-ostatkah-gruppa

type StockType

type StockType string

StockType Параметр stockType. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-kratkij-otchet-ob-ostatkah-parametr-stocktype

const (
	StockDefault   StockType = "stock"     // Физический остаток на складах, без учёта резерва и ожидания
	StockFreeStock StockType = "freeStock" // Остаток на складах за вычетом резерва
	StockQuantity  StockType = "quantity"  // Доступно. Учитывает резерв и ожидания
)

func (StockType) String

func (s StockType) String() string

type Store

type Store struct {
	AccountId    *uuid.UUID       `json:"accountId,omitempty"`    // ID учетной записи
	Address      *string          `json:"address,omitempty"`      // Адрес склада
	AddressFull  *Address         `json:"addressFull,omitempty"`  // Адрес с детализацией по отдельным полям
	Archived     *bool            `json:"archived,omitempty"`     // Добавлен ли Склад в архив
	Attributes   *Attributes      `json:"attributes,omitempty"`   // Массив метаданных дополнительных полей склада
	Code         *string          `json:"code,omitempty"`         // Код Склада
	Description  *string          `json:"description,omitempty"`  // Комментарий к Складу
	ExternalCode *string          `json:"externalCode,omitempty"` // Внешний код Склада
	Group        *Group           `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID       `json:"id,omitempty"`           // ID сущности
	Meta         *Meta            `json:"meta,omitempty"`         // Метаданные
	Name         *string          `json:"name,omitempty"`         // Наименование Склада
	Owner        *Employee        `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Parent       *Store           `json:"parent,omitempty"`       // Метаданные родительского склада (Группы)
	PathName     *string          `json:"pathName,omitempty"`     // Группа Склада
	Shared       *bool            `json:"shared,omitempty"`       // Общий доступ
	Updated      *Timestamp       `json:"updated,omitempty"`      // Момент последнего обновления Склада
	Zones        *MetaArray[Zone] `json:"zones,omitempty"`        // Зоны склада
	Slots        *MetaArray[Slot] `json:"slots,omitempty"`        // Ячейки склада
}

Store Склад. Ключевое слово: store Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad

func (Store) MetaType

func (s Store) MetaType() MetaType

func (Store) String

func (s Store) String() string

type StoreService

type StoreService struct {
	Endpoint
	// contains filtered or unexported fields
}

StoreService Сервис для работы со складами.

func NewStoreService

func NewStoreService(client *Client) *StoreService

func (*StoreService) Create

func (s *StoreService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*StoreService) CreateAttribute

func (s *StoreService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*StoreService) CreateAttributes

func (s *StoreService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*StoreService) CreateOrUpdateSlots

func (s *StoreService) CreateOrUpdateSlots(ctx context.Context, storeId uuid.UUID, slots []*Slot) (*Slice[Slot], *Response, error)

CreateOrUpdateSlots Запрос создания и обновления нескольких Ячеек Склада. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-massowoe-sozdanie-i-obnowlenie-qcheek-sklada

func (*StoreService) CreateOrUpdateZones

func (s *StoreService) CreateOrUpdateZones(ctx context.Context, storeId uuid.UUID, zones []*Zone) (*Slice[Zone], *Response, error)

CreateOrUpdateZones Запрос на создание и обновление нескольких Зон склада.

func (*StoreService) CreateSlot

func (s *StoreService) CreateSlot(ctx context.Context, storeId uuid.UUID, slot *Slot) (*Slot, *Response, error)

CreateSlot Запрос на создание Ячейки Склада. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-sozdat-qchejku-sklada

func (*StoreService) CreateUpdateMany

func (s *StoreService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*StoreService) CreateZone

func (s *StoreService) CreateZone(ctx context.Context, storeId uuid.UUID, zone *Zone) (*Zone, *Response, error)

CreateZone Запрос на создание Зоны склада. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-sozdat-zonu-sklada

func (*StoreService) Delete

func (s *StoreService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*StoreService) DeleteAttribute

func (s *StoreService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*StoreService) DeleteAttributes

func (s *StoreService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*StoreService) DeleteMany

func (s *StoreService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*StoreService) DeleteSlot

func (s *StoreService) DeleteSlot(ctx context.Context, storeId, slotId uuid.UUID) (bool, *Response, error)

DeleteSlot Запрос на удаление Ячейки склада с указанным id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-udalit-qchejku-sklada

func (*StoreService) DeleteSlots

func (s *StoreService) DeleteSlots(ctx context.Context, storeId uuid.UUID, slots []*Slot) (*DeleteManyResponse, *Response, error)

DeleteSlots Запрос на массовое удаление Ячеек склада. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-massowoe-udalenie-qcheek-sklada

func (*StoreService) DeleteZone

func (s *StoreService) DeleteZone(ctx context.Context, storeId, zoneId uuid.UUID) (bool, *Response, error)

DeleteZone Запрос на удаление Зоны склада с указанным id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-udalit-zonu-sklada

func (*StoreService) DeleteZones

func (s *StoreService) DeleteZones(ctx context.Context, storeId uuid.UUID, zones []*Zone) (*DeleteManyResponse, *Response, error)

DeleteZones Запрос на массовое удаление Зон склада. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-massowoe-udalenie-zon-sklada

func (*StoreService) Get

func (s *StoreService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*StoreService) GetAttributeById

func (s *StoreService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*StoreService) GetAttributes

func (s *StoreService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*StoreService) GetById

func (s *StoreService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*StoreService) GetMetadata

func (s *StoreService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*StoreService) GetNamedFilterById

func (s *StoreService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*StoreService) GetNamedFilters

func (s *StoreService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*StoreService) GetSlotById

func (s *StoreService) GetSlotById(ctx context.Context, storeId, slotId uuid.UUID) (*Slot, *Response, error)

GetSlotById Запрос на получение отдельной Ячейки Склада с указанным id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-poluchit-qchejku-sklada

func (*StoreService) GetSlots

func (s *StoreService) GetSlots(ctx context.Context, storeId uuid.UUID) (*List[Slot], *Response, error)

GetSlots Получить список всех Ячеек Склада. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-poluchit-qchejki-sklada

func (*StoreService) GetZoneById

func (s *StoreService) GetZoneById(ctx context.Context, storeId, zoneId uuid.UUID) (*Zone, *Response, error)

GetZoneById Запрос на получение отдельной Зоны Склада с указанным id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-poluchit-zonu-sklada

func (*StoreService) GetZones

func (s *StoreService) GetZones(ctx context.Context, storeId uuid.UUID) (*List[Zone], *Response, error)

GetZones Получить список всех Зон. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-poluchit-zony-sklada

func (*StoreService) Update

func (s *StoreService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*StoreService) UpdateAttribute

func (s *StoreService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*StoreService) UpdateSlot

func (s *StoreService) UpdateSlot(ctx context.Context, storeId, slotId uuid.UUID, slot *Slot) (*Slot, *Response, error)

UpdateSlot Запрос на обновление Ячейки склада. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-izmenit-qchejku-sklada

func (*StoreService) UpdateZone

func (s *StoreService) UpdateZone(ctx context.Context, storeId, zoneId uuid.UUID, zone *Zone) (*Zone, *Response, error)

UpdateZone Запрос на обновление Зоны склада. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-izmenit-zonu-sklada

type Subscription

type Subscription struct {
	Role                          *string `json:"role,omitempty"`                          // Роль авторизованного пользователя (USER/ADMIN)
	Tariff                        Tariff  `json:"tariff,omitempty"`                        // Действующий тариф Аккаунта
	IsSubscriptionChangeAvailable *bool   `json:"isSubscriptionChangeAvailable,omitempty"` // Доступность изменения подписки
	SubscriptionEndDate           *int64  `json:"subscriptionEndDate,omitempty"`           // Дата (в миллисекундах) окончания действия текущего тарифа, если тариф отличается от “Пробный” и “Бесплатный”
}

Subscription Подписка компании. Ключевое слово: subscription Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-podpiska-kompanii

func (Subscription) MetaType

func (s Subscription) MetaType() MetaType

func (Subscription) String

func (s Subscription) String() string

type SubscriptionService

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

SubscriptionService Сервис для работы с подпиской компании.

func NewSubscriptionService

func NewSubscriptionService(client *Client) *SubscriptionService

func (*SubscriptionService) Get

func (s *SubscriptionService) Get(ctx context.Context, params *Params) (*T, *Response, error)

type Supplies

type Supplies = Iterator[Supply]

type Supply

type Supply struct {
	AccountId           *uuid.UUID                 `json:"accountId,omitempty"`           // ID учетной записи
	Agent               *Counterparty              `json:"agent,omitempty"`               // Метаданные контрагента
	AgentAccount        *AgentAccount              `json:"agentAccount,omitempty"`        // Метаданные счета контрагента
	Applicable          *bool                      `json:"applicable,omitempty"`          // Отметка о проведении
	Attributes          *Attributes                `json:"attributes,omitempty"`          // Коллекция метаданных доп. полей. Поля объекта
	Code                *string                    `json:"code,omitempty"`                // Код Приемки
	Contract            *Contract                  `json:"contract,omitempty"`            // Метаданные договора
	Created             *Timestamp                 `json:"created,omitempty"`             // Дата создания
	Deleted             *Timestamp                 `json:"deleted,omitempty"`             // Момент последнего удаления Приемки
	Description         *string                    `json:"description,omitempty"`         // Комментарий Приемки
	ExternalCode        *string                    `json:"externalCode,omitempty"`        // Внешний код Приемки
	Files               *Files                     `json:"files,omitempty"`               // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Group               *Group                     `json:"group,omitempty"`               // Отдел сотрудника
	Id                  *uuid.UUID                 `json:"id,omitempty"`                  // ID сущности
	IncomingDate        *Timestamp                 `json:"incomingDate,omitempty"`        // Входящая дата
	IncomingNumber      *string                    `json:"incomingNumber,omitempty"`      // Входящий номер
	Meta                *Meta                      `json:"meta,omitempty"`                // Метаданные
	Moment              *Timestamp                 `json:"moment,omitempty"`              // Дата документа
	Name                *string                    `json:"name,omitempty"`                // Наименование
	Organization        *Organization              `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount              `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Overhead            *Overhead                  `json:"overhead,omitempty"`            // Накладные расходы. Если Позиции Приемки не заданы, то накладные расходы нельзя задать
	Owner               *Employee                  `json:"owner,omitempty"`               // Владелец (Сотрудник)
	PayedSum            *float64                   `json:"payedSum,omitempty"`            // Сумма входящих платежей по Приемке
	Positions           *Positions[SupplyPosition] `json:"positions,omitempty"`           // Метаданные позиций Приемки
	Printed             *bool                      `json:"printed,omitempty"`             // Напечатан ли документ
	Project             *Project                   `json:"project,omitempty"`             // Метаданные проекта
	Published           *bool                      `json:"published,omitempty"`           // Опубликован ли документ
	Rate                *Rate                      `json:"rate,omitempty"`                // Валюта
	Shared              *bool                      `json:"shared,omitempty"`              // Общий доступ
	State               *State                     `json:"state,omitempty"`               // Метаданные статуса Приемки
	Store               *Store                     `json:"store,omitempty"`               // Метаданные склада
	Sum                 *float64                   `json:"sum,omitempty"`                 // Сумма
	SyncId              *uuid.UUID                 `json:"syncId,omitempty"`              // ID синхронизации. После заполнения недоступен для изменения
	Updated             *Timestamp                 `json:"updated,omitempty"`             // Момент последнего обновления
	VatEnabled          *bool                      `json:"vatEnabled,omitempty"`          // Учитывается ли НДС
	VatIncluded         *bool                      `json:"vatIncluded,omitempty"`         // Включен ли НДС в цену
	VatSum              *float64                   `json:"vatSum,omitempty"`              // Сумма включая НДС
	PurchaseOrder       *PurchaseOrder             `json:"purchaseOrder,omitempty"`       // Ссылка на связанный заказ поставщику в формате Метаданных
	FactureIn           *FactureIn                 `json:"factureIn,omitempty"`           // Ссылка на Счет-фактуру полученный, с которым связана эта Приемка в формате Метаданных
	InvoicesIn          *InvoicesIn                `json:"invoicesIn,omitempty"`          // Массив ссылок на связанные счета поставщиков в формате Метаданных
	Payments            *Payments                  `json:"payments,omitempty"`            // Массив ссылок на связанные платежи в формате Метаданных
	Returns             *PurchaseReturns           `json:"returns,omitempty"`             // Массив ссылок на связанные возвраты в формате Метаданных
}

Supply Приёмка. Ключевое слово: supply Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-priemka

func (Supply) GetMeta

func (s Supply) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Supply) MetaType

func (s Supply) MetaType() MetaType

func (Supply) String

func (s Supply) String() string

type SupplyPosition

type SupplyPosition struct {
	AccountId     *uuid.UUID          `json:"accountId,omitempty"`     // ID учетной записи
	Assortment    *AssortmentPosition `json:"assortment,omitempty"`    // Метаданные товара/услуги/серии/модификации, которую представляет собой позиция
	Country       *Country            `json:"country,omitempty"`       // Метаданные страны
	Discount      *float64            `json:"discount,omitempty"`      // Процент скидки или наценки. Наценка указывается отрицательным числом, т.е. -10 создаст наценку в 10%
	GTD           *GTD                `json:"gtd,omitempty"`           // ГТД
	Id            *uuid.UUID          `json:"id,omitempty"`            // ID позиции
	Pack          *Pack               `json:"pack,omitempty"`          // Упаковка Товара
	Price         *float64            `json:"price,omitempty"`         // Цена товара/услуги в копейках
	Quantity      *float64            `json:"quantity,omitempty"`      // Количество товаров/услуг данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе.
	Slot          *Slot               `json:"slot,omitempty"`          // Ячейка на складе
	Things        *Things             `json:"things,omitempty"`        // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута.
	TrackingCodes *TrackingCodes      `json:"trackingCodes,omitempty"` // Коды маркировки товаров и транспортных упаковок
	Overhead      *float64            `json:"overhead,omitempty"`      // Накладные расходы. Если Позиции Приемки не заданы, то накладные расходы нельзя задать.
	Vat           *int                `json:"vat,omitempty"`           // НДС, которым облагается текущая позиция
	VatEnabled    *bool               `json:"vatEnabled,omitempty"`    // Включен ли НДС для позиции. С помощью этого флага для позиции можно выставлять НДС = 0 или НДС = "без НДС". (vat = 0, vatEnabled = false) -> vat = "без НДС", (vat = 0, vatEnabled = true) -> vat = 0%.
	Stock         *Stock              `json:"stock,omitempty"`         // Остатки и себестоимость `?fields=stock&expand=positions`
}

SupplyPosition Позиция Приемки. Ключевое слово: supplyposition Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-priemka-priemki-pozicii-priemki

func (SupplyPosition) MetaType

func (s SupplyPosition) MetaType() MetaType

func (SupplyPosition) String

func (s SupplyPosition) String() string

type SupplyService

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

SupplyService Сервис для работы с приёмками.

func NewSupplyService

func NewSupplyService(client *Client) *SupplyService

func (*SupplyService) Create

func (s *SupplyService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*SupplyService) CreateAttribute

func (s *SupplyService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *Response, error)

CreateAttribute Создать дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*SupplyService) CreateAttributes

func (s *SupplyService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*Slice[Attribute], *Response, error)

CreateAttributes Создать дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-sozdat-dopolnitel-nye-polq

func (*SupplyService) CreateFile

func (s *SupplyService) CreateFile(ctx context.Context, id *uuid.UUID, file *File) (*Slice[File], *Response, error)

CreateFile Добавить Файл

func (*SupplyService) CreateOrUpdatePositionTrackingCodes

func (s *SupplyService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*Slice[TrackingCode], *Response, error)

CreateOrUpdatePositionTrackingCodes Массовое создание и обновление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-sozdanie-i-obnowlenie-kodow-markirowki

func (*SupplyService) CreateOrUpdateStates

func (s *SupplyService) CreateOrUpdateStates(ctx context.Context, id *uuid.UUID, states []*State) (*Slice[State], *Response, error)

CreateOrUpdateStates Массовое создание и обновление Статусов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-statusy-dokumentow-massowoe-sozdanie-i-obnowlenie-statusow

func (*SupplyService) CreatePosition

func (s *SupplyService) CreatePosition(ctx context.Context, id *uuid.UUID, position *T) (*T, *Response, error)

CreatePosition Создание позиции документа

func (*SupplyService) CreatePositions

func (s *SupplyService) CreatePositions(ctx context.Context, id *uuid.UUID, positions []*T) (*Slice[T], *Response, error)

CreatePositions Массово создаёт позиции документа.

func (*SupplyService) CreateState

func (s *SupplyService) CreateState(ctx context.Context, state *State) (*State, *Response, error)

CreateState Создать новый статус Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-statusy-dokumentow-sozdat-status

func (*SupplyService) CreateUpdateMany

func (s *SupplyService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*SupplyService) Delete

func (s *SupplyService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*SupplyService) DeleteAttribute

func (s *SupplyService) DeleteAttribute(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteAttribute Удалить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-udalit-dopolnitel-noe-pole

func (*SupplyService) DeleteAttributes

func (s *SupplyService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *Response, error)

DeleteAttributes Удалить дополнительные поля Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-udalit-dopolnitel-nye-polq

func (*SupplyService) DeleteBySyncId

func (s *SupplyService) DeleteBySyncId(ctx context.Context, syncId uuid.UUID) (bool, *Response, error)

func (*SupplyService) DeleteFile

func (s *SupplyService) DeleteFile(ctx context.Context, id, fileId uuid.UUID) (bool, *Response, error)

DeleteFile Удалить Файл Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-fajly-udalit-fajl

func (*SupplyService) DeleteFiles

func (s *SupplyService) DeleteFiles(ctx context.Context, id *uuid.UUID, files []*File) (*DeleteManyResponse, *Response, error)

DeleteFiles Удалить Файлы

func (*SupplyService) DeleteMany

func (s *SupplyService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*SupplyService) DeletePosition

func (s *SupplyService) DeletePosition(ctx context.Context, id, positionId uuid.UUID) (bool, *Response, error)

DeletePosition Удаляет позицию документа.

func (*SupplyService) DeletePositionTrackingCodes

func (s *SupplyService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *Response, error)

DeletePositionTrackingCodes Массовое удаление Кодов маркировки. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-massowoe-udalenie-kodow-markirowki

func (*SupplyService) DeletePublication

func (s *SupplyService) DeletePublication(ctx context.Context, id, publicationId uuid.UUID) (bool, *Response, error)

DeletePublication Запрос на удаление Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-udalit-publikaciu

func (*SupplyService) DeleteState

func (s *SupplyService) DeleteState(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteState Запрос на удаление Статуса с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-statusy-dokumentow-udalit-status

func (*SupplyService) Get

func (s *SupplyService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*SupplyService) GetAttributeById

func (s *SupplyService) GetAttributeById(ctx context.Context, id *uuid.UUID) (*Attribute, *Response, error)

GetAttributeById Получить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-poluchit-dopolnitel-noe-pole

func (*SupplyService) GetAttributes

func (s *SupplyService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *Response, error)

GetAttributes Получить все дополнительные поля для указанного типа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-nye-polq-suschnostej-poluchit-wse-dopolnitel-nye-polq-dlq-ukazannogo-tipa

func (*SupplyService) GetById

func (s *SupplyService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*SupplyService) GetBySyncId

func (s *SupplyService) GetBySyncId(ctx context.Context, syncId uuid.UUID) (*T, *Response, error)

func (*SupplyService) GetFiles

func (s *SupplyService) GetFiles(ctx context.Context, id *uuid.UUID) (*MetaArray[File], *Response, error)

GetFiles Получить список Файлов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-fajly-poluchit-spisok-fajlow-operacii-nomenklatury-zadachi-ili-kontragenta

func (*SupplyService) GetMetadata

func (s *SupplyService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*SupplyService) GetNamedFilterById

func (s *SupplyService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*SupplyService) GetNamedFilters

func (s *SupplyService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*SupplyService) GetPositionById

func (s *SupplyService) GetPositionById(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *Response, error)

GetPositionById Получение отдельной позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*SupplyService) GetPositionTrackingCodes

func (s *SupplyService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *Response, error)

GetPositionTrackingCodes Получить Коды маркировки позиции документа. https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-poluchit-kody-markirowki-pozicii-dokumenta

func (*SupplyService) GetPositions

func (s *SupplyService) GetPositions(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[T], *Response, error)

GetPositions Получить все позиции документа Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*SupplyService) GetPublicationById

func (s *SupplyService) GetPublicationById(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *Response, error)

GetPublicationById Запрос на получение Публикации с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikaciu

func (*SupplyService) GetPublications

func (s *SupplyService) GetPublications(ctx context.Context, id *uuid.UUID) (*MetaArray[Publication], *Response, error)

GetPublications Запрос на получение списка Публикаций по указанному документу Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-poluchit-publikacii

func (*SupplyService) GetStateById

func (s *SupplyService) GetStateById(ctx context.Context, id *uuid.UUID) (*State, *Response, error)

GetStateById Запрос на получение статуса по id

func (*SupplyService) PrintDoc

func (s *SupplyService) PrintDoc(ctx context.Context, id *uuid.UUID, printDocRequest *PrintDocRequest) (*PrintFile, *Response, error)

PrintDoc Запрос на печать документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-pechat-dokumentow-zapros-na-pechat

func (*SupplyService) Publish

func (s *SupplyService) Publish(ctx context.Context, id *uuid.UUID, template *Templater) (*Publication, *Response, error)

Publish Запрос на публикацию документа Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-publikaciq-dokumentow-sozdat-publikaciu

func (*SupplyService) Remove

func (s *SupplyService) Remove(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

Remove Запрос на перемещение документа с указанным id в корзину Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-udalenie-w-korzinu

func (*SupplyService) Template

func (s *SupplyService) Template(ctx context.Context, basedOn ...HasMeta) (*T, *Response, error)

Template Получить предзаполненный стандартными полями JSON-объект TODO: basedOn Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-shablony-dokumentow

func (*SupplyService) Update

func (s *SupplyService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*SupplyService) UpdateAttribute

func (s *SupplyService) UpdateAttribute(ctx context.Context, id *uuid.UUID, attribute *Attribute) (*Attribute, *Response, error)

UpdateAttribute Изменить дополнительное поле Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-dopolnitel-noe-pole-izmenit-dopolnitel-noe-pole

func (*SupplyService) UpdateFiles

func (s *SupplyService) UpdateFiles(ctx context.Context, id *uuid.UUID, files []File) (*Slice[File], *Response, error)

UpdateFiles Добавить/обновить Файлы Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-fajly-dobawit-fajly-k-operacii-nomenklature-ili-kontragentu

func (*SupplyService) UpdatePosition

func (s *SupplyService) UpdatePosition(ctx context.Context, id, positionId uuid.UUID, position *T, params *Params) (*T, *Response, error)

UpdatePosition Обновление позиции Флаг withStockPositions - получить остатки и себестоимость в позициях (поле Stock)

func (*SupplyService) UpdateState

func (s *SupplyService) UpdateState(ctx context.Context, id *uuid.UUID, state *State) (*State, *Response, error)

UpdateState Изменить существующий статус Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-statusy-dokumentow-izmenit-status

type Tags

type Tags = Iterator[string]

type Tariff

type Tariff string

Tariff Действующий тариф аккаунта. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-podpiska-kompanii-dejstwuuschij-tarif-akkaunta

const (
	TariffBasic        Tariff = "BASIC"        // Тариф "Базовый"
	TariffCorporate    Tariff = "CORPORATE"    // Тариф "Корпоративный"
	TariffFree         Tariff = "FREE"         // Тариф "Бесплатный 2014"
	TariffMinimal      Tariff = "MINIMAL"      // Тариф "Индивидуальный"
	TariffProfessional Tariff = "PROFESSIONAL" // Тариф "Профессиональный"
	TariffRetail       Tariff = "RETAIL"       // Тариф "Бесплатный"
	TariffStart        Tariff = "START"        // Тариф "Старт"
	TariffTrial        Tariff = "TRIAL"        // Тариф "Пробный"
)

type Task

type Task struct {
	AccountId         *uuid.UUID    `json:"accountId,omitempty"`         // ID учетной записи
	Agent             *Counterparty `json:"agent,omitempty"`             // Метаданные Контрагента или юрлица, связанного с задачей. Задача может быть привязана либо к конрагенту, либо к юрлицу, либо к документу
	Assignee          *Employee     `json:"assignee,omitempty"`          // Метаданные ответственного за выполнение задачи
	Author            *Employee     `json:"author,omitempty"`            // Метаданные Сотрудника, создавшего задачу (администратор аккаунта, если автор - Приложение)
	AuthorApplication *Application  `json:"authorApplication,omitempty"` // Метаданные Приложения, создавшего задачу
	Completed         *Timestamp    `json:"completed,omitempty"`         // Время выполнения задачи
	Created           *Timestamp    `json:"created,omitempty"`           // Момент создания
	Description       *string       `json:"description,omitempty"`       // Текст задачи
	Done              *bool         `json:"done,omitempty"`              // Отметка о выполнении задачи
	DueToDate         *Timestamp    `json:"dueToDate,omitempty"`         // Срок задачи
	Files             *Files        `json:"files,omitempty"`             // Метаданные массива Файлов (Максимальное количество файлов - 100)
	Id                *uuid.UUID    `json:"id,omitempty"`                // ID Задачи
	Implementer       *Employee     `json:"implementer,omitempty"`       // Метаданные Сотрудника, выполнившего задачу
	Meta              *Meta         `json:"meta,omitempty"`              // Метаданные
	Notes             *TaskNotes    `json:"notes,omitempty"`             // Метаданные комментария к задаче
	//Operation         *Operations   `json:"operation,omitempty"`         // Метаданные Документа, связанного с задачей. Задача может быть привязана либо к конрагенту, либо к юрлицу, либо к документу
	Updated *Timestamp `json:"updated,omitempty"` // Момент последнего обновления Задачи
}

Task Задача. Ключевое слово: task Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-zadacha

func (Task) MetaType

func (t Task) MetaType() MetaType

func (Task) String

func (t Task) String() string

type TaskNote

type TaskNote struct {
	Author            *Meta      `json:"author,omitempty"`            // Метаданные Сотрудника, создавшего комментарий (администратор аккаунта, если автор - приложение)
	AuthorApplication *Meta      `json:"authorApplication,omitempty"` // Метаданные Приложения, создавшего комментарий
	Moment            *Timestamp `json:"moment,omitempty"`            // Момент создания комментария
	Description       *string    `json:"description,omitempty"`       // Текст комментария
}

TaskNote Комментарии задачи. Ключевое слово: tasknote Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-zadacha-zadachi-kommentarii-zadachi

func (TaskNote) MetaType

func (t TaskNote) MetaType() MetaType

func (TaskNote) String

func (t TaskNote) String() string

type TaskNotes

type TaskNotes = Iterator[TaskNote]

type TaskService

type TaskService struct {
	Endpoint
	// contains filtered or unexported fields
}

TaskService Сервис для работы с задачами.

func NewTaskService

func NewTaskService(client *Client) *TaskService

func (*TaskService) Create

func (s *TaskService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*TaskService) CreateNote

func (s *TaskService) CreateNote(ctx context.Context, taskId uuid.UUID, taskNote *TaskNote) (*TaskNote, *Response, error)

CreateNote Запрос на создание нового комментария к Задаче. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-zadacha-sozdat-kommentarij-zadachi

func (*TaskService) CreateNotes

func (s *TaskService) CreateNotes(ctx context.Context, taskId uuid.UUID, taskNotes []*TaskNote) (*Slice[TaskNote], *Response, error)

CreateNotes Запрос на создание нескольких комментариев к Задаче.

func (*TaskService) CreateUpdateMany

func (s *TaskService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*TaskService) Delete

func (s *TaskService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*TaskService) DeleteMany

func (s *TaskService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*TaskService) DeleteNote

func (s *TaskService) DeleteNote(ctx context.Context, taskId, taskNoteId uuid.UUID) (bool, *Response, error)

DeleteNote Запрос на удаление отдельного комментария к Задаче с указанным id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-zadacha-udalit-kommentarij

func (*TaskService) Get

func (s *TaskService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*TaskService) GetById

func (s *TaskService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*TaskService) GetNamedFilterById

func (s *TaskService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*TaskService) GetNamedFilters

func (s *TaskService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*TaskService) GetNoteById

func (s *TaskService) GetNoteById(ctx context.Context, taskId, taskNoteId uuid.UUID) (*TaskNote, *Response, error)

GetNoteById Отдельный комментарий к Задаче с указанным id комментария. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-zadacha-poluchit-kommentarij-k-zadache

func (*TaskService) GetNotes

func (s *TaskService) GetNotes(ctx context.Context, taskId uuid.UUID, params *Params) (*List[TaskNote], *Response, error)

GetNotes Запрос на получение списка всех комментариев данной Задачи. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-zadacha-poluchit-kommentarii-zadachi

func (*TaskService) Update

func (s *TaskService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*TaskService) UpdateNote

func (s *TaskService) UpdateNote(ctx context.Context, taskId, taskNoteId uuid.UUID, taskNote *TaskNote) (*TaskNote, *Response, error)

UpdateNote Запрос на обновление отдельного комментария к Задаче. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-zadacha-izmenit-kommentarij-k-zadache

type TaxRate

type TaxRate struct {
	AccountId *uuid.UUID `json:"accountId,omitempty"` // ID учетной записи
	Archived  *bool      `json:"archived,omitempty"`  // Флаг принадлежности ставки к архивным ставкам
	Comment   *string    `json:"comment,omitempty"`   // Комментарий к налоговой ставке
	Group     *Group     `json:"group,omitempty"`     // Отдел сотрудника
	Id        *uuid.UUID `json:"id,omitempty"`        // ID налоговой ставки
	Meta      *Meta      `json:"meta,omitempty"`      // Метаданные налоговой ставки
	Rate      *int       `json:"rate,omitempty"`      // Значение налоговой ставки
	Owner     *Employee  `json:"owner,omitempty"`     // Владелец (Сотрудник)
	Shared    *bool      `json:"shared,omitempty"`    // Общий доступ
	Updated   *Timestamp `json:"updated,omitempty"`   // Момент последнего обновления сущности
}

TaxRate Ставка НДС. Ключевое слово: taxrate Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-stawka-nds

func (TaxRate) MetaType

func (t TaxRate) MetaType() MetaType

func (TaxRate) String

func (t TaxRate) String() string

type TaxRateService

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

TaxRateService Сервис для работы со ставками НДС.

func NewTaxRateService

func NewTaxRateService(client *Client) *TaxRateService

func (*TaxRateService) Create

func (s *TaxRateService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*TaxRateService) CreateUpdateMany

func (s *TaxRateService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*TaxRateService) Delete

func (s *TaxRateService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*TaxRateService) DeleteMany

func (s *TaxRateService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*TaxRateService) Get

func (s *TaxRateService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*TaxRateService) GetById

func (s *TaxRateService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*TaxRateService) Update

func (s *TaxRateService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type TaxSystem

type TaxSystem string

TaxSystem Код системы налогообложения по умолчанию. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-kod-sistemy-nalogooblozheniq-po-umolchaniu

const (
	GeneralTaxSystem                 TaxSystem = "GENERAL_TAX_SYSTEM"                   // ОСН
	SimplifiedTaxSystemIncome        TaxSystem = "SIMPLIFIED_TAX_SYSTEM_INCOME"         // УСН. Доход
	SimplifiedTaxSystemIncomeOutcome TaxSystem = "SIMPLIFIED_TAX_SYSTEM_INCOME_OUTCOME" // УСН. Доход-Расход
	UnifiedAgriculturalTax           TaxSystem = "UNIFIED_AGRICULTURAL_TAX"             // ЕСХН
	PresumptiveTaxSystem             TaxSystem = "PRESUMPTIVE_TAX_SYSTEM"               // ЕНВД
	PatentBased                      TaxSystem = "PATENT_BASED"                         // Патент
)

type Template

type Template struct {
	Content *string      `json:"content,omitempty"` // Ссылка на скачивание
	Id      *uuid.UUID   `json:"id,omitempty"`      // ID сущности
	Meta    *Meta        `json:"meta,omitempty"`    // Метаданные Стандартного шаблона
	Name    *string      `json:"name,omitempty"`    // Наименование шаблона
	Type    TemplateType `json:"type,omitempty"`    // Тип шаблона (entity - документ, mxtemplate - новый тип шаблона для ценников и этикеток)
}

Template Общие поля для шаблонов. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy

func (Template) String

func (t Template) String() string

type TemplateType

type TemplateType string
const (
	TemplateTypeEntity     TemplateType = "entity"     // Документ
	TemplateTypePriceType  TemplateType = "pricetype"  // Ценник/этикетка
	TemplateTypeMXTemplate TemplateType = "mxtemplate" // Ценник/этикетка нового формата
)

type Templater

type Templater interface {
	HasMeta
	Type() TemplateType
}

type Things

type Things = Iterator[string]

Things серийные номера.

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp represents a time that can be unmarshalled from a JSON string formatted as either an TimestampFormat.

func (Timestamp) Equal

func (t Timestamp) Equal(u Timestamp) bool

Equal reports whether t and u are equal based on time.Equal

func (*Timestamp) GetTime

func (t *Timestamp) GetTime() *time.Time

GetTime returns std time.Time.

func (Timestamp) MarshalJSON

func (t Timestamp) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Timestamp) String

func (t Timestamp) String() string

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface.

type TobaccoMRCControlType

type TobaccoMRCControlType string

TobaccoMRCControlType Тип контроля МРЦ для табачной продукции. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-tip-kontrolq-mrc-dlq-tabachnoj-produkcii

const (
	TobaccoMRCControlTypeUserPrice TobaccoMRCControlType = "USER_PRICE" // Не контролировать МРЦ
	TobaccoMRCControlTypeMrcPrice  TobaccoMRCControlType = "MRC_PRICE"  // Продавать по МРЦ указанной на пачке
	TobaccoMRCControlTypeSamePrice TobaccoMRCControlType = "SAME_PRICE" // Запрещать продажу, если цена продажи не совпадает с МРЦ
)

type Token

type Token struct {
	AccessToken string `json:"access_token"`
}

Token Токен. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/#mojsklad-json-api-obschie-swedeniq-autentifikaciq-poluchenie-nowogo-tokena

func (Token) String

func (t Token) String() string

type TrackingCode

type TrackingCode struct {
	Id               *string                `json:"id,omitempty"`                 // ID кода маркировки
	Cis              *string                `json:"cis,omitempty"`                // Код маркировки в стандартном формате
	Cis1162          *string                `json:"cis_1162,omitempty"`           // Код маркировки в формате тега 1162
	Type             TrackingCodeType       `json:"type,omitempty"`               // Тип кода маркировки
	TrackingCodes    Iterator[TrackingCode] `json:"trackingCodes,omitempty"`      // Массив вложенных кодов маркировки. Может присутствовать, только если type имеет значения consumerpack или transportpack
	TrackingCode1162 Iterator[TrackingCode] `json:"trackingCodes_1162,omitempty"` // Массив вложенных кодов маркировки. Может присутствовать, только если type имеет значения consumerpack или transportpack
}

TrackingCode Коды маркировки Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-kody-markirowki-kod-markirowki-atributy-suschnosti

func (TrackingCode) String

func (t TrackingCode) String() string

type TrackingCodeType

type TrackingCodeType string

TrackingCodeType Коды маркировки товаров и транспортных упаковок Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-priemka-priemki-kody-markirowki-towarow-i-transportnyh-upakowok

const (
	TrackingCodeTypeTransportPack TrackingCodeType = "transportpack" // код маркировки товара
	TrackingCodeTypeConsumerPack  TrackingCodeType = "consumerpack"  // код маркировки потребительской упаковки
	TrackingCodeTypeTrackingCode  TrackingCodeType = "trackingcode"  // код транспортной упаковки
)

type TrackingCodes

type TrackingCodes = Iterator[TrackingCode]

type TrackingType

type TrackingType string

TrackingType Тип маркируемой продукции. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-towar-towary-atributy-suschnosti-tip-markiruemoj-produkcii

const (
	TrackingTypeElectronics TrackingType = "ELECTRONICS"
	TrackingTypeClothes     TrackingType = "LP_CLOTHES"
	TrackingTypeLinens      TrackingType = "LP_LINENS"
	TrackingTypeMilk        TrackingType = "MILK"
	TrackingTypeNcp         TrackingType = "NCP"
	TrackingTypeNotTracked  TrackingType = "NOT_TRACKED"
	TrackingTypeOtp         TrackingType = "OTP"
	TrackingTypePerfumery   TrackingType = "PERFUMERY"
	TrackingTypeShoes       TrackingType = "SHOES"
	TrackingTypeTires       TrackingType = "TIRES"
	TrackingTypeTobacco     TrackingType = "TOBACCO"
	TrackingTypeWater       TrackingType = "WATER"
)

type Turnover

type Turnover struct {
	OnPeriodStart TurnoverIncomeOutcome `json:"onPeriodStart"` // Показатели на начало периода
	OnPeriodEnd   TurnoverIncomeOutcome `json:"onPeriodEnd"`   // Показатели на конец периода
	Income        TurnoverIncomeOutcome `json:"income"`        // Показатели прихода в течение периода отчета
	Outcome       TurnoverIncomeOutcome `json:"outcome"`       // Показатели расхода в течение периода отчета
}

Turnover Атрибуты объекта отчета. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaram-atributy-ob-ekta-otcheta

type TurnoverAll

type TurnoverAll struct {
	Assortment MetaName `json:"assortment"` // Краткое представление Товара или Модификации в отчете
	Turnover
}

TurnoverAll Обороты по товарам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-poluchit-oboroty-po-towaram

type TurnoverAssortment

type TurnoverAssortment struct {
	Article       string        `json:"article"`       // Артикул Товара
	Code          string        `json:"code"`          // Код Товара
	Image         Image         `json:"image"`         // Первое изображение Товара или Модификации
	Meta          Meta          `json:"meta"`          // Метаданные Товара или Модификации
	Name          string        `json:"name"`          // Наименование Товара или Модификации
	ProductFolder ProductFolder `json:"productFolder"` // Группа Товара или Модификации
	Uom           MetaName      `json:"uom"`           // Единица измерения
}

TurnoverAssortment Структура объекта assortment. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaru-s-detalizaciej-po-skladam-struktura-ob-ekta-assortment

type TurnoverByOperation

type TurnoverByOperation struct {
	Assortment TurnoverAssortment `json:"assortment"` // Краткое представление Товара или Модификации в отчете
	Store      MetaName           `json:"store"`      // Склад
	Operation  TurnoverOperation  `json:"operation"`  // Документ, связанный с Товаром
	Quantity   float64            `json:"quantity"`   // Количество товара в документе.
	Cost       float64            `json:"cost"`       // Себестоимость товара в документе.
	Sum        float64            `json:"sum"`        // Сумма себестоимостей.
}

TurnoverByOperation Обороты по товару с детализацией по документам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaru-s-detalizaciej-po-dokumentam

type TurnoverByStore

type TurnoverByStore struct {
	Assortment   TurnoverAssortment       `json:"assortment"`   // Краткое представление Товара или Модификации в отчете
	StockByStore []TurnoverByStoreElement `json:"stockByStore"` // Детализация оборотов по складам
}

TurnoverByStore Обороты по товару с детализацией по складам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaru-s-detalizaciej-po-skladam

type TurnoverByStoreElement

type TurnoverByStoreElement struct {
	Store MetaName `json:"store"` // Склад
	Turnover
}

TurnoverByStoreElement Структура объекта детализация оборотов по складам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaru-s-detalizaciej-po-skladam-struktura-ob-ekta-detalizaciq-oborotow-po-skladam

type TurnoverIncomeOutcome

type TurnoverIncomeOutcome struct {
	Sum      float64 `json:"sum"`      // Сумма себестоимости
	Quantity float64 `json:"quantity"` // Количество единиц товара
}

TurnoverIncomeOutcome Структура объекта показатели (onPeriodStart, onPeriodEnd, income, outcome). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaram-struktura-ob-ekta-pokazateli-onperiodstart-onperiodend-income-outcome

type TurnoverOperation

type TurnoverOperation struct {
	Meta        Meta      `json:"meta"`        // Метаданные документа
	Name        string    `json:"name"`        // Номер документа
	Description string    `json:"description"` // Комментарий к документу
	Moment      Timestamp `json:"moment"`      // Дата проведения документа
	Agent       MetaName  `json:"agent"`       // Контрагент документа
}

TurnoverOperation Структура объекта operation. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaru-s-detalizaciej-po-dokumentam-struktura-ob-ekta-operation

type UniqueCodeRules

type UniqueCodeRules struct {
	CheckUniqueCode *bool `json:"checkUniqueCode,omitempty"` // Проверка уникальности кода сущностей справочника товаров
	FillUniqueCode  *bool `json:"fillUniqueCode,omitempty"`  // Устанавливать уникальный код при создании создании сущностей справочника товаров
}

UniqueCodeRules Настройки уникальности кода для сущностей справочника. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-assortiment-atributy-wlozhennyh-suschnostej-nastrojki-unikal-nosti-koda-dlq-suschnostej-sprawochnika

func (UniqueCodeRules) String

func (u UniqueCodeRules) String() string

type UnitGender

type UnitGender string

UnitGender Грамматический род единицы валюты.

const (
	UnitGenderMasculine UnitGender = "masculine" // мужской
	UnitGenderFeminine  UnitGender = "feminine"  // женский
)

type Uom

type Uom struct {
	AccountId    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	Code         *string    `json:"code,omitempty"`         // Код Единицы измерения
	Description  *string    `json:"description,omitempty"`  // Описание Единциы измерения
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код Единицы измерения
	Group        *Group     `json:"group,omitempty"`        // Отдел сотрудника
	Id           *uuid.UUID `json:"id,omitempty"`           // ID сущности
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные
	Name         *string    `json:"name,omitempty"`         // Наименование Единицы измерения
	Owner        *Employee  `json:"owner,omitempty"`        // Владелец (Сотрудник)
	Shared       *bool      `json:"shared,omitempty"`       // Общий доступ
	Updated      *Timestamp `json:"updated,omitempty"`      // Момент последнего обновления Единицы измерения
}

Uom Единица измерения. Ключевое слово: uom Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-edinica-izmereniq

func (Uom) MetaType

func (u Uom) MetaType() MetaType

func (Uom) String

func (u Uom) String() string

type UomService

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

UomService Сервис для работы с единицами измерения.

func NewUomService

func NewUomService(client *Client) *UomService

func (*UomService) Create

func (s *UomService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*UomService) CreateUpdateMany

func (s *UomService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*UomService) Delete

func (s *UomService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*UomService) DeleteMany

func (s *UomService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*UomService) Get

func (s *UomService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*UomService) GetById

func (s *UomService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*UomService) Update

func (s *UomService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type UserSettings

type UserSettings struct {
	AutoShowReports             *bool         `json:"autoShowReports,omitempty"`             // Строить ли отчеты автоматически при переходе на вкладку с отчетом
	DefaultCompany              *Meta         `json:"defaultCompany,omitempty"`              // Метаданные Организации, которая будет использоваться по умолчанию в документах
	DefaultCustomerCounterparty *Meta         `json:"defaultCustomerCounterparty,omitempty"` // Метаданные Покупателя, который будет использоваться по умолчанию в документах раздела "Продажи"
	DefaultPlace                *Meta         `json:"defaultPlace,omitempty"`                // Метаданные Склада, который будет использоваться по умолчанию в документах
	DefaultProject              *Meta         `json:"defaultProject,omitempty"`              // Метаданные Проекта, который будет использоваться по умолчанию в документах
	DefaultPurchaseCounterparty *Meta         `json:"defaultPurchaseCounterparty,omitempty"` // Метаданные Поставщика, который будет использоваться по умолчанию в документах раздела "Закупки"
	DefaultScreen               DefaultScreen `json:"defaultScreen,omitempty"`               // Страница, которая открывается у пользователя при логине
	FieldsPerRow                *int          `json:"fieldsPerRow,omitempty"`                // Количество столбцов, в которых будут располагаться дополнительные поля в документах
	Locale                      Locale        `json:"locale,omitempty"`                      // Язык системы. Допустимые значения "ru_RU" и "en_US"
	MailFooter                  *string       `json:"mailFooter,omitempty"`                  // Подставляется в подпись в письмах, отправляемых из МС
	Meta                        *Meta         `json:"meta,omitempty"`                        // Метаданные настроек
	PrintFormat                 PrintFormat   `json:"printFormat,omitempty"`                 // Правила печати документов
}

UserSettings Настройки пользователя. Ключевое слово: usersettings Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-nastrojki-pol-zowatelq

func (UserSettings) MetaType

func (u UserSettings) MetaType() MetaType

func (UserSettings) String

func (u UserSettings) String() string

type UserSettingsService

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

UserSettingsService Сервис для работы с настройками пользователей.

func NewContextUserSettingsService

func NewContextUserSettingsService(client *Client) *UserSettingsService

func (*UserSettingsService) Get

func (s *UserSettingsService) Get(ctx context.Context, params *Params) (*T, *Response, error)

func (*UserSettingsService) Update

func (s *UserSettingsService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type Variant

type Variant struct {
	AccountId          *uuid.UUID       `json:"accountId,omitempty"`          // ID учетной записи
	Barcodes           *Barcodes        `json:"barcodes,omitempty"`           // Штрихкоды
	Code               *string          `json:"code,omitempty"`               // Код
	Description        *string          `json:"description,omitempty"`        // Описание
	ExternalCode       *string          `json:"externalCode,omitempty"`       // Внешний код
	Id                 *uuid.UUID       `json:"id,omitempty"`                 // ID сущности
	Meta               *Meta            `json:"meta,omitempty"`               // Метаданные
	Name               *string          `json:"name,omitempty"`               // Наименование
	Archived           *bool            `json:"archived,omitempty"`           // Добавлен ли товар в архив
	BuyPrice           *BuyPrice        `json:"buyPrice,omitempty"`           // Закупочная цена
	Characteristics    *Characteristics `json:"characteristics,omitempty"`    // Характеристики Модификации
	DiscountProhibited *bool            `json:"discountProhibited,omitempty"` // Признак запрета скидок
	Images             *Images          `json:"images,omitempty"`             // Массив метаданных Изображений (Максимальное количество изображений - 10)
	MinPrice           *MinPrice        `json:"minPrice,omitempty"`           // Минимальная цена
	Packs              []VariantPack    `json:"packs,omitempty"`              // Упаковки модификации
	Product            *Product         `json:"product,omitempty"`            // Метаданные товара, к которому привязана Модификация
	SalePrices         *SalePrices      `json:"salePrices,omitempty"`         // Цены продажи
	Things             *Things          `json:"things,omitempty"`             // Серийные номера
	Updated            *Timestamp       `json:"updated,omitempty"`            // Момент последнего обновления сущности
}

Variant Модификация. Ключевое слово: variant Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-modifikaciq

func (Variant) ConvertToAssortmentPosition

func (v Variant) ConvertToAssortmentPosition() (*AssortmentPosition, error)

func (Variant) GetMeta

func (v Variant) GetMeta() *Meta

GetMeta удовлетворяет интерфейсу HasMeta

func (Variant) MetaType

func (v Variant) MetaType() MetaType

func (Variant) String

func (v Variant) String() string

type VariantPack

type VariantPack struct {
	Barcodes   *Barcodes  `json:"barcodes,omitempty"`   // Массив штрихкодов упаковки модификации. Данный массив может содержать только один штрихкод
	Id         *uuid.UUID `json:"id,omitempty"`         // ID упаковки модификации
	ParentPack *Pack      `json:"parentpack,omitempty"` // Метаданные родительской упаковки (упаковки товара), для которой переопределяется штрихкод
}

VariantPack Упаковка модификации. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-modifikaciq-modifikacii-atributy-wlozhennyh-suschnostej-upakowki-modifikacii

func (VariantPack) String

func (v VariantPack) String() string

type VariantService

type VariantService struct {
	Endpoint
	// contains filtered or unexported fields
}

VariantService Сервис для работы с модификациями.

func NewVariantService

func NewVariantService(client *Client) *VariantService

func (*VariantService) Create

func (s *VariantService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*VariantService) CreateCharacteristic

func (s *VariantService) CreateCharacteristic(ctx context.Context, characteristic *Characteristic) (*Characteristic, *Response, error)

CreateCharacteristic Создать характеристику. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-harakteristiki-modifikacij-sozdat-harakteristiku

func (*VariantService) CreateCharacteristics

func (s *VariantService) CreateCharacteristics(ctx context.Context, characteristics []*Characteristic) (*Slice[Characteristic], *Response, error)

CreateCharacteristics Массовое создание Характеристик. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-harakteristiki-modifikacij-massowoe-sozdanie-harakteristik

func (*VariantService) CreateImage

func (s *VariantService) CreateImage(ctx context.Context, id *uuid.UUID, image *Image) (*Slice[Image], *Response, error)

CreateImage Добавить Изображение Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-dobawit-izobrazhenie-k-towaru-komplektu-ili-modifikacii

func (*VariantService) CreateUpdateMany

func (s *VariantService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*VariantService) Delete

func (s *VariantService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*VariantService) DeleteCharacteristic

func (s *VariantService) DeleteCharacteristic(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

DeleteCharacteristic Удалить характеристику.

func (*VariantService) DeleteImage

func (s *VariantService) DeleteImage(ctx context.Context, id, imageId uuid.UUID) (bool, *Response, error)

DeleteImage Удалить Изображение Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-udalit-izobrazhenie

func (*VariantService) DeleteImages

func (s *VariantService) DeleteImages(ctx context.Context, id *uuid.UUID, images []*Image) (*DeleteManyResponse, *Response, error)

DeleteImages Удалить несколько Изображений Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-udalit-gruppu-izobrazhenij

func (*VariantService) DeleteMany

func (s *VariantService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*VariantService) Get

func (s *VariantService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*VariantService) GetById

func (s *VariantService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*VariantService) GetCharacteristicById

func (s *VariantService) GetCharacteristicById(ctx context.Context, id *uuid.UUID) (*Characteristic, *Response, error)

GetCharacteristicById Получить Характеристику. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-harakteristiki-modifikacij-poluchit-harakteristiku

func (*VariantService) GetImages

func (s *VariantService) GetImages(ctx context.Context, id *uuid.UUID) (*MetaArray[Image], *Response, error)

GetImages Получить список Изображений Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-poluchit-spisok-izobrazhenij-towara-komplekta-i-modifikacii

func (*VariantService) GetMetadata

func (s *VariantService) GetMetadata(ctx context.Context) (*T, *Response, error)

GetMetadata Получить метаданные сущности Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-suschnosti

func (*VariantService) GetNamedFilterById

func (s *VariantService) GetNamedFilterById(ctx context.Context, id *uuid.UUID) (*NamedFilter, *Response, error)

GetNamedFilterById Получить фильтр по id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-fil-tr-po-id

func (*VariantService) GetNamedFilters

func (s *VariantService) GetNamedFilters(ctx context.Context, params *Params) (*List[NamedFilter], *Response, error)

GetNamedFilters Получить список фильтров Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sohranennye-fil-try-poluchit-spisok-fil-trow

func (*VariantService) Update

func (s *VariantService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

func (*VariantService) UpdateCharacteristic

func (s *VariantService) UpdateCharacteristic(ctx context.Context, id *uuid.UUID, characteristic *Characteristic) (*Characteristic, *Response, error)

UpdateCharacteristic Изменить характеристику.

func (*VariantService) UpdateImages

func (s *VariantService) UpdateImages(ctx context.Context, id *uuid.UUID, images []*Image) (*Slice[Image], *Response, error)

UpdateImages Изменение списка Изображений Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-izmenenie-spiska-izobrazhenij-u-towara-komplekta-ili-modifikacii

type ViewCreateDeletePermission

type ViewCreateDeletePermission struct {
	View   PermissionValue `json:"view"`
	Create PermissionValue `json:"create"`
	Delete PermissionValue `json:"delete"`
}

type ViewPrintPermission

type ViewPrintPermission struct {
	View  PermissionValue `json:"view"`
	Print PermissionValue `json:"print"`
}

type Webhook

type Webhook struct {
	AccountId         *uuid.UUID    `json:"accountId,omitempty"`         // ID учетной записи
	Action            WebhookAction `json:"action,omitempty"`            // Действие, которое отслеживается веб-хуком. Возможные значения: [CREATE, UPDATE, DELETE, PROCESSED]. Задать значение PROCESSED возможно только для асинхронных задач
	AuthorApplication *Application  `json:"authorApplication,omitempty"` // Метаданные Приложения, создавшего веб-хук
	DiffType          WebhookDiff   `json:"diffType,omitempty"`          // Режим отображения изменения сущности. Указывается только для действия UPDATE. Возможные значения: [NONE, FIELDS] (по умолчанию NONE)
	Enabled           *bool         `json:"enabled,omitempty"`           // Флажок состояние веб-хука (включен / отключен)
	EntityType        *MetaType     `json:"entityType,omitempty"`        // Тип сущности, к которой привязан веб-хук
	Id                *uuid.UUID    `json:"id,omitempty"`                // ID Веб-хука
	Meta              *Meta         `json:"meta,omitempty"`              // Метаданные
	Method            WebhookMethod `json:"method,omitempty"`            // HTTP метод, с которым будет происходить запрос. Возможные значения: POST
	URL               *string       `json:"url,omitempty"`               // URL, по которому будет происходить запрос. Допустимая длина до 255 символов
	UpdatedFields     []string      `json:"updatedFields,omitempty"`     // Поля сущности, измененные пользователем
}

Webhook Вебхук. Ключевое слово: webhook Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-vebhuki

func (Webhook) MetaType

func (w Webhook) MetaType() MetaType

func (Webhook) String

func (w Webhook) String() string

type WebhookAction

type WebhookAction string
const (
	WebhookActionCreate    WebhookAction = "CREATE"
	WebhookActionUpdate    WebhookAction = "UPDATE"
	WebhookActionDelete    WebhookAction = "DELETE"
	WebhookActionProcessed WebhookAction = "PROCESSED"
)

type WebhookDiff

type WebhookDiff string
const (
	WebhookDiffNone   WebhookDiff = "NONE"
	WebhookDiffFields WebhookDiff = "FIELDS"
)

type WebhookMethod

type WebhookMethod string
const (
	Post WebhookMethod = "POST"
)

type WebhookNotification

type WebhookNotification struct {
	Events       Slice[Event] `json:"events,omitempty"`       // Данные о событии, вызвавшем срабатывание вебхука
	AuditContext AuditContext `json:"auditContext,omitempty"` // Контекст аудита, соответствующий событию вебхука
}

WebhookNotification уведомление вебхука.

type WebhookReport

type WebhookReport string

WebhookReport Тип отчета остатков, к которым привязан вебхук на изменение остатков

const (
	WebhookReportAll     WebhookReport = "all"
	WebhookReportByStore WebhookReport = "bystore"
)

type WebhookService

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

WebhookService Сервис для работы с вебхуками.

func NewWebhookService

func NewWebhookService(client *Client) *WebhookService

func (*WebhookService) Create

func (s *WebhookService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*WebhookService) CreateUpdateMany

func (s *WebhookService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*WebhookService) Delete

func (s *WebhookService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*WebhookService) DeleteMany

func (s *WebhookService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*WebhookService) Get

func (s *WebhookService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*WebhookService) GetById

func (s *WebhookService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*WebhookService) Update

func (s *WebhookService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type WebhookStock

type WebhookStock struct {
	AccountId         *uuid.UUID    `json:"accountId,omitempty"`         // ID учетной записи
	AuthorApplication *Meta         `json:"authorApplication,omitempty"` // Метаданные Приложения, создавшего вебхук на изменение остатков
	Enabled           *bool         `json:"enabled,omitempty"`           // Флажок состояние веб-хука (включен / отключен)
	StockType         *string       `json:"stockType,omitempty"`         // Тип остатков, изменение которых вызывает вебхук на изменение остатков. Возможные значения: [stock]
	ReportType        WebhookReport `json:"reportType,omitempty"`        // Тип отчета остатков, к которым привязан вебхук на изменение остатков. Возможные значения: [all, bystore]
	ReportUrl         *string       `json:"reportUrl,omitempty"`         // URL на получения данных по изменившейся номенклатуре за указанный период
	Id                *uuid.UUID    `json:"id,omitempty"`                // ID вебхука на изменение остатков
	Meta              *Meta         `json:"meta,omitempty"`              // Метаданные вебхука на изменение остатков
	URL               *string       `json:"url,omitempty"`               // URL, по которому будет происходить обработка вебхука. Допустимая длина до 255 символов
}

WebhookStock Вебхук на изменение остатков. Ключевое слово: webhookstock Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-vebhuk-na-izmenenie-ostatkow

func (WebhookStock) MetaType

func (w WebhookStock) MetaType() MetaType

func (WebhookStock) String

func (w WebhookStock) String() string

type WebhookStockService

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

WebhookStockService Сервис для работы с вебхуками на изменение остатков.

func NewWebhookStockService

func NewWebhookStockService(client *Client) *WebhookStockService

func (*WebhookStockService) Create

func (s *WebhookStockService) Create(ctx context.Context, entity *T, params *Params) (*T, *Response, error)

Create создать элемент

func (*WebhookStockService) CreateUpdateMany

func (s *WebhookStockService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *Response, error)

CreateUpdateMany Создание и обновление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*WebhookStockService) Delete

func (s *WebhookStockService) Delete(ctx context.Context, id *uuid.UUID) (bool, *Response, error)

func (*WebhookStockService) DeleteMany

func (s *WebhookStockService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *Response, error)

DeleteMany Удаление нескольких объектов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/index.html#mojsklad-json-api-obschie-swedeniq-sozdanie-i-obnowlenie-neskol-kih-ob-ektow

func (*WebhookStockService) Get

func (s *WebhookStockService) Get(ctx context.Context, params *Params) (*List[T], *Response, error)

func (*WebhookStockService) GetById

func (s *WebhookStockService) GetById(ctx context.Context, id *uuid.UUID, params *Params) (*T, *Response, error)

func (*WebhookStockService) Update

func (s *WebhookStockService) Update(ctx context.Context, id *uuid.UUID, entity *T, params *Params) (*T, *Response, error)

type WelcomeBonusesMode

type WelcomeBonusesMode string

WelcomeBonusesMode Условия бонусных баллов Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-bonusnaq-programma-bonusnye-programmy-atributy-suschnosti-uslowiq-bonusnyh-ballow

const (
	WelcomeBonusesModeRegistration  WelcomeBonusesMode = "REGISTRATION"   // Приветственные баллы начисляются участникам после регистрации в бонусной программе.
	WelcomeBonusesModeFirstPurchase WelcomeBonusesMode = "FIRST_PURCHASE" // Приветственные баллы начисляются участникам бонусной программы после совершения первой покупки.
)

type Zone

type Zone struct {
	AccountId    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	ExternalCode *string    `json:"externalCode,omitempty"` // Внешний код Зоны
	Id           *uuid.UUID `json:"id,omitempty"`           // ID Зоны
	Meta         *Meta      `json:"meta,omitempty"`         // Метаданные Зоны
	Name         *string    `json:"name,omitempty"`         // Наименование Зоны
	Updated      *Timestamp `json:"updated,omitempty"`      // Момент последнего обновления Зоны
}

Zone Зона склада. Ключевое слово: storezone Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-zony-sklada

func (Zone) MetaType

func (z Zone) MetaType() MetaType

func (Zone) String

func (z Zone) String() string

Source Files

Jump to

Keyboard shortcuts

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