pub struct Client { /* private fields */ }
Expand description
A client for interacting with the Up API.
Implementations
sourceimpl Client
impl Client
sourcepub async fn list_accounts(
&self,
options: &ListAccountsOptions
) -> Result<ListAccountsResponse, Error>
pub async fn list_accounts(
&self,
options: &ListAccountsOptions
) -> Result<ListAccountsResponse, Error>
Retrieve a paginated list of all accounts for the currently authenticated user. The returned list is paginated and can be scrolled by following the prev
and next
links where present.
sourcepub async fn get_account(&self, id: &str) -> Result<GetAccountResponse, Error>
pub async fn get_account(&self, id: &str) -> Result<GetAccountResponse, Error>
Retrieve a specific account by providing its unique identifier.
sourceimpl Client
impl Client
sourcepub async fn list_categories(
&self,
options: &ListCategoriesOptions
) -> Result<ListCategoriesResponse, Error>
pub async fn list_categories(
&self,
options: &ListCategoriesOptions
) -> Result<ListCategoriesResponse, Error>
Retrieve a list of all categories and their ancestry. The returned list is not paginated.
sourcepub async fn get_category(&self, id: &str) -> Result<GetCategoryResponse, Error>
pub async fn get_category(&self, id: &str) -> Result<GetCategoryResponse, Error>
Retrieve a specific category by providing its unique identifier.
sourcepub async fn categorise_transaction(
&self,
transaction_id: &str,
category: Option<&str>
) -> Result<(), Error>
pub async fn categorise_transaction(
&self,
transaction_id: &str,
category: Option<&str>
) -> Result<(), Error>
Updates the category associated with a transaction. Only transactions for which is_categorizable
is set to true support this operation. The id
is taken from the list exposed on list_categories
and cannot be one of the top-level (parent) categories. To de-categorize a transaction, set the entire data
key to null
. The associated category, along with its request URL is also exposed via the category relationship on the transaction resource returned from get_transaction
.
sourceimpl Client
impl Client
Retrieve a list of all tags currently in use. The returned list is paginated and can be scrolled by following the next
and prev
links where present. Results are ordered lexicographically. The transactions relationship for each tag exposes a link to get the transactions with the given tag.
Associates one or more tags with a specific transaction. No more than 6 tags may be present on any single transaction. Duplicate tags are silently ignored. The associated tags, along with this request URL, are also exposed via the tags relationship on the transaction resource returned from get_transaction
.
Disassociates one or more tags from a specific transaction. Tags that are not associated are silently ignored. The associated tags, along with this request URL, are also exposed via the tags relationship on the transaction resource returned from get_transaction
.
sourceimpl Client
impl Client
sourcepub async fn list_transactions(
&self,
options: &ListTransactionsOptions
) -> Result<ListTransactionsResponse, Error>
pub async fn list_transactions(
&self,
options: &ListTransactionsOptions
) -> Result<ListTransactionsResponse, Error>
Retrieve a list of all transactions across all accounts for the currently authenticated user. The returned list is paginated and can be scrolled by following the next
and prev
links where present. To narrow the results to a specific date range pass one or both of filter[since]
and filter[until]
in the query string. These filter parameters should not be used for pagination. Results are ordered newest first to oldest last.
sourcepub async fn get_transaction(
&self,
id: &String
) -> Result<GetTransactionResponse, Error>
pub async fn get_transaction(
&self,
id: &String
) -> Result<GetTransactionResponse, Error>
Retrieve a specific transaction by providing its unique identifier.
sourcepub async fn list_transactions_by_account(
&self,
account_id: &String,
options: &ListTransactionsOptions
) -> Result<ListTransactionsResponse, Error>
pub async fn list_transactions_by_account(
&self,
account_id: &String,
options: &ListTransactionsOptions
) -> Result<ListTransactionsResponse, Error>
Retrieve a list of all transactions for a specific account. The returned list is paginated and can be scrolled by following the next
and prev
links where present. To narrow the results to a specific date range pass one or both of filter[since]
and filter[until]
in the query string. These filter parameters should not be used for pagination. Results are ordered newest first to oldest last.
Auto Trait Implementations
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more