pub struct OpeningBalanceSpecBuilder { /* private fields */ }Expand description
Builder for opening balance specifications.
Implementations§
Source§impl OpeningBalanceSpecBuilder
impl OpeningBalanceSpecBuilder
Sourcepub fn new(
company_code: impl Into<String>,
as_of_date: NaiveDate,
total_assets: Decimal,
industry: IndustryType,
) -> Self
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.
Sourcepub fn with_currency(self, currency: impl Into<String>) -> Self
pub fn with_currency(self, currency: impl Into<String>) -> Self
Sets the currency.
Sourcepub fn with_fiscal_year(self, fiscal_year: i32) -> Self
pub fn with_fiscal_year(self, fiscal_year: i32) -> Self
Sets the fiscal year.
Sourcepub fn with_asset_composition(self, composition: AssetComposition) -> Self
pub fn with_asset_composition(self, composition: AssetComposition) -> Self
Sets custom asset composition.
Sourcepub fn with_capital_structure(self, structure: CapitalStructure) -> Self
pub fn with_capital_structure(self, structure: CapitalStructure) -> Self
Sets custom capital structure.
Sourcepub fn with_target_ratios(self, ratios: TargetRatios) -> Self
pub fn with_target_ratios(self, ratios: TargetRatios) -> Self
Sets custom target ratios.
Sourcepub fn with_account_override(
self,
account_code: impl Into<String>,
description: impl Into<String>,
account_type: AccountType,
fixed_balance: Decimal,
) -> Self
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.
Sourcepub fn build(self) -> OpeningBalanceSpec
pub fn build(self) -> OpeningBalanceSpec
Builds the opening balance specification.
Auto Trait Implementations§
impl Freeze for OpeningBalanceSpecBuilder
impl RefUnwindSafe for OpeningBalanceSpecBuilder
impl Send for OpeningBalanceSpecBuilder
impl Sync for OpeningBalanceSpecBuilder
impl Unpin for OpeningBalanceSpecBuilder
impl UnwindSafe for OpeningBalanceSpecBuilder
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