pub struct WaveClient { /* private fields */ }Expand description
Client for the Wave Accounting GraphQL API.
Implementations§
Source§impl WaveClient
impl WaveClient
Sourcepub fn with_oauth(config: OAuthConfig) -> Self
pub fn with_oauth(config: OAuthConfig) -> Self
Create a new client with OAuth credentials.
Source§impl WaveClient
impl WaveClient
Sourcepub async fn create_customer(
&self,
input: CustomerCreateInput,
) -> Result<Customer, WaveError>
pub async fn create_customer( &self, input: CustomerCreateInput, ) -> Result<Customer, WaveError>
Create a customer.
Sourcepub async fn patch_customer(
&self,
input: CustomerPatchInput,
) -> Result<Customer, WaveError>
pub async fn patch_customer( &self, input: CustomerPatchInput, ) -> Result<Customer, WaveError>
Patch a customer.
Sourcepub async fn delete_customer(
&self,
input: CustomerDeleteInput,
) -> Result<(), WaveError>
pub async fn delete_customer( &self, input: CustomerDeleteInput, ) -> Result<(), WaveError>
Delete a customer.
Sourcepub async fn create_invoice(
&self,
input: InvoiceCreateInput,
) -> Result<Invoice, WaveError>
pub async fn create_invoice( &self, input: InvoiceCreateInput, ) -> Result<Invoice, WaveError>
Create an invoice.
Sourcepub async fn patch_invoice(
&self,
input: InvoicePatchInput,
) -> Result<Invoice, WaveError>
pub async fn patch_invoice( &self, input: InvoicePatchInput, ) -> Result<Invoice, WaveError>
Patch an invoice.
Sourcepub async fn delete_invoice(&self, invoice_id: &str) -> Result<(), WaveError>
pub async fn delete_invoice(&self, invoice_id: &str) -> Result<(), WaveError>
Delete an invoice.
Sourcepub async fn clone_invoice(
&self,
invoice_id: &str,
) -> Result<Invoice, WaveError>
pub async fn clone_invoice( &self, invoice_id: &str, ) -> Result<Invoice, WaveError>
Clone an invoice.
Sourcepub async fn approve_invoice(
&self,
invoice_id: &str,
) -> Result<Invoice, WaveError>
pub async fn approve_invoice( &self, invoice_id: &str, ) -> Result<Invoice, WaveError>
Approve an invoice.
Sourcepub async fn mark_invoice_sent(
&self,
input: InvoiceMarkSentInput,
) -> Result<Invoice, WaveError>
pub async fn mark_invoice_sent( &self, input: InvoiceMarkSentInput, ) -> Result<Invoice, WaveError>
Mark an invoice as sent.
Sourcepub async fn send_invoice(
&self,
input: InvoiceSendInput,
) -> Result<Invoice, WaveError>
pub async fn send_invoice( &self, input: InvoiceSendInput, ) -> Result<Invoice, WaveError>
Send an invoice via email.
Sourcepub async fn create_account(
&self,
input: AccountCreateInput,
) -> Result<Account, WaveError>
pub async fn create_account( &self, input: AccountCreateInput, ) -> Result<Account, WaveError>
Create an account.
Sourcepub async fn patch_account(
&self,
input: AccountPatchInput,
) -> Result<Account, WaveError>
pub async fn patch_account( &self, input: AccountPatchInput, ) -> Result<Account, WaveError>
Patch an account.
Sourcepub async fn archive_account(
&self,
input: AccountArchiveInput,
) -> Result<(), WaveError>
pub async fn archive_account( &self, input: AccountArchiveInput, ) -> Result<(), WaveError>
Archive an account.
Sourcepub async fn create_product(
&self,
input: ProductCreateInput,
) -> Result<Product, WaveError>
pub async fn create_product( &self, input: ProductCreateInput, ) -> Result<Product, WaveError>
Create a product.
Sourcepub async fn patch_product(
&self,
input: ProductPatchInput,
) -> Result<Product, WaveError>
pub async fn patch_product( &self, input: ProductPatchInput, ) -> Result<Product, WaveError>
Patch a product.
Sourcepub async fn archive_product(
&self,
input: ProductArchiveInput,
) -> Result<(), WaveError>
pub async fn archive_product( &self, input: ProductArchiveInput, ) -> Result<(), WaveError>
Archive a product.
Sourcepub async fn create_sales_tax(
&self,
input: SalesTaxCreateInput,
) -> Result<SalesTax, WaveError>
pub async fn create_sales_tax( &self, input: SalesTaxCreateInput, ) -> Result<SalesTax, WaveError>
Create a sales tax.
Sourcepub async fn patch_sales_tax(
&self,
input: SalesTaxPatchInput,
) -> Result<SalesTax, WaveError>
pub async fn patch_sales_tax( &self, input: SalesTaxPatchInput, ) -> Result<SalesTax, WaveError>
Patch a sales tax.
Sourcepub async fn archive_sales_tax(
&self,
input: SalesTaxArchiveInput,
) -> Result<(), WaveError>
pub async fn archive_sales_tax( &self, input: SalesTaxArchiveInput, ) -> Result<(), WaveError>
Archive a sales tax.
Sourcepub async fn create_money_transaction(
&self,
input: MoneyTransactionCreateInput,
) -> Result<Transaction, WaveError>
pub async fn create_money_transaction( &self, input: MoneyTransactionCreateInput, ) -> Result<Transaction, WaveError>
Create a single money transaction.
Sourcepub async fn create_money_transactions(
&self,
input: MoneyTransactionsCreateInput,
) -> Result<Vec<Transaction>, WaveError>
pub async fn create_money_transactions( &self, input: MoneyTransactionsCreateInput, ) -> Result<Vec<Transaction>, WaveError>
Bulk create money transactions.
Source§impl WaveClient
impl WaveClient
Sourcepub async fn list_businesses(
&self,
opts: ListBusinessesOptions,
) -> Result<Page<Business>, WaveError>
pub async fn list_businesses( &self, opts: ListBusinessesOptions, ) -> Result<Page<Business>, WaveError>
List all businesses accessible to the authenticated user.
Sourcepub async fn get_business(&self, id: &str) -> Result<Business, WaveError>
pub async fn get_business(&self, id: &str) -> Result<Business, WaveError>
Get a single business by ID.
Sourcepub async fn list_customers(
&self,
business_id: &str,
opts: ListCustomersOptions,
) -> Result<Page<Customer>, WaveError>
pub async fn list_customers( &self, business_id: &str, opts: ListCustomersOptions, ) -> Result<Page<Customer>, WaveError>
List customers for a business.
Sourcepub async fn get_customer(
&self,
business_id: &str,
customer_id: &str,
) -> Result<Customer, WaveError>
pub async fn get_customer( &self, business_id: &str, customer_id: &str, ) -> Result<Customer, WaveError>
Get a single customer by ID.
Sourcepub async fn list_invoices(
&self,
business_id: &str,
opts: ListInvoicesOptions,
) -> Result<Page<Invoice>, WaveError>
pub async fn list_invoices( &self, business_id: &str, opts: ListInvoicesOptions, ) -> Result<Page<Invoice>, WaveError>
List invoices for a business.
Sourcepub async fn get_invoice(
&self,
business_id: &str,
invoice_id: &str,
) -> Result<Invoice, WaveError>
pub async fn get_invoice( &self, business_id: &str, invoice_id: &str, ) -> Result<Invoice, WaveError>
Get a single invoice by ID.
Sourcepub async fn list_accounts(
&self,
business_id: &str,
opts: ListAccountsOptions,
) -> Result<Page<Account>, WaveError>
pub async fn list_accounts( &self, business_id: &str, opts: ListAccountsOptions, ) -> Result<Page<Account>, WaveError>
List accounts (Chart of Accounts) for a business.
Sourcepub async fn get_account(
&self,
business_id: &str,
account_id: &str,
) -> Result<Account, WaveError>
pub async fn get_account( &self, business_id: &str, account_id: &str, ) -> Result<Account, WaveError>
Get a single account by ID.
Sourcepub async fn list_products(
&self,
business_id: &str,
opts: ListProductsOptions,
) -> Result<Page<Product>, WaveError>
pub async fn list_products( &self, business_id: &str, opts: ListProductsOptions, ) -> Result<Page<Product>, WaveError>
List products for a business.
Sourcepub async fn get_product(
&self,
business_id: &str,
product_id: &str,
) -> Result<Product, WaveError>
pub async fn get_product( &self, business_id: &str, product_id: &str, ) -> Result<Product, WaveError>
Get a single product by ID.
Sourcepub async fn list_vendors(
&self,
business_id: &str,
opts: ListVendorsOptions,
) -> Result<Page<Vendor>, WaveError>
pub async fn list_vendors( &self, business_id: &str, opts: ListVendorsOptions, ) -> Result<Page<Vendor>, WaveError>
List vendors for a business.
Sourcepub async fn get_vendor(
&self,
business_id: &str,
vendor_id: &str,
) -> Result<Vendor, WaveError>
pub async fn get_vendor( &self, business_id: &str, vendor_id: &str, ) -> Result<Vendor, WaveError>
Get a single vendor by ID.
Sourcepub async fn list_sales_taxes(
&self,
business_id: &str,
opts: ListSalesTaxesOptions,
) -> Result<Page<SalesTax>, WaveError>
pub async fn list_sales_taxes( &self, business_id: &str, opts: ListSalesTaxesOptions, ) -> Result<Page<SalesTax>, WaveError>
List sales taxes for a business.
Sourcepub async fn get_sales_tax(
&self,
business_id: &str,
sales_tax_id: &str,
) -> Result<SalesTax, WaveError>
pub async fn get_sales_tax( &self, business_id: &str, sales_tax_id: &str, ) -> Result<SalesTax, WaveError>
Get a single sales tax by ID.
Sourcepub async fn list_account_types(&self) -> Result<Vec<AccountType>, WaveError>
pub async fn list_account_types(&self) -> Result<Vec<AccountType>, WaveError>
List account types.
Sourcepub async fn list_account_subtypes(
&self,
) -> Result<Vec<AccountSubtype>, WaveError>
pub async fn list_account_subtypes( &self, ) -> Result<Vec<AccountSubtype>, WaveError>
List account subtypes.
Trait Implementations§
Source§impl Clone for WaveClient
impl Clone for WaveClient
Source§fn clone(&self) -> WaveClient
fn clone(&self) -> WaveClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more