moysklad

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "v0.0.13"

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

Variables

This section is empty.

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 Deref

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

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

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 AdminRole added in v0.0.8

type AdminRole struct {
	Meta Meta `json:"meta,omitempty"`
}

AdminRole Роль администратора

func (AdminRole) MetaType added in v0.0.8

func (r AdminRole) MetaType() MetaType

func (AdminRole) String added in v0.0.8

func (r AdminRole) 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 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 {
	Meta         Meta   `json:"meta"`
	Message      string `json:"error"`
	Parameter    string `json:"parameter"`
	ErrorMessage string `json:"error_message"`
	MoreInfo     string `json:"moreInfo"`
	Dependencies []Meta `json:"dependencies"`
	Code         int    `json:"code"`
	Line         int    `json:"line"`
	Column       int    `json:"column"`
}

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) GetByID added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*ApplicationService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

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() Slice[Bundle]

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

func (Assortment) FilterConsignment

func (a Assortment) FilterConsignment() Slice[Consignment]

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

func (Assortment) FilterProduct

func (a Assortment) FilterProduct() Slice[Product]

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

func (Assortment) FilterService

func (a Assortment) FilterService() Slice[Service]

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

func (Assortment) FilterVariant

func (a Assortment) FilterVariant() Slice[Variant]

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

func (Assortment) MetaType

func (a Assortment) MetaType() MetaType

type AssortmentPosition

type AssortmentPosition struct {
	Meta         Meta     `json:"meta"`
	Code         string   `json:"code,omitempty"`
	Description  string   `json:"description,omitempty"`
	ExternalCode string   `json:"externalCode,omitempty"`
	Name         string   `json:"name,omitempty"`
	Barcodes     Barcodes `json:"barcodes,omitempty"`

	AccountID uuid.UUID `json:"accountId,omitempty"`
	ID        uuid.UUID `json:"id,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"`
	Rows    Assortment     `json:"rows,omitempty"`
	Meta    MetaCollection `json:"meta,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, *resty.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, *resty.Response, error)

Get Запрос (отдельный) на получение объекта. Например, ассортимент, контекст.

func (*AssortmentService) GetAsync

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

GetAsync Запрос на асинхронное выполнение задачи. Первым возвращаемым аргументом является сервис для дальнейшей работы с конкретной асинхронной задачей.

func (*AssortmentService) GetCustomTemplateByID added in v0.0.8

func (s *AssortmentService) GetCustomTemplateByID(ctx context.Context, id uuid.UUID) (*CustomTemplate, *resty.Response, error)

GetCustomTemplateByID Запрос на получение информации об отдельном пользовательском шаблоне печатной формы для указанного типа сущности по его id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-otdel-nyj-pol-zowatel-skij-shablon

func (*AssortmentService) GetCustomTemplates added in v0.0.8

func (s *AssortmentService) GetCustomTemplates(ctx context.Context) (*List[CustomTemplate], *resty.Response, error)

GetCustomTemplates Запрос на получение информации о пользовательских шаблонах печатных форм для указанного типа сущности. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-spisok-pol-zowatel-skih-shablonow

func (*AssortmentService) GetEmbeddedTemplateByID added in v0.0.8

func (s *AssortmentService) GetEmbeddedTemplateByID(ctx context.Context, id uuid.UUID) (*EmbeddedTemplate, *resty.Response, error)

GetEmbeddedTemplateByID Запрос на получение информации об отдельном стандартном шаблоне печатной формы для указанного типа сущности по его id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-otdel-nyj-standartnyj-shablon

func (*AssortmentService) GetEmbeddedTemplates added in v0.0.8

func (s *AssortmentService) GetEmbeddedTemplates(ctx context.Context) (*List[EmbeddedTemplate], *resty.Response, error)

GetEmbeddedTemplates Запрос на получение информации о стандартных шаблонах печатных форм для указанного типа сущности. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-spisok-standartnyh-shablonow

func (*AssortmentService) GetSettings

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

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

func (*AssortmentService) UpdateSettings

func (s *AssortmentService) UpdateSettings(ctx context.Context, settings *T) (*T, *resty.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 {
	Meta         Meta       `json:"meta,omitempty"`
	Owner        Meta       `json:"owner,omitempty"`
	DeletionDate Timestamp  `json:"deletionDate,omitempty"`
	RequestURL   string     `json:"request,omitempty"`
	ResultURL    string     `json:"resultUrl,omitempty"`
	State        AsyncState `json:"state,omitempty"`
	ApiErrors    []ApiError `json:"errors,omitempty"`
	AccountID    uuid.UUID  `json:"accountId,omitempty"`
	ID           uuid.UUID  `json:"id,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](req *resty.Request, resp *resty.Response) *AsyncResultService[T]

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

func (*AsyncResultService[T]) Cancel

func (s *AsyncResultService[T]) Cancel(ctx context.Context) (bool, *resty.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, *resty.Response, error)

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

func (*AsyncResultService[T]) Result

func (s *AsyncResultService[T]) Result(ctx context.Context) (*T, *resty.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, *resty.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], *resty.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 {
	Value            any           `json:"value,omitempty"`
	CustomEntityMeta *Meta         `json:"customEntityMeta,omitempty"`
	Description      *string       `json:"description,omitempty"`
	ID               *uuid.UUID    `json:"id,omitempty"`
	Meta             *Meta         `json:"meta,omitempty"`
	Name             *string       `json:"name,omitempty"`
	Required         *bool         `json:"required,omitempty"`
	Show             *bool         `json:"show,omitempty"`
	File             *File         `json:"file,omitempty"`
	Type             AttributeType `json:"type,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 []*Attribute

func (*Attributes) Push added in v0.0.8

func (a *Attributes) Push(elements ...*Attribute) *Attributes

Push добавляет элементы в срез.

type AttributesCreateSharedWrapper

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

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 {
	Events        MetaWrapper      `json:"events"`
	Meta          Meta             `json:"meta"`
	Moment        Timestamp        `json:"moment"`
	EntityType    string           `json:"entityType"`
	EventType     AuditEventType   `json:"eventType"`
	Info          AuditContextInfo `json:"info"`
	ObjectType    string           `json:"objectType"`
	Source        string           `json:"source"`
	UID           string           `json:"uid"`
	ObjectCount   int              `json:"objectCount"`
	ID            uuid.UUID        `json:"id"`
	SupportAccess bool             `json:"supportAccess"`
}

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 {
	Entity         MetaWrapper    `json:"entity"`
	Audit          MetaWrapper    `json:"audit"`
	Moment         Timestamp      `json:"moment"`
	Diff           any            `json:"diff"`
	EntityType     string         `json:"entityType"`
	EventType      AuditEventType `json:"eventType"`
	AdditionalInfo string         `json:"additionalInfo"`
	Name           string         `json:"name"`
	ObjectType     string         `json:"objectType"`
	Source         string         `json:"source"`
	UID            string         `json:"uid"`
	ObjectCount    int            `json:"objectCount"`
	SupportAccess  bool           `json:"supportAccess"`
}

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 {
	OldValue        any    `json:"oldValue,omitempty"`
	NewValue        any    `json:"newValue,omitempty"`
	Account         string `json:"account,omitempty"`
	Country         string `json:"country,omitempty"`
	TemplateName    string `json:"templateName,omitempty"`
	PublicationHref string `json:"publicationHref,omitempty"`
	SenderEmail     string `json:"senderEmail,omitempty"`
	TargetEmail     string `json:"targetEmail,omitempty"`
	SubjectEmail    string `json:"subjectEmail,omitempty"`
	Text            string `json:"text,omitempty"`
	AttributeName   string `json:"attributeName,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], *resty.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], *resty.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, *resty.Response, error)

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

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 = Slice[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 {
	MaxPaidRatePercents       *int               `json:"maxPaidRatePercents,omitempty"`
	EarnWhileRedeeming        *bool              `json:"earnWhileRedeeming,omitempty"`
	AgentTags                 *Tags              `json:"agentTags,omitempty"`
	AllAgents                 *bool              `json:"allAgents,omitempty"`
	AccountID                 *uuid.UUID         `json:"accountId,omitempty"`
	EarnRateRoublesToPoint    *int               `json:"earnRateRoublesToPoint,omitempty"`
	Active                    *bool              `json:"active,omitempty"`
	ID                        *uuid.UUID         `json:"id,omitempty"`
	AllProducts               *bool              `json:"allProducts,omitempty"`
	Meta                      *Meta              `json:"meta,omitempty"`
	Name                      *string            `json:"name,omitempty"`
	PostponedBonusesDelayDays *int               `json:"postponedBonusesDelayDays,omitempty"`
	SpendRatePointsToRouble   *int               `json:"spendRatePointsToRouble,omitempty"`
	WelcomeBonusesEnabled     *bool              `json:"welcomeBonusesEnabled,omitempty"`
	WelcomeBonusesValue       *int               `json:"welcomeBonusesValue,omitempty"`
	WelcomeBonusesMode        WelcomeBonusesMode `json:"welcomeBonusesMode,omitempty"`
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*BonusProgramService) Delete

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

Delete Запрос на удаление объекта по id.

func (*BonusProgramService) DeleteMany

func (s *BonusProgramService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*BonusProgramService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*BonusProgramService) Update

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

Update Запрос на обновление объекта.

type BonusTransaction

type BonusTransaction struct {
	Organization      *Organization            `json:"organization,omitempty"`
	UpdatedBy         *string                  `json:"updatedBy,omitempty"`
	Group             *Group                   `json:"group,omitempty"`
	BonusProgram      *BonusProgram            `json:"bonusProgram,omitempty"`
	BonusValue        *int                     `json:"bonusValue,omitempty"`
	ID                *uuid.UUID               `json:"id,omitempty"`
	Code              *string                  `json:"code,omitempty"`
	Created           *Timestamp               `json:"created,omitempty"`
	ExecutionDate     *Timestamp               `json:"executionDate,omitempty"`
	Meta              *Meta                    `json:"meta,omitempty"`
	Applicable        *bool                    `json:"applicable,omitempty"`
	Agent             *Counterparty            `json:"agent,omitempty"`
	ExternalCode      *string                  `json:"externalCode,omitempty"`
	Moment            *Timestamp               `json:"moment,omitempty"`
	Name              *string                  `json:"name,omitempty"`
	AccountID         *uuid.UUID               `json:"accountId,omitempty"`
	Owner             *Employee                `json:"owner,omitempty"`
	ParentDocument    *BonusTransaction        `json:"parentDocument,omitempty"`
	Shared            *bool                    `json:"shared,omitempty"`
	Updated           *Timestamp               `json:"updated,omitempty"`
	TransactionType   BonusTransactionType     `json:"transactionType,omitempty"`
	TransactionStatus BonusTransactionStatus   `json:"transactionStatus,omitempty"`
	CategoryType      BonusTransactionCategory `json:"categoryType,omitempty"`
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*BonusTransactionService) CreateUpdateMany

func (s *BonusTransactionService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*BonusTransactionService) GetByID added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*BonusTransactionService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*BonusTransactionService) Update

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

Update Запрос на обновление объекта.

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 {
	Images              *Images                     `json:"images,omitempty"`
	Updated             *Timestamp                  `json:"updated,omitempty"`
	Code                *string                     `json:"code,omitempty"`
	Description         *string                     `json:"description,omitempty"`
	ExternalCode        *string                     `json:"externalCode,omitempty"`
	ID                  *uuid.UUID                  `json:"id,omitempty"`
	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"`
	Overhead            *BundleOverhead             `json:"overhead,omitempty"`
	EffectiveVat        *int                        `json:"effectiveVat,omitempty"`
	EffectiveVatEnabled *bool                       `json:"effectiveVatEnabled,omitempty"`
	Files               *Files                      `json:"files,omitempty"`
	Group               *Group                      `json:"group,omitempty"`
	Volume              *float64                    `json:"volume,omitempty"`
	Barcodes            *Barcodes                   `json:"barcodes,omitempty"`
	DiscountProhibited  *bool                       `json:"discountProhibited"`
	Owner               *Employee                   `json:"owner,omitempty"`
	PartialDisposal     *bool                       `json:"partialDisposal,omitempty"`
	PathName            *string                     `json:"pathName,omitempty"`
	Weight              *float64                    `json:"weight,omitempty"`
	SalePrices          *SalePrices                 `json:"salePrices,omitempty"`
	ProductFolder       *ProductFolder              `json:"productFolder,omitempty"`
	Shared              *bool                       `json:"shared,omitempty"`
	SyncID              *uuid.UUID                  `json:"syncId,omitempty"`
	AccountID           *uuid.UUID                  `json:"accountId,omitempty"`
	Tnved               *string                     `json:"tnved,omitempty"`
	VatEnabled          *bool                       `json:"vatEnabled,omitempty"`
	Uom                 *Uom                        `json:"uom,omitempty"`
	MinPrice            *MinPrice                   `json:"minPrice,omitempty"`
	UseParentVat        *bool                       `json:"useParentVat,omitempty"`
	Vat                 *int                        `json:"vat,omitempty"`
	TrackingType        TrackingType                `json:"trackingType,omitempty"`
	TaxSystem           GoodTaxSystem               `json:"taxSystem,omitempty"`
	PaymentItemType     PaymentItem                 `json:"paymentItemType,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*BundleService) CreateComponent

func (s *BundleService) CreateComponent(ctx context.Context, id uuid.UUID, bundleComponent *BundleComponent) (*BundleComponent, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*BundleService) DeleteComponent

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

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

func (*BundleService) GetByID added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*BundleService) GetComponentById

func (s *BundleService) GetComponentById(ctx context.Context, id, componentId uuid.UUID) (*BundleComponent, *resty.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], *resty.Response, error)

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

func (*BundleService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*BundleService) Update

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

Update Запрос на обновление объекта.

func (*BundleService) UpdateComponent

func (s *BundleService) UpdateComponent(ctx context.Context, id, componentId uuid.UUID, bundleComponent *BundleComponent) (*BundleComponent, *resty.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     *Operations   `json:"operations,omitempty"`     // Массив ссылок на связанные операции в формате Метаданных
}

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

func (*CashIn) BindDocuments added in v0.0.6

func (c *CashIn) BindDocuments(documentsMeta ...*Meta) *CashIn

BindDocuments Привязка платежей к документам. Необходимо передать *Meta документов, к которым необходимо привязать платёж. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-priwqzka-platezhej-k-dokumentam

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CashInService) CreateAttribute

func (s *CashInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CashInService) DeleteAttribute

func (s *CashInService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *CashInService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*CashInService) DeletePublication

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

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

func (*CashInService) GetAttributeByID added in v0.0.8

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

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*CashInService) GetBySyncID added in v0.0.8

func (s *CashInService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*CashInService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*CashInService) GetMetadata

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

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

func (*CashInService) GetPublicationByID added in v0.0.8

func (s *CashInService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*CashInService) TemplateBasedOn added in v0.0.7

func (s *CashInService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*CashInService) Update

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

Update Запрос на обновление объекта.

func (*CashInService) UpdateAttribute

func (s *CashInService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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 CashInTemplateArg added in v0.0.7

type CashInTemplateArg struct {
	CustomerOrder      *MetaWrapper `json:"customerOrder,omitempty"`
	PurchaseReturn     *MetaWrapper `json:"purchaseReturn,omitempty"`
	Demand             *MetaWrapper `json:"demand,omitempty"`
	InvoiceOut         *MetaWrapper `json:"invoiceOut,omitempty"`
	CommissionReportIn *MetaWrapper `json:"commissionReportIn,omitempty"`
}

CashInTemplateArg Документ: Приходный ордер (cashin) Основание, на котором он может быть создан: - Заказ покупателя (customerorder) - Возврат поставщику (purchasereturn) - Отгрузка (demand) - Счет покупателю (invoiceout) - Полученный отчет комиссионера (commissionreportin)

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"`     // Ссылка на Счет-фактуру выданный, с которым связан этот платеж в формате Метаданных
	Operations     *Operations   `json:"operations,omitempty"`     // Массив ссылок на связанные операции в формате Метаданных
}

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

func (*CashOut) BindDocuments added in v0.0.6

func (c *CashOut) BindDocuments(documentsMeta ...*Meta) *CashOut

BindDocuments Привязка платежей к документам. Необходимо передать *Meta документов, к которым необходимо привязать платёж. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-priwqzka-platezhej-k-dokumentam

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CashOutService) CreateAttribute

func (s *CashOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CashOutService) DeleteAttribute

func (s *CashOutService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *CashOutService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*CashOutService) DeletePublication

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

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

func (*CashOutService) GetAttributeByID added in v0.0.8

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

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*CashOutService) GetBySyncID added in v0.0.8

func (s *CashOutService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*CashOutService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*CashOutService) GetMetadata

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

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

func (*CashOutService) GetPublicationByID added in v0.0.8

func (s *CashOutService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*CashOutService) TemplateBasedOn added in v0.0.7

func (s *CashOutService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*CashOutService) Update

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

Update Запрос на обновление объекта.

func (*CashOutService) UpdateAttribute

func (s *CashOutService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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 CashOutTemplateArg added in v0.0.7

type CashOutTemplateArg struct {
	SalesReturn         *MetaWrapper `json:"salesReturn,omitempty"`
	Supply              *MetaWrapper `json:"supply,omitempty"`
	InvoiceIn           *MetaWrapper `json:"invoiceIn,omitempty"`
	PurchaseOrder       *MetaWrapper `json:"purchaseOrder,omitempty"`
	CommissionReportOut *MetaWrapper `json:"commissionReportOut,omitempty"`
}

CashOutTemplateArg Документ: Расходный ордер (cashout) Основание, на котором он может быть создан: - Возврат покупателя (salesreturn) - Приемка (supply) - Счет поставщика (invoicein) - Заказ поставщику (purchaseorder) - Выданный отчет комиссионера (commissionreportout)

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 CashierRole added in v0.0.8

type CashierRole struct {
	Meta Meta `json:"meta,omitempty"`
}

CashierRole Роль кассира

func (CashierRole) MetaType added in v0.0.8

func (r CashierRole) MetaType() MetaType

func (CashierRole) String added in v0.0.8

func (r CashierRole) 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 = Slice[Characteristic]

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 {
	Time            Timestamp `json:"time,omitempty"`
	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"`
}

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 added in v0.0.4

func (c *Client) Async() *AsyncService

func (*Client) Audit added in v0.0.4

func (c *Client) Audit() *AuditService

func (*Client) Context added in v0.0.4

func (c *Client) Context() *ContextService

func (*Client) Entity added in v0.0.4

func (c *Client) Entity() *EntityService

func (*Client) Report added in v0.0.4

func (c *Client) Report() *ReportService

func (*Client) Security added in v0.0.4

func (c *Client) Security() *SecurityTokenService

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) 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 {
	Name                          *string                                      `json:"name,omitempty"`
	Applicable                    *bool                                        `json:"applicable,omitempty"`
	AgentAccount                  *AgentAccount                                `json:"agentAccount,omitempty"`
	Organization                  *Organization                                `json:"organization,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"`
	OrganizationAccount           *AgentAccount                                `json:"organizationAccount,omitempty"`
	Group                         *Group                                       `json:"group,omitempty"`
	ID                            *uuid.UUID                                   `json:"id,omitempty"`
	Meta                          *Meta                                        `json:"meta,omitempty"`
	Moment                        *Timestamp                                   `json:"moment,omitempty"`
	VatSum                        *float64                                     `json:"vatSum,omitempty"`
	Agent                         *Counterparty                                `json:"agent,omitempty"`
	Files                         *Files                                       `json:"files,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"`
	Payments                      *Payments                                    `json:"payments,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"`
	Updated                       *Timestamp                                   `json:"updated,omitempty"`
	VatEnabled                    *bool                                        `json:"vatEnabled,omitempty"`
	VatIncluded                   *bool                                        `json:"vatIncluded,omitempty"`
	AccountID                     *uuid.UUID                                   `json:"accountId,omitempty"`
	RewardType                    RewardType                                   `json:"rewardType,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CommissionReportInService) CreateAttribute

func (s *CommissionReportInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*CommissionReportInService) CreatePositions

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

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

func (*CommissionReportInService) CreateReturnPosition

func (s *CommissionReportInService) CreateReturnPosition(ctx context.Context, id *uuid.UUID, position *CommissionReportInReturnPosition) (*CommissionReportInReturnPosition, *resty.Response, error)

CreateReturnPosition Создать позицию возврата на склад комиссионера. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-poluchennyj-otchet-komissionera-sozdat-poziciu-wozwrata-na-sklad-komissionera

func (*CommissionReportInService) CreateUpdateMany

func (s *CommissionReportInService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CommissionReportInService) DeleteAttribute

func (s *CommissionReportInService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *CommissionReportInService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*CommissionReportInService) DeleteMany

func (s *CommissionReportInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*CommissionReportInService) DeletePositionTrackingCodes

func (s *CommissionReportInService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.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, *resty.Response, error)

DeleteReturnPosition Удалить позицию возврата на склад комиссионера. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-poluchennyj-otchet-komissionera-udalit-poziciu-wozwrata-na-sklad-komissionera

func (*CommissionReportInService) GetAttributeByID added in v0.0.8

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

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*CommissionReportInService) GetBySyncID added in v0.0.8

func (s *CommissionReportInService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*CommissionReportInService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*CommissionReportInService) GetMetadata

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

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

func (*CommissionReportInService) GetNamedFilterByID added in v0.0.8

func (s *CommissionReportInService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*CommissionReportInService) GetPositionByID added in v0.0.8

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

GetPositionByID Получение отдельной позиции.

func (*CommissionReportInService) GetPositionTrackingCodes

func (s *CommissionReportInService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*CommissionReportInService) GetPublicationByID added in v0.0.8

func (s *CommissionReportInService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.Response, error)

GetReturnPositionById Получить позицию возврата на склад комиссионера. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-poluchennyj-otchet-komissionera-poluchit-poziciu-wozwrata-na-sklad-komissionera

func (*CommissionReportInService) GetReturnPositions

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

GetReturnPositions Получить позиции возврата на склад комиссионера. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-poluchennyj-otchet-komissionera-poluchit-pozicii-wozwrata-na-sklad-komissionera

func (*CommissionReportInService) Publish

func (s *CommissionReportInService) Publish(ctx context.Context, id uuid.UUID, template *Templater) (*Publication, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*CommissionReportInService) UpdateAttribute

func (s *CommissionReportInService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

func (*CommissionReportInService) UpdateReturnPosition

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

UpdateReturnPosition Изменить позицию возврата на склад комиссионера. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-poluchennyj-otchet-komissionera-izmenit-poziciu-wozwrata-na-sklad-komissionera

type CommissionReportOut

type CommissionReportOut struct {
	Organization          *Organization                           `json:"organization,omitempty"`
	CommissionPeriodStart *Timestamp                              `json:"commissionPeriodStart,omitempty"`
	AgentAccount          *AgentAccount                           `json:"agentAccount,omitempty"`
	AccountID             *uuid.UUID                              `json:"accountId,omitempty"`
	Attributes            *Attributes                             `json:"attributes,omitempty"`
	Owner                 *Employee                               `json:"owner,omitempty"`
	CommissionPeriodEnd   *Timestamp                              `json:"commissionPeriodEnd,omitempty"`
	OrganizationAccount   *AgentAccount                           `json:"organizationAccount,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"`
	Group                 *Group                                  `json:"group,omitempty"`
	ID                    *uuid.UUID                              `json:"id,omitempty"`
	Meta                  *Meta                                   `json:"meta,omitempty"`
	Moment                *Timestamp                              `json:"moment,omitempty"`
	Name                  *string                                 `json:"name,omitempty"`
	Applicable            *bool                                   `json:"applicable,omitempty"`
	Agent                 *Counterparty                           `json:"agent,omitempty"`
	Code                  *string                                 `json:"code,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"`
	Payments              *Payments                               `json:"payments,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"`
	Updated               *Timestamp                              `json:"updated,omitempty"`
	VatEnabled            *bool                                   `json:"vatEnabled,omitempty"`
	VatIncluded           *bool                                   `json:"vatIncluded,omitempty"`
	VatSum                *float64                                `json:"vatSum,omitempty"`
	RewardType            RewardType                              `json:"rewardType,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CommissionReportOutService) CreateAttribute

func (s *CommissionReportOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*CommissionReportOutService) CreatePositions

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

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

func (*CommissionReportOutService) CreateUpdateMany

func (s *CommissionReportOutService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CommissionReportOutService) DeleteAttribute

func (s *CommissionReportOutService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *CommissionReportOutService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*CommissionReportOutService) DeleteMany

func (s *CommissionReportOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*CommissionReportOutService) DeletePositionTrackingCodes

func (s *CommissionReportOutService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*CommissionReportOutService) GetAttributeByID added in v0.0.8

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

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*CommissionReportOutService) GetBySyncID added in v0.0.8

