pub struct TransferPricingPolicy {Show 13 fields
pub policy_id: String,
pub name: String,
pub method: TransferPricingMethod,
pub markup_percent: Decimal,
pub min_markup_percent: Option<Decimal>,
pub max_markup_percent: Option<Decimal>,
pub applicable_transaction_types: Vec<String>,
pub effective_date: NaiveDate,
pub end_date: Option<NaiveDate>,
pub fee_currency: Option<String>,
pub fixed_fee_amount: Option<Decimal>,
pub documentation_requirements: DocumentationLevel,
pub requires_annual_benchmarking: bool,
}Expand description
A transfer pricing policy applicable to intercompany transactions.
Fields§
§policy_id: StringUnique policy identifier.
name: StringPolicy name/description.
method: TransferPricingMethodTransfer pricing method used.
markup_percent: DecimalMarkup or margin percentage (interpretation depends on method).
min_markup_percent: Option<Decimal>Minimum markup (for range-based policies).
max_markup_percent: Option<Decimal>Maximum markup (for range-based policies).
applicable_transaction_types: Vec<String>Transaction types this policy applies to.
effective_date: NaiveDateEffective date of the policy.
end_date: Option<NaiveDate>End date of the policy (if replaced).
fee_currency: Option<String>Currency for fixed fee policies.
fixed_fee_amount: Option<Decimal>Fixed fee amount (for FixedFee method).
documentation_requirements: DocumentationLevelDocumentation requirements.
requires_annual_benchmarking: boolWhether annual benchmarking is required.
Implementations§
Source§impl TransferPricingPolicy
impl TransferPricingPolicy
Sourcepub fn new_cost_plus(
policy_id: String,
name: String,
markup_percent: Decimal,
effective_date: NaiveDate,
) -> Self
pub fn new_cost_plus( policy_id: String, name: String, markup_percent: Decimal, effective_date: NaiveDate, ) -> Self
Create a new cost-plus policy.
Sourcepub fn new_fixed_fee(
policy_id: String,
name: String,
fee_amount: Decimal,
currency: String,
effective_date: NaiveDate,
) -> Self
pub fn new_fixed_fee( policy_id: String, name: String, fee_amount: Decimal, currency: String, effective_date: NaiveDate, ) -> Self
Create a new fixed fee policy.
Sourcepub fn is_active_on(&self, date: NaiveDate) -> bool
pub fn is_active_on(&self, date: NaiveDate) -> bool
Check if the policy is active on a given date.
Sourcepub fn calculate_transfer_price(&self, cost: Decimal) -> Decimal
pub fn calculate_transfer_price(&self, cost: Decimal) -> Decimal
Calculate the transfer price for a given cost.
Sourcepub fn calculate_markup(&self, cost: Decimal) -> Decimal
pub fn calculate_markup(&self, cost: Decimal) -> Decimal
Calculate the markup amount for a given cost.
Trait Implementations§
Source§impl Clone for TransferPricingPolicy
impl Clone for TransferPricingPolicy
Source§fn clone(&self) -> TransferPricingPolicy
fn clone(&self) -> TransferPricingPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransferPricingPolicy
impl Debug for TransferPricingPolicy
Source§impl<'de> Deserialize<'de> for TransferPricingPolicy
impl<'de> Deserialize<'de> for TransferPricingPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TransferPricingPolicy
impl RefUnwindSafe for TransferPricingPolicy
impl Send for TransferPricingPolicy
impl Sync for TransferPricingPolicy
impl Unpin for TransferPricingPolicy
impl UnsafeUnpin for TransferPricingPolicy
impl UnwindSafe for TransferPricingPolicy
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