pub struct Receiving { /* private fields */ }Implementations§
Source§impl Receiving
impl Receiving
pub fn into_reference(val: Receiving, env: Env) -> Result<Reference<Receiving>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Receiving>>
Source§impl Receiving
impl Receiving
Sourcepub async fn create_receipt(
&self,
input: CreateReceiptInput,
) -> Result<ReceiptOutput>
pub async fn create_receipt( &self, input: CreateReceiptInput, ) -> Result<ReceiptOutput>
Create a new receipt
Sourcepub async fn get_receipt(&self, id: String) -> Result<Option<ReceiptOutput>>
pub async fn get_receipt(&self, id: String) -> Result<Option<ReceiptOutput>>
Get a receipt by ID
Sourcepub async fn get_receipt_by_number(
&self,
number: String,
) -> Result<Option<ReceiptOutput>>
pub async fn get_receipt_by_number( &self, number: String, ) -> Result<Option<ReceiptOutput>>
Get a receipt by receipt number
Sourcepub async fn list_receipts(&self) -> Result<Vec<ReceiptOutput>>
pub async fn list_receipts(&self) -> Result<Vec<ReceiptOutput>>
List all receipts
Sourcepub async fn start_receiving(&self, id: String) -> Result<ReceiptOutput>
pub async fn start_receiving(&self, id: String) -> Result<ReceiptOutput>
Start receiving
Sourcepub async fn complete_receiving(&self, id: String) -> Result<ReceiptOutput>
pub async fn complete_receiving(&self, id: String) -> Result<ReceiptOutput>
Complete receiving
Sourcepub async fn cancel_receipt(&self, id: String) -> Result<ReceiptOutput>
pub async fn cancel_receipt(&self, id: String) -> Result<ReceiptOutput>
Cancel a receipt
Sourcepub async fn create_receipt_from_po(
&self,
po_id: String,
warehouse_id: i32,
) -> Result<ReceiptOutput>
pub async fn create_receipt_from_po( &self, po_id: String, warehouse_id: i32, ) -> Result<ReceiptOutput>
Create a receipt from a purchase order
Sourcepub async fn count_receipts(&self) -> Result<u32>
pub async fn count_receipts(&self) -> Result<u32>
Count receipts
Trait Implementations§
Source§impl FromNapiMutRef for Receiving
impl FromNapiMutRef for Receiving
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 Receiving
impl FromNapiRef for Receiving
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 &Receiving
impl FromNapiValue for &Receiving
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 Receiving
impl FromNapiValue for &mut Receiving
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 Receiving
impl ToNapiValue for Receiving
Source§unsafe fn to_napi_value(env: napi_env, val: Receiving) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Receiving) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &Receiving
impl ValidateNapiValue for &Receiving
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 Receiving
impl ValidateNapiValue for &mut Receiving
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 Receiving
impl !RefUnwindSafe for Receiving
impl Send for Receiving
impl Sync for Receiving
impl Unpin for Receiving
impl UnsafeUnpin for Receiving
impl !UnwindSafe for Receiving
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