pub struct Warehouse { /* private fields */ }Implementations§
Source§impl Warehouse
impl Warehouse
pub fn into_reference(val: Warehouse, env: Env) -> Result<Reference<Warehouse>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Warehouse>>
Source§impl Warehouse
impl Warehouse
Sourcepub async fn create_warehouse(
&self,
input: CreateWarehouseInput,
) -> Result<WarehouseOutput>
pub async fn create_warehouse( &self, input: CreateWarehouseInput, ) -> Result<WarehouseOutput>
Create a new warehouse
Sourcepub async fn get_warehouse(&self, id: i32) -> Result<Option<WarehouseOutput>>
pub async fn get_warehouse(&self, id: i32) -> Result<Option<WarehouseOutput>>
Get a warehouse by ID
Sourcepub async fn get_warehouse_by_code(
&self,
code: String,
) -> Result<Option<WarehouseOutput>>
pub async fn get_warehouse_by_code( &self, code: String, ) -> Result<Option<WarehouseOutput>>
Get a warehouse by code
Sourcepub async fn list_warehouses(&self) -> Result<Vec<WarehouseOutput>>
pub async fn list_warehouses(&self) -> Result<Vec<WarehouseOutput>>
List all warehouses
Sourcepub async fn create_location(
&self,
input: CreateLocationInput,
) -> Result<LocationOutput>
pub async fn create_location( &self, input: CreateLocationInput, ) -> Result<LocationOutput>
Create a new location
Sourcepub async fn get_location(&self, id: i32) -> Result<Option<LocationOutput>>
pub async fn get_location(&self, id: i32) -> Result<Option<LocationOutput>>
Get a location by ID
Sourcepub async fn list_locations(
&self,
warehouse_id: Option<i32>,
) -> Result<Vec<LocationOutput>>
pub async fn list_locations( &self, warehouse_id: Option<i32>, ) -> Result<Vec<LocationOutput>>
List locations in a warehouse
Sourcepub async fn get_pickable_locations(
&self,
warehouse_id: i32,
sku: String,
) -> Result<Vec<LocationOutput>>
pub async fn get_pickable_locations( &self, warehouse_id: i32, sku: String, ) -> Result<Vec<LocationOutput>>
Get pickable locations for a SKU
Sourcepub async fn get_total_available(
&self,
warehouse_id: i32,
sku: String,
) -> Result<f64>
pub async fn get_total_available( &self, warehouse_id: i32, sku: String, ) -> Result<f64>
Get total available quantity for a SKU in a warehouse
Sourcepub async fn count_warehouses(&self) -> Result<u32>
pub async fn count_warehouses(&self) -> Result<u32>
Count warehouses
Trait Implementations§
Source§impl FromNapiMutRef for Warehouse
impl FromNapiMutRef for Warehouse
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for Warehouse
impl FromNapiRef for Warehouse
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &Warehouse
impl FromNapiValue for &Warehouse
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut Warehouse
impl FromNapiValue for &mut Warehouse
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for Warehouse
impl ToNapiValue for Warehouse
Source§unsafe fn to_napi_value(env: napi_env, val: Warehouse) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Warehouse) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &Warehouse
impl ValidateNapiValue for &Warehouse
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut Warehouse
impl ValidateNapiValue for &mut Warehouse
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for Warehouse
impl !RefUnwindSafe for Warehouse
impl Send for Warehouse
impl Sync for Warehouse
impl Unpin for Warehouse
impl UnsafeUnpin for Warehouse
impl !UnwindSafe for Warehouse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more