func (s *CommissionReportOutService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*CommissionReportOutService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*CommissionReportOutService) GetMetadata

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

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

func (*CommissionReportOutService) GetNamedFilterByID added in v0.0.8

func (s *CommissionReportOutService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*CommissionReportOutService) GetPositionByID added in v0.0.8

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

GetPositionByID Получение отдельной позиции.

func (*CommissionReportOutService) GetPositionTrackingCodes

func (s *CommissionReportOutService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*CommissionReportOutService) GetPublicationByID added in v0.0.8

func (s *CommissionReportOutService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*CommissionReportOutService) UpdateAttribute

func (s *CommissionReportOutService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type CompanySettings

type CompanySettings struct {
	Meta                     *Meta            `json:"meta,omitempty"`
	CheckMinPrice            *bool            `json:"checkMinPrice,omitempty"`
	CheckShippingStock       *bool            `json:"checkShippingStock,omitempty"`
	CompanyAddress           *string          `json:"companyAddress,omitempty"`
	Currency                 *Currency        `json:"currency,omitempty"`
	GlobalOperationNumbering *bool            `json:"globalOperationNumbering,omitempty"`
	PriceTypes               *PriceTypes      `json:"priceTypes,omitempty"`
	UseCompanyAddress        *bool            `json:"useCompanyAddress,omitempty"`
	UseRecycleBin            *bool            `json:"useRecycleBin,omitempty"`
	DiscountStrategy         DiscountStrategy `json:"discountStrategy,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ConsignmentService) CreateAttribute

func (s *ConsignmentService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ConsignmentService) DeleteAttribute

func (s *ConsignmentService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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, *resty.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) GetAttributeByID added in v0.0.8

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

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*ConsignmentService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*ConsignmentService) GetMetadata

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

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

func (*ConsignmentService) GetNamedFilterByID added in v0.0.8

func (s *ConsignmentService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*ConsignmentService) UpdateAttribute

func (s *ConsignmentService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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) (*[]PriceType, *resty.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, *resty.Response, error)

Get Запрос (отдельный) на получение объекта. Например, ассортимент, контекст.

func (*ContextCompanySettingsService) GetMetadata

func (s *ContextCompanySettingsService) GetMetadata(ctx context.Context) (*T, *resty.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, *resty.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, *resty.Response, error)

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

func (*ContextCompanySettingsService) GetPriceTypes

func (s *ContextCompanySettingsService) GetPriceTypes(ctx context.Context) (*[]PriceType, *resty.Response, error)

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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*ContextCompanySettingsService) UpdatePriceTypes

func (s *ContextCompanySettingsService) UpdatePriceTypes(ctx context.Context, priceTypes []*PriceType) (*[]PriceType, *resty.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 {
	Owner       Employee  `json:"owner"`
	Image       Image     `json:"image"`
	Meta        Meta      `json:"meta"`
	Group       Group     `json:"group"`
	Updated     Timestamp `json:"updated"`
	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"`
	Created      string   `json:"created"`
	MiddleName   string   `json:"middleName"`
	ExternalCode string   `json:"externalCode"`
	ID           string   `json:"id"`
	Position     string   `json:"position"`
	Uid          string   `json:"uid"`
	Email        string   `json:"email"`
	Phone        string   `json:"phone"`
	FirstName    string   `json:"firstName"`
	Name         string   `json:"name"`
	LastName     string   `json:"lastName"`
	FullName     string   `json:"fullName"`
	ShortFio     string   `json:"shortFio"`
	AccountID    string   `json:"accountId"`
	Cashiers     Cashiers `json:"cashiers"`
	Shared       bool     `json:"shared"`
	Archived     bool     `json:"archived"`
}

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, *resty.Response, error)

Get Запрос (отдельный) на получение объекта. Например, ассортимент, контекст.

type ContextService

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

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

func (*ContextService) CompanySettings

func (s *ContextService) CompanySettings() *ContextCompanySettingsService

func (*ContextService) Employee

func (s *ContextService) Employee() *ContextEmployeeService

func (*ContextService) UserSettings

func (s *ContextService) UserSettings() *UserSettingsService

type Contract

type Contract struct {
	RewardPercent       *int          `json:"rewardPercent,omitempty"`
	Updated             *Timestamp    `json:"updated,omitempty"`
	Moment              *Timestamp    `json:"moment,omitempty"`
	Archived            *bool         `json:"archived,omitempty"`
	Attributes          *Attributes   `json:"attributes,omitempty"`
	Code                *string       `json:"code,omitempty"`
	Name                *string       `json:"name,omitempty"`
	Description         *string       `json:"description,omitempty"`
	ExternalCode        *string       `json:"externalCode,omitempty"`
	Group               *Group        `json:"group,omitempty"`
	ID                  *uuid.UUID    `json:"id,omitempty"`
	Meta                *Meta         `json:"meta,omitempty"`
	AgentAccount        *AgentAccount `json:"agentAccount,omitempty"`
	Agent               *Counterparty `json:"agent,omitempty"`
	State               *State        `json:"state,omitempty"`
	OwnAgent            *Organization `json:"ownAgent,omitempty"`
	Owner               *Employee     `json:"owner,omitempty"`
	Rate                *Rate         `json:"rate,omitempty"`
	AccountID           *uuid.UUID    `json:"accountId,omitempty"`
	Published           *bool         `json:"published,omitempty"`
	Shared              *bool         `json:"shared,omitempty"`
	OrganizationAccount *AgentAccount `json:"organizationAccount,omitempty"`
	Sum                 *float64      `json:"sum,omitempty"`
	SyncID              *uuid.UUID    `json:"syncId,omitempty"`
	Printed             *bool         `json:"printed,omitempty"`
	RewardType          RewardType    `json:"rewardType,omitempty"`
	ContractType        ContractType  `json:"contractType,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ContractService) CreateAttribute

func (s *ContractService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ContractService) DeleteAttribute

func (s *ContractService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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, *resty.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, *resty.Response, error)

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

func (*ContractService) GetAttributeByID added in v0.0.8

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

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*ContractService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*ContractService) GetMetadata

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

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

func (*ContractService) GetNamedFilterByID added in v0.0.8

func (s *ContractService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*ContractService) GetPublicationByID added in v0.0.8

func (s *ContractService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*ContractService) UpdateAttribute

func (s *ContractService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CounterPartyAdjustmentService) CreateUpdateMany

func (s *CounterPartyAdjustmentService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CounterPartyAdjustmentService) DeleteMany

func (s *CounterPartyAdjustmentService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*CounterPartyAdjustmentService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*CounterPartyAdjustmentService) GetMetadata

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

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

func (*CounterPartyAdjustmentService) GetNamedFilterByID added in v0.0.8

func (s *CounterPartyAdjustmentService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

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"`          // Дата рождения [15-08-2023]
	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"`                // Пол Контрагента [15-08-2023]
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CounterpartyService) CreateAttribute

func (s *CounterpartyService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]ContactPerson, *resty.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) (*[]Note, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CounterpartyService) DeleteAttribute

func (s *CounterpartyService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *CounterpartyService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*CounterpartyService) DeleteMany

func (s *CounterpartyService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*CounterpartyService) GetAccountByID added in v0.0.8

func (s *CounterpartyService) GetAccountByID(ctx context.Context, id, accountId uuid.UUID) (*AgentAccount, *resty.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], *resty.Response, error)

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

func (*CounterpartyService) GetAsync

func (s *CounterpartyService) GetAsync(ctx context.Context, params *Params) (*AsyncResultService[List[Counterparty]], *resty.Response, error)

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

func (*CounterpartyService) GetAttributeByID added in v0.0.8

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

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*CounterpartyService) GetBySyncID added in v0.0.8

func (s *CounterpartyService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*CounterpartyService) GetContactPersonById

func (s *CounterpartyService) GetContactPersonById(ctx context.Context, id, contactPersonId uuid.UUID) (*ContactPerson, *resty.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], *resty.Response, error)

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

func (*CounterpartyService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*CounterpartyService) GetMetadata

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

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

func (*CounterpartyService) GetNamedFilterByID added in v0.0.8

func (s *CounterpartyService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.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], *resty.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, *resty.Response, error)

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

func (*CounterpartyService) Update

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

Update Запрос на обновление объекта.

func (*CounterpartyService) UpdateAccounts

func (s *CounterpartyService) UpdateAccounts(ctx context.Context, id uuid.UUID, accounts []*AgentAccount) (*[]AgentAccount, *resty.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, *resty.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, *resty.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, *resty.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, *resty.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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CountryService) CreateUpdateMany

func (s *CountryService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CountryService) DeleteMany

func (s *CountryService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*CountryService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*CountryService) GetNamedFilterByID added in v0.0.8

