Skip to main content

AccountingInfoClient

Struct AccountingInfoClient 

Source
pub struct AccountingInfoClient { /* private fields */ }
Expand description

Client for the Yuki AccountingInfo SOAP service.

Implementations§

Source§

impl AccountingInfoClient

Source

pub fn new() -> Self

Source

pub async fn authenticate(&mut self, api_key: &str) -> Result<String, YukiError>

Authenticate with the Yuki API and store the session ID.

Source

pub async fn get_transaction_details( &self, transaction_id: &str, ) -> Result<Vec<TransactionDetail>, YukiError>

Retrieve full details for a single transaction by ID.

Source

pub fn parse_transaction_details( xml: &str, ) -> Result<Vec<TransactionDetail>, YukiError>

Parse a GetTransactionDetails SOAP response into a list of TransactionDetail values.

Each TransactionInfo element carries child elements id, transactionDate, description, transactionAmount, currency, and glAccountCode.

Source

pub async fn get_gl_account_scheme( &self, administration_id: &str, ) -> Result<Vec<GlAccount>, YukiError>

Retrieve the full GL account scheme (chart of accounts).

Source

pub async fn get_transaction_document( &self, administration_id: &str, transaction_id: &str, ) -> Result<String, YukiError>

Retrieve the document linked to a transaction.

Source

pub async fn get_period_date_table( &self, year: &str, ) -> Result<String, YukiError>

Retrieve the period date table for a given fiscal year.

Source

pub async fn get_start_balance_by_gl_account( &self, administration_id: &str, bookyear: &str, ) -> Result<Vec<AccountStartBalance>, YukiError>

Retrieve opening balances per GL account for a book year.

Source

pub async fn get_projects( &self, administration_id: &str, ) -> Result<Vec<Project>, YukiError>

Retrieve all projects.

Source

pub async fn get_project_balance( &self, administration_id: &str, project_code: &str, gl_account_code: &str, start_date: &str, end_date: &str, ) -> Result<Vec<ProjectBalance>, YukiError>

Retrieve project balance for a specific project and GL account over a date range.

Trait Implementations§

Source§

impl Default for AccountingInfoClient

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more