Skip to main content

OpeningBalanceSpecBuilder

Struct OpeningBalanceSpecBuilder 

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

Builder for opening balance specifications.

Implementations§

Source§

impl OpeningBalanceSpecBuilder

Source

pub fn new( company_code: impl Into<String>, as_of_date: NaiveDate, total_assets: Decimal, industry: IndustryType, ) -> Self

Creates a new builder with required parameters.

Source

pub fn with_currency(self, currency: impl Into<String>) -> Self

Sets the currency.

Source

pub fn with_fiscal_year(self, fiscal_year: i32) -> Self

Sets the fiscal year.

Source

pub fn with_asset_composition(self, composition: AssetComposition) -> Self

Sets custom asset composition.

Source

pub fn with_capital_structure(self, structure: CapitalStructure) -> Self

Sets custom capital structure.

Source

pub fn with_target_ratios(self, ratios: TargetRatios) -> Self

Sets custom target ratios.

Source

pub fn with_account_override( self, account_code: impl Into<String>, description: impl Into<String>, account_type: AccountType, fixed_balance: Decimal, ) -> Self

Adds an account override with a fixed balance.

Source

pub fn build(self) -> OpeningBalanceSpec

Builds the opening balance specification.

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, 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, 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V