func (s *CountryService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

type Currency

type Currency struct {
	Margin         *float64       `json:"margin,omitempty"`
	ISOCode        *string        `json:"isoCode,omitempty"`
	Default        *bool          `json:"default,omitempty"`
	FullName       *string        `json:"fullName,omitempty"`
	Archived       *bool          `json:"archived,omitempty"`
	Indirect       *bool          `json:"indirect,omitempty"`
	Code           *string        `json:"code,omitempty"`
	MajorUnit      *CurrencyUnit  `json:"majorUnit,omitempty"`
	ID             *uuid.UUID     `json:"id,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"`
	System         *bool          `json:"system,omitempty"`
	RateUpdateType RateUpdateType `json:"rateUpdateType,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CurrencyService) CreateUpdateMany

func (s *CurrencyService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CurrencyService) DeleteMany

func (s *CurrencyService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*CurrencyService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*CurrencyService) GetNamedFilterByID added in v0.0.8

func (s *CurrencyService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CustomEntityService) CreateElement

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

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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CustomEntityService) DeleteElement

func (s *CustomEntityService) DeleteElement(ctx context.Context, id, elementId uuid.UUID) (bool, *resty.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, *resty.Response, error)

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

func (*CustomEntityService) GetElements

func (s *CustomEntityService) GetElements(ctx context.Context, id uuid.UUID) (*List[CustomEntityElement], *resty.Response, error)

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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*CustomEntityService) UpdateElement

func (s *CustomEntityService) UpdateElement(ctx context.Context, id, elementId uuid.UUID, element *CustomEntityElement) (*CustomEntityElement, *resty.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 {
	Printed               *bool                             `json:"printed,omitempty"`
	Contract              *Contract                         `json:"contract,omitempty"`
	AgentAccount          *AgentAccount                     `json:"agentAccount,omitempty"`
	Applicable            *bool                             `json:"applicable,omitempty"`
	Attributes            *Attributes                       `json:"attributes,omitempty"`
	Code                  *string                           `json:"code,omitempty"`
	Project               *Project                          `json:"project,omitempty"`
	Created               *Timestamp                        `json:"created,omitempty"`
	Deleted               *Timestamp                        `json:"deleted,omitempty"`
	DeliveryPlannedMoment *Timestamp                        `json:"deliveryPlannedMoment,omitempty"`
	Description           *string                           `json:"description,omitempty"`
	Published             *bool                             `json:"published,omitempty"`
	Files                 *Files                            `json:"files,omitempty"`
	Group                 *Group                            `json:"group,omitempty"`
	ID                    *uuid.UUID                        `json:"id,omitempty"`
	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"`
	AccountID             *uuid.UUID                        `json:"accountId,omitempty"`
	Owner                 *Employee                         `json:"owner,omitempty"`
	PayedSum              *float64                          `json:"payedSum,omitempty"`
	Positions             *Positions[CustomerOrderPosition] `json:"positions,omitempty"`
	OrganizationAccount   *AgentAccount                     `json:"organizationAccount,omitempty"`
	Agent                 *Counterparty                     `json:"agent,omitempty"`
	ExternalCode          *string                           `json:"externalCode,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"`
	Prepayments           *Prepayments                      `json:"prepayments,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"`
	TaxSystem             TaxSystem                         `json:"taxSystem,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 {
	Quantity   *float64            `json:"quantity,omitempty"`
	Assortment *AssortmentPosition `json:"assortment,omitempty"`
	Discount   *float64            `json:"discount,omitempty"`
	ID         *uuid.UUID          `json:"id,omitempty"`
	Pack       *Pack               `json:"pack,omitempty"`
	Price      *float64            `json:"price,omitempty"`
	AccountID  *uuid.UUID          `json:"accountId,omitempty"`
	Reserve    *float64            `json:"reserve,omitempty"`
	Shipped    *float64            `json:"shipped,omitempty"`
	Vat        *int                `json:"vat,omitempty"`
	VatEnabled *bool               `json:"vatEnabled,omitempty"`
	Stock      *Stock              `json:"stock,omitempty"`
	TaxSystem  GoodTaxSystem       `json:"taxSystem,omitempty"`
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*CustomerOrderService) CreateAttribute

func (s *CustomerOrderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*CustomerOrderService) CreatePositions

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

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

func (*CustomerOrderService) CreateUpdateMany

func (s *CustomerOrderService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*CustomerOrderService) DeleteAttribute

func (s *CustomerOrderService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *CustomerOrderService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*CustomerOrderService) DeleteMany

func (s *CustomerOrderService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*CustomerOrderService) DeletePositionTrackingCodes

func (s *CustomerOrderService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*CustomerOrderService) GetAttributeByID added in v0.0.8

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

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

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

GetByID Запрос на получение объекта по id.

func (*CustomerOrderService) GetBySyncID added in v0.0.8

func (s *CustomerOrderService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*CustomerOrderService) GetCustomTemplateByID added in v0.0.8

func (s *CustomerOrderService) GetCustomTemplateByID(ctx context.Context, id uuid.UUID) (*CustomTemplate, *resty.Response, error)

GetCustomTemplateByID Запрос на получение информации об отдельном пользовательском шаблоне печатной формы для указанного типа сущности по его id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-otdel-nyj-pol-zowatel-skij-shablon

func (*CustomerOrderService) GetCustomTemplates added in v0.0.8

func (s *CustomerOrderService) GetCustomTemplates(ctx context.Context) (*List[CustomTemplate], *resty.Response, error)

GetCustomTemplates Запрос на получение информации о пользовательских шаблонах печатных форм для указанного типа сущности. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-spisok-pol-zowatel-skih-shablonow

func (*CustomerOrderService) GetEmbeddedTemplateByID added in v0.0.8

func (s *CustomerOrderService) GetEmbeddedTemplateByID(ctx context.Context, id uuid.UUID) (*EmbeddedTemplate, *resty.Response, error)

GetEmbeddedTemplateByID Запрос на получение информации об отдельном стандартном шаблоне печатной формы для указанного типа сущности по его id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-otdel-nyj-standartnyj-shablon

func (*CustomerOrderService) GetEmbeddedTemplates added in v0.0.8

func (s *CustomerOrderService) GetEmbeddedTemplates(ctx context.Context) (*List[EmbeddedTemplate], *resty.Response, error)

GetEmbeddedTemplates Запрос на получение информации о стандартных шаблонах печатных форм для указанного типа сущности. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-spisok-standartnyh-shablonow

func (*CustomerOrderService) GetList added in v0.0.10

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

GetList Запрос на получение списка объектов.

func (*CustomerOrderService) GetMetadata

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

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

func (*CustomerOrderService) GetNamedFilterByID added in v0.0.8

func (s *CustomerOrderService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*CustomerOrderService) GetPositionByID added in v0.0.8

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

GetPositionByID Получение отдельной позиции.

func (*CustomerOrderService) GetPositionTrackingCodes

func (s *CustomerOrderService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*CustomerOrderService) GetPublicationByID added in v0.0.8

func (s *CustomerOrderService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*CustomerOrderService) UpdateAttribute

func (s *CustomerOrderService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type CustomerOrders

type CustomerOrders = Slice[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) 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, *resty.Response, error)

Create Запрос на создание объекта.

func (*DemandService) CreateAttribute

func (s *DemandService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*DemandService) CreatePositions

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

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

func (*DemandService) CreateUpdateMany

func (s *DemandService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*DemandService) DeleteAttribute

func (s *DemandService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *DemandService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*DemandService) DeleteMany

func (s *DemandService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*DemandService) DeletePositionTrackingCodes

func (s *DemandService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*DemandService) GetAttributeByID added in v0.0.8

func (s *DemandService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *DemandService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*DemandService) GetBySyncID added in v0.0.8

func (s *DemandService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*DemandService) GetCustomTemplateByID added in v0.0.8

func (s *DemandService) GetCustomTemplateByID(ctx context.Context, id uuid.UUID) (*CustomTemplate, *resty.Response, error)

GetCustomTemplateByID Запрос на получение информации об отдельном пользовательском шаблоне печатной формы для указанного типа сущности по его id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-otdel-nyj-pol-zowatel-skij-shablon

func (*DemandService) GetCustomTemplates added in v0.0.8

func (s *DemandService) GetCustomTemplates(ctx context.Context) (*List[CustomTemplate], *resty.Response, error)

GetCustomTemplates Запрос на получение информации о пользовательских шаблонах печатных форм для указанного типа сущности. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-spisok-pol-zowatel-skih-shablonow

func (*DemandService) GetEmbeddedTemplateByID added in v0.0.8

func (s *DemandService) GetEmbeddedTemplateByID(ctx context.Context, id uuid.UUID) (*EmbeddedTemplate, *resty.Response, error)

GetEmbeddedTemplateByID Запрос на получение информации об отдельном стандартном шаблоне печатной формы для указанного типа сущности по его id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-otdel-nyj-standartnyj-shablon

func (*DemandService) GetEmbeddedTemplates added in v0.0.8

func (s *DemandService) GetEmbeddedTemplates(ctx context.Context) (*List[EmbeddedTemplate], *resty.Response, error)

GetEmbeddedTemplates Запрос на получение информации о стандартных шаблонах печатных форм для указанного типа сущности. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-shablon-pechatnoj-formy-spisok-standartnyh-shablonow

func (*DemandService) GetList added in v0.0.10

func (s *DemandService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*DemandService) GetMetadata

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

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

func (*DemandService) GetNamedFilterByID added in v0.0.8

func (s *DemandService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*DemandService) GetPositionByID added in v0.0.8

func (s *DemandService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*DemandService) GetPositionTrackingCodes

func (s *DemandService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*DemandService) GetPublicationByID added in v0.0.8

func (s *DemandService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.Response, error)

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

func (*DemandService) PrintDocument added in v0.0.8

func (s *DemandService) PrintDocument(ctx context.Context, id uuid.UUID, PrintDocumentArg *PrintDocumentArg) (*PrintFile, *resty.Response, error)

PrintDocument Запрос на печать документа. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-pechat-dokumentow-zapros-na-pechat

func (*DemandService) Publish

func (s *DemandService) Publish(ctx context.Context, id uuid.UUID, template *Templater) (*Publication, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*DemandService) TemplateBasedOn added in v0.0.7

func (s *DemandService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*DemandService) Update

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

Update Запрос на обновление объекта.

func (*DemandService) UpdateAttribute

func (s *DemandService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type DemandTemplateArg added in v0.0.7

type DemandTemplateArg struct {
	CustomerOrder *MetaWrapper `json:"customerOrder,omitempty"`
}

DemandTemplateArg Документ: Отгрузка (demand) Основание, на котором он может быть создан: - Заказ покупателя (customerorder)

type Demands

type Demands Slice[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, *resty.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, *resty.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, *resty.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, *resty.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, *resty.Response, error)

DeletePersonalDiscount Удалить персональную скидку.

func (*DiscountService) DeleteSpecialPriceDiscount

func (s *DiscountService) DeleteSpecialPriceDiscount(ctx context.Context, id *uuid.UUID) (bool, *resty.Response, error)

DeleteSpecialPriceDiscount Удалить специальную цену. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-udalit-special-nuu-cenu

func (*DiscountService) GetAccumulationDiscounts

func (s *DiscountService) GetAccumulationDiscounts(ctx context.Context, params *Params) (*List[AccumulationDiscount], *resty.Response, error)

GetAccumulationDiscounts Получить все накопительные скидки.

func (*DiscountService) GetByIdAccumulationDiscount

func (s *DiscountService) GetByIdAccumulationDiscount(ctx context.Context, id *uuid.UUID, params *Params) (*AccumulationDiscount, *resty.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, *resty.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, *resty.Response, error)

GetByIdSpecialPriceDiscount Получить специальную цену. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-skidki-poluchit-special-nuu-cenu

func (*DiscountService) GetList added in v0.0.10

func (s *DiscountService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*DiscountService) GetPersonalDiscounts

func (s *DiscountService) GetPersonalDiscounts(ctx context.Context, params *Params) (*List[PersonalDiscount], *resty.Response, error)

GetPersonalDiscounts Получить все персональные скидки.

func (*DiscountService) GetSpecialPriceDiscounts

func (s *DiscountService) GetSpecialPriceDiscounts(ctx context.Context, params *Params) (*List[SpecialPriceDiscount], *resty.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, *resty.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, *resty.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, *resty.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, *resty.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 = Slice[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 {
	AuthorizedIpNetmask *string  `json:"authorizedIpNetmask,omitempty"`
	AuthorizedIpNetwork *string  `json:"authorizedIpNetwork,omitempty"`
	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"`
	AuthorizedHosts     []string `json:"authorizedHosts,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 {
	ProcessingOrder                 OperationPermission        `json:"processingOrder"`
	CustomerOrder                   OperationPermission        `json:"customerOrder"`
	BonusTransaction                OperationPermission        `json:"bonusTransaction"`
	SalesReturn                     OperationPermission        `json:"salesReturn"`
	PriceList                       OperationPermission        `json:"priceList"`
	Enter                           OperationPermission        `json:"enter"`
	RetailSalesReturn               OperationPermission        `json:"retailSalesReturn"`
	RetailDrawerCashOut             OperationPermission        `json:"retailDrawerCashOut"`
	RetailDrawerCashIn              OperationPermission        `json:"retailDrawerCashIn"`
	RetailDemand                    OperationPermission        `json:"retailDemand"`
	CommissionReportOut             OperationPermission        `json:"commissionReportOut"`
	PrepaymentReturn                OperationPermission        `json:"prepaymentReturn"`
	PurchaseReturn                  OperationPermission        `json:"purchaseReturn"`
	PurchaseOrder                   OperationPermission        `json:"purchaseOrder"`
	Supply                          OperationPermission        `json:"supply"`
	Demand                          OperationPermission        `json:"demand"`
	CommissionReportIn              OperationPermission        `json:"commissionReportIn"`
	Prepayment                      OperationPermission        `json:"prepayment"`
	PaymentOut                      OperationPermission        `json:"paymentOut"`
	PaymentIn                       OperationPermission        `json:"paymentIn"`
	Move                            OperationPermission        `json:"move"`
	Loss                            OperationPermission        `json:"loss"`
	InvoiceOut                      OperationPermission        `json:"invoiceOut"`
	InvoiceIn                       OperationPermission        `json:"invoiceIn"`
	CashOut                         OperationPermission        `json:"cashOut"`
	InternalOrder                   OperationPermission        `json:"internalOrder"`
	CashIn                          OperationPermission        `json:"cashIn"`
	FactureOut                      OperationPermission        `json:"factureOut"`
	FactureIn                       OperationPermission        `json:"factureIn"`
	Inventory                       DictionaryPermission       `json:"inventory"`
	AccountAdjustment               DictionaryPermission       `json:"accountAdjustment"`
	Good                            DictionaryPermission       `json:"good"`
	UtilizationReport               DictionaryPermission       `json:"utilizationReport"`
	CashBoxAdjustment               DictionaryPermission       `json:"cashboxAdjustment"`
	RemainsOrder                    DictionaryPermission       `json:"remainsOrder"`
	RemarkingOrder                  DictionaryPermission       `json:"remarkingOrder"`
	Company                         DictionaryPermission       `json:"company"`
	Contract                        DictionaryPermission       `json:"contract"`
	CounterpartyAdjustment          DictionaryPermission       `json:"counterpartyAdjustment"`
	RetailShift                     DictionaryPermission       `json:"retailShift"`
	CRPTCancellation                DictionaryPermission       `json:"crptCancellation"`
	CRPTPackageCreation             DictionaryPermission       `json:"crptPackageCreation"`
	CRPTPackageDisaggregation       DictionaryPermission       `json:"crptPackageDisaggregation"`
	CRPTPackageItemRemoval          DictionaryPermission       `json:"crptPackageItemRemoval"`
	EnrollOrder                     DictionaryPermission       `json:"enrollOrder"`
	AtkAggregation                  DictionaryPermission       `json:"atkAggregation"`
	RetireOrder                     DictionaryPermission       `json:"retireOrder"`
	Script                          ScriptPermission           `json:"script"`
	EmissionOrder                   DictionaryPermission       `json:"emissionOrder"`
	Currency                        BasePermission             `json:"currency"`
	MyCompany                       BasePermission             `json:"myCompany"`
	Employee                        BasePermission             `json:"employee"`
	Warehouse                       BasePermission             `json:"warehouse"`
	Country                         BasePermission             `json:"country"`
	Uom                             BasePermission             `json:"uom"`
	RetailStore                     BasePermission             `json:"retailStore"`
	Project                         BasePermission             `json:"project"`
	ProcessingPlan                  BasePermission             `json:"processingPlan"`
	CustomEntity                    BasePermission             `json:"customEntity"`
	Processing                      BasePermission             `json:"processing"`
	GTINList                        ViewCreateDeletePermission `json:"GTINList"`
	TrackingCodeList                ViewPrintPermission        `json:"trackingCodeList"`
	ViewCashFlow                    bool                       `json:"viewCashFlow"`
	SendEmail                       bool                       `json:"sendEmail"`
	ViewMoneyDashboard              bool                       `json:"viewMoneyDashboard"`
	ViewDashboard                   bool                       `json:"viewDashboard"`
	ViewCustomerBalanceList         bool                       `json:"viewCustomerBalanceList"`
	ViewCompanyCRM                  bool                       `json:"viewCompanyCRM"`
	ViewCommissionGoods             bool                       `json:"viewCommissionGoods"`
	ViewProfitAndLoss               bool                       `json:"viewProfitAndLoss"`
	ViewPurchaseFunnel              bool                       `json:"viewPurchaseFunnel"`
	ViewRecycleBin                  bool                       `json:"viewRecycleBin"`
	ViewSaleProfit                  bool                       `json:"viewSaleProfit"`
	ViewAudit                       bool                       `json:"viewAudit"`
	SubscriptionControl             bool                       `json:"subscriptionControl"`
	ViewProductCostAndProfit        bool                       `json:"viewProductCostAndProfit"`
	RestoreFromRecycleBin           bool                       `json:"restoreFromRecycleBin"`
	PurchaseControl                 bool                       `json:"purchaseControl"`
	OnlineShops                     bool                       `json:"onlineShops"`
	ListenCalls                     bool                       `json:"listenCalls"`
	ImportData                      bool                       `json:"importData"`
	ExportData                      bool                       `json:"exportData"`
	ViewSerialNumbers               bool                       `json:"viewSerialNumbers"`
	EditDocumentsOfRestrictedPeriod bool                       `json:"editDocumentsOfRestrictedPeriod"`
	EditDocumentTemplates           bool                       `json:"editDocumentTemplates"`
	EditCurrencyRateOfDocument      bool                       `json:"editCurrencyRateOfDocument"`
	ViewStockReport                 bool                       `json:"viewStockReport"`
	ViewTurnover                    bool                       `json:"viewTurnover"`
	ApiRequest                      bool                       `json:"apiRequest"`
	DeleteFromRecycleBin            bool                       `json:"deleteFromRecycleBin"`
}

type EmployeeService

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

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

func NewEmployeeService

func NewEmployeeService(client *Client) *EmployeeService

func (*EmployeeService) Activate

func (s *EmployeeService) Activate(ctx context.Context, id *uuid.UUID, permissions *EmployeePermission) (*MailActivationRequired, *resty.Response, error)

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*EmployeeService) CreateAttribute

func (s *EmployeeService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*EmployeeService) DeleteAttribute

func (s *EmployeeService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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, *resty.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) GetAttributeByID added in v0.0.8

func (s *EmployeeService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *EmployeeService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*EmployeeService) GetList added in v0.0.10

func (s *EmployeeService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*EmployeeService) GetMetadata

func (s *EmployeeService) GetMetadata(ctx context.Context) (*T, *resty.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, *resty.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, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*EmployeeService) UpdateAttribute

func (s *EmployeeService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.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, *resty.Response, error)

Create Запрос на создание объекта.

func (*EnterService) CreateAttribute

func (s *EnterService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*EnterService) CreatePositions

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

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

func (*EnterService) CreateUpdateMany

func (s *EnterService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*EnterService) DeleteAttribute

func (s *EnterService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *EnterService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*EnterService) DeleteMany

func (s *EnterService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*EnterService) DeletePositionTrackingCodes

func (s *EnterService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*EnterService) GetAttributeByID added in v0.0.8

func (s *EnterService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *EnterService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*EnterService) GetBySyncID added in v0.0.8

func (s *EnterService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*EnterService) GetList added in v0.0.10

func (s *EnterService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*EnterService) GetMetadata

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

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

func (*EnterService) GetNamedFilterByID added in v0.0.8

func (s *EnterService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*EnterService) GetPositionByID added in v0.0.8

func (s *EnterService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*EnterService) GetPositionTrackingCodes

func (s *EnterService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*EnterService) GetPublicationByID added in v0.0.8

func (s *EnterService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.Response, error)

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

func (*EnterService) Template added in v0.0.7

func (s *EnterService) Template(ctx context.Context) (*T, *resty.Response, error)

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

func (*EnterService) TemplateBasedOn added in v0.0.7

func (s *EnterService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*EnterService) Update

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

Update Запрос на обновление объекта.

func (*EnterService) UpdateAttribute

func (s *EnterService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type EnterTemplateArg added in v0.0.7

type EnterTemplateArg struct {
	Inventory *MetaWrapper `json:"inventory,omitempty"`
}

EnterTemplateArg Документ: Оприходование (enter) Основание, на котором он может быть создан: - Инвентаризация(inventory)

type EntityService

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

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) ProductionStage added in v0.0.15

func (s *EntityService) ProductionStage() *ProductionStageService

func (*EntityService) ProductionStageCompletion added in v0.0.15

func (s *EntityService) ProductionStageCompletion() *ProductionStageCompletionService

func (*EntityService) ProductionTask added in v0.0.15

func (s *EntityService) ProductionTask() *ProductionTaskService

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) Thing added in v0.0.14

func (s *EntityService) Thing() *ThingService

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 ErrUnknownEntity added in v0.0.8

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

func (ErrUnknownEntity) Error added in v0.0.8

func (e ErrUnknownEntity) Error() string

type ErrWrongMetaType

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

func (ErrWrongMetaType) Error added in v0.0.8

func (e ErrWrongMetaType) Error() string

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ExpenseItemService) CreateUpdateMany

func (s *ExpenseItemService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ExpenseItemService) DeleteMany

func (s *ExpenseItemService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

func (s *ExpenseItemService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ExpenseItemService) GetList added in v0.0.10

func (s *ExpenseItemService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ExpenseItemService) Remove

func (s *ExpenseItemService) Remove(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*FactureInService) CreateAttribute

func (s *FactureInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*FactureInService) DeleteAttribute

func (s *FactureInService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *FactureInService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*FactureInService) DeleteMany

func (s *FactureInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*FactureInService) GetAttributeByID added in v0.0.8

func (s *FactureInService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *FactureInService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*FactureInService) GetBySyncID added in v0.0.8

func (s *FactureInService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*FactureInService) GetList added in v0.0.10

func (s *FactureInService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*FactureInService) GetMetadata

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

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

func (*FactureInService) GetPublicationByID added in v0.0.8

func (s *FactureInService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*FactureInService) UpdateAttribute

func (s *FactureInService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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         *Demands         `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, *resty.Response, error)

Create Запрос на создание объекта.

func (*FactureOutService) CreateAttribute

func (s *FactureOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*FactureOutService) DeleteAttribute

func (s *FactureOutService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *FactureOutService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*FactureOutService) DeleteMany

func (s *FactureOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*FactureOutService) GetAttributeByID added in v0.0.8

func (s *FactureOutService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *FactureOutService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*FactureOutService) GetBySyncID added in v0.0.8

func (s *FactureOutService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*FactureOutService) GetList added in v0.0.10

func (s *FactureOutService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*FactureOutService) GetMetadata

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

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

func (*FactureOutService) GetPublicationByID added in v0.0.8

func (s *FactureOutService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*FactureOutService) UpdateAttribute

func (s *FactureOutService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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:"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"`     // Название Файла
}

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 MetaArray[File]

func (*Files) Push added in v0.0.8

func (f *Files) Push(elements ...*File) *Files

Push добавляет элементы в срез. Элементы, превышающее максимальное значение MaxImages, игнорируются

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 {
	FiscalValidityDate Timestamp `json:"fiscalValidityDate,omitempty"`
	FiscalDataVersion  string    `json:"fiscalDataVersion,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 {
	NotSendFirstDocMoment Timestamp              `json:"notSendFirstDocMoment,omitempty"` // Дата последнего неотправленного документа (?)
	Error                 FiscalMemoryStateError `json:"error,omitempty"`                 // Информация об ошибке ФН
	NotSendDocCount       int                    `json:"notSendDocCount,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*GroupService) Delete

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

Delete Запрос на удаление объекта по id.

func (*GroupService) GetByID added in v0.0.8

func (s *GroupService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*GroupService) GetList added in v0.0.10

func (s *GroupService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*GroupService) Update

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

Update Запрос на обновление объекта.

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 MetaArray[Image]

func (*Images) Push added in v0.0.8

func (i *Images) Push(elements ...*Image) *Images

Push добавляет элементы в срез. Элементы, превышающее максимальное значение MaxImages, игнорируются

type IndividualRole added in v0.0.8

type IndividualRole struct {
	Meta Meta `json:"meta,omitempty"`
}

IndividualRole Индивидуальная роль

func (IndividualRole) MetaType added in v0.0.8

func (r IndividualRole) MetaType() MetaType

func (IndividualRole) String added in v0.0.8

func (r IndividualRole) String() string

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                 *Moves                            `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, *resty.Response, error)

Create Запрос на создание объекта.

func (*InternalOrderService) CreateAttribute

func (s *InternalOrderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*InternalOrderService) CreatePositions

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

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

func (*InternalOrderService) CreateUpdateMany

func (s *InternalOrderService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*InternalOrderService) DeleteAttribute

func (s *InternalOrderService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *InternalOrderService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*InternalOrderService) DeleteMany

func (s *InternalOrderService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*InternalOrderService) DeletePositionTrackingCodes

func (s *InternalOrderService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*InternalOrderService) GetAttributeByID added in v0.0.8

func (s *InternalOrderService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *InternalOrderService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*InternalOrderService) GetBySyncID added in v0.0.8

func (s *InternalOrderService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*InternalOrderService) GetList added in v0.0.10

func (s *InternalOrderService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*InternalOrderService) GetMetadata

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

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

func (*InternalOrderService) GetPositionByID added in v0.0.8

func (s *InternalOrderService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*InternalOrderService) GetPositionTrackingCodes

func (s *InternalOrderService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*InternalOrderService) GetPublicationByID added in v0.0.8

func (s *InternalOrderService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*InternalOrderService) UpdateAttribute

func (s *InternalOrderService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*InventoryService) CreateAttribute

func (s *InventoryService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*InventoryService) CreatePositions

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

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

func (*InventoryService) CreateUpdateMany

func (s *InventoryService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*InventoryService) DeleteAttribute

func (s *InventoryService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *InventoryService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*InventoryService) DeleteMany

func (s *InventoryService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*InventoryService) DeletePositionTrackingCodes

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

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

func (*InventoryService) GetAttributeByID added in v0.0.8

func (s *InventoryService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *InventoryService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*InventoryService) GetBySyncID added in v0.0.8

func (s *InventoryService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*InventoryService) GetList added in v0.0.10

func (s *InventoryService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*InventoryService) GetMetadata

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

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

func (*InventoryService) GetPositionByID added in v0.0.8

func (s *InventoryService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*InventoryService) GetPositionTrackingCodes

func (s *InventoryService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*InventoryService) Recalculate

func (s *InventoryService) Recalculate(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*InventoryService) UpdateAttribute

func (s *InventoryService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

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             *Supplies                   `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, *resty.Response, error)

Create Запрос на создание объекта.

func (*InvoiceInService) CreateAttribute

func (s *InvoiceInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*InvoiceInService) CreatePositions

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

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

func (*InvoiceInService) CreateUpdateMany

func (s *InvoiceInService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*InvoiceInService) DeleteAttribute

func (s *InvoiceInService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *InvoiceInService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*InvoiceInService) DeleteMany

func (s *InvoiceInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*InvoiceInService) DeletePositionTrackingCodes

func (s *InvoiceInService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*InvoiceInService) GetAttributeByID added in v0.0.8

func (s *InvoiceInService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *InvoiceInService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*InvoiceInService) GetBySyncID added in v0.0.8

func (s *InvoiceInService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*InvoiceInService) GetList added in v0.0.10

func (s *InvoiceInService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*InvoiceInService) GetMetadata

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

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

func (*InvoiceInService) GetPositionByID added in v0.0.8

func (s *InvoiceInService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*InvoiceInService) GetPositionTrackingCodes

func (s *InvoiceInService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*InvoiceInService) GetPublicationByID added in v0.0.8

func (s *InvoiceInService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*InvoiceInService) TemplateBasedOn added in v0.0.7

func (s *InvoiceInService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*InvoiceInService) Update

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

Update Запрос на обновление объекта.

func (*InvoiceInService) UpdateAttribute

func (s *InvoiceInService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type InvoiceInTemplateArg added in v0.0.7

type InvoiceInTemplateArg struct {
	PurchaseOrder *MetaWrapper `json:"purchaseOrder,omitempty"`
}

InvoiceInTemplateArg Документ: Счет поставщика (invoicein) Основание, на котором он может быть создан: - Заказ поставщику (purchaseorder)

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              *Demands                    `json:"demands,omitempty"`              // Массив ссылок на связанные отгрузки в формате Метаданных
}

InvoiceOut Счет покупателю. Ключевое слово: invoiceout Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-schet-pokupatelu

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*InvoiceOutService) CreateAttribute

func (s *InvoiceOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*InvoiceOutService) CreatePositions

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

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

func (*InvoiceOutService) CreateUpdateMany

func (s *InvoiceOutService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*InvoiceOutService) DeleteAttribute

func (s *InvoiceOutService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *InvoiceOutService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*InvoiceOutService) DeleteMany

func (s *InvoiceOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*InvoiceOutService) DeletePositionTrackingCodes

func (s *InvoiceOutService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*InvoiceOutService) GetAttributeByID added in v0.0.8

func (s *InvoiceOutService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *InvoiceOutService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*InvoiceOutService) GetBySyncID added in v0.0.8

func (s *InvoiceOutService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*InvoiceOutService) GetList added in v0.0.10

func (s *InvoiceOutService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*InvoiceOutService) GetMetadata

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

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

func (*InvoiceOutService) GetPositionByID added in v0.0.8

func (s *InvoiceOutService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*InvoiceOutService) GetPositionTrackingCodes

func (s *InvoiceOutService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*InvoiceOutService) GetPublicationByID added in v0.0.8

func (s *InvoiceOutService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*InvoiceOutService) TemplateBasedOn added in v0.0.7

func (s *InvoiceOutService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*InvoiceOutService) Update

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

Update Запрос на обновление объекта.

func (*InvoiceOutService) UpdateAttribute

func (s *InvoiceOutService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type InvoiceOutTemplateArg added in v0.0.7

type InvoiceOutTemplateArg struct {
	CustomerOrder *MetaWrapper `json:"customerOrder,omitempty"`
}

InvoiceOutTemplateArg Документ: Cчет покупателю (invoiceout) Основание, на котором он может быть создан: - Заказ покупателя (customerorder)

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 = Slice[InvoiceIn]

type InvoicesOut

type InvoicesOut = Slice[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]) 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 = Slice[LastOperation]

type Levels

type Levels = Slice[AccumulationLevel]

type List

type List[T any] struct {
	Context Context        `json:"context"`
	Rows    Slice[T]       `json:"rows"`
	Meta    MetaCollection `json:"meta"`
}

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 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, *resty.Response, error)

Create Запрос на создание объекта.

func (*LossService) CreateAttribute

func (s *LossService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*LossService) CreatePositions

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

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

func (*LossService) CreateUpdateMany

func (s *LossService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*LossService) DeleteAttribute

func (s *LossService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *LossService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*LossService) DeleteMany

func (s *LossService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*LossService) DeletePositionTrackingCodes

func (s *LossService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*LossService) GetAttributeByID added in v0.0.8

func (s *LossService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *LossService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*LossService) GetBySyncID added in v0.0.8

func (s *LossService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*LossService) GetList added in v0.0.10

func (s *LossService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*LossService) GetMetadata

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

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

func (*LossService) GetPositionByID added in v0.0.8

func (s *LossService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*LossService) GetPositionTrackingCodes

func (s *LossService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*LossService) GetPublicationByID added in v0.0.8

func (s *LossService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*LossService) TemplateBasedOn added in v0.0.7

func (s *LossService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*LossService) Update

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

Update Запрос на обновление объекта.

func (*LossService) UpdateAttribute

func (s *LossService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type LossTemplateArg added in v0.0.7

type LossTemplateArg struct {
	SalesReturn *MetaWrapper `json:"salesReturn,omitempty"`
	Inventory   *MetaWrapper `json:"inventory,omitempty"`
}

LossTemplateArg Документ: Списание (loss) Основание, на котором он может быть создан: - Возврат покупателя (salesreturn) - инвентаризация(inventory)

type Losses

type Losses = Slice[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 MarksCheckMode added in v0.0.13

type MarksCheckMode string

MarksCheckMode Продажа маркированных товаров https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-tochka-prodazh-tochki-prodazh-atributy-suschnosti-prodazha-markirowannyh-towarow

const (
	MarksCheckModeCorrectMarksOnly MarksCheckMode = "CORRECT_MARKS_ONLY" // Только проверенные и правильные коды маркировки
	MarksCheckModeWithoutErrors    MarksCheckMode = "WITHOUT_ERRORS"     // Правильные коды и те, которые не удалось проверить
	MarksCheckModeAll              MarksCheckMode = "ALL"                // Все — независимо от результатов проверки кодов
)

type Meta

type Meta struct {
	Href         *string  `json:"href,omitempty"`
	MetadataHref *string  `json:"metadataHref,omitempty"`
	MediaType    *string  `json:"mediaType,omitempty"`
	UUIDHref     *string  `json:"uuidHref,omitempty"`
	DownloadHref *string  `json:"downloadHref,omitempty"`
	Type         MetaType `json:"type,omitempty"`
}

Meta Метаданные объекта. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/workbook/#workbook-metadannye-metadannye-ob-ekta

func (Meta) ID added in v0.0.17

func (m Meta) ID() *uuid.UUID

ID возвращает UUID из поля Href Возвращает nil, если поле Href пусто или не содержит id

func (Meta) String

func (m Meta) String() string

type MetaArray

type MetaArray[T any] struct {
	Rows Slice[T]       `json:"rows,omitempty"`
	Meta MetaCollection `json:"meta,omitempty"`
}

MetaArray Объект с полями meta и rows, где rows - массив объектов

func (MetaArray[T]) MarshalJSON added in v0.0.8

func (m MetaArray[T]) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

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"`
	NextHref     string `json:"nextHref,omitempty"`
	PreviousHref string `json:"previousHref,omitempty"`
	Size         int    `json:"size,omitempty"`
	Limit        int    `json:"limit,omitempty"`
	Offset       int    `json:"offset,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 MetaNameShared added in v0.0.17

type MetaNameShared struct {
	Meta         Meta   `json:"meta,omitempty"`
	Name         string `json:"name,omitempty"`
	CreateShared bool   `json:"createShared,omitempty"`
}

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"
	MetaTypeThing                             MetaType = "thing"
	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"
	MetaTypeProductionTask                    MetaType = "productiontask"
	MetaTypeProductionRow                     MetaType = "productionrow"
	MetaTypeProductionTaskResult              MetaType = "productiontaskresult"
	MetaTypeProductionStage                   MetaType = "productionstage"
	MetaTypeProductionStageCompletion         MetaType = "productionstagecompletion"
	MetaTypeProductionStageCompletionMaterial MetaType = "productionstagecompletionmaterial"
	MetaTypeProductionStageCompletionResult   MetaType = "productionstagecompletionresult"
)

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 {
	Inventory                 AttributesCreateSharedWrapper       `json:"inventory"`
	Prepayment                AttributesCreateSharedWrapper       `json:"prepayment"`
	ProductionsTageCompletion AttributesCreateSharedWrapper       `json:"productionstagecompletion"`
	Enter                     AttributesCreateSharedWrapper       `json:"enter"`
	RetailSalesReturn         AttributesCreateSharedWrapper       `json:"retailsalesreturn"`
	Store                     AttributesCreateSharedWrapper       `json:"store"`
	BonusTransaction          AttributesCreateSharedWrapper       `json:"bonustransaction"`
	PriceList                 AttributesCreateSharedWrapper       `json:"pricelist"`
	PaymentIn                 AttributesCreateSharedWrapper       `json:"paymentin"`
	RetailDrawerCashIn        AttributesCreateSharedWrapper       `json:"retaildrawercashin"`
	Supply                    AttributesCreateSharedWrapper       `json:"supply"`
	CommissionReportIn        AttributesCreateSharedWrapper       `json:"commissionreportin"`
	CommissionReportOut       AttributesCreateSharedWrapper       `json:"commissionreportout"`
	PrepaymentReturn          AttributesCreateSharedWrapper       `json:"prepaymentreturn"`
	RetailShift               AttributesCreateSharedWrapper       `json:"retailshift"`
	Loss                      AttributesCreateSharedWrapper       `json:"loss"`
	FactureOut                AttributesCreateSharedWrapper       `json:"factureout"`
	PurchaseOrder             AttributesCreateSharedWrapper       `json:"purchaseorder"`
	CrptOrder                 AttributesCreateSharedWrapper       `json:"crptorder"`
	Move                      AttributesCreateSharedWrapper       `json:"move"`
	Employee                  AttributesCreateSharedWrapper       `json:"employee"`
	InvoiceOut                AttributesCreateSharedWrapper       `json:"invoiceout"`
	RetailDemand              AttributesCreateSharedWrapper       `json:"retaildemand"`
	SalesReturn               AttributesCreateSharedWrapper       `json:"salesreturn"`
	InternalOrder             AttributesCreateSharedWrapper       `json:"internalorder"`
	Organization              AttributesCreateSharedWrapper       `json:"organization"`
	InvoiceIn                 AttributesCreateSharedWrapper       `json:"invoicein"`
	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"`
	RetailDrawerCashOut       AttributesCreateSharedWrapper       `json:"retaildrawercashout"`
	ProcessingOrder           AttributesCreateSharedWrapper       `json:"processingorder"`
	Project                   AttributesCreateSharedWrapper       `json:"project"`
	FactureOn                 AttributesCreateSharedWrapper       `json:"facturein"`
	CashIn                    AttributesCreateSharedWrapper       `json:"cashin"`
	Contract                  AttributesCreateSharedWrapper       `json:"contract"`
	BonusProgram              AttributesWrapper                   `json:"bonusprogram"`
	ProcessingPlan            AttributesWrapper                   `json:"processingplan"`
	Consignment               AttributesWrapper                   `json:"consignment"`
	Application               MetaWrapper                         `json:"application"`
	ProcessingPlanFolder      MetaWrapper                         `json:"processingplanfolder"`
	ProductFolder             MetaWrapper                         `json:"productfolder"`
	Assortment                Meta                                `json:"assortment"`
	Counterparty              CounterPartyOption                  `json:"counterparty"`
	CompanySettings           MetadataCompanySettings             `json:"companysettings"`
	CustomerOrder             AttributesStatesCreateSharedWrapper `json:"customerorder"`
	Variant                   MetadataVariant                     `json:"variant"`
	Bundle                    MetadataAttributeShared             `json:"bundle"`
	Product                   MetadataAttributeShared             `json:"product"`
	Service                   MetadataAttributeShared             `json:"service"`
}

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 {
	PriceTypes []struct {
		Name string `json:"name,omitempty"`
	} `json:"priceTypes"`
	MetadataAttributeShared // Наименование
}

type MetadataAttributeSharedStates

type MetadataAttributeSharedStates struct {
	States []State `json:"states"`
	MetadataAttributeShared
}

type MetadataCompanySettings

type MetadataCompanySettings struct {
	CustomEntities []MetaNameShared `json:"customEntities"`
	MetadataAttribute
}

type MetadataCounterparty

type MetadataCounterparty struct {
	Tags []string `json:"tags"`
	MetadataAttributeShared
}

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, *resty.Response, error)

