pub struct VatClient { /* private fields */ }Expand description
Client for the Yuki VAT SOAP service.
Implementations§
Source§impl VatClient
impl VatClient
pub fn new() -> Self
Sourcepub fn with_client(http: Client) -> Self
pub fn with_client(http: Client) -> Self
Build over a caller-provided HTTP client, so a long-running consumer can share a single pooled client across all service clients.
Sourcepub async fn authenticate(&mut self, api_key: &str) -> Result<String, YukiError>
pub async fn authenticate(&mut self, api_key: &str) -> Result<String, YukiError>
Authenticate with the Yuki API and store the session ID.
Sourcepub async fn vat_return_list(
&self,
administration_id: &str,
) -> Result<Vec<VatReturn>, YukiError>
pub async fn vat_return_list( &self, administration_id: &str, ) -> Result<Vec<VatReturn>, YukiError>
Retrieve the list of VAT returns for an administration.
Sourcepub async fn active_vat_codes(
&self,
administration_id: &str,
) -> Result<Vec<VatCode>, YukiError>
pub async fn active_vat_codes( &self, administration_id: &str, ) -> Result<Vec<VatCode>, YukiError>
Retrieve all active VAT codes for an administration.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for VatClient
impl !UnwindSafe for VatClient
impl Freeze for VatClient
impl Send for VatClient
impl Sync for VatClient
impl Unpin for VatClient
impl UnsafeUnpin for VatClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more