Expand description
C FFI bindings for StateSet Embedded Commerce (.NET/C#)
This crate provides C-compatible bindings for .NET P/Invoke integration.
Functions§
- stateset_
analytics_ sales_ summary - Get sales summary period: “today”, “week”, “month”, “quarter”, “year”, “all” Returns JSON string (caller must free)
- stateset_
analytics_ top_ customers - Get top customers Returns JSON array string (caller must free)
- stateset_
analytics_ top_ products - Get top products Returns JSON array string (caller must free)
- stateset_
ap_ create_ bill - Create a bill Returns JSON string (caller must free)
- stateset_
ap_ list_ bills - List bills Returns JSON array string (caller must free)
- stateset_
ar_ aging_ summary - Get AR aging summary Returns JSON string (caller must free)
- stateset_
ar_ customer_ aging - Get customer AR aging Returns JSON string (caller must free)
- stateset_
backorder_ create - Create a backorder Returns JSON string (caller must free)
- stateset_
backorder_ list - List backorders Returns JSON array string (caller must free)
- stateset_
cart_ add_ item - Add item to cart Returns JSON string (caller must free)
- stateset_
cart_ create - Create a cart
customer_idcan be null for anonymous carts Returns JSON string (caller must free) - stateset_
cart_ get - Get cart by ID Returns JSON string (caller must free)
- stateset_
commerce_ ⚠free - Destroy a Commerce instance
- stateset_
commerce_ new - Create a new Commerce instance Returns a handle pointer, or null on error
- stateset_
cost_ get_ item_ cost - Get item cost Returns JSON string (caller must free)
- stateset_
cost_ set_ item_ cost - Set item cost Returns JSON string (caller must free)
- stateset_
credit_ create_ account - Create a credit account Returns JSON string (caller must free)
- stateset_
customer_ count - Count customers Returns count or -1 on error
- stateset_
customer_ create - Create a customer
Returns JSON string (caller must free with
stateset_string_free) - stateset_
customer_ delete - Delete a customer by ID Returns 1 on success, 0 on failure
- stateset_
customer_ get - Get a customer by ID Returns JSON string (caller must free)
- stateset_
customer_ list - List all customers Returns JSON array string (caller must free)
- stateset_
get_ last_ error - Get the last error message (returns null if no error) Caller must free the returned string
- stateset_
gl_ create_ account - Create a GL account Returns JSON string (caller must free)
- stateset_
gl_ list_ accounts - List GL accounts Returns JSON array string (caller must free)
- stateset_
inventory_ adjust - Adjust inventory quantity Returns 1 on success, 0 on failure
- stateset_
inventory_ create_ item - Create an inventory item Returns JSON string (caller must free)
- stateset_
inventory_ get_ level - Get stock level for SKU Returns JSON string (caller must free)
- stateset_
lots_ create - Create a lot Returns JSON string (caller must free)
- stateset_
lots_ list - List lots Returns JSON array string (caller must free)
- stateset_
order_ create - Create an order
items_jsonshould be a JSON array of order items Returns JSON string (caller must free) - stateset_
order_ get - Get an order by ID Returns JSON string (caller must free)
- stateset_
order_ list - List all orders Returns JSON array string (caller must free)
- stateset_
order_ update_ status - Update order status status: “pending”, “confirmed”, “processing”, “shipped”, “delivered”, “cancelled”, “refunded” Returns JSON string (caller must free)
- stateset_
payment_ create - Create a payment
method: “
credit_card”, “debit_card”, “bank_transfer”, “paypal”, “apple_pay”, “google_pay”, “crypto” Returns JSON string (caller must free) - stateset_
product_ create - Create a product Returns JSON string (caller must free)
- stateset_
product_ get - Get a product by ID Returns JSON string (caller must free)
- stateset_
product_ list - List all products Returns JSON array string (caller must free)
- stateset_
quality_ create_ inspection - Create a quality inspection Returns JSON string (caller must free)
- stateset_
return_ create - Create a return
reason: “defective”, “
wrong_item”, “not_as_described”, “changed_mind”, “damaged”, “other” Returns JSON string (caller must free) - stateset_
return_ list - List all returns Returns JSON array string (caller must free)
- stateset_
serials_ create - Create a serial number Returns JSON string (caller must free)
- stateset_
serials_ list - List serial numbers Returns JSON array string (caller must free)
- stateset_
shipment_ cancel - Cancel a shipment Returns JSON string (caller must free)
- stateset_
shipment_ create - Create a shipment Returns JSON string (caller must free)
- stateset_
shipment_ deliver - Mark shipment as delivered Returns JSON string (caller must free)
- stateset_
shipment_ get - Get a shipment by ID Returns JSON string (caller must free)
- stateset_
shipment_ list - List all shipments Returns JSON array string (caller must free)
- stateset_
shipment_ ship - Ship a shipment (hand off to carrier) Returns JSON string (caller must free)
- stateset_
string_ ⚠free - Free a string allocated by Rust
- stateset_
warehouse_ create - Create a warehouse Returns JSON string (caller must free)
- stateset_
warehouse_ create_ location - Create a warehouse location Returns JSON string (caller must free)
- stateset_
warehouse_ list - List warehouses Returns JSON array string (caller must free)