Get Запрос (отдельный) на получение объекта. Например, ассортимент, контекст.

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"`
	Series  []PlotSeriesElement `json:"series"`
	Credit  float64             `json:"credit"`
	Debit   float64             `json:"debit"`
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*MoveService) CreateAttribute

func (s *MoveService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*MoveService) CreatePositions

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

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

func (*MoveService) CreateUpdateMany

func (s *MoveService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*MoveService) DeleteAttribute

func (s *MoveService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *MoveService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*MoveService) DeleteMany

func (s *MoveService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*MoveService) DeletePositionTrackingCodes

func (s *MoveService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*MoveService) GetAttributeByID added in v0.0.8

func (s *MoveService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *MoveService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*MoveService) GetBySyncID added in v0.0.8

func (s *MoveService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*MoveService) GetList added in v0.0.10

func (s *MoveService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*MoveService) GetMetadata

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

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

func (*MoveService) GetPositionByID added in v0.0.8

func (s *MoveService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*MoveService) GetPositionTrackingCodes

func (s *MoveService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*MoveService) GetPublicationByID added in v0.0.8

func (s *MoveService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*MoveService) TemplateBasedOn added in v0.0.7

func (s *MoveService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*MoveService) Update

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

Update Запрос на обновление объекта.

func (*MoveService) UpdateAttribute

func (s *MoveService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type MoveTemplateArg added in v0.0.7

type MoveTemplateArg struct {
	InternalOrder *MetaWrapper `json:"internalOrder,omitempty"`
}

MoveTemplateArg Документ: Перемещение (move) Основание, на котором он может быть создан: - Внутренний заказ (internalorder)

type Moves

type Moves Slice[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 {
	Meta        Meta      `json:"meta"`
	Created     Timestamp `json:"created"`
	Description string    `json:"description"`
	Title       string    `json:"title"`
	AccountID   uuid.UUID `json:"accountId"`
	ID          uuid.UUID `json:"id"`
	Read        bool      `json:"read"`
}

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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*NotificationService) GetByID added in v0.0.8

func (s *NotificationService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*NotificationService) GetList added in v0.0.10

func (s *NotificationService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*NotificationService) MarkAsRead

func (s *NotificationService) MarkAsRead(ctx context.Context, id *uuid.UUID) (bool, *resty.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, *resty.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 {
	// Общие поля
	AccountID    *uuid.UUID    `json:"accountId,omitempty"`    // ID учетной записи
	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"`         // Метаданные
	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"`    // Опубликован ли документ
	Shared       *bool         `json:"shared,omitempty"`       // Общий доступ
	SyncID       *uuid.UUID    `json:"syncId,omitempty"`       // ID синхронизации. После заполнения недоступен для изменения
	Updated      *Timestamp    `json:"updated,omitempty"`      // Момент последнего обновления
	VatEnabled   *bool         `json:"vatEnabled,omitempty"`   // Учитывается ли НДС
	VatIncluded  *bool         `json:"vatIncluded,omitempty"`  // Включен ли НДС в цену
	LinkedSum    *float64      `json:"linkedSum,omitempty"`    // Сумма, оплаченная по данному документу
	Payments     *Payments     `json:"payments,omitempty"`     // Массив ссылок на связанные платежи в формате Метаданных
	// contains filtered or unexported fields
}

Operation операция, к которой привязан платёж Представляет из себя структуру из полей: `Meta` для определения типа сущности `LinkedSum` для хранения суммы по операции `data` для хранения сырых данных

func (Operation) CommissionReportIn

func (o Operation) CommissionReportIn() (*CommissionReportIn, error)

func (Operation) CommissionReportOut

func (o Operation) CommissionReportOut() (*CommissionReportOut, error)

func (Operation) CustomerOrder

func (o Operation) CustomerOrder() (*CustomerOrder, error)

func (Operation) Data

func (o Operation) Data() json.RawMessage

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

func (Operation) Demand

func (o Operation) Demand() (*Demand, error)

func (Operation) InvoiceIn

func (o Operation) InvoiceIn() (*InvoiceIn, error)

func (Operation) InvoiceOut

func (o Operation) InvoiceOut() (*InvoiceOut, error)

func (Operation) MetaType

func (o Operation) MetaType() MetaType

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

func (Operation) PurchaseOrder

func (o Operation) PurchaseOrder() (*PurchaseOrder, error)

func (Operation) PurchaseReturn

func (o Operation) PurchaseReturn() (*PurchaseReturn, error)

func (Operation) RetailShift

func (o Operation) RetailShift() (*RetailShift, error)

func (Operation) SalesReturn

func (o Operation) SalesReturn() (*SalesReturn, error)

func (Operation) String

func (o Operation) String() string

func (Operation) Supply

func (o Operation) Supply() (*Supply, error)

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

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 Operations added in v0.0.6

type Operations []Operation

func (Operations) FilterCommissionReportIn added in v0.0.6

func (o Operations) FilterCommissionReportIn() Slice[CommissionReportIn]

func (Operations) FilterCommissionReportOut added in v0.0.6

func (o Operations) FilterCommissionReportOut() Slice[CommissionReportOut]

func (Operations) FilterCustomerOrder added in v0.0.6

func (o Operations) FilterCustomerOrder() Slice[CustomerOrder]

func (Operations) FilterDemand added in v0.0.6

func (o Operations) FilterDemand() Slice[Demand]

func (Operations) FilterInvoiceIn added in v0.0.6

func (o Operations) FilterInvoiceIn() Slice[InvoiceIn]

func (Operations) FilterInvoiceOut added in v0.0.6

func (o Operations) FilterInvoiceOut() Slice[InvoiceOut]

func (Operations) FilterPurchaseOrder added in v0.0.6

func (o Operations) FilterPurchaseOrder() Slice[PurchaseOrder]

func (Operations) FilterPurchaseReturn added in v0.0.6

func (o Operations) FilterPurchaseReturn() Slice[PurchaseReturn]

func (Operations) FilterRetailShift added in v0.0.6

func (o Operations) FilterRetailShift() Slice[RetailShift]

func (Operations) FilterSalesReturn added in v0.0.6

func (o Operations) FilterSalesReturn() Slice[SalesReturn]

func (Operations) FilterSupply added in v0.0.6

func (o Operations) FilterSupply() Slice[Supply]

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 {
	CertificateNumber      *string       `json:"certificateNumber,omitempty"`
	Code                   *string       `json:"code,omitempty"`
	ActualAddressFull      *Address      `json:"actualAddressFull,omitempty"`
	Archived               *bool         `json:"archived,omitempty"`
	BonusPoints            *int          `json:"bonusPoints,omitempty"`
	BonusProgram           *BonusProgram `json:"bonusProgram,omitempty"`
	ChiefAccountSign       *Image        `json:"chiefAccountSign,omitempty"`
	UTMUrl                 *string       `json:"utmUrl,omitempty"`
	Created                *Timestamp    `json:"created,omitempty"`
	Description            *string       `json:"description,omitempty"`
	ExternalCode           *string       `json:"externalCode,omitempty"`
	ChiefAccountant        *string       `json:"chiefAccountant,omitempty"`
	ID                     *uuid.UUID    `json:"id,omitempty"`
	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"`
	TrackingContractDate   *Timestamp    `json:"trackingContractDate,omitempty"`
	TrackingContractNumber *string       `json:"trackingContractNumber,omitempty"`
	AccountID              *uuid.UUID    `json:"accountId,omitempty"`
	Accounts               *MetaWrapper  `json:"accounts,omitempty"`
	Attributes             *Attributes   `json:"attributes,omitempty"`
	CertificateDate        *Timestamp    `json:"certificateDate,omitempty"`
	Updated                *Timestamp    `json:"updated,omitempty"`
	ActualAddress          *string       `json:"actualAddress,omitempty"`
	Group                  *Group        `json:"group,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"`
	CompanyType            CompanyType   `json:"companyType,omitempty"`
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*OrganizationService) CreateAttribute

func (s *OrganizationService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*OrganizationService) DeleteAttribute

func (s *OrganizationService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *OrganizationService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*OrganizationService) DeleteMany

func (s *OrganizationService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetAccountByID added in v0.0.8

func (s *OrganizationService) GetAccountByID(ctx context.Context, id, accountId uuid.UUID) (*AgentAccount, *resty.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], *resty.Response, error)

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

func (*OrganizationService) GetAttributeByID added in v0.0.8

func (s *OrganizationService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *OrganizationService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*OrganizationService) GetBySyncID added in v0.0.8

func (s *OrganizationService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*OrganizationService) GetList added in v0.0.10

func (s *OrganizationService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*OrganizationService) GetMetadata

func (s *OrganizationService) GetMetadata(ctx context.Context) (*T, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*OrganizationService) UpdateAccounts

func (s *OrganizationService) UpdateAccounts(ctx context.Context, id uuid.UUID, accounts []*AgentAccount) (*[]AgentAccount, *resty.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, *resty.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 = Slice[Pack]

type Params

type Params struct {
	MomentFrom  string      `url:"momentFrom,omitempty"`
	GroupBy     GroupByType `url:"groupBy,omitempty"`
	Fields      string      `url:"fields,omitempty"`
	Interval    Interval    `url:"interval,omitempty"`
	Search      string      `url:"search,omitempty"`
	NamedFilter string      `url:"namedfilter,omitempty"`
	MomentTo    string      `url:"momentTo,omitempty"`
	StockType   StockType   `url:"stockType,omitempty"`
	Order       []string    `url:"order,omitempty" del:";"`
	Expand      []string    `url:"expand,omitempty" del:","`
	Filter      []string    `url:"filter,omitempty" del:";"`
	Offset      int         `url:"offset,omitempty"`
	Limit       int         `url:"limit,omitempty"`
	Async       bool        `url:"async,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 Payment added in v0.0.6

type Payment 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"`                     // Метаданные
	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"`         // Сумма включая НДС
	LinkedSum      *float64      `json:"linkedSum,omitempty"`      // Сумма, оплаченная по документу из этого платежа
	Operations     *Operations   `json:"operations,omitempty"`     // Массив ссылок на связанные операции в формате Метаданных
	// contains filtered or unexported fields
}

func (*Payment) ConvertToCashIn added in v0.0.6

func (p *Payment) ConvertToCashIn() (*CashIn, error)

ConvertToCashIn структурирует позицию в *CashIn

func (*Payment) ConvertToCashOut added in v0.0.6

func (p *Payment) ConvertToCashOut() (*CashOut, error)

ConvertToCashOut структурирует позицию в *CashOut

func (*Payment) ConvertToPaymentIn added in v0.0.6

func (p *Payment) ConvertToPaymentIn() (*PaymentIn, error)

ConvertToPaymentIn структурирует позицию в *PaymentIn

func (*Payment) ConvertToPaymentOut added in v0.0.6

func (p *Payment) ConvertToPaymentOut() (*PaymentOut, error)

ConvertToPaymentOut структурирует позицию в *PaymentOut

func (Payment) Data added in v0.0.6

func (p Payment) Data() json.RawMessage

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

func (Payment) MetaType added in v0.0.6

func (p Payment) MetaType() MetaType

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

func (Payment) String added in v0.0.6

func (p Payment) String() string

func (*Payment) UnmarshalJSON added in v0.0.6

func (p *Payment) 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"`          // Ссылка на Счет-фактуру выданный, с которым связан этот платеж в формате Метаданных
	Operations          *Operations   `json:"operations,omitempty"`          // Массив ссылок на связанные операции в формате Метаданных
}

PaymentIn Входящий платеж. Ключевое слово: paymentin Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vhodqschij-platezh

func (*PaymentIn) BindDocuments added in v0.0.6

func (p *PaymentIn) BindDocuments(documentsMeta ...*Meta) *PaymentIn

BindDocuments Привязка платежей к документам. Необходимо передать *Meta документов, к которым необходимо привязать платёж. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-priwqzka-platezhej-k-dokumentam

func (PaymentIn) MetaType

func (p PaymentIn) MetaType() MetaType

func (PaymentIn) String

func (p PaymentIn) String() string

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*PaymentInService) CreateAttribute

func (s *PaymentInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*PaymentInService) DeleteAttribute

func (s *PaymentInService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *PaymentInService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*PaymentInService) DeleteMany

func (s *PaymentInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*PaymentInService) GetAttributeByID added in v0.0.8

func (s *PaymentInService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *PaymentInService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*PaymentInService) GetBySyncID added in v0.0.8

func (s *PaymentInService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*PaymentInService) GetList added in v0.0.10

func (s *PaymentInService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*PaymentInService) GetMetadata

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

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

func (*PaymentInService) GetPublicationByID added in v0.0.8

func (s *PaymentInService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*PaymentInService) TemplateBasedOn added in v0.0.7

func (s *PaymentInService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*PaymentInService) Update

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

Update Запрос на обновление объекта.

func (*PaymentInService) UpdateAttribute

func (s *PaymentInService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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 PaymentInTemplateArg added in v0.0.7

type PaymentInTemplateArg struct {
	CustomerOrder      *MetaWrapper `json:"customerOrder,omitempty"`
	PurchaseReturn     *MetaWrapper `json:"purchaseReturn,omitempty"`
	Demand             *MetaWrapper `json:"demand,omitempty"`
	InvoiceOut         *MetaWrapper `json:"invoiceOut,omitempty"`
	CommissionReportIn *MetaWrapper `json:"commissionReportIn,omitempty"`
}

PaymentInTemplateArg Документ: Входящий платеж (paymentin) Основание, на котором он может быть создан: - Заказ покупателя (customerorder) - Возврат поставщику (purchasereturn) - Отгрузка (demand) - Счет покупателю (invoiceout) - Полученный отчет комиссионера (commissionreportin)

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"`           // Ссылка на Счет-фактуру
	Operations          *Operations   `json:"operations,omitempty"`          // Массив ссылок на связанные операции в формате Метаданных
}

PaymentOut Исходящий платеж. Ключевое слово: paymentout Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-ishodqschij-platezh

func (*PaymentOut) BindDocuments added in v0.0.6

func (p *PaymentOut) BindDocuments(documentsMeta ...*Meta) *PaymentOut

BindDocuments Привязка платежей к документам. Необходимо передать *Meta документов, к которым необходимо привязать платёж. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-obschie-swedeniq-priwqzka-platezhej-k-dokumentam

func (PaymentOut) MetaType

func (p PaymentOut) MetaType() MetaType

func (PaymentOut) String

func (p PaymentOut) String() string

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*PaymentOutService) CreateAttribute

func (s *PaymentOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*PaymentOutService) DeleteAttribute

func (s *PaymentOutService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *PaymentOutService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*PaymentOutService) DeleteMany

func (s *PaymentOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*PaymentOutService) GetAttributeByID added in v0.0.8

func (s *PaymentOutService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *PaymentOutService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*PaymentOutService) GetBySyncID added in v0.0.8

func (s *PaymentOutService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*PaymentOutService) GetList added in v0.0.10

func (s *PaymentOutService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*PaymentOutService) GetMetadata

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

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

func (*PaymentOutService) GetPublicationByID added in v0.0.8

func (s *PaymentOutService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*PaymentOutService) TemplateBasedOn added in v0.0.7

func (s *PaymentOutService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*PaymentOutService) Update

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

Update Запрос на обновление объекта.

func (*PaymentOutService) UpdateAttribute

func (s *PaymentOutService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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 PaymentOutTemplateArg added in v0.0.7

type PaymentOutTemplateArg struct {
	SalesReturn         *MetaWrapper `json:"salesReturn,omitempty"`
	Supply              *MetaWrapper `json:"supply,omitempty"`
	InvoiceIn           *MetaWrapper `json:"invoiceIn,omitempty"`
	PurchaseOrder       *MetaWrapper `json:"purchaseOrder,omitempty"`
	CommissionReportOut *MetaWrapper `json:"commissionReportOut,omitempty"`
}

PaymentOutTemplateArg Документ: Исходящий платеж (paymentout) Основание, на котором он может быть создан: - Возврат покупателя (salesreturn) - Приемка (supply) - Счет поставщика (invoicein) - Заказ поставщику (purchaseorder) - Выданный отчет комиссионера (commissionreportout)

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 []Payment

Payments Входящий платеж, Приходный ордер, Исходящий платеж, Расходный ордер

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]) Push

func (p *Positions[T]) Push(elements ...*T)

type Prepayment

