pub trait QBSparseUpdateable {
// Required method
fn can_sparse_update(&self) -> bool;
}Expand description
Trait for entities that support sparse update operations.
Sparse updates allow updating only specific fields of an entity without affecting other fields. This is more efficient and safer than full updates when you only need to change specific values.
§Required Methods
can_sparse_update(): Returns true if the entity can be sparse updated
§Implementation Notes
Typically requires:
- Entity can perform full updates
- Entity has the
sparsefield set totrue QuickBooksAPI supports sparse updates for this entity type
§Examples
use quickbooks_types::{Customer, QBSparseUpdateable};
let mut customer = Customer::default();
customer.id = Some("123".to_string());
customer.sync_token = Some("2".to_string());
customer.display_name = Some("John Doe".to_string());
customer.sparse = Some(true);
// Check if can be sparse updated
if customer.can_sparse_update() {
// Proceed with sparse update
}