Trait TransactionsApi

Source
pub trait TransactionsApi {
    // Required methods
    fn create_transaction(
        &self,
        budget_id: &str,
        data: PostTransactionsWrapper,
    ) -> Result<SaveTransactionsResponse, Error>;
    fn delete_transaction(
        &self,
        budget_id: &str,
        transaction_id: &str,
    ) -> Result<TransactionResponse, Error>;
    fn get_transaction_by_id(
        &self,
        budget_id: &str,
        transaction_id: &str,
    ) -> Result<TransactionResponse, Error>;
    fn get_transactions(
        &self,
        budget_id: &str,
        since_date: Option<String>,
        _type: Option<&str>,
        last_knowledge_of_server: Option<i64>,
    ) -> Result<TransactionsResponse, Error>;
    fn get_transactions_by_account(
        &self,
        budget_id: &str,
        account_id: &str,
        since_date: Option<String>,
        _type: Option<&str>,
        last_knowledge_of_server: Option<i64>,
    ) -> Result<TransactionsResponse, Error>;
    fn get_transactions_by_category(
        &self,
        budget_id: &str,
        category_id: &str,
        since_date: Option<String>,
        _type: Option<&str>,
        last_knowledge_of_server: Option<i64>,
    ) -> Result<HybridTransactionsResponse, Error>;
    fn get_transactions_by_month(
        &self,
        budget_id: &str,
        month: &str,
        since_date: Option<String>,
        _type: Option<&str>,
        last_knowledge_of_server: Option<i64>,
    ) -> Result<HybridTransactionsResponse, Error>;
    fn get_transactions_by_payee(
        &self,
        budget_id: &str,
        payee_id: &str,
        since_date: Option<String>,
        _type: Option<&str>,
        last_knowledge_of_server: Option<i64>,
    ) -> Result<HybridTransactionsResponse, Error>;
    fn import_transactions(
        &self,
        budget_id: &str,
    ) -> Result<TransactionsImportResponse, Error>;
    fn update_transaction(
        &self,
        budget_id: &str,
        transaction_id: &str,
        data: PutTransactionWrapper,
    ) -> Result<TransactionResponse, Error>;
    fn update_transactions(
        &self,
        budget_id: &str,
        data: PatchTransactionsWrapper,
    ) -> Result<SaveTransactionsResponse, Error>;
}

Required Methods§

Source

fn create_transaction( &self, budget_id: &str, data: PostTransactionsWrapper, ) -> Result<SaveTransactionsResponse, Error>

Source

fn delete_transaction( &self, budget_id: &str, transaction_id: &str, ) -> Result<TransactionResponse, Error>

Source

fn get_transaction_by_id( &self, budget_id: &str, transaction_id: &str, ) -> Result<TransactionResponse, Error>

Source

fn get_transactions( &self, budget_id: &str, since_date: Option<String>, _type: Option<&str>, last_knowledge_of_server: Option<i64>, ) -> Result<TransactionsResponse, Error>

Source

fn get_transactions_by_account( &self, budget_id: &str, account_id: &str, since_date: Option<String>, _type: Option<&str>, last_knowledge_of_server: Option<i64>, ) -> Result<TransactionsResponse, Error>

Source

fn get_transactions_by_category( &self, budget_id: &str, category_id: &str, since_date: Option<String>, _type: Option<&str>, last_knowledge_of_server: Option<i64>, ) -> Result<HybridTransactionsResponse, Error>

Source

fn get_transactions_by_month( &self, budget_id: &str, month: &str, since_date: Option<String>, _type: Option<&str>, last_knowledge_of_server: Option<i64>, ) -> Result<HybridTransactionsResponse, Error>

Source

fn get_transactions_by_payee( &self, budget_id: &str, payee_id: &str, since_date: Option<String>, _type: Option<&str>, last_knowledge_of_server: Option<i64>, ) -> Result<HybridTransactionsResponse, Error>

Source

fn import_transactions( &self, budget_id: &str, ) -> Result<TransactionsImportResponse, Error>

Source

fn update_transaction( &self, budget_id: &str, transaction_id: &str, data: PutTransactionWrapper, ) -> Result<TransactionResponse, Error>

Source

fn update_transactions( &self, budget_id: &str, data: PatchTransactionsWrapper, ) -> Result<SaveTransactionsResponse, Error>

Implementors§