type Prepayment struct {
	Organization  *Organization                  `json:"organization,omitempty"`
	VatIncluded   *bool                          `json:"vatIncluded,omitempty"`
	Applicable    *bool                          `json:"applicable,omitempty"`
	AccountID     *uuid.UUID                     `json:"accountId,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"`
	Group         *Group                         `json:"group,omitempty"`
	ID            *uuid.UUID                     `json:"id,omitempty"`
	Meta          *Meta                          `json:"meta,omitempty"`
	Moment        *Timestamp                     `json:"moment,omitempty"`
	Name          *string                        `json:"name,omitempty"`
	NoCashSum     *float64                       `json:"noCashSum,omitempty"`
	Attributes    *Attributes                    `json:"attributes,omitempty"`
	Agent         *Counterparty                  `json:"agent,omitempty"`
	Printed       *bool                          `json:"printed,omitempty"`
	Positions     *Positions[PrepaymentPosition] `json:"positions,omitempty"`
	Published     *bool                          `json:"published,omitempty"`
	QRSum         *float64                       `json:"qrSum,omitempty"`
	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"`
	VatSum        *float64                       `json:"vatSum,omitempty"`
	Updated       *Timestamp                     `json:"updated,omitempty"`
	VatEnabled    *bool                          `json:"vatEnabled,omitempty"`
	Owner         *Employee                      `json:"owner,omitempty"`
	TaxSystem     TaxSystem                      `json:"taxSystem,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 {
	Owner        *Employee                            `json:"owner,omitempty"`
	Attributes   *Attributes                          `json:"attributes,omitempty"`
	NoCashSum    *float64                             `json:"noCashSum,omitempty"`
	Organization *Organization                        `json:"organization,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"`
	Group        *Group                               `json:"group,omitempty"`
	ID           *uuid.UUID                           `json:"id,omitempty"`
	Meta         *Meta                                `json:"meta,omitempty"`
	Moment       *Timestamp                           `json:"moment,omitempty"`
	Name         *string                              `json:"name,omitempty"`
	Applicable   *bool                                `json:"applicable,omitempty"`
	AccountID    *uuid.UUID                           `json:"accountId,omitempty"`
	Agent        *Counterparty                        `json:"agent,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"`
	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"`
	VatSum       *float64                             `json:"vatSum,omitempty"`
	Updated      *Timestamp                           `json:"updated,omitempty"`
	VatEnabled   *bool                                `json:"vatEnabled,omitempty"`
	VatIncluded  *bool                                `json:"vatIncluded,omitempty"`
	TaxSystem    TaxSystem                            `json:"taxSystem,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, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*PrepaymentReturnService) CreatePositions

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

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

func (*PrepaymentReturnService) DeleteAttribute

func (s *PrepaymentReturnService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *PrepaymentReturnService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*PrepaymentReturnService) DeletePosition

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

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

func (*PrepaymentReturnService) DeletePositionTrackingCodes

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

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

func (*PrepaymentReturnService) GetAttributeByID added in v0.0.8

func (s *PrepaymentReturnService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *PrepaymentReturnService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*PrepaymentReturnService) GetBySyncID added in v0.0.8

func (s *PrepaymentReturnService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*PrepaymentReturnService) GetList added in v0.0.10

func (s *PrepaymentReturnService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*PrepaymentReturnService) GetMetadata

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

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

func (*PrepaymentReturnService) GetPositionByID added in v0.0.8

func (s *PrepaymentReturnService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*PrepaymentReturnService) GetPositionTrackingCodes

func (s *PrepaymentReturnService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*PrepaymentReturnService) Remove

func (s *PrepaymentReturnService) Remove(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type PrepaymentReturns

type PrepaymentReturns = Slice[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, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*PrepaymentService) CreatePositions

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

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

func (*PrepaymentService) Delete

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

Delete Запрос на удаление объекта по id.

func (*PrepaymentService) DeleteAttribute

func (s *PrepaymentService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *PrepaymentService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*PrepaymentService) DeletePosition

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

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

func (*PrepaymentService) DeletePositionTrackingCodes

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

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

func (*PrepaymentService) GetAttributeByID added in v0.0.8

func (s *PrepaymentService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *PrepaymentService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*PrepaymentService) GetBySyncID added in v0.0.8

func (s *PrepaymentService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*PrepaymentService) GetList added in v0.0.10

func (s *PrepaymentService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*PrepaymentService) GetMetadata

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

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

func (*PrepaymentService) GetPositionByID added in v0.0.8

func (s *PrepaymentService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*PrepaymentService) GetPositionTrackingCodes

func (s *PrepaymentService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*PrepaymentService) Remove

func (s *PrepaymentService) Remove(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type Prepayments

type Prepayments = Slice[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 = Slice[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 = Slice[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, *resty.Response, error)

Create Запрос на создание объекта.

func (*PriceListService) CreateAttribute

func (s *PriceListService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*PriceListService) CreatePositions

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

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

func (*PriceListService) CreateUpdateMany

func (s *PriceListService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*PriceListService) DeleteAttribute

func (s *PriceListService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *PriceListService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*PriceListService) DeleteMany

func (s *PriceListService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*PriceListService) DeletePositionTrackingCodes

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

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

func (*PriceListService) GetAttributeByID added in v0.0.8

func (s *PriceListService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *PriceListService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*PriceListService) GetBySyncID added in v0.0.8

func (s *PriceListService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*PriceListService) GetList added in v0.0.10

func (s *PriceListService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*PriceListService) GetMetadata

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

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

func (*PriceListService) GetPositionByID added in v0.0.8

func (s *PriceListService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*PriceListService) GetPositionTrackingCodes

func (s *PriceListService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*PriceListService) Remove

func (s *PriceListService) Remove(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*PriceListService) UpdateAttribute

func (s *PriceListService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

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 = Slice[PriceType]

type PrintDocArgManyElement added in v0.0.8

type PrintDocArgManyElement struct {
	Template *MetaWrapper `json:"template,omitempty"`
	Count    int          `json:"count,omitempty"`
}

func NewPrintDocArgManyElement added in v0.0.8

func NewPrintDocArgManyElement(template Templater, count int) *PrintDocArgManyElement

NewPrintDocArgManyElement создаёт и возвращает *PrintDocArgManyElement, который служит аргументом для метода NewPrintDocArgMany

type PrintDocumentArg added in v0.0.8

type PrintDocumentArg struct {
	Template  *MetaWrapper                   `json:"template,omitempty"`
	Templates *Slice[PrintDocArgManyElement] `json:"templates,omitempty"`
	Extension Extension                      `json:"extension,omitempty"`
}

func NewPrintDocArgMany added in v0.0.8

func NewPrintDocArgMany(templates ...*PrintDocArgManyElement) *PrintDocumentArg

NewPrintDocArgMany создаёт и возвращает заполненный объект для запроса печати документов. Применяется для запроса комплекта документов. Каждый аргумент создаётся с помощью метода NewPrintDocArgManyElement

func NewPrintDocArgOne added in v0.0.8

func NewPrintDocArgOne(template Templater, ext Extension) *PrintDocumentArg

NewPrintDocArgOne создаёт и возвращает заполненный объект для запроса печати документов. Применяется только для запроса 1 документа. Возможные расширения: – ExtensionXLS для документа с расширением .xls – ExtensionPDF для документа с расширением .pdf – ExtensionHTML для документа с расширением .html – ExtensionODS для документа с расширением .ods

type PrintFile

type PrintFile struct {
	*bytes.Buffer
	FileName string
}

func GetFileFromResponse

func GetFileFromResponse(resp *resty.Response) (*PrintFile, error)

func (*PrintFile) Save added in v0.0.8

func (f *PrintFile) Save(path string) error

Save сохраняет полученный файл в указанную папку. Аргументом является директория, в которую необходимо сохранить файл.

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 PrintLabelArg added in v0.0.8

type PrintLabelArg struct {
	Organization MetaWrapper            `json:"organization,omitempty"`
	SalePrice    PrintLabelArgSalePrice `json:"salePrice,omitempty"`
	Template     MetaWrapper            `json:"template,omitempty"`
	Count        int                    `json:"count,omitempty"`
}

func NewPrintLabelArg added in v0.0.8

func NewPrintLabelArg(organization *Organization, priceType *PriceType, template Templater, count int) *PrintLabelArg

NewPrintLabelArg создаёт и возвращает заполненный объект для запроса печати ценников. Аргументы: организация, тип цен, шаблон и кол-во ценников

type PrintLabelArgSalePrice added in v0.0.8

type PrintLabelArgSalePrice 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 {
	Organization        *Organization                     `json:"organization,omitempty"`
	SyncID              *uuid.UUID                        `json:"syncId,omitempty"`
	Attributes          *Attributes                       `json:"attributes,omitempty"`
	Code                *string                           `json:"code,omitempty"`
	Created             *Timestamp                        `json:"created,omitempty"`
	Deleted             *Timestamp                        `json:"deleted,omitempty"`
	AccountID           *uuid.UUID                        `json:"accountId,omitempty"`
	ExternalCode        *string                           `json:"externalCode,omitempty"`
	Files               *Files                            `json:"files,omitempty"`
	Group               *Group                            `json:"group,omitempty"`
	ID                  *uuid.UUID                        `json:"id,omitempty"`
	Moment              *Timestamp                        `json:"moment,omitempty"`
	MaterialsStore      *Store                            `json:"materialsStore,omitempty"`
	Meta                *Meta                             `json:"meta,omitempty"`
	ProcessingOrder     *ProcessingOrder                  `json:"processingOrder,omitempty"`
	Applicable          *bool                             `json:"applicable,omitempty"`
	Description         *string                           `json:"description,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"`
	Updated             *Timestamp                        `json:"updated,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"`
	Name                *string                           `json:"name,omitempty"`
	Products            Slice[ProcessingPositionProduct]  `json:"products,omitempty"`
	Materials           Slice[ProcessingPositionMaterial] `json:"materials,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ProcessingOrderService) CreateAttribute

func (s *ProcessingOrderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*ProcessingOrderService) CreatePositions

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

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

func (*ProcessingOrderService) CreateUpdateMany

func (s *ProcessingOrderService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ProcessingOrderService) DeleteAttribute

func (s *ProcessingOrderService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *ProcessingOrderService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*ProcessingOrderService) DeleteMany

func (s *ProcessingOrderService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*ProcessingOrderService) DeletePositionTrackingCodes

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

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

func (*ProcessingOrderService) GetAttributeByID added in v0.0.8

func (s *ProcessingOrderService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *ProcessingOrderService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProcessingOrderService) GetBySyncID added in v0.0.8

func (s *ProcessingOrderService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*ProcessingOrderService) GetList added in v0.0.10

func (s *ProcessingOrderService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProcessingOrderService) GetMetadata

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

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

func (*ProcessingOrderService) GetPositionByID added in v0.0.8

func (s *ProcessingOrderService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*ProcessingOrderService) GetPositionTrackingCodes

func (s *ProcessingOrderService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*ProcessingOrderService) Remove

func (s *ProcessingOrderService) Remove(ctx context.Context, id uuid.UUID) (bool, *resty.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) (*T, *resty.Response, error)

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

func (*ProcessingOrderService) TemplateBasedOn added in v0.0.7

func (s *ProcessingOrderService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*ProcessingOrderService) Update

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

Update Запрос на обновление объекта.

func (*ProcessingOrderService) UpdateAttribute

func (s *ProcessingOrderService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type ProcessingOrderTemplateArg added in v0.0.7

type ProcessingOrderTemplateArg struct {
	ProcessingPlan *MetaWrapper `json:"processingPlan,omitempty"`
}

ProcessingOrderTemplateArg Документ: Заказ на производство (processingorder) Основание, на котором он может быть создан: - Техкарта (processingplan)

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ProcessingPlanFolderService) Delete

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

Delete Запрос на удаление объекта по id.

func (*ProcessingPlanFolderService) GetByID added in v0.0.8

func (s *ProcessingPlanFolderService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProcessingPlanFolderService) GetList added in v0.0.10

func (s *ProcessingPlanFolderService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProcessingPlanFolderService) GetMetadata

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

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

func (*ProcessingPlanFolderService) GetNamedFilterByID added in v0.0.8

func (s *ProcessingPlanFolderService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

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"` // Метаданные позиции Тех. процесса
	MaterialProcessingPlan    *Meta               `json:"materialProcessingPlan"`              // Метаданные техкарты материала [11-01-2024]
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ProcessingPlanService) CreateMaterial

func (s *ProcessingPlanService) CreateMaterial(ctx context.Context, id uuid.UUID, material *ProcessingPlanMaterial) (*ProcessingPlanMaterial, *resty.Response, error)

func (*ProcessingPlanService) CreateOrUpdatePositionTrackingCodes

func (s *ProcessingPlanService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*ProcessingPlanService) CreatePositions

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

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

func (*ProcessingPlanService) CreateProduct

func (s *ProcessingPlanService) CreateProduct(ctx context.Context, id uuid.UUID, product *ProcessingPlanProduct) (*ProcessingPlanProduct, *resty.Response, error)

func (*ProcessingPlanService) CreateUpdateMany

func (s *ProcessingPlanService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ProcessingPlanService) DeleteMany

func (s *ProcessingPlanService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

func (*ProcessingPlanService) DeletePosition

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

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

func (*ProcessingPlanService) DeletePositionTrackingCodes

func (s *ProcessingPlanService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

func (*ProcessingPlanService) GetByID added in v0.0.8

func (s *ProcessingPlanService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProcessingPlanService) GetList added in v0.0.10

func (s *ProcessingPlanService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProcessingPlanService) GetMaterialById

func (s *ProcessingPlanService) GetMaterialById(ctx context.Context, id, materialId uuid.UUID) (*ProcessingPlanMaterial, *resty.Response, error)

func (*ProcessingPlanService) GetMaterials

func (s *ProcessingPlanService) GetMaterials(ctx context.Context, id uuid.UUID) (*List[ProcessingPlanMaterial], *resty.Response, error)

func (*ProcessingPlanService) GetPositionByID added in v0.0.8

func (s *ProcessingPlanService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*ProcessingPlanService) GetPositionTrackingCodes

func (s *ProcessingPlanService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*ProcessingPlanService) GetProductById

func (s *ProcessingPlanService) GetProductById(ctx context.Context, id, productId uuid.UUID) (*ProcessingPlanProduct, *resty.Response, error)

func (*ProcessingPlanService) GetProducts

func (s *ProcessingPlanService) GetProducts(ctx context.Context, id uuid.UUID) (*List[ProcessingPlanProduct], *resty.Response, error)

func (*ProcessingPlanService) GetStageById

func (s *ProcessingPlanService) GetStageById(ctx context.Context, id, stageId uuid.UUID) (*ProcessingStage, *resty.Response, error)

func (*ProcessingPlanService) GetStages

func (s *ProcessingPlanService) GetStages(ctx context.Context, id uuid.UUID, params *Params) (*MetaArray[ProcessingStage], *resty.Response, error)

func (*ProcessingPlanService) Remove

func (s *ProcessingPlanService) Remove(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*ProcessingPlanService) UpdateMaterial

func (s *ProcessingPlanService) UpdateMaterial(ctx context.Context, id, materialId uuid.UUID, material *ProcessingPlanMaterial) (*ProcessingPlanMaterial, *resty.Response, error)

func (*ProcessingPlanService) UpdatePosition

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

UpdatePosition Обновление позиции.

func (*ProcessingPlanService) UpdateProduct

func (s *ProcessingPlanService) UpdateProduct(ctx context.Context, id, productId uuid.UUID, product *ProcessingPlanProduct) (*ProcessingPlanProduct, *resty.Response, error)

func (*ProcessingPlanService) UpdateStage

func (s *ProcessingPlanService) UpdateStage(ctx context.Context, id, stageId uuid.UUID, stage *ProcessingStage) (*ProcessingStage, *resty.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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ProcessingProcessService) CreateOrUpdatePositionTrackingCodes

func (s *ProcessingProcessService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*ProcessingProcessService) CreatePositions

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

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

func (*ProcessingProcessService) CreateUpdateMany

func (s *ProcessingProcessService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ProcessingProcessService) DeleteMany

func (s *ProcessingProcessService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*ProcessingProcessService) DeletePositionTrackingCodes

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

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

func (*ProcessingProcessService) GetByID added in v0.0.8

func (s *ProcessingProcessService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProcessingProcessService) GetList added in v0.0.10

func (s *ProcessingProcessService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProcessingProcessService) GetNamedFilterByID added in v0.0.8

func (s *ProcessingProcessService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*ProcessingProcessService) GetPositionByID added in v0.0.8

func (s *ProcessingProcessService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*ProcessingProcessService) GetPositionTrackingCodes

func (s *ProcessingProcessService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*ProcessingProcessService) Remove

func (s *ProcessingProcessService) Remove(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*ProcessingProcessService) UpdatePosition

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

UpdatePosition Обновление позиции.

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ProcessingService) CreateAttribute

func (s *ProcessingService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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

func (s *ProcessingService) CreateMaterial(ctx context.Context, id uuid.UUID, material *ProcessingPlanMaterial) (*ProcessingPlanMaterial, *resty.Response, error)

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) (*[]ProcessingPlanMaterial, *resty.Response, error)

CreateMaterials Создать несколько материалов Тех. карты.

func (*ProcessingService) CreateProduct

func (s *ProcessingService) CreateProduct(ctx context.Context, id uuid.UUID, product *ProcessingPlanProduct) (*ProcessingPlanProduct, *resty.Response, error)

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) (*[]ProcessingPlanProduct, *resty.Response, error)

CreateProducts Создать несколько продуктов Тех. карты.

func (*ProcessingService) CreateUpdateMany

func (s *ProcessingService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ProcessingService) DeleteAttribute

func (s *ProcessingService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *ProcessingService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*ProcessingService) DeleteMany

func (s *ProcessingService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.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, *resty.Response, error)

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

func (*ProcessingService) GetAttributeByID added in v0.0.8

func (s *ProcessingService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *ProcessingService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProcessingService) GetBySyncID added in v0.0.8

func (s *ProcessingService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*ProcessingService) GetList added in v0.0.10

func (s *ProcessingService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProcessingService) GetMaterialById

func (s *ProcessingService) GetMaterialById(ctx context.Context, id, materialId uuid.UUID) (*ProcessingPlanMaterial, *resty.Response, error)

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

func (*ProcessingService) GetMaterials

func (s *ProcessingService) GetMaterials(ctx context.Context, id uuid.UUID) (*List[ProcessingPlanMaterial], *resty.Response, error)

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, *resty.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, *resty.Response, error)

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

func (*ProcessingService) GetProducts

func (s *ProcessingService) GetProducts(ctx context.Context, id uuid.UUID) (*List[ProcessingPlanProduct], *resty.Response, error)

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, *resty.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) (*T, *resty.Response, error)

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

func (*ProcessingService) TemplateBasedOn added in v0.0.7

func (s *ProcessingService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*ProcessingService) Update

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

Update Запрос на обновление объекта.

func (*ProcessingService) UpdateAttribute

func (s *ProcessingService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.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, *resty.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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ProcessingStageService) CreateUpdateMany

func (s *ProcessingStageService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ProcessingStageService) DeleteMany

