QBVoidable

Trait QBVoidable 

Source
pub trait QBVoidable: QBItem {
    // Provided method
    fn can_void(&self) -> bool { ... }
}
Expand description

Trait for entities that can be voided in QuickBooks.

Voiding is a special operation in QuickBooks that marks transactions as void while preserving them for audit purposes. Only certain entities support voiding.

§Default Implementation

The default implementation requires that the entity has been read from QuickBooks (has both ID and sync token).

§Supported Entities

Typically includes: Invoice, Payment, Bill, Check, SalesReceipt, and other transactional entities.

§Examples

use quickbooks_types::{Invoice, QBVoidable};

let mut invoice = Invoice::default();
invoice.id = Some("123".to_string());
invoice.sync_token = Some("2".to_string());

// Can void because it has been read from QuickBooks
assert!(invoice.can_void());

Provided Methods§

Source

fn can_void(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§