Skip to main content

RetailAnomaly

Enum RetailAnomaly 

Source
pub enum RetailAnomaly {
    Sweethearting {
        cashier_id: String,
        beneficiary: String,
        estimated_loss: Decimal,
        transaction_count: u32,
    },
    Skimming {
        register_id: String,
        store_id: String,
        amount: Decimal,
        detection_method: String,
    },
    RefundFraud {
        transaction_id: String,
        employee_id: String,
        refund_amount: Decimal,
        scheme_type: RefundFraudType,
    },
    ReceivingFraud {
        po_id: String,
        employee_id: String,
        short_quantity: u32,
        value: Decimal,
    },
    TransferFraud {
        from_store: String,
        to_store: String,
        items_diverted: u32,
        value: Decimal,
    },
    CouponFraud {
        coupon_code: String,
        not_presented: bool,
        value: Decimal,
        transaction_count: u32,
    },
    EmployeeDiscountAbuse {
        employee_id: String,
        non_employee_beneficiary: String,
        discount_value: Decimal,
        transaction_count: u32,
    },
    VoidAbuse {
        cashier_id: String,
        void_count: u32,
        void_total: Decimal,
        period_days: u32,
    },
    PriceOverrideAbuse {
        employee_id: String,
        override_count: u32,
        total_discount: Decimal,
    },
    GiftCardFraud {
        scheme_type: GiftCardFraudType,
        amount: Decimal,
        cards_affected: u32,
    },
    InventoryManipulation {
        store_id: String,
        manipulation_type: InventoryManipulationType,
        value: Decimal,
    },
    VendorKickback {
        vendor_id: String,
        buyer_id: String,
        kickback_amount: Decimal,
        scheme_duration_days: u32,
    },
}
Expand description

Retail-specific anomaly types.

Variants§

§

Sweethearting

Employee gives unauthorized discounts to friends/family.

Fields

§cashier_id: String
§beneficiary: String
§estimated_loss: Decimal
§transaction_count: u32
§

Skimming

Cash stolen from register before recording.

Fields

§register_id: String
§store_id: String
§amount: Decimal
§detection_method: String
§

RefundFraud

Fraudulent refunds processed.

Fields

§transaction_id: String
§employee_id: String
§refund_amount: Decimal
§scheme_type: RefundFraudType
§

ReceivingFraud

Receiving fraud (short shipments, diversions).

Fields

§po_id: String
§employee_id: String
§short_quantity: u32
§value: Decimal
§

TransferFraud

Fraudulent inter-store transfers.

Fields

§from_store: String
§to_store: String
§items_diverted: u32
§value: Decimal
§

CouponFraud

Coupon/promotion fraud.

Fields

§coupon_code: String
§not_presented: bool
§value: Decimal
§transaction_count: u32
§

EmployeeDiscountAbuse

Employee discount abuse.

Fields

§employee_id: String
§non_employee_beneficiary: String
§discount_value: Decimal
§transaction_count: u32
§

VoidAbuse

Void abuse.

Fields

§cashier_id: String
§void_count: u32
§void_total: Decimal
§period_days: u32
§

PriceOverrideAbuse

Price override abuse.

Fields

§employee_id: String
§override_count: u32
§total_discount: Decimal
§

GiftCardFraud

Gift card fraud.

Fields

§scheme_type: GiftCardFraudType
§amount: Decimal
§cards_affected: u32
§

InventoryManipulation

Inventory manipulation.

Fields

§store_id: String
§manipulation_type: InventoryManipulationType
§value: Decimal
§

VendorKickback

Fictitious vendor kickback.

Fields

§vendor_id: String
§buyer_id: String
§kickback_amount: Decimal
§scheme_duration_days: u32

Implementations§

Source§

impl RetailAnomaly

Source

pub fn financial_impact(&self) -> Decimal

Returns the financial impact of this anomaly.

Source

pub fn involves_collusion(&self) -> bool

Returns whether this involves collusion.

Trait Implementations§

Source§

impl Clone for RetailAnomaly

Source§

fn clone(&self) -> RetailAnomaly

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RetailAnomaly

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RetailAnomaly

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl IndustryAnomaly for RetailAnomaly

Source§

fn anomaly_type(&self) -> &str

Returns the anomaly type name.
Source§

fn severity(&self) -> u8

Returns the severity (1-5).
Source§

fn detection_difficulty(&self) -> &str

Returns detection difficulty.
Source§

fn indicators(&self) -> Vec<String>

Returns indicators that should trigger detection.
Source§

fn regulatory_concerns(&self) -> Vec<String>

Returns related regulatory concerns.
Source§

impl Serialize for RetailAnomaly

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,