func (s *ProcessingStageService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

func (s *ProcessingStageService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProcessingStageService) GetList added in v0.0.10

func (s *ProcessingStageService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProcessingStageService) GetNamedFilterByID added in v0.0.8

func (s *ProcessingStageService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

type ProcessingTemplateArg added in v0.0.7

type ProcessingTemplateArg struct {
	ProcessingOrder *MetaWrapper `json:"processingOrder,omitempty"`
	ProcessingPlan  *MetaWrapper `json:"processingPlan,omitempty"`
}

ProcessingTemplateArg Документ: Техоперация (processing) Основание, на котором он может быть создан: - Заказ на производство (processingorder) - Техкарта (processingplan)

type Processings

type Processings = Slice[Processing]

type Product

type Product struct {
	MinimumBalance      *float64       `json:"minimumBalance,omitempty"`
	UseParentVat        *bool          `json:"useParentVat,omitempty"`
	Code                *string        `json:"code,omitempty"`
	Description         *string        `json:"description,omitempty"`
	ExternalCode        *string        `json:"externalCode,omitempty"`
	ID                  *uuid.UUID     `json:"id,omitempty"`
	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"`
	Files               *Files         `json:"files,omitempty"`
	Group               *Group         `json:"group,omitempty"`
	Images              *Images        `json:"images,omitempty"`
	IsSerialTrackable   *bool          `json:"isSerialTrackable,omitempty"`
	MinPrice            *MinPrice      `json:"minPrice,omitempty"`
	Volume              *float64       `json:"volume,omitempty"`
	Barcodes            *Barcodes      `json:"barcodes,omitempty"`
	PathName            *string        `json:"pathName,omitempty"`
	Packs               *Packs         `json:"packs,omitempty"`
	PartialDisposal     *bool          `json:"partialDisposal,omitempty"`
	Owner               *Employee      `json:"owner,omitempty"`
	Weight              *float64       `json:"weight,omitempty"`
	PpeType             *string        `json:"ppeType,omitempty"`
	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"`
	AccountID           *uuid.UUID     `json:"accountId,omitempty"`
	Things              *Things        `json:"things,omitempty"`
	Tnved               *string        `json:"tnved,omitempty"`
	VatEnabled          *bool          `json:"vatEnabled,omitempty"`
	Uom                 *Uom           `json:"uom,omitempty"`
	Updated             *Timestamp     `json:"updated,omitempty"`
	OnTap               *bool          `json:"onTap,omitempty"`
	VariantsCount       *int           `json:"variantsCount,omitempty"`
	Vat                 *int           `json:"vat,omitempty"`
	TrackingType        TrackingType   `json:"trackingType,omitempty"`
	TaxSystem           GoodTaxSystem  `json:"taxSystem,omitempty"`
	PaymentItemType     PaymentItem    `json:"paymentItemType,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 {
	Name                *string        `json:"name,omitempty"`
	UseParentVat        *bool          `json:"useParentVat,omitempty"`
	Code                *string        `json:"code,omitempty"`
	Description         *string        `json:"description,omitempty"`
	EffectiveVat        *int           `json:"effectiveVat,omitempty"`
	EffectiveVatEnabled *bool          `json:"effectiveVatEnabled,omitempty"`
	ExternalCode        *string        `json:"externalCode,omitempty"`
	AccountID           *uuid.UUID     `json:"accountId,omitempty"`
	VatEnabled          *bool          `json:"vatEnabled,omitempty"`
	Archived            *bool          `json:"archived,omitempty"`
	Group               *Group         `json:"group,omitempty"`
	Owner               *Employee      `json:"owner,omitempty"`
	PathName            *string        `json:"pathName,omitempty"`
	ProductFolder       *ProductFolder `json:"productFolder,omitempty"`
	Shared              *bool          `json:"shared,omitempty"`
	ID                  *uuid.UUID     `json:"id,omitempty"`
	Updated             *Timestamp     `json:"updated,omitempty"`
	Meta                *Meta          `json:"meta,omitempty"`
	Vat                 *int           `json:"vat,omitempty"`
	TaxSystem           GoodTaxSystem  `json:"taxSystem,omitempty"`
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ProductFolderService) CreateAttribute

func (s *ProductFolderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ProductFolderService) DeleteAttribute

func (s *ProductFolderService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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, *resty.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) GetAttributeByID added in v0.0.8

func (s *ProductFolderService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *ProductFolderService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProductFolderService) GetList added in v0.0.10

func (s *ProductFolderService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProductFolderService) GetMetadata

func (s *ProductFolderService) GetMetadata(ctx context.Context) (*T, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*ProductFolderService) UpdateAttribute

func (s *ProductFolderService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ProductService) CreateAttribute

func (s *ProductService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]Image, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ProductService) DeleteAttribute

func (s *ProductService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *ProductService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*ProductService) DeleteImage

func (s *ProductService) DeleteImage(ctx context.Context, id, imageId uuid.UUID) (bool, *resty.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, *resty.Response, error)

DeleteImages Удалить несколько Изображений. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-udalit-gruppu-izobrazhenij

func (*ProductService) GetAttributeByID added in v0.0.8

func (s *ProductService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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], *resty.Response, error)

GetAudit Запрос на получение событий по сущности с указанным id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/audit/#audit-audit-poluchit-sobytiq-po-suschnosti

func (*ProductService) GetByID added in v0.0.8

func (s *ProductService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProductService) GetBySyncID added in v0.0.8

func (s *ProductService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*ProductService) GetImages

func (s *ProductService) GetImages(ctx context.Context, id uuid.UUID) (*MetaArray[Image], *resty.Response, error)

GetImages Получить список Изображений. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-poluchit-spisok-izobrazhenij-towara-komplekta-i-modifikacii

func (*ProductService) GetList added in v0.0.10

func (s *ProductService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProductService) GetMetadata

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

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

func (*ProductService) GetNamedFilterByID added in v0.0.8

func (s *ProductService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*ProductService) PrintLabel added in v0.0.8

func (s *ProductService) PrintLabel(ctx context.Context, id uuid.UUID, PrintLabelArg *PrintLabelArg) (*PrintFile, *resty.Response, error)

PrintLabel Запрос на печать этикеток и ценников. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*ProductService) UpdateAttribute

func (s *ProductService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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) (*[]Image, *resty.Response, error)

UpdateImages Изменение Изображений (списком). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-izmenenie-spiska-izobrazhenij-u-towara-komplekta-ili-modifikacii

type ProductionRow added in v0.0.15

type ProductionRow struct {
	AccountId        *uuid.UUID      `json:"accountId,omitempty"`        // ID учетной записи
	ExternalCode     *string         `json:"externalCode,omitempty"`     // Внешний код
	ID               *uuid.UUID      `json:"id,omitempty"`               // ID позиции
	Name             *string         `json:"name,omitempty"`             // Наименование
	ProcessingPlan   *ProcessingPlan `json:"processingPlan,omitempty"`   // Метаданные Техкарты
	ProductionVolume *float64        `json:"productionVolume,omitempty"` // Объем производства.
	Updated          *Timestamp      `json:"updated,omitempty"`          // Момент последнего обновления Производственного задания
}

ProductionRow Позиция производственного задания Ключевое слово: productionrow Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-proizwodstwennye-zadaniq-pozicii-proizwodstwennogo-zadaniq

type ProductionStage added in v0.0.15

type ProductionStage struct {
	AccountId          *uuid.UUID                         `json:"accountId,omitempty"`          // ID учетной записи
	ID                 *uuid.UUID                         `json:"id,omitempty"`                 // ID Производственного этапа
	Meta               *Meta                              `json:"meta,omitempty"`               // Метаданные Производственного этапа
	LabourUnitCost     *float64                           `json:"labourUnitCost,omitempty"`     // Затраты на оплату труда за единицу объема производства
	Materials          *Positions[ProductionTaskMaterial] `json:"materials,omitempty"`          // Метаданные Материалов производственного этапа
	OrderingPosition   *int                               `json:"orderingPosition,omitempty"`   // Индекс Производственного этапа в Позиции производственного задания
	Stage              *ProductionStage                   `json:"stage,omitempty"`              // Метаданные Этапа производства
	ProductionRow      *ProductionRow                     `json:"productionRow,omitempty"`      // Метаданные Позиции производственного задания
	TotalQuantity      *float64                           `json:"totalQuantity,omitempty"`      // Объем Производственного этапа. Соответствует объему Позиции производственного задания
	CompletedQuantity  *float64                           `json:"completedQuantity,omitempty"`  // Выполненное количество
	AvailableQuantity  *float64                           `json:"availableQuantity,omitempty"`  // Количество, доступное к выполнению
	BlockedQuantity    *float64                           `json:"blockedQuantity,omitempty"`    // Количество, которое на данный момент выполнять нельзя. Например, ещё не выполнен предыдущий этап
	SkippedQuantity    *float64                           `json:"skippedQuantity,omitempty"`    // Количество, которое не будет выполнено. Например, из-за остановки производства
	ProcessingUnitCost *float64                           `json:"processingUnitCost,omitempty"` // Затраты на единицу объема производства
}

ProductionStage Производственный этап Ключевое слово: productionstage Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-proizwodstwennye-atapy

type ProductionStageCompletion added in v0.0.15

type ProductionStageCompletion struct {
	AccountId          *uuid.UUID                                    `json:"accountId,omitempty"`          // ID учетной записи
	Created            *Timestamp                                    `json:"created,omitempty"`            // Дата создания
	ExternalCode       *string                                       `json:"externalCode,omitempty"`       // Внешний код Выполнения этапа производства
	Group              *Group                                        `json:"group,omitempty"`              // Отдел сотрудника
	ID                 *uuid.UUID                                    `json:"id,omitempty"`                 // ID Выполнения этапа производства
	LabourUnitCost     *float64                                      `json:"labourUnitCost,omitempty"`     // Оплата труда за единицу объема производства
	Materials          *Positions[ProductionStageCompletionMaterial] `json:"materials,omitempty"`          // Метаданные Материалов выполнения этапа производства
	Meta               *Meta                                         `json:"meta,omitempty"`               // Метаданные Выполнения этапа производства
	Moment             *Timestamp                                    `json:"moment,omitempty"`             // Дата документа
	Name               *string                                       `json:"name,omitempty"`               // Наименование Выполнения этапа производства
	Owner              *Employee                                     `json:"owner,omitempty"`              // Владелец (Сотрудник)
	Performer          *Employee                                     `json:"performer,omitempty"`          // Исполнитель (Сотрудник)
	ProcessingUnitCost *float64                                      `json:"processingUnitCost,omitempty"` // Затраты на единицу объема производства
	ProductionStage    *ProductionStage                              `json:"productionStage,omitempty"`    // Производственный этап
	ProductionVolume   *float64                                      `json:"productionVolume,omitempty"`   // Объем производства
	Products           *Positions[ProductionStageCompletionResult]   `json:"products,omitempty"`           // Метаданные Продуктов выполнения этапа производства. Есть только у последнего этапа
	Shared             *bool                                         `json:"shared,omitempty"`             // Общий доступ
	Updated            *Timestamp                                    `json:"updated,omitempty"`            // Момент последнего обновления Выполнения этапа производства
}

ProductionStageCompletion Выполнение этапа производства Ключевое слово: productionstagecompletion Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vypolnenie-atapa-proizwodstwa

type ProductionStageCompletionMaterial added in v0.0.15

type ProductionStageCompletionMaterial struct {
	AccountId        *uuid.UUID          `json:"accountId,omitempty"`        // ID учетной записи
	Assortment       *AssortmentPosition `json:"assortment,omitempty"`       // Метаданные товара/модификации/серии, которую представляет собой позиция
	ConsumedQuantity *float64            `json:"consumedQuantity,omitempty"` // Количество товаров/модификаций данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе
	ID               *uuid.UUID          `json:"id,omitempty"`               // ID позиции
	Things           *Things             `json:"things,omitempty"`           // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута
}

ProductionStageCompletionMaterial Материалы Выполнения этапа производства Ключевое слово: productionstagecompletionmaterial Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vypolnenie-atapa-proizwodstwa-izmenit-vypolnenie-atapa-proizwodstwa-materialy-vypolneniq-atapa-proizwodstwa

type ProductionStageCompletionResult added in v0.0.15

type ProductionStageCompletionResult struct {
	AccountId        *uuid.UUID          `json:"accountId,omitempty"`        // ID учетной записи
	Assortment       *AssortmentPosition `json:"assortment,omitempty"`       // Метаданные товара/модификации/серии, которую представляет собой позиция
	ID               *uuid.UUID          `json:"id,omitempty"`               // ID позиции
	ProducedQuantity *float64            `json:"producedQuantity,omitempty"` // Количество товаров/модификаций данного вида в позиции. Если позиция - товар, у которого включен учет по серийным номерам, то значение в этом поле всегда будет равно количеству серийных номеров для данной позиции в документе
	Things           *Things             `json:"things,omitempty"`           // Серийные номера. Значение данного атрибута игнорируется, если товар позиции не находится на серийном учете. В ином случае количество товаров в позиции будет равно количеству серийных номеров, переданных в значении атрибута
}

ProductionStageCompletionResult Продукт Выполнения этапа производства Ключевое слово: productionstagecompletionresult Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vypolnenie-atapa-proizwodstwa-izmenit-vypolnenie-atapa-proizwodstwa-produkty-vypolneniq-atapa-proizwodstwa

type ProductionStageCompletionService added in v0.0.15

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

ProductionStageCompletionService Сервис для работы с выполнениями этапов производства

func NewProductionStageCompletionService added in v0.0.15

func NewProductionStageCompletionService(client *Client) *ProductionStageCompletionService

func (*ProductionStageCompletionService) Create added in v0.0.15

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

Create Запрос на создание объекта.

func (*ProductionStageCompletionService) CreateMaterial added in v0.0.15

func (s *ProductionStageCompletionService) CreateMaterial(ctx context.Context, id *uuid.UUID, productionStageCompletionMaterial *ProductionStageCompletionMaterial, params *Params) (*ProductionStageCompletionMaterial, *resty.Response, error)

CreateMaterial Добавить Материал выполнения этапа производства. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vypolnenie-atapa-proizwodstwa-dobawit-material-wypolneniq-atapa-proizwodstwa

func (*ProductionStageCompletionService) CreateUpdateMany added in v0.0.15

func (s *ProductionStageCompletionService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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 (*ProductionStageCompletionService) Delete added in v0.0.15

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

Delete Запрос на удаление объекта по id.

func (*ProductionStageCompletionService) DeleteMany added in v0.0.15

func (s *ProductionStageCompletionService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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 (*ProductionStageCompletionService) GetByID added in v0.0.15

func (s *ProductionStageCompletionService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProductionStageCompletionService) GetList added in v0.0.15

func (s *ProductionStageCompletionService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProductionStageCompletionService) GetMaterials added in v0.0.15

func (s *ProductionStageCompletionService) GetMaterials(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[ProductionStageCompletionMaterial], *resty.Response, error)

GetMaterials Получить Материалы выполнения этапа производства. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vypolnenie-atapa-proizwodstwa-poluchit-materialy-wypolneniq-atapa-proizwodstwa

func (*ProductionStageCompletionService) GetProducts added in v0.0.15

func (s *ProductionStageCompletionService) GetProducts(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[ProductionStageCompletionResult], *resty.Response, error)

GetProducts Получить Продукты выполнения этапа производства. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vypolnenie-atapa-proizwodstwa-poluchit-produkty-wypolneniq-atapa-proizwodstwa

func (*ProductionStageCompletionService) Update added in v0.0.15

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

Update Запрос на обновление объекта.

func (*ProductionStageCompletionService) UpdateMaterial added in v0.0.15

func (s *ProductionStageCompletionService) UpdateMaterial(ctx context.Context, id *uuid.UUID, materialID *uuid.UUID, productionStageCompletionMaterial *ProductionStageCompletionMaterial, params *Params) (*ProductionStageCompletionMaterial, *resty.Response, error)

UpdateMaterial Изменить Материал выполнения этапа производства. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vypolnenie-atapa-proizwodstwa-izmenit-material-wypolneniq-atapa-proizwodstwa

func (*ProductionStageCompletionService) UpdateProduct added in v0.0.15

func (s *ProductionStageCompletionService) UpdateProduct(ctx context.Context, id *uuid.UUID, productlID *uuid.UUID, productionStageCompletionResult *ProductionStageCompletionResult, params *Params) (*ProductionStageCompletionResult, *resty.Response, error)

UpdateProduct Изменить Продукт выполнения этапа производства. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-vypolnenie-atapa-proizwodstwa-izmenit-produkt-wypolneniq-atapa-proizwodstwa

type ProductionStageService added in v0.0.15

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

ProductionStageService Сервис для работы с производственными этапами

func NewProductionStageService added in v0.0.15

func NewProductionStageService(client *Client) *ProductionStageService

func (*ProductionStageService) CreateMaterial added in v0.0.15

func (s *ProductionStageService) CreateMaterial(ctx context.Context, id *uuid.UUID, productionTaskMaterial *ProductionTaskMaterial, params *Params) (*ProductionTaskMaterial, *resty.Response, error)

CreateMaterial Добавить Материал к производственному этапу. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-dobawit-material-k-proizwodstwennomu-atapu

func (*ProductionStageService) DeleteMaterial added in v0.0.15

func (s *ProductionStageService) DeleteMaterial(ctx context.Context, id *uuid.UUID, materialID *uuid.UUID) (bool, *resty.Response, error)

DeleteMaterial Удалить Материал производственного этапа. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-udalit-material-proizwodstwennogo-atapa

func (*ProductionStageService) GetMaterials added in v0.0.15

func (s *ProductionStageService) GetMaterials(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[ProductionTaskMaterial], *resty.Response, error)

GetMaterials Получить Материалы производственного этапа. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-poluchit-materialy-proizwodstwennogo-atapa

func (*ProductionStageService) GetProductStages added in v0.0.15

func (s *ProductionStageService) GetProductStages(ctx context.Context, productionTaskID *uuid.UUID, params *Params) (*MetaArray[ProductionStage], *resty.Response, error)

GetProductStages Получить список Производственных этапов Производственного задания. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-poluchit-spisok-proizwodstwennyh-atapow-proizwodstwennogo-zadaniq

func (*ProductionStageService) Update added in v0.0.15

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

Update Запрос на обновление объекта.

func (*ProductionStageService) UpdateMaterial added in v0.0.15

func (s *ProductionStageService) UpdateMaterial(ctx context.Context, id *uuid.UUID, materialID *uuid.UUID, productionTaskMaterial *ProductionTaskMaterial, params *Params) (*ProductionTaskMaterial, *resty.Response, error)

UpdateMaterial Изменить Материал производственного этапа. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-izmenit-material-proizwodstwennogo-atapa

type ProductionTask added in v0.0.15

type ProductionTask 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 Производственного задания
	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"`          // Метаданные юрлица
	Owner                 *Employee                        `json:"owner,omitempty"`                 // Владелец (Сотрудник)
	Printed               *bool                            `json:"printed,omitempty"`               // Напечатан ли документ
	ProductionRows        *Positions[ProductionRow]        `json:"productionRows,omitempty"`        // Метаданные Позиций производственного задания
	ProductionEnd         *Timestamp                       `json:"productionEnd,omitempty"`         // Дата окончания производства
	ProductionStart       *Timestamp                       `json:"productionStart,omitempty"`       // Дата начала производства
	Products              *Positions[ProductionTaskResult] `json:"products,omitempty"`              // Метаданные производимой продукции
	ProductsStore         *Store                           `json:"productsStore,omitempty"`         // Метаданные склада продукции
	Published             *bool                            `json:"published,omitempty"`             // Опубликован ли документ
	Reserve               *bool                            `json:"reserve,omitempty"`               // Флаг резервирования материала Производственного задания
	Shared                *bool                            `json:"shared,omitempty"`                // Общий доступ
	State                 *State                           `json:"state,omitempty"`                 // Метаданные статуса Производственного задания
	Updated               *Timestamp                       `json:"updated,omitempty"`               // Момент последнего обновления Производственного задания
}

ProductionTask Производственное задание Ключевое слово: productiontask Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie

type ProductionTaskMaterial added in v0.0.15

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

ProductionTaskMaterial Материал Производственного этапа Ключевое слово: productiontaskmaterial Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-proizwodstwennye-atapy-materialy-proizwodstwennogo-atapa

type ProductionTaskResult added in v0.0.15

type ProductionTaskResult struct {
	AccountId     *uuid.UUID          `json:"accountId,omitempty"`     // ID учетной записи
	Assortment    *AssortmentPosition `json:"assortment,omitempty"`    // Ссылка на товар/серию/модификацию, которую представляет собой позиция.
	ID            *uuid.UUID          `json:"id,omitempty"`            // ID позиции
	PlanQuantity  *float64            `json:"planQuantity,omitempty"`  // Запланированное для производства количество продукта
	ProductionRow *ProductionRow      `json:"productionRow,omitempty"` // Метаданные Позиции производственного задания
}

ProductionTaskResult Продукт производственного задания Ключевое слово: productiontaskresult https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-proizwodstwennye-zadaniq-produkty-proizwodstwennogo-zadaniq

type ProductionTaskService added in v0.0.15

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

ProductionTaskService Сервис для работы с производственными заданиями

func NewProductionTaskService added in v0.0.15

func NewProductionTaskService(client *Client) *ProductionTaskService

func (*ProductionTaskService) Create added in v0.0.15

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

Create Запрос на создание объекта.

func (*ProductionTaskService) CreateAttribute added in v0.0.15

func (s *ProductionTaskService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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 (*ProductionTaskService) CreateAttributes added in v0.0.15

func (s *ProductionTaskService) CreateAttributes(ctx context.Context, attributes []*Attribute) (*[]Attribute, *resty.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 (*ProductionTaskService) CreateOrUpdatePositionTrackingCodes added in v0.0.15

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

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

func (*ProductionTaskService) CreatePosition added in v0.0.15

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

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

func (*ProductionTaskService) CreatePositions added in v0.0.15

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

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

func (*ProductionTaskService) CreateProduct added in v0.0.15

func (s *ProductionTaskService) CreateProduct(ctx context.Context, id *uuid.UUID, productionTaskResult *ProductionTaskResult, params *Params) (*ProductionTaskResult, *resty.Response, error)

CreateProduct Создать продукт. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-sozdat-produkt

func (*ProductionTaskService) CreateUpdateMany added in v0.0.15

func (s *ProductionTaskService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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 (*ProductionTaskService) Delete added in v0.0.15

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

Delete Запрос на удаление объекта по id.

func (*ProductionTaskService) DeleteAttribute added in v0.0.15

func (s *ProductionTaskService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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 (*ProductionTaskService) DeleteAttributes added in v0.0.15

func (s *ProductionTaskService) DeleteAttributes(ctx context.Context, attributes []*Attribute) (*DeleteManyResponse, *resty.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 (*ProductionTaskService) DeleteMany added in v0.0.15

func (s *ProductionTaskService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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 (*ProductionTaskService) DeletePosition added in v0.0.15

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

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

func (*ProductionTaskService) DeletePositionTrackingCodes added in v0.0.15

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

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

func (*ProductionTaskService) DeleteProduct added in v0.0.15

func (s *ProductionTaskService) DeleteProduct(ctx context.Context, id *uuid.UUID, productID *uuid.UUID) (bool, *resty.Response, error)

DeleteProduct Удалить продукт. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-udalit-produkt

func (*ProductionTaskService) DeleteProductMany added in v0.0.15

func (s *ProductionTaskService) DeleteProductMany(ctx context.Context, id *uuid.UUID) (*DeleteManyResponse, *resty.Response, error)

DeleteProductMany Массовое удаление продуктов Производственного задания. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-udalit-produkt

func (*ProductionTaskService) GetAttributeByID added in v0.0.15

func (s *ProductionTaskService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

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

func (*ProductionTaskService) GetAttributes added in v0.0.15

func (s *ProductionTaskService) GetAttributes(ctx context.Context) (*MetaArray[Attribute], *resty.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 (*ProductionTaskService) GetByID added in v0.0.15

func (s *ProductionTaskService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProductionTaskService) GetList added in v0.0.15

func (s *ProductionTaskService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProductionTaskService) GetMetadata added in v0.0.15

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

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

func (*ProductionTaskService) GetPositionByID added in v0.0.15

func (s *ProductionTaskService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*ProductionTaskService) GetPositionTrackingCodes added in v0.0.15

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

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

func (*ProductionTaskService) GetPositions added in v0.0.15

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

GetPositions Получить все позиции документа.

func (*ProductionTaskService) GetProductByID added in v0.0.15

func (s *ProductionTaskService) GetProductByID(ctx context.Context, id *uuid.UUID, productID *uuid.UUID, params *Params) (*ProductionTaskResult, *resty.Response, error)

GetProductByID Получить продукт производственного задания. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-produkt-proizwodstwennogo-zadaniq

func (*ProductionTaskService) GetProducts added in v0.0.15

func (s *ProductionTaskService) GetProducts(ctx context.Context, id *uuid.UUID, params *Params) (*MetaArray[ProductionTaskResult], *resty.Response, error)

GetProducts Получить Продукты производственного задания. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-poluchit-produkty-proizwodstwennogo-zadaniq

func (*ProductionTaskService) Update added in v0.0.15

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

Update Запрос на обновление объекта.

func (*ProductionTaskService) UpdateAttribute added in v0.0.15

func (s *ProductionTaskService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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 (*ProductionTaskService) UpdatePosition added in v0.0.15

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

UpdatePosition Обновление позиции.

func (*ProductionTaskService) UpdateProduct added in v0.0.15

func (s *ProductionTaskService) UpdateProduct(ctx context.Context, id *uuid.UUID, productID *uuid.UUID, productionTaskResult *ProductionTaskResult, params *Params) (*ProductionTaskResult, *resty.Response, error)

UpdateProduct Изменить продукт. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/documents/#dokumenty-proizwodstwennoe-zadanie-izmenit-produkt

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 {
	Image Meta `json:"image"`
	MetaName
	Uom     MetaName `json:"uom,omitempty"`
	Code    string   `json:"code"`
	Article string   `json:"article"`
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ProjectService) CreateAttribute

func (s *ProjectService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ProjectService) DeleteAttribute

func (s *ProjectService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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, *resty.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) GetAttributeByID added in v0.0.8

func (s *ProjectService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *ProjectService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ProjectService) GetList added in v0.0.10

func (s *ProjectService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ProjectService) GetMetadata

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

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

func (*ProjectService) GetNamedFilterByID added in v0.0.8

func (s *ProjectService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*ProjectService) UpdateAttribute

func (s *ProjectService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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              *Supplies                         `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) 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, *resty.Response, error)

Create Запрос на создание объекта.

func (*PurchaseOrderService) CreateAttribute

func (s *PurchaseOrderService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*PurchaseOrderService) CreatePositions

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

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

func (*PurchaseOrderService) CreateUpdateMany

func (s *PurchaseOrderService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*PurchaseOrderService) DeleteAttribute

func (s *PurchaseOrderService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *PurchaseOrderService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*PurchaseOrderService) DeleteMany

func (s *PurchaseOrderService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*PurchaseOrderService) DeletePositionTrackingCodes

func (s *PurchaseOrderService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*PurchaseOrderService) GetAttributeByID added in v0.0.8

func (s *PurchaseOrderService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *PurchaseOrderService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*PurchaseOrderService) GetBySyncID added in v0.0.8

func (s *PurchaseOrderService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*PurchaseOrderService) GetList added in v0.0.10

func (s *PurchaseOrderService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*PurchaseOrderService) GetMetadata

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

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

func (*PurchaseOrderService) GetNamedFilterByID added in v0.0.8

func (s *PurchaseOrderService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*PurchaseOrderService) GetPositionByID added in v0.0.8

func (s *PurchaseOrderService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*PurchaseOrderService) GetPositionTrackingCodes

func (s *PurchaseOrderService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*PurchaseOrderService) GetPublicationByID added in v0.0.8

func (s *PurchaseOrderService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*PurchaseOrderService) TemplateBasedOn added in v0.0.7

func (s *PurchaseOrderService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*PurchaseOrderService) Update

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

Update Запрос на обновление объекта.

func (*PurchaseOrderService) UpdateAttribute

func (s *PurchaseOrderService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type PurchaseOrderTemplateArg added in v0.0.7

type PurchaseOrderTemplateArg struct {
	InternalOrder *MetaWrapper `json:"internalOrder,omitempty"`
}

PurchaseOrderTemplateArg Документ: Заказ поставщику (purchaseorder) Основание, на котором он может быть создан: - Внутренний заказ (internalorder)

type PurchaseOrders

type PurchaseOrders = Slice[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, *resty.Response, error)

Create Запрос на создание объекта.

func (*PurchaseReturnService) CreateAttribute

func (s *PurchaseReturnService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*PurchaseReturnService) CreatePositions

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

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

func (*PurchaseReturnService) CreateUpdateMany

func (s *PurchaseReturnService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*PurchaseReturnService) DeleteAttribute

func (s *PurchaseReturnService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *PurchaseReturnService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*PurchaseReturnService) DeleteMany

func (s *PurchaseReturnService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*PurchaseReturnService) DeletePositionTrackingCodes

func (s *PurchaseReturnService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*PurchaseReturnService) GetAttributeByID added in v0.0.8

func (s *PurchaseReturnService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *PurchaseReturnService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*PurchaseReturnService) GetBySyncID added in v0.0.8

func (s *PurchaseReturnService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*PurchaseReturnService) GetList added in v0.0.10

func (s *PurchaseReturnService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*PurchaseReturnService) GetMetadata

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

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

func (*PurchaseReturnService) GetNamedFilterByID added in v0.0.8

func (s *PurchaseReturnService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*PurchaseReturnService) GetPositionByID added in v0.0.8

func (s *PurchaseReturnService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*PurchaseReturnService) GetPositionTrackingCodes

func (s *PurchaseReturnService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*PurchaseReturnService) GetPublicationByID added in v0.0.8

func (s *PurchaseReturnService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*PurchaseReturnService) TemplateBasedOn added in v0.0.7

func (s *PurchaseReturnService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*PurchaseReturnService) Update

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

Update Запрос на обновление объекта.

func (*PurchaseReturnService) UpdateAttribute

func (s *PurchaseReturnService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type PurchaseReturnTemplateArg added in v0.0.7

type PurchaseReturnTemplateArg struct {
	Supply *MetaWrapper `json:"supply,omitempty"`
}

PurchaseReturnTemplateArg Документ: Возврат поставщику (purchasereturn) Основание, на котором он может быть создан: - Приемка (supply)

type PurchaseReturns

type PurchaseReturns = Slice[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 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) GetByID added in v0.0.8

func (s *RegionService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*RegionService) GetList added in v0.0.10

func (s *RegionService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

type ReportCounterparty

type ReportCounterparty struct {
	Meta            Meta             `json:"meta"`
	FirstDemandDate Timestamp        `json:"firstDemandDate"`
	Updated         Timestamp        `json:"updated"`
	LastEventDate   Timestamp        `json:"lastEventDate"`
	LastDemandDate  Timestamp        `json:"lastDemandDate"`
	Counterparty    CounterpartyData `json:"counterparty"`
	LastEventText   string           `json:"lastEventText"`
	DemandsCount    int              `json:"demandsCount"`
	DiscountsSum    float64          `json:"discountsSum"`
	DemandsSum      float64          `json:"demandsSum"`
	AverageReceipt  float64          `json:"averageReceipt"`
	BonusBalance    float64          `json:"bonusBalance"`
	Profit          float64          `json:"profit"`
	ReturnsCount    int              `json:"returnsCount"`
	ReturnsSum      float64          `json:"returnsSum"`
	Balance         float64          `json:"balance"`
}

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

func (s *ReportCounterpartyService) GetByCounterparties(ctx context.Context, data *CounterpartiesMeta) (*List[ReportCounterparty], *resty.Response, error)

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, *resty.Response, error)

GetByCounterpartyId Запрос на получение отчета по контрагенту с указанным id Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pokazateli-kontragentow-pokazateli-kontragenta

func (*ReportCounterpartyService) GetList

func (s *ReportCounterpartyService) GetList(ctx context.Context, params *Params) (*List[ReportCounterparty], *resty.Response, error)

GetList Запрос на получение отчета по контрагентам Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pokazateli-kontragentow-poluchit-pokazateli-kontragentow

func (*ReportCounterpartyService) GetListAsync

func (s *ReportCounterpartyService) GetListAsync(ctx context.Context) (*AsyncResultService[List[ReportCounterparty]], *resty.Response, error)

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

func (s *ReportDashboardService) GetByDay(ctx context.Context) (*Dashboard, *resty.Response, error)

GetByDay Запрос на получение показателей за день. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-den

func (*ReportDashboardService) GetByDayAsync

func (s *ReportDashboardService) GetByDayAsync(ctx context.Context) (*AsyncResultService[Dashboard], *resty.Response, error)

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, *resty.Response, error)

GetByMonth Запрос на получение показателей за месяц. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-mesqc

func (*ReportDashboardService) GetByMonthAsync

func (s *ReportDashboardService) GetByMonthAsync(ctx context.Context) (*AsyncResultService[Dashboard], *resty.Response, error)

GetByMonthAsync Запрос на получение показателей за месяц (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-mesqc

func (*ReportDashboardService) GetByWeek

func (s *ReportDashboardService) GetByWeek(ctx context.Context) (*Dashboard, *resty.Response, error)

GetByWeek Запрос на получение показателей за неделю. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-pokazateli-poluchit-pokazateli-za-nedelu

func (*ReportDashboardService) GetByWeekAsync

func (s *ReportDashboardService) GetByWeekAsync(ctx context.Context) (*AsyncResultService[Dashboard], *resty.Response, error)

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], *resty.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]], *resty.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, *resty.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], *resty.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, *resty.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], *resty.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], *resty.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

func (s *ReportProfitService) GetByCounterpartyAsync(ctx context.Context) (*AsyncResultService[List[ProfitByCounterparty]], *resty.Response, error)

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], *resty.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

func (s *ReportProfitService) GetByEmployeeAsync(ctx context.Context) (*AsyncResultService[List[ProfitByEmployee]], *resty.Response, error)

GetByEmployeeAsync Запрос на получение отчета "Прибыльность по сотрудникам" (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-sotrudnikam

func (*ReportProfitService) GetByProduct

func (s *ReportProfitService) GetByProduct(ctx context.Context) (*List[ProfitByProduct], *resty.Response, error)

GetByProduct Запрос на получение отчета "Прибыльность по товарам". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-towaram

func (*ReportProfitService) GetByProductAsync

func (s *ReportProfitService) GetByProductAsync(ctx context.Context) (*AsyncResultService[List[ProfitByProduct]], *resty.Response, error)

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], *resty.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

func (s *ReportProfitService) GetBySalesChannelAsync(ctx context.Context) (*AsyncResultService[List[ProfitBySalesChannel]], *resty.Response, error)

GetBySalesChannelAsync Запрос на получение отчета "Прибыльность по каналам продаж" (асинхронно). Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-kanalam-prodazh

func (*ReportProfitService) GetByVariant

func (s *ReportProfitService) GetByVariant(ctx context.Context) (*List[ProfitByVariant], *resty.Response, error)

GetByVariant Запрос на получение отчета "Прибыльность по модификациям". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-pribyl-nost-poluchit-pribyl-nost-po-modifikaciqm

func (*ReportProfitService) GetByVariantAsync

func (s *ReportProfitService) GetByVariantAsync(ctx context.Context) (*AsyncResultService[List[ProfitByVariant]], *resty.Response, error)

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, *resty.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], *resty.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 {
	// contains filtered or unexported fields
}

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

func (s *ReportStockService) GetAll(ctx context.Context) (*List[StockAll], *resty.Response, error)

GetAll Запрос на получение Расширенного отчета об остатках. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-rasshirennyj-otchet-ob-ostatkah

func (*ReportStockService) GetAllAsync

func (s *ReportStockService) GetAllAsync(ctx context.Context) (*AsyncResultService[List[StockAll]], *resty.Response, error)

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], *resty.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], *resty.Response, error)

GetByStore Запрос на получение отчета "Остатки по складам". Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-ostatki-poluchit-ostatki-po-skladam

func (*ReportStockService) GetByStoreAsync

func (s *ReportStockService) GetByStoreAsync(ctx context.Context) (*AsyncResultService[List[StockByStore]], *resty.Response, error)

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) (*[]StockCurrentAll, *resty.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) (*[]StockCurrentByStore, *resty.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

func (s *ReportTurnoverService) GetAll(ctx context.Context) (*List[TurnoverAll], *resty.Response, error)

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], *resty.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], *resty.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], *resty.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], *resty.Response, error)

GetByStoreWithVariant Отчет обороты по модификации с детализацией по складам. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/reports/#otchety-otchet-oboroty-oboroty-po-towaru-s-detalizaciej-po-skladam

type RequestBuilder

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

func NewRequestBuilder

func NewRequestBuilder[T any](client *Client, uri string) *RequestBuilder[T]

func (*RequestBuilder[T]) Async

func (rb *RequestBuilder[T]) Async(ctx context.Context) (*AsyncResultService[T], *resty.Response, error)

func (*RequestBuilder[T]) Delete

func (rb *RequestBuilder[T]) Delete(ctx context.Context) (bool, *resty.Response, error)

func (*RequestBuilder[T]) Get

func (rb *RequestBuilder[T]) Get(ctx context.Context) (*T, *resty.Response, error)

func (*RequestBuilder[T]) Post

func (rb *RequestBuilder[T]) Post(ctx context.Context, body any) (*T, *resty.Response, error)

func (*RequestBuilder[T]) Put

func (rb *RequestBuilder[T]) Put(ctx context.Context, body any) (*T, *resty.Response, error)

func (*RequestBuilder[T]) SetParams added in v0.0.10

func (rb *RequestBuilder[T]) SetParams(params *Params) *RequestBuilder[T]

type RetailDemand

type RetailDemand struct {
	AccountID           *uuid.UUID                 `json:"accountId,omitempty"`
	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"`
	Fiscal              *bool                      `json:"fiscal,omitempty"`
	FiscalPrinterInfo   *string                    `json:"fiscalPrinterInfo,omitempty"`
	Group               *Group                     `json:"group,omitempty"`
	ID                  *uuid.UUID                 `json:"id,omitempty"`
	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"`
	Printed             *bool                      `json:"printed,omitempty"`
	Project             *Project                   `json:"project,omitempty"`
	Published           *bool                      `json:"published,omitempty"`
	QRSum               *float64                   `json:"qrSum,omitempty"`
	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"`
	Updated             *Timestamp                 `json:"updated,omitempty"`
	VatEnabled          *bool                      `json:"vatEnabled,omitempty"`
	VatIncluded         *bool                      `json:"vatIncluded,omitempty"`
	VatSum              *float64                   `json:"vatSum,omitempty"`
	TaxSystem           TaxSystem                  `json:"taxSystem,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*RetailDemandService) CreateAttribute

func (s *RetailDemandService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*RetailDemandService) CreatePositions

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

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

func (*RetailDemandService) CreateUpdateMany

func (s *RetailDemandService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*RetailDemandService) DeleteAttribute

func (s *RetailDemandService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *RetailDemandService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*RetailDemandService) DeleteMany

func (s *RetailDemandService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*RetailDemandService) DeletePositionTrackingCodes

func (s *RetailDemandService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*RetailDemandService) GetAttributeByID added in v0.0.8

func (s *RetailDemandService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *RetailDemandService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*RetailDemandService) GetBySyncID added in v0.0.8

func (s *RetailDemandService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*RetailDemandService) GetList added in v0.0.10

func (s *RetailDemandService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*RetailDemandService) GetMetadata

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

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

func (*RetailDemandService) GetNamedFilterByID added in v0.0.8

func (s *RetailDemandService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*RetailDemandService) GetPositionByID added in v0.0.8

func (s *RetailDemandService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*RetailDemandService) GetPositionTrackingCodes

func (s *RetailDemandService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*RetailDemandService) GetPublicationByID added in v0.0.8

func (s *RetailDemandService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*RetailDemandService) TemplateBasedOn added in v0.0.7

func (s *RetailDemandService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*RetailDemandService) Update

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

Update Запрос на обновление объекта.

func (*RetailDemandService) UpdateAttribute

func (s *RetailDemandService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type RetailDemandTemplateArg added in v0.0.7

type RetailDemandTemplateArg struct {
	RetailShift   *MetaWrapper `json:"retailShift,omitempty"`
	CustomerOrder *MetaWrapper `json:"customerOrder,omitempty"`
}

RetailDemandTemplateArg Документ: Розничная продажа (retaildemand) Основание, на котором он может быть создан: - Розничная смена - Заказ покупателя

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*RetailDrawerCashInService) CreateAttribute

func (s *RetailDrawerCashInService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*RetailDrawerCashInService) DeleteAttribute

func (s *RetailDrawerCashInService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *RetailDrawerCashInService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*RetailDrawerCashInService) DeleteMany

func (s *RetailDrawerCashInService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*RetailDrawerCashInService) GetAttributeByID added in v0.0.8

func (s *RetailDrawerCashInService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *RetailDrawerCashInService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*RetailDrawerCashInService) GetBySyncID added in v0.0.8

func (s *RetailDrawerCashInService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*RetailDrawerCashInService) GetList added in v0.0.10

func (s *RetailDrawerCashInService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*RetailDrawerCashInService) GetMetadata

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

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

func (*RetailDrawerCashInService) GetNamedFilterByID added in v0.0.8

func (s *RetailDrawerCashInService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*RetailDrawerCashInService) GetPublicationByID added in v0.0.8

func (s *RetailDrawerCashInService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*RetailDrawerCashInService) UpdateAttribute

func (s *RetailDrawerCashInService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

Create Запрос на создание объекта.

func (*RetailDrawerCashOutService) CreateAttribute

func (s *RetailDrawerCashOutService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*RetailDrawerCashOutService) DeleteAttribute

func (s *RetailDrawerCashOutService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *RetailDrawerCashOutService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*RetailDrawerCashOutService) DeleteMany

func (s *RetailDrawerCashOutService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*RetailDrawerCashOutService) GetAttributeByID added in v0.0.8

func (s *RetailDrawerCashOutService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *RetailDrawerCashOutService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*RetailDrawerCashOutService) GetBySyncID added in v0.0.8

func (s *RetailDrawerCashOutService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*RetailDrawerCashOutService) GetList added in v0.0.10

func (s *RetailDrawerCashOutService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*RetailDrawerCashOutService) GetMetadata

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

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

func (*RetailDrawerCashOutService) GetNamedFilterByID added in v0.0.8

func (s *RetailDrawerCashOutService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*RetailDrawerCashOutService) GetPublicationByID added in v0.0.8

func (s *RetailDrawerCashOutService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*RetailDrawerCashOutService) UpdateAttribute

func (s *RetailDrawerCashOutService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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 RetailOperation added in v0.0.6

type RetailOperation struct {
	Meta Meta `json:"meta"`
	// contains filtered or unexported fields
}

func (RetailOperation) Data added in v0.0.6

func (o RetailOperation) Data() json.RawMessage

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

func (RetailOperation) MetaType added in v0.0.6

func (o RetailOperation) MetaType() MetaType

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

func (*RetailOperation) Prepayment added in v0.0.6

func (o *RetailOperation) Prepayment() (*Prepayment, error)

Prepayment структурирует сущность в *Prepayment

func (*RetailOperation) PrepaymentReturn added in v0.0.6

func (o *RetailOperation) PrepaymentReturn() (*PrepaymentReturn, error)

PrepaymentReturn структурирует сущность в *PrepaymentReturn

func (*RetailOperation) RetailDemand added in v0.0.6

func (o *RetailOperation) RetailDemand() (*RetailDemand, error)

RetailDemand структурирует сущность в *RetailDemand

func (*RetailOperation) RetailDrawerCashIn added in v0.0.6

func (o *RetailOperation) RetailDrawerCashIn() (*RetailDrawerCashIn, error)

RetailDrawerCashIn структурирует сущность в *RetailDrawerCashIn

func (*RetailOperation) RetailDrawerCashOut added in v0.0.6

func (o *RetailOperation) RetailDrawerCashOut() (*RetailDrawerCashOut, error)

RetailDrawerCashOut структурирует сущность в *RetailDrawerCashOut

func (*RetailOperation) RetailSalesReturn added in v0.0.6

func (o *RetailOperation) RetailSalesReturn() (*RetailSalesReturn, error)

RetailSalesReturn структурирует сущность в *RetailSalesReturn

func (RetailOperation) String added in v0.0.6

func (o RetailOperation) String() string

func (*RetailOperation) UnmarshalJSON added in v0.0.6

func (o *RetailOperation) UnmarshalJSON(data []byte) error

type RetailOperations added in v0.0.6

type RetailOperations []RetailOperation

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 {
	OrganizationAccount *AgentAccount              `json:"organizationAccount,omitempty"`
	SyncID              *uuid.UUID                 `json:"syncId,omitempty"`
	AgentAccount        *AgentAccount              `json:"agentAccount,omitempty"`
	Applicable          *bool                      `json:"applicable,omitempty"`
	Attributes          *Attributes                `json:"attributes,omitempty"`
	CashSum             *float64                   `json:"cashSum,omitempty"`
	NoCashSum           *float64                   `json:"noCashSum,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"`
	Meta                *Meta                      `json:"meta,omitempty"`
	Moment              *Timestamp                 `json:"moment,omitempty"`
	AccountID           *uuid.UUID                 `json:"accountId,omitempty"`
	Code                *string                    `json:"code,omitempty"`
	Agent               *Counterparty              `json:"agent,omitempty"`
	Name                *string                    `json:"name,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"`
	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"`
	Organization        *Organization              `json:"organization,omitempty"`
	VatSum              *float64                   `json:"vatSum,omitempty"`
	Updated             *Timestamp                 `json:"updated,omitempty"`
	VatEnabled          *bool                      `json:"vatEnabled,omitempty"`
	VatIncluded         *bool                      `json:"vatIncluded,omitempty"`
	TaxSystem           TaxSystem                  `json:"taxSystem,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*RetailSalesReturnService) CreateAttribute

func (s *RetailSalesReturnService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*RetailSalesReturnService) CreatePositions

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

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

func (*RetailSalesReturnService) CreateUpdateMany

func (s *RetailSalesReturnService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*RetailSalesReturnService) DeleteAttribute

func (s *RetailSalesReturnService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *RetailSalesReturnService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*RetailSalesReturnService) DeleteMany

func (s *RetailSalesReturnService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*RetailSalesReturnService) DeletePositionTrackingCodes

func (s *RetailSalesReturnService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*RetailSalesReturnService) GetAttributeByID added in v0.0.8

func (s *RetailSalesReturnService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *RetailSalesReturnService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*RetailSalesReturnService) GetBySyncID added in v0.0.8

func (s *RetailSalesReturnService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*RetailSalesReturnService) GetList added in v0.0.10

func (s *RetailSalesReturnService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*RetailSalesReturnService) GetMetadata

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

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

func (*RetailSalesReturnService) GetNamedFilterByID added in v0.0.8

func (s *RetailSalesReturnService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*RetailSalesReturnService) GetPositionByID added in v0.0.8

func (s *RetailSalesReturnService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*RetailSalesReturnService) GetPositionTrackingCodes

func (s *RetailSalesReturnService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*RetailSalesReturnService) GetPublicationByID added in v0.0.8

func (s *RetailSalesReturnService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*RetailSalesReturnService) UpdateAttribute

func (s *RetailSalesReturnService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

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          *RetailOperations `json:"operations,omitempty"`          // Коллекция метаданных связанных операций
	Organization        *Organization     `json:"organization,omitempty"`        // Метаданные юрлица
	OrganizationAccount *AgentAccount     `json:"organizationAccount,omitempty"` // Метаданные счета юрлица
	Owner               *Employee         `json:"owner,omitempty"`               // Владелец (Сотрудник)
	Payments            *Payments         `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) 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, *resty.Response, error)

Create Запрос на создание объекта.

func (*RetailShiftService) CreateAttribute

func (s *RetailShiftService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*RetailShiftService) DeleteAttribute

func (s *RetailShiftService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *RetailShiftService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*RetailShiftService) GetAttributeByID added in v0.0.8

func (s *RetailShiftService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *RetailShiftService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*RetailShiftService) GetBySyncID added in v0.0.8

func (s *RetailShiftService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*RetailShiftService) GetList added in v0.0.10

func (s *RetailShiftService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*RetailShiftService) GetMetadata

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

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

func (*RetailShiftService) GetNamedFilterByID added in v0.0.8

func (s *RetailShiftService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*RetailShiftService) UpdateAttribute

func (s *RetailShiftService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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 {
	Meta                                *Meta                 `json:"meta,omitempty"`
	AllowCreateProducts                 *bool                 `json:"allowCreateProducts,omitempty"`
	Active                              *bool                 `json:"active,omitempty"`
	AccountID                           *uuid.UUID            `json:"accountId,omitempty"`
	AddressFull                         *Address              `json:"addressFull,omitempty"`
	Updated                             *Timestamp            `json:"updated,omitempty"`
	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"`
	CreateAgentsTags                    *Tags                 `json:"createAgentsTags,omitempty"`
	CreateCashInOnRetailShiftClosing    *bool                 `json:"createCashInOnRetailShiftClosing,omitempty"`
	CreateOrderWithState                *State                `json:"createOrderWithState,omitempty"`
	CreatePaymentInOnRetailShiftClosing *bool                 `json:"createPaymentInOnRetailShiftClosing,omitempty"`
	CustomerOrderStates                 *States               `json:"customerOrderStates,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"`
	Group                               *Group                `json:"group,omitempty"`
	ID                                  *uuid.UUID            `json:"id,omitempty"`
	IdQR                                *string               `json:"idQR,omitempty"`
	IssueOrders                         *bool                 `json:"issueOrders,omitempty"`
	LastOperationNames                  *LastOperations       `json:"lastOperationNames,omitempty"`
	MasterRetailStores                  *RetailStores         `json:"masterRetailStores,omitempty"`
	Address                             *string               `json:"address,omitempty"`
	SyncAgents                          *bool                 `json:"syncAgents,omitempty"`
	Acquire                             *Counterparty         `json:"acquire,omitempty"`
	Store                               *Store                `json:"store,omitempty"`
	State                               *RetailStoreState     `json:"state,omitempty"`
	Name                                *string               `json:"name,omitempty"`
	OFDEnabled                          *bool                 `json:"ofdEnabled,omitempty"`
	OnlyInStock                         *bool                 `json:"onlyInStock,omitempty"`
	Shared                              *bool                 `json:"shared,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"`
	SendMarksForCheck                   *bool                 `json:"sendMarksForCheck,omitempty"`
	ProductFolders                      *ProductFolders       `json:"productFolders,omitempty"`
	QRAcquire                           *Counterparty         `json:"qrAcquire,omitempty"`
	QRBankPercent                       *float64              `json:"qrBankPercent,omitempty"`
	QRPayEnabled                        *bool                 `json:"qrPayEnabled,omitempty"`
	QRTerminalId                        *string               `json:"qrTerminalId,omitempty"`
	ReceiptTemplate                     *Meta                 `json:"receiptTemplate,omitempty"`
	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"`
	ShowBeerOnTap                       *bool                 `json:"showBeerOnTap,omitempty"` // [28-11-2023]
	PriorityOFDSend                     PriorityOfdSend       `json:"priorityOfdSend,omitempty"`
	OrderTaxSystem                      TaxSystem             `json:"orderTaxSystem,omitempty"`
	MinionToMasterType                  MinionToMaster        `json:"minionToMasterType,omitempty"`
	MarkingSellingMode                  MarkingSellingMode    `json:"markingSellingMode,omitempty"`
	FiscalType                          FiscalType            `json:"fiscalType,omitempty"`
	TobaccoMRCControlType               TobaccoMRCControlType `json:"tobaccoMrcControlType,omitempty"`
	DefaultTaxSystem                    TaxSystem             `json:"defaulTaxSystem,omitempty"`
	MarksCheckMode                      MarksCheckMode        `json:"marksCheckMode,omitempty"` // [07-02-2024]
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*RetailStoreService) CreateUpdateMany

func (s *RetailStoreService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*RetailStoreService) DeleteMany

func (s *RetailStoreService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

func (s *RetailStoreService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*RetailStoreService) GetCashierById

func (s *RetailStoreService) GetCashierById(ctx context.Context, id, cashierId uuid.UUID) (*Cashier, *resty.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], *resty.Response, error)

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

func (*RetailStoreService) GetList added in v0.0.10

func (s *RetailStoreService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*RetailStoreService) GetNamedFilterByID added in v0.0.8

func (s *RetailStoreService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

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 {
	LastAttemptMoment Timestamp `json:"lastAttempMoment,omitempty"`
	Message           string    `json:"message,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 = Slice[RetailStore]

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 {
	Endpoint
	// contains filtered or unexported fields
}

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

func NewRoleService

func NewRoleService(client *Client) *RoleService

func (*RoleService) Create

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

Create Запрос на создание объекта.

func (*RoleService) Delete

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

Delete Запрос на удаление объекта по id.

func (*RoleService) GetAdminRole added in v0.0.8

func (s *RoleService) GetAdminRole(ctx context.Context) (*AdminRole, *resty.Response, error)

GetAdminRole Запрос на получение роли админа. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik-zapros-na-poluchenie-roli-admina

func (*RoleService) GetByID added in v0.0.8

func (s *RoleService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*RoleService) GetCashierRole added in v0.0.8

func (s *RoleService) GetCashierRole(ctx context.Context) (*CashierRole, *resty.Response, error)

GetCashierRole Запрос на получение роли кассира. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik-zapros-na-poluchenie-indiwidual-noj-roli

func (*RoleService) GetIndividualRole added in v0.0.8

func (s *RoleService) GetIndividualRole(ctx context.Context) (*IndividualRole, *resty.Response, error)

GetIndividualRole Запрос на получение индивидуальной роли. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sotrudnik-zapros-na-poluchenie-indiwidual-noj-roli

func (*RoleService) GetList added in v0.0.10

func (s *RoleService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*RoleService) Update

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

Update Запрос на обновление объекта.

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 = Slice[SalePrice]

type SalesChannel

type SalesChannel struct {
	ID               *uuid.UUID       `json:"id,omitempty"`
	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"`
	AccountID        *uuid.UUID       `json:"accountId,omitempty"`
	Meta             *Meta            `json:"meta,omitempty"`
	Name             *string          `json:"name,omitempty"`
	Owner            *Employee        `json:"owner,omitempty"`
	Shared           *bool            `json:"shared,omitempty"`
	Updated          *Timestamp       `json:"update,omitempty"`
	SalesChannelType SalesChannelType `json:"type,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*SalesChannelService) CreateUpdateMany

func (s *SalesChannelService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*SalesChannelService) DeleteMany

func (s *SalesChannelService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

func (s *SalesChannelService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*SalesChannelService) GetList added in v0.0.10

func (s *SalesChannelService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*SalesChannelService) Update

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

Update Запрос на обновление объекта.

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*SalesReturnService) CreateAttribute

func (s *SalesReturnService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]TrackingCode, *resty.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, *resty.Response, error)

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

func (*SalesReturnService) CreatePositions

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

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

func (*SalesReturnService) CreateUpdateMany

func (s *SalesReturnService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*SalesReturnService) DeleteAttribute

func (s *SalesReturnService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *SalesReturnService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*SalesReturnService) DeleteMany

func (s *SalesReturnService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*SalesReturnService) DeletePositionTrackingCodes

func (s *SalesReturnService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*SalesReturnService) GetAttributeByID added in v0.0.8

func (s *SalesReturnService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *SalesReturnService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*SalesReturnService) GetBySyncID added in v0.0.8

func (s *SalesReturnService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*SalesReturnService) GetList added in v0.0.10

func (s *SalesReturnService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*SalesReturnService) GetMetadata

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

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

func (*SalesReturnService) GetNamedFilterByID added in v0.0.8

func (s *SalesReturnService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*SalesReturnService) GetPositionByID added in v0.0.8

func (s *SalesReturnService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*SalesReturnService) GetPositionTrackingCodes

func (s *SalesReturnService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*SalesReturnService) GetPublicationByID added in v0.0.8

func (s *SalesReturnService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.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, *resty.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, *resty.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) (*T, *resty.Response, error)

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

func (*SalesReturnService) TemplateBasedOn added in v0.0.7

func (s *SalesReturnService) TemplateBasedOn(ctx context.Context, arg *A) (*T, *resty.Response, error)

TemplateBasedOn Получить предзаполненный стандартными полями объект на основании документа(-ов)

func (*SalesReturnService) Update

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

Update Запрос на обновление объекта.

func (*SalesReturnService) UpdateAttribute

func (s *SalesReturnService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

type SalesReturnTemplateArg added in v0.0.7

type SalesReturnTemplateArg struct {
	Demand       *MetaWrapper `json:"demand,omitempty"`
	RetailDemand *MetaWrapper `json:"retailDemand,omitempty"`
}

SalesReturnTemplateArg Документ: Возврат покупателя (salesreturn) Основание, на котором он может быть создан: - Отгрузка (demand) - Розничная продажа (retaildemand)

type SalesReturns

type SalesReturns = Slice[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 SecurityTokenService

type SecurityTokenService struct {
	Endpoint
}

SecurityTokenService Сервис для получения нового токена

func NewSecurityTokenService

func NewSecurityTokenService(client *Client) *SecurityTokenService

func (*SecurityTokenService) GetNewToken

func (s *SecurityTokenService) GetNewToken(ctx context.Context) (*Token, *resty.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 {
	Files               *Files         `json:"files,omitempty"`
	Code                *string        `json:"code,omitempty"`
	Group               *Group         `json:"group,omitempty"`
	Description         *string        `json:"description,omitempty"`
	ExternalCode        *string        `json:"externalCode,omitempty"`
	ID                  *uuid.UUID     `json:"id,omitempty"`
	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"`
	VatEnabled          *bool          `json:"vatEnabled,omitempty"`
	Barcodes            *Barcodes      `json:"barcodes,omitempty"`
	MinPrice            *MinPrice      `json:"minPrice,omitempty"`
	Owner               *Employee      `json:"owner,omitempty"`
	PathName            *string        `json:"pathName,omitempty"`
	AccountID           *uuid.UUID     `json:"accountId,omitempty"`
	ProductFolder       *ProductFolder `json:"productFolder,omitempty"`
	SalePrices          *SalePrices    `json:"salePrices,omitempty"`
	Shared              *bool          `json:"shared,omitempty"`
	SyncID              *uuid.UUID     `json:"syncId,omitempty"`
	Vat                 *int           `json:"vat,omitempty"`
	Uom                 *Uom           `json:"uom,omitempty"`
	Updated             *Timestamp     `json:"updated,omitempty"`
	UseParentVat        *bool          `json:"useParentVat,omitempty"`
	TaxSystem           TaxSystem      `json:"taxSystem,omitempty"`
	PaymentItemType     PaymentItem    `json:"paymentItemType,omitempty"`
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*ServiceService) CreateUpdateMany

func (s *ServiceService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*ServiceService) DeleteBySyncID added in v0.0.8

func (s *ServiceService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*ServiceService) DeleteMany

func (s *ServiceService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

func (s *ServiceService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ServiceService) GetBySyncID added in v0.0.8

func (s *ServiceService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*ServiceService) GetList added in v0.0.10

func (s *ServiceService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*ServiceService) GetNamedFilterByID added in v0.0.8

func (s *ServiceService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

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]) Filter added in v0.0.8

func (s Slice[E]) Filter(f func(e *E) bool) Slice[E]

Filter фильтрация элементов.

func (Slice[E]) Iter

func (s Slice[E]) Iter() *Iterator[E]

Iter возвращает итератор.

func (*Slice[E]) Pop added in v0.0.8

func (s *Slice[E]) Pop() *E

func (*Slice[E]) Push added in v0.0.8

func (s *Slice[E]) Push(elements ...*E) *Slice[E]

Push добавляет элементы в конец среза.

func (Slice[E]) S added in v0.0.8

func (s Slice[E]) S() []*E

S возвращает простой срез.

func (*Slice[E]) Shift added in v0.0.8

func (s *Slice[E]) Shift() *E

func (*Slice[E]) Unshift added in v0.0.8

func (s *Slice[E]) Unshift(elements ...*E) *Slice[E]

Unshift добавляет элементы в начало среза.

type Slot

type Slot struct {
	AccountID    *uuid.UUID `json:"accountId,omitempty"`    // ID учетной записи
	Barcode      *string    `json:"barcode,omitempty"`      // Штрихкод ячейки [16-10-2023]
	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 = Slice[State]

type StatesElement

type StatesElement struct {
	Meta       Meta   `json:"meta"`
	EntityType string `json:"entityType"`
	StateType  string `json:"stateType"`
	Color      int    `json:"color"`
}

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 {
	Image        Meta        `json:"image"`
	Meta         Meta        `json:"meta"`
	Folder       StockFolder `json:"folder"`
	Uom          MetaName    `json:"uom"`
	Article      string      `json:"article"`
	ExternalCode string      `json:"externalCode"`
	Code         string      `json:"code"`
	Name         string      `json:"name"`
	InTransit    float64     `json:"inTransit"`
	Price        float64     `json:"price"`
	Quantity     float64     `json:"quantity"`
	Reserve      float64     `json:"reserve"`
	SalePrice    float64     `json:"salePrice"`
	Stock        float64     `json:"stock"`
	StockDays    int         `json:"stockDays"`
}

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"`
	Name      string  `json:"name"`
	Stock     float64 `json:"stock"`
	InTransit float64 `json:"inTransit"`
	Reserve   float64 `json:"reserve"`
}

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"  // Доступно. Учитывает резерв и ожидания
	StockReserve   StockType = "reserve"   // Резерв [05-10-2023]
	StockInTransit StockType = "inTransit" // Ожидание [05-10-2023]
)

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*StoreService) CreateAttribute

func (s *StoreService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]Slot, *resty.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) (*[]Zone, *resty.Response, error)

CreateOrUpdateZones Запрос на создание и обновление нескольких Зон склада.

func (*StoreService) CreateSlot

func (s *StoreService) CreateSlot(ctx context.Context, storeId uuid.UUID, slot *Slot) (*Slot, *resty.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, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*StoreService) DeleteAttribute

func (s *StoreService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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, *resty.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, *resty.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, *resty.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, *resty.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, *resty.Response, error)

DeleteZones Запрос на массовое удаление Зон склада. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-sklad-massowoe-udalenie-zon-sklada

func (*StoreService) GetAttributeByID added in v0.0.8

func (s *StoreService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *StoreService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*StoreService) GetList added in v0.0.10

func (s *StoreService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*StoreService) GetMetadata

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

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

func (*StoreService) GetNamedFilterByID added in v0.0.8

func (s *StoreService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.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], *resty.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, *resty.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], *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*StoreService) UpdateAttribute

func (s *StoreService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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, *resty.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, *resty.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"`
	IsSubscriptionChangeAvailable *bool   `json:"isSubscriptionChangeAvailable,omitempty"`
	SubscriptionEndDate           *int64  `json:"subscriptionEndDate,omitempty"`
	Tariff                        Tariff  `json:"tariff,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, *resty.Response, error)

Get Запрос (отдельный) на получение объекта. Например, ассортимент, контекст.

type Supplies

type Supplies Slice[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, *resty.Response, error)

Create Запрос на создание объекта.

func (*SupplyService) CreateAttribute

func (s *SupplyService) CreateAttribute(ctx context.Context, attribute *Attribute) (*Attribute, *resty.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) (*[]Attribute, *resty.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) (*[]File, *resty.Response, error)

CreateFile Добавить Файл.

func (*SupplyService) CreateOrUpdatePositionTrackingCodes

func (s *SupplyService) CreateOrUpdatePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*[]TrackingCode, *resty.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) (*[]State, *resty.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, *resty.Response, error)

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

func (*SupplyService) CreatePositions

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

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

func (*SupplyService) CreateState

func (s *SupplyService) CreateState(ctx context.Context, state *State) (*State, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*SupplyService) DeleteAttribute

func (s *SupplyService) DeleteAttribute(ctx context.Context, id uuid.UUID) (bool, *resty.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, *resty.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 added in v0.0.8

func (s *SupplyService) DeleteBySyncID(ctx context.Context, syncID uuid.UUID) (bool, *resty.Response, error)

DeleteBySyncID Запрос на удаление объекта по syncID.

func (*SupplyService) DeleteFile

func (s *SupplyService) DeleteFile(ctx context.Context, id, fileId uuid.UUID) (bool, *resty.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, *resty.Response, error)

DeleteFiles Удалить несколько Файлов.

func (*SupplyService) DeleteMany

func (s *SupplyService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

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

func (*SupplyService) DeletePositionTrackingCodes

func (s *SupplyService) DeletePositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID, trackingCodes TrackingCodes) (*DeleteManyResponse, *resty.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, *resty.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, *resty.Response, error)

DeleteState Запрос на удаление Статуса с указанным id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-statusy-dokumentow-udalit-status

func (*SupplyService) GetAttributeByID added in v0.0.8

func (s *SupplyService) GetAttributeByID(ctx context.Context, id uuid.UUID) (*Attribute, *resty.Response, error)

GetAttributeByID Получить дополнительное поле по id. Документация МойСклад: 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], *resty.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 added in v0.0.8

func (s *SupplyService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*SupplyService) GetBySyncID added in v0.0.8

func (s *SupplyService) GetBySyncID(ctx context.Context, syncID uuid.UUID) (*T, *resty.Response, error)

GetBySyncID Запрос на получение объекта по syncID.

func (*SupplyService) GetFiles

func (s *SupplyService) GetFiles(ctx context.Context, id uuid.UUID) (*MetaArray[File], *resty.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) GetList added in v0.0.10

func (s *SupplyService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*SupplyService) GetMetadata

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

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

func (*SupplyService) GetNamedFilterByID added in v0.0.8

func (s *SupplyService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.Response, error)

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

func (*SupplyService) GetPositionByID added in v0.0.8

func (s *SupplyService) GetPositionByID(ctx context.Context, id, positionId uuid.UUID, params *Params) (*T, *resty.Response, error)

GetPositionByID Получение отдельной позиции.

func (*SupplyService) GetPositionTrackingCodes

func (s *SupplyService) GetPositionTrackingCodes(ctx context.Context, id, positionId uuid.UUID) (*MetaArray[TrackingCode], *resty.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], *resty.Response, error)

GetPositions Получить все позиции документа.

func (*SupplyService) GetPublicationByID added in v0.0.8

func (s *SupplyService) GetPublicationByID(ctx context.Context, id, publicationId uuid.UUID) (*Publication, *resty.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], *resty.Response, error)

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

func (*SupplyService) GetStateByID added in v0.0.8

func (s *SupplyService) GetStateByID(ctx context.Context, id uuid.UUID) (*State, *resty.Response, error)

GetStateByID Запрос на получение статуса по id.

func (*SupplyService) PrintDocument added in v0.0.8

func (s *SupplyService) PrintDocument(ctx context.Context, id uuid.UUID, PrintDocumentArg *PrintDocumentArg) (*PrintFile, *resty.Response, error)

PrintDocument Запрос на печать документа. Документация МойСклад: 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, *resty.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, *resty.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) (*T, *resty.Response, error)

Template Получить предзаполненный стандартными полями объект. Документация МойСклад: 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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*SupplyService) UpdateAttribute

func (s *SupplyService) UpdateAttribute(ctx context.Context, id uuid.UUID, attribute *Attribute) (*Attribute, *resty.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) (*[]File, *resty.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, *resty.Response, error)

UpdatePosition Обновление позиции.

func (*SupplyService) UpdateState

func (s *SupplyService) UpdateState(ctx context.Context, id uuid.UUID, state *State) (*State, *resty.Response, error)

UpdateState Изменить существующий статус. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-statusy-dokumentow-izmenit-status

type Tags

type Tags = []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 = Slice[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, *resty.Response, error)

Create Запрос на создание объекта.

func (*TaskService) CreateNote

func (s *TaskService) CreateNote(ctx context.Context, taskId uuid.UUID, taskNote *TaskNote) (*TaskNote, *resty.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) (*[]TaskNote, *resty.Response, error)

CreateNotes Запрос на создание нескольких комментариев к Задаче.

func (*TaskService) CreateUpdateMany

func (s *TaskService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*TaskService) DeleteMany

func (s *TaskService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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, *resty.Response, error)

DeleteNote Запрос на удаление отдельного комментария к Задаче с указанным id. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-zadacha-udalit-kommentarij

func (*TaskService) GetByID added in v0.0.8

func (s *TaskService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*TaskService) GetList added in v0.0.10

func (s *TaskService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*TaskService) GetNamedFilterByID added in v0.0.8

func (s *TaskService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.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], *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*TaskService) UpdateNote

func (s *TaskService) UpdateNote(ctx context.Context, taskId, taskNoteId uuid.UUID, taskNote *TaskNote) (*TaskNote, *resty.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, *resty.Response, error)

Create Запрос на создание объекта.

func (*TaxRateService) CreateUpdateMany

func (s *TaxRateService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*TaxRateService) DeleteMany

func (s *TaxRateService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

func (s *TaxRateService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*TaxRateService) GetList added in v0.0.10

func (s *TaxRateService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*TaxRateService) Update

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

Update Запрос на обновление объекта.

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) GetMeta added in v0.0.8

func (t Template) GetMeta() *Meta

func (Template) GetType added in v0.0.8

func (t Template) GetType() TemplateType

func (Template) String

func (t Template) String() string

type TemplateArg added in v0.0.7

TemplateArg типы, которые могут быть использованы в качестве документа-основания при запросе на создание шаблона документа

type TemplateType

type TemplateType string
const (
	TemplateTypeEntity     TemplateType = "entity"     // Документ
	TemplateTypePriceType  TemplateType = "pricetype"  // Ценник/этикетка
	TemplateTypeMXTemplate TemplateType = "mxtemplate" // Ценник/этикетка нового формата
)

type Templater

type Templater interface {
	HasMeta
	GetType() TemplateType
}

type Thing added in v0.0.14

type Thing struct {
	AccountId   *uuid.UUID `json:"accountId,omitempty"`   // ID учетной записи
	Description *string    `json:"description,omitempty"` // Описание Серийного номера
	ID          *uuid.UUID `json:"id,omitempty"`          // ID Серийного номера
	Meta        *Meta      `json:"meta,omitempty"`        // Метаданные о Серийном номере
	Name        *string    `json:"name,omitempty"`        // Наименование Серийного номера
}

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

func (Thing) MetaType added in v0.0.14

func (t Thing) MetaType() MetaType

func (Thing) String added in v0.0.14

func (t Thing) String() string

type ThingService added in v0.0.14

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

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

func NewThingService added in v0.0.14

func NewThingService(client *Client) *ThingService

func (*ThingService) GetByID added in v0.0.14

func (s *ThingService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*ThingService) GetList added in v0.0.14

func (s *ThingService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

type Things

type Things = []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    Slice[TrackingCode] `json:"trackingCodes,omitempty"`      // Массив вложенных кодов маркировки. Может присутствовать, только если type имеет значения consumerpack или transportpack
	TrackingCode1162 Slice[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 = Slice[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 (
	TrackingTypeFoodSupplement TrackingType = "FOOD_SUPPLEMENT" // [22-12-2023]
	TrackingTypeBeerAlcohol    TrackingType = "BEER_ALCOHOL"    // [26-10-2023]
	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, *resty.Response, error)

Create Запрос на создание объекта.

func (*UomService) CreateUpdateMany

func (s *UomService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*UomService) DeleteMany

func (s *UomService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

func (s *UomService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*UomService) GetList added in v0.0.10

func (s *UomService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*UomService) Update

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

Update Запрос на обновление объекта.

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, *resty.Response, error)

Get Запрос (отдельный) на получение объекта. Например, ассортимент, контекст.

func (*UserSettingsService) Update

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

Update Запрос на обновление объекта.

type Variant

type Variant struct {
	Archived           *bool            `json:"archived,omitempty"`
	Updated            *Timestamp       `json:"updated,omitempty"`
	AccountID          *uuid.UUID       `json:"accountId,omitempty"`
	Description        *string          `json:"description,omitempty"`
	ExternalCode       *string          `json:"externalCode,omitempty"`
	ID                 *uuid.UUID       `json:"id,omitempty"`
	Meta               *Meta            `json:"meta,omitempty"`
	Name               *string          `json:"name,omitempty"`
	Code               *string          `json:"code,omitempty"`
	Barcodes           *Barcodes        `json:"barcodes,omitempty"`
	DiscountProhibited *bool            `json:"discountProhibited,omitempty"`
	Characteristics    *Characteristics `json:"characteristics,omitempty"`
	Images             *Images          `json:"images,omitempty"`
	MinPrice           *MinPrice        `json:"minPrice,omitempty"`
	BuyPrice           *BuyPrice        `json:"buyPrice,omitempty"`
	Product            *Product         `json:"product,omitempty"`
	SalePrices         *SalePrices      `json:"salePrices,omitempty"`
	Things             *Things          `json:"things,omitempty"`
	Packs              []VariantPack    `json:"packs,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*VariantService) CreateCharacteristic

func (s *VariantService) CreateCharacteristic(ctx context.Context, characteristic *Characteristic) (*Characteristic, *resty.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) (*[]Characteristic, *resty.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) (*[]Image, *resty.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, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*VariantService) DeleteCharacteristic

func (s *VariantService) DeleteCharacteristic(ctx context.Context, id *uuid.UUID) (bool, *resty.Response, error)

DeleteCharacteristic Удалить характеристику.

func (*VariantService) DeleteImage

func (s *VariantService) DeleteImage(ctx context.Context, id, imageId uuid.UUID) (bool, *resty.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, *resty.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, *resty.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) GetByID added in v0.0.8

func (s *VariantService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*VariantService) GetCharacteristicById

func (s *VariantService) GetCharacteristicById(ctx context.Context, id *uuid.UUID) (*Characteristic, *resty.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], *resty.Response, error)

GetImages Получить список Изображений. Документация МойСклад: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-izobrazhenie-poluchit-spisok-izobrazhenij-towara-komplekta-i-modifikacii

func (*VariantService) GetList added in v0.0.10

func (s *VariantService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*VariantService) GetMetadata

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

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

func (*VariantService) GetNamedFilterByID added in v0.0.8

func (s *VariantService) GetNamedFilterByID(ctx context.Context, id uuid.UUID) (*NamedFilter, *resty.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], *resty.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, *resty.Response, error)

Update Запрос на обновление объекта.

func (*VariantService) UpdateCharacteristic

func (s *VariantService) UpdateCharacteristic(ctx context.Context, id *uuid.UUID, characteristic *Characteristic) (*Characteristic, *resty.Response, error)

UpdateCharacteristic Изменить характеристику.

func (*VariantService) UpdateImages

func (s *VariantService) UpdateImages(ctx context.Context, id uuid.UUID, images []*Image) (*[]Image, *resty.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 {
	AuditContext AuditContext `json:"auditContext,omitempty"`
	Events       Slice[Event] `json:"events,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, *resty.Response, error)

Create Запрос на создание объекта.

func (*WebhookService) CreateUpdateMany

func (s *WebhookService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*WebhookService) DeleteMany

func (s *WebhookService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

func (s *WebhookService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*WebhookService) GetList added in v0.0.10

func (s *WebhookService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*WebhookService) Update

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

Update Запрос на обновление объекта.

type WebhookStock

type WebhookStock struct {
	AccountID         *uuid.UUID    `json:"accountId,omitempty"`
	AuthorApplication *Meta         `json:"authorApplication,omitempty"`
	Enabled           *bool         `json:"enabled,omitempty"`
	StockType         *string       `json:"stockType,omitempty"`
	ReportUrl         *string       `json:"reportUrl,omitempty"`
	ID                *uuid.UUID    `json:"id,omitempty"`
	Meta              *Meta         `json:"meta,omitempty"`
	URL               *string       `json:"url,omitempty"`
	ReportType        WebhookReport `json:"reportType,omitempty"`
}

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, *resty.Response, error)

Create Запрос на создание объекта.

func (*WebhookStockService) CreateUpdateMany

func (s *WebhookStockService) CreateUpdateMany(ctx context.Context, entities []*T, params *Params) (*[]T, *resty.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, *resty.Response, error)

Delete Запрос на удаление объекта по id.

func (*WebhookStockService) DeleteMany

func (s *WebhookStockService) DeleteMany(ctx context.Context, entities []*T) (*DeleteManyResponse, *resty.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) GetByID added in v0.0.8

func (s *WebhookStockService) GetByID(ctx context.Context, id uuid.UUID, params *Params) (*T, *resty.Response, error)

GetByID Запрос на получение объекта по id.

func (*WebhookStockService) GetList added in v0.0.10

func (s *WebhookStockService) GetList(ctx context.Context, params *Params) (*List[T], *resty.Response, error)

GetList Запрос на получение списка объектов.

func (*WebhookStockService) Update

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

Update Запрос на обновление объекта.

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