pub struct Commerce { /* private fields */ }Expand description
JavaScript-friendly Commerce instance
Implementations§
Source§impl Commerce
impl Commerce
pub fn into_reference(val: Commerce, env: Env) -> Result<Reference<Commerce>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Commerce>>
Source§impl Commerce
impl Commerce
Sourcepub fn new(db_path: String) -> Result<Self>
pub fn new(db_path: String) -> Result<Self>
Create a new Commerce instance with a database path Use “:memory:” for an in-memory database
Sourcepub fn custom_objects(&self) -> CustomObjects
pub fn custom_objects(&self) -> CustomObjects
Get the custom objects API (custom states / metaobjects)
Sourcepub fn custom_states(&self) -> CustomObjects
pub fn custom_states(&self) -> CustomObjects
Alias for custom_objects (for users who prefer the “custom states” name)
Sourcepub fn warranties(&self) -> Warranties
pub fn warranties(&self) -> Warranties
Get the warranties API
Sourcepub fn purchase_orders(&self) -> PurchaseOrders
pub fn purchase_orders(&self) -> PurchaseOrders
Get the purchase orders API
Sourcepub fn work_orders(&self) -> WorkOrders
pub fn work_orders(&self) -> WorkOrders
Get the work orders API
Sourcepub fn currency(&self) -> CurrencyOperations
pub fn currency(&self) -> CurrencyOperations
Get the currency API
Sourcepub fn subscriptions(&self) -> Subscriptions
pub fn subscriptions(&self) -> Subscriptions
Get the subscriptions API
Sourcepub fn promotions(&self) -> Promotions
pub fn promotions(&self) -> Promotions
Get the promotions API
Sourcepub fn fulfillment(&self) -> Fulfillment
pub fn fulfillment(&self) -> Fulfillment
Get the fulfillment API
Sourcepub fn accounts_payable(&self) -> AccountsPayable
pub fn accounts_payable(&self) -> AccountsPayable
Get the accounts payable API
Sourcepub fn accounts_receivable(&self) -> AccountsReceivable
pub fn accounts_receivable(&self) -> AccountsReceivable
Get the accounts receivable API
Sourcepub fn cost_accounting(&self) -> CostAccounting
pub fn cost_accounting(&self) -> CostAccounting
Get the cost accounting API
Sourcepub fn backorder(&self) -> Backorders
pub fn backorder(&self) -> Backorders
Get the backorder management API
Sourcepub fn general_ledger(&self) -> GeneralLedger
pub fn general_ledger(&self) -> GeneralLedger
Get the general ledger API
Sourcepub fn vector(&self, api_key: String) -> VectorSearch
pub fn vector(&self, api_key: String) -> VectorSearch
Create a vector search instance with the given OpenAI API key
Vector search enables semantic similarity search across products, customers, orders, and inventory items using OpenAI embeddings.