use crate::runtime::{
push_query_param, ApiClient, ApiError, HttpMethod, QueryParam, ResponseEnvelope,
};
use serde::de::DeserializeOwned;
use serde_json::Value;
pub struct IWarehouseDocumentsController;
pub mod get {
use super::*;
#[async_trait::async_trait]
pub trait Overload {
type Output: DeserializeOwned;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError>;
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError>;
}
pub struct List;
#[async_trait::async_trait]
impl Overload for List {
type Output =
Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>>(HttpMethod::Get, "/api/WarehouseDocuments", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments", query)
.await
}
}
pub struct ById {
pub id: i32,
}
#[async_trait::async_trait]
impl Overload for ById {
type Output = crate::web_api::interface::warehouse::view_models::WarehouseDocument;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "id", &self.id)?;
api.request_no_body::<crate::web_api::interface::warehouse::view_models::WarehouseDocument>(HttpMethod::Get, "/api/WarehouseDocuments", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "id", &self.id)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments", query)
.await
}
}
pub struct ByNumberBuffer {
pub number: String,
pub buffer: bool,
}
#[async_trait::async_trait]
impl Overload for ByNumberBuffer {
type Output = crate::web_api::interface::warehouse::view_models::WarehouseDocument;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "number", &self.number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
api.request_no_body::<crate::web_api::interface::warehouse::view_models::WarehouseDocument>(HttpMethod::Get, "/api/WarehouseDocuments", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "number", &self.number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments", query)
.await
}
}
}
pub mod get_list_by_contractor {
use super::*;
#[async_trait::async_trait]
pub trait Overload {
type Output: DeserializeOwned;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError>;
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError>;
}
pub struct ByContractorIdDateFromDateTo {
pub contractor_id: i32,
pub date_from: Option<chrono::NaiveDateTime>,
pub date_to: Option<chrono::NaiveDateTime>,
}
#[async_trait::async_trait]
impl Overload for ByContractorIdDateFromDateTo {
type Output =
Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "contractorId", &self.contractor_id)?;
push_query_param(&mut query, "dateFrom", &self.date_from)?;
push_query_param(&mut query, "dateTo", &self.date_to)?;
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>>(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "contractorId", &self.contractor_id)?;
push_query_param(&mut query, "dateFrom", &self.date_from)?;
push_query_param(&mut query, "dateTo", &self.date_to)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query)
.await
}
}
pub struct ByContractorCodeDateFromDateTo {
pub contractor_code: String,
pub date_from: Option<chrono::NaiveDateTime>,
pub date_to: Option<chrono::NaiveDateTime>,
}
#[async_trait::async_trait]
impl Overload for ByContractorCodeDateFromDateTo {
type Output =
Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "contractorCode", &self.contractor_code)?;
push_query_param(&mut query, "dateFrom", &self.date_from)?;
push_query_param(&mut query, "dateTo", &self.date_to)?;
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>>(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "contractorCode", &self.contractor_code)?;
push_query_param(&mut query, "dateFrom", &self.date_from)?;
push_query_param(&mut query, "dateTo", &self.date_to)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query)
.await
}
}
}
pub mod get_list_by_warehouse {
use super::*;
#[async_trait::async_trait]
pub trait Overload {
type Output: DeserializeOwned;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError>;
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError>;
}
pub struct ByWarehouseIdDateFromDateTo {
pub warehouse_id: i32,
pub date_from: Option<chrono::NaiveDateTime>,
pub date_to: Option<chrono::NaiveDateTime>,
}
#[async_trait::async_trait]
impl Overload for ByWarehouseIdDateFromDateTo {
type Output =
Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "warehouseId", &self.warehouse_id)?;
push_query_param(&mut query, "dateFrom", &self.date_from)?;
push_query_param(&mut query, "dateTo", &self.date_to)?;
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>>(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "warehouseId", &self.warehouse_id)?;
push_query_param(&mut query, "dateFrom", &self.date_from)?;
push_query_param(&mut query, "dateTo", &self.date_to)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query)
.await
}
}
pub struct ByWarehouseCodeDateFromDateTo {
pub warehouse_code: String,
pub date_from: Option<chrono::NaiveDateTime>,
pub date_to: Option<chrono::NaiveDateTime>,
}
#[async_trait::async_trait]
impl Overload for ByWarehouseCodeDateFromDateTo {
type Output =
Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "warehouseCode", &self.warehouse_code)?;
push_query_param(&mut query, "dateFrom", &self.date_from)?;
push_query_param(&mut query, "dateTo", &self.date_to)?;
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>>(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "warehouseCode", &self.warehouse_code)?;
push_query_param(&mut query, "dateFrom", &self.date_from)?;
push_query_param(&mut query, "dateTo", &self.date_to)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query)
.await
}
}
}
pub mod get_fv {
use super::*;
#[async_trait::async_trait]
pub trait Overload {
type Output: DeserializeOwned;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError>;
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError>;
}
pub struct ByDocumentId {
pub document_id: i32,
}
#[async_trait::async_trait]
impl Overload for ByDocumentId {
type Output = Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentFV>;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentId", &self.document_id)?;
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentFV>>(HttpMethod::Get, "/api/WarehouseDocuments/FV", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentId", &self.document_id)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/FV", query)
.await
}
}
pub struct ByDocumentNumberBuffer {
pub document_number: String,
pub buffer: bool,
}
#[async_trait::async_trait]
impl Overload for ByDocumentNumberBuffer {
type Output = Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentFV>;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentNumber", &self.document_number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentFV>>(HttpMethod::Get, "/api/WarehouseDocuments/FV", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentNumber", &self.document_number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/FV", query)
.await
}
}
}
pub mod get_status {
use super::*;
#[async_trait::async_trait]
pub trait Overload {
type Output: DeserializeOwned;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError>;
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError>;
}
pub struct ByDocumentId {
pub document_id: i32,
}
#[async_trait::async_trait]
impl Overload for ByDocumentId {
type Output = crate::web_api::interface::warehouse::view_models::WarehouseDocumentStatus;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentId", &self.document_id)?;
api.request_no_body::<crate::web_api::interface::warehouse::view_models::WarehouseDocumentStatus>(HttpMethod::Get, "/api/WarehouseDocuments/Status", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentId", &self.document_id)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Status", query)
.await
}
}
pub struct ByDocumentNumberBuffer {
pub document_number: String,
pub buffer: bool,
}
#[async_trait::async_trait]
impl Overload for ByDocumentNumberBuffer {
type Output = crate::web_api::interface::warehouse::view_models::WarehouseDocumentStatus;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentNumber", &self.document_number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
api.request_no_body::<crate::web_api::interface::warehouse::view_models::WarehouseDocumentStatus>(HttpMethod::Get, "/api/WarehouseDocuments/Status", query).await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentNumber", &self.document_number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Status", query)
.await
}
}
}
pub mod get_pdf {
use super::*;
#[async_trait::async_trait]
pub trait Overload {
type Output: DeserializeOwned;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError>;
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError>;
}
pub struct ByDocumentIdPrintNote {
pub document_id: i32,
pub print_note: bool,
}
#[async_trait::async_trait]
impl Overload for ByDocumentIdPrintNote {
type Output = crate::web_api::interface::common::view_models::PDF;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentId", &self.document_id)?;
push_query_param(&mut query, "printNote", &self.print_note)?;
api.request_no_body::<crate::web_api::interface::common::view_models::PDF>(
HttpMethod::Get,
"/api/WarehouseDocuments/PDF",
query,
)
.await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentId", &self.document_id)?;
push_query_param(&mut query, "printNote", &self.print_note)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/PDF", query)
.await
}
}
pub struct ByDocumentNumberBufferPrintNote {
pub document_number: String,
pub buffer: bool,
pub print_note: bool,
}
#[async_trait::async_trait]
impl Overload for ByDocumentNumberBufferPrintNote {
type Output = crate::web_api::interface::common::view_models::PDF;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentNumber", &self.document_number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
push_query_param(&mut query, "printNote", &self.print_note)?;
api.request_no_body::<crate::web_api::interface::common::view_models::PDF>(
HttpMethod::Get,
"/api/WarehouseDocuments/PDF",
query,
)
.await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentNumber", &self.document_number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
push_query_param(&mut query, "printNote", &self.print_note)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/PDF", query)
.await
}
}
pub struct ByDocumentId<'a> {
pub document_id: i32,
pub settings: &'a crate::web_api::interface::common::view_models::PDFSettings,
}
#[async_trait::async_trait]
impl<'a> Overload for ByDocumentId<'a> {
type Output = crate::web_api::interface::common::view_models::PDF;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentId", &self.document_id)?;
api.request_with_body::<crate::web_api::interface::common::view_models::PDF, _>(
HttpMethod::Patch,
"/api/WarehouseDocuments/PDF",
query,
self.settings,
)
.await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentId", &self.document_id)?;
api.request_with_body_raw(
HttpMethod::Patch,
"/api/WarehouseDocuments/PDF",
query,
self.settings,
)
.await
}
}
pub struct ByDocumentNumberBuffer<'a> {
pub document_number: String,
pub buffer: bool,
pub settings: &'a crate::web_api::interface::common::view_models::PDFSettings,
}
#[async_trait::async_trait]
impl<'a> Overload for ByDocumentNumberBuffer<'a> {
type Output = crate::web_api::interface::common::view_models::PDF;
async fn call(self, api: &ApiClient) -> Result<ResponseEnvelope<Self::Output>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentNumber", &self.document_number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
api.request_with_body::<crate::web_api::interface::common::view_models::PDF, _>(
HttpMethod::Patch,
"/api/WarehouseDocuments/PDF",
query,
self.settings,
)
.await
}
async fn call_raw(self, api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentNumber", &self.document_number)?;
push_query_param(&mut query, "buffer", &self.buffer)?;
api.request_with_body_raw(
HttpMethod::Patch,
"/api/WarehouseDocuments/PDF",
query,
self.settings,
)
.await
}
}
}
#[allow(non_snake_case)]
impl IWarehouseDocumentsController {
pub async fn Get<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<T::Output>, ApiError>
where
T: get::Overload,
{
overload.call(api).await
}
pub async fn GetRaw<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<Value>, ApiError>
where
T: get::Overload,
{
overload.call_raw(api).await
}
pub async fn GetListByContractor<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<T::Output>, ApiError>
where
T: get_list_by_contractor::Overload,
{
overload.call(api).await
}
pub async fn GetListByContractorRaw<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<Value>, ApiError>
where
T: get_list_by_contractor::Overload,
{
overload.call_raw(api).await
}
pub async fn GetListByWarehouse<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<T::Output>, ApiError>
where
T: get_list_by_warehouse::Overload,
{
overload.call(api).await
}
pub async fn GetListByWarehouseRaw<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<Value>, ApiError>
where
T: get_list_by_warehouse::Overload,
{
overload.call_raw(api).await
}
pub async fn GetFV<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<T::Output>, ApiError>
where
T: get_fv::Overload,
{
overload.call(api).await
}
pub async fn GetFVRaw<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<Value>, ApiError>
where
T: get_fv::Overload,
{
overload.call_raw(api).await
}
pub async fn GetStatus<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<T::Output>, ApiError>
where
T: get_status::Overload,
{
overload.call(api).await
}
pub async fn GetStatusRaw<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<Value>, ApiError>
where
T: get_status::Overload,
{
overload.call_raw(api).await
}
pub async fn GetPDF<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<T::Output>, ApiError>
where
T: get_pdf::Overload,
{
overload.call(api).await
}
pub async fn GetPDFRaw<T>(
api: &ApiClient,
overload: T,
) -> Result<ResponseEnvelope<Value>, ApiError>
where
T: get_pdf::Overload,
{
overload.call_raw(api).await
}
pub async fn GetList(
api: &ApiClient,
date_from: Option<chrono::NaiveDateTime>,
date_to: Option<chrono::NaiveDateTime>,
) -> Result<
ResponseEnvelope<
Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>,
>,
ApiError,
> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "dateFrom", &date_from)?;
push_query_param(&mut query, "dateTo", &date_to)?;
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>>(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query).await
}
pub async fn GetListRaw(
api: &ApiClient,
date_from: Option<chrono::NaiveDateTime>,
date_to: Option<chrono::NaiveDateTime>,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "dateFrom", &date_from)?;
push_query_param(&mut query, "dateTo", &date_to)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query)
.await
}
pub async fn GetListByDimension(
api: &ApiClient,
dimension_code: String,
dictionary_value: String,
value: String,
) -> Result<
ResponseEnvelope<
Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>,
>,
ApiError,
> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "dimensionCode", &dimension_code)?;
push_query_param(&mut query, "dictionaryValue", &dictionary_value)?;
push_query_param(&mut query, "value", &value)?;
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>>(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query).await
}
pub async fn GetListByDimensionRaw(
api: &ApiClient,
dimension_code: String,
dictionary_value: String,
value: String,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "dimensionCode", &dimension_code)?;
push_query_param(&mut query, "dictionaryValue", &dictionary_value)?;
push_query_param(&mut query, "value", &value)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Filter", query)
.await
}
pub async fn GetMarkers(
api: &ApiClient,
) -> Result<
ResponseEnvelope<Vec<crate::web_api::interface::common::view_models::Marker>>,
ApiError,
> {
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::common::view_models::Marker>>(
HttpMethod::Get,
"/api/WarehouseDocuments/Markers",
query,
)
.await
}
pub async fn GetMarkersRaw(api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Markers", query)
.await
}
pub async fn GetKinds(
api: &ApiClient,
) -> Result<ResponseEnvelope<Vec<crate::web_api::interface::common::view_models::Kind>>, ApiError>
{
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::common::view_models::Kind>>(
HttpMethod::Get,
"/api/WarehouseDocuments/Kinds",
query,
)
.await
}
pub async fn GetKindsRaw(api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Kinds", query)
.await
}
pub async fn GetCatalogs(
api: &ApiClient,
) -> Result<
ResponseEnvelope<Vec<crate::web_api::interface::common::view_models::Catalog>>,
ApiError,
> {
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::common::view_models::Catalog>>(
HttpMethod::Get,
"/api/WarehouseDocuments/Catalogs",
query,
)
.await
}
pub async fn GetCatalogsRaw(api: &ApiClient) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Catalogs", query)
.await
}
pub async fn GetWarehouseRegistries(
api: &ApiClient,
) -> Result<
ResponseEnvelope<Vec<crate::web_api::interface::warehouse::view_models::WarehouseRegistry>>,
ApiError,
> {
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseRegistry>>(HttpMethod::Get, "/api/WarehouseDocuments/WarehouseRegistries", query).await
}
pub async fn GetWarehouseRegistriesRaw(
api: &ApiClient,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(
HttpMethod::Get,
"/api/WarehouseDocuments/WarehouseRegistries",
query,
)
.await
}
pub async fn GetPWDocumentTypes(
api: &ApiClient,
) -> Result<
ResponseEnvelope<Vec<crate::web_api::interface::common::view_models::DocumentType>>,
ApiError,
> {
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::common::view_models::DocumentType>>(
HttpMethod::Get,
"/api/WarehouseDocuments/PWDocumentTypes",
query,
)
.await
}
pub async fn GetPWDocumentTypesRaw(
api: &ApiClient,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(
HttpMethod::Get,
"/api/WarehouseDocuments/PWDocumentTypes",
query,
)
.await
}
pub async fn GetRWDocumentTypes(
api: &ApiClient,
) -> Result<
ResponseEnvelope<Vec<crate::web_api::interface::common::view_models::DocumentType>>,
ApiError,
> {
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::common::view_models::DocumentType>>(
HttpMethod::Get,
"/api/WarehouseDocuments/RWDocumentTypes",
query,
)
.await
}
pub async fn GetRWDocumentTypesRaw(
api: &ApiClient,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(
HttpMethod::Get,
"/api/WarehouseDocuments/RWDocumentTypes",
query,
)
.await
}
pub async fn GetWZODocumentTypes(
api: &ApiClient,
) -> Result<
ResponseEnvelope<Vec<crate::web_api::interface::common::view_models::DocumentType>>,
ApiError,
> {
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::common::view_models::DocumentType>>(
HttpMethod::Get,
"/api/WarehouseDocuments/WZDocumentTypes",
query,
)
.await
}
pub async fn GetWZODocumentTypesRaw(
api: &ApiClient,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(
HttpMethod::Get,
"/api/WarehouseDocuments/WZDocumentTypes",
query,
)
.await
}
pub async fn GetPZODocumentTypes(
api: &ApiClient,
) -> Result<
ResponseEnvelope<Vec<crate::web_api::interface::common::view_models::DocumentType>>,
ApiError,
> {
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::common::view_models::DocumentType>>(
HttpMethod::Get,
"/api/WarehouseDocuments/PZDocumentTypes",
query,
)
.await
}
pub async fn GetPZODocumentTypesRaw(
api: &ApiClient,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(
HttpMethod::Get,
"/api/WarehouseDocuments/PZDocumentTypes",
query,
)
.await
}
pub async fn GetMMMinusDocumentTypes(
api: &ApiClient,
) -> Result<
ResponseEnvelope<Vec<crate::web_api::interface::common::view_models::DocumentType>>,
ApiError,
> {
let query = vec![];
api.request_no_body::<Vec<crate::web_api::interface::common::view_models::DocumentType>>(
HttpMethod::Get,
"/api/WarehouseDocuments/MMMinusDocumentTypes",
query,
)
.await
}
pub async fn GetMMMinusDocumentTypesRaw(
api: &ApiClient,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let query = vec![];
api.request_no_body_raw(
HttpMethod::Get,
"/api/WarehouseDocuments/MMMinusDocumentTypes",
query,
)
.await
}
pub async fn GetDocumentSeries(
api: &ApiClient,
document_type_id: i32,
) -> Result<
ResponseEnvelope<Vec<crate::web_api::interface::common::view_models::DocumentSeries>>,
ApiError,
> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentTypeId", &document_type_id)?;
api.request_no_body::<Vec<crate::web_api::interface::common::view_models::DocumentSeries>>(
HttpMethod::Get,
"/api/WarehouseDocuments/DocumentSeries",
query,
)
.await
}
pub async fn GetDocumentSeriesRaw(
api: &ApiClient,
document_type_id: i32,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "documentTypeId", &document_type_id)?;
api.request_no_body_raw(
HttpMethod::Get,
"/api/WarehouseDocuments/DocumentSeries",
query,
)
.await
}
pub async fn GetPagedDocument(
api: &ApiClient,
page: i32,
size: i32,
order_by: crate::web_api::interface::enums::enumOrderByType,
) -> Result<
ResponseEnvelope<
crate::web_api::interface::view_models::Page<
crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement,
>,
>,
ApiError,
> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "page", &page)?;
push_query_param(&mut query, "size", &size)?;
push_query_param(&mut query, "orderBy", &order_by)?;
api.request_no_body::<crate::web_api::interface::view_models::Page<
crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement,
>>(HttpMethod::Get, "/api/WarehouseDocuments/Page", query)
.await
}
pub async fn GetPagedDocumentRaw(
api: &ApiClient,
page: i32,
size: i32,
order_by: crate::web_api::interface::enums::enumOrderByType,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "page", &page)?;
push_query_param(&mut query, "size", &size)?;
push_query_param(&mut query, "orderBy", &order_by)?;
api.request_no_body_raw(HttpMethod::Get, "/api/WarehouseDocuments/Page", query)
.await
}
pub async fn GetDocumentTypesWithRange(
api: &ApiClient,
date_from: crate::web_api::interface::common::view_models::FilterDocumentType,
date_to: Option<chrono::NaiveDateTime>,
) -> Result<
ResponseEnvelope<
Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>,
>,
ApiError,
> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "dateFrom", &date_from)?;
push_query_param(&mut query, "dateTo", &date_to)?;
api.request_no_body::<Vec<crate::web_api::interface::warehouse::view_models::WarehouseDocumentListElement>>(HttpMethod::Get, "/api/WarehouseDocuments/Filter/ByDocumentTypes", query).await
}
pub async fn GetDocumentTypesWithRangeRaw(
api: &ApiClient,
date_from: crate::web_api::interface::common::view_models::FilterDocumentType,
date_to: Option<chrono::NaiveDateTime>,
) -> Result<ResponseEnvelope<Value>, ApiError> {
let mut query = Vec::<QueryParam>::new();
push_query_param(&mut query, "dateFrom", &date_from)?;
push_query_param(&mut query, "dateTo", &date_to)?;
api.request_no_body_raw(
HttpMethod::Get,
"/api/WarehouseDocuments/Filter/ByDocumentTypes",
query,
)
.await
}
}