Api reference
components.eyewear.public.blueprints ¶
admin_blueprint ¶
components.eyewear.public.business_logic ¶
frame_order ¶
get_last_eyewear_frame_order_for_user ¶
Retrieve the last eyewear frame order for a given user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
feature_user
|
FeatureUser
|
The user for whom to retrieve the eyewear frame order. |
required |
Returns:
| Type | Description |
|---|---|
Optional[EyewearFrameOrderData]
|
Optional[EyewearFrameOrderData]: The last eyewear frame order data if available, otherwise None. |
Source code in components/eyewear/public/business_logic/frame_order.py
components.eyewear.public.commands ¶
app_group ¶
register_all_commands ¶
register_contact_lens_commands ¶
Source code in components/eyewear/public/commands/app_group.py
register_eyewear_commands ¶
Source code in components/eyewear/public/commands/app_group.py
backfill_favorites_to_shop ¶
backfill_favorites_to_shop ¶
Backfill ShopFavorite rows from existing EyewearFavorite rows.
Idempotent (safe to re-run). Run with --dry-run first to estimate scope.
Source code in components/eyewear/public/commands/backfill_favorites_to_shop.py
contact_lens_commands ¶
build_images_from_weiss_dir ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
cancel_old_unpaid_orders ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
import_catalog ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
notify_stale_orders ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
review_order ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
run_orders_reviewing ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
send_order_rating_notifications ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
send_unpaid_order_notifications ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
simulate_orders_reviewing ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
sync_packages_status_from_laposte ¶
Source code in components/eyewear/public/commands/contact_lens_commands.py
eyewear_commands ¶
build_images_from_fittingbox_dir ¶
Source code in components/eyewear/public/commands/eyewear_commands.py
build_images_from_photoshoot_dir ¶
Source code in components/eyewear/public/commands/eyewear_commands.py
cancel_return_parcels ¶
Source code in components/eyewear/public/commands/eyewear_commands.py
notify_stale_orders ¶
Source code in components/eyewear/public/commands/eyewear_commands.py
send_order_rating_notifications ¶
Source code in components/eyewear/public/commands/eyewear_commands.py
send_restock_alerts ¶
Source code in components/eyewear/public/commands/eyewear_commands.py
sync_frames_stock_from_turing ¶
Source code in components/eyewear/public/commands/eyewear_commands.py
sync_packages_status_from_sendcloud ¶
Source code in components/eyewear/public/commands/eyewear_commands.py
components.eyewear.public.member_attributes ¶
EyewearContactLensOrderShortData
dataclass
¶
EyewearContactLensOrderShortData(
id,
prescription_id,
is_invoiced,
items_count,
total_amount,
covered_amount,
out_of_pocket,
invoiced_total_amount,
invoiced_covered_amount,
invoiced_out_of_pocket,
status,
created_at,
paid_at=None,
shipped_at=None,
delivered_at=None,
returned_at=None,
lost_at=None,
invoiced_at=None,
status_info=None,
)
Bases: DataClassJsonMixin
created_at
class-attribute
instance-attribute
¶
delivered_at
class-attribute
instance-attribute
¶
invoiced_at
class-attribute
instance-attribute
¶
lost_at
class-attribute
instance-attribute
¶
paid_at
class-attribute
instance-attribute
¶
returned_at
class-attribute
instance-attribute
¶
shipped_at
class-attribute
instance-attribute
¶
EyewearFrameOrderShortData
dataclass
¶
EyewearFrameOrderShortData(
id,
prescription_id,
is_invoiced,
is_part_of_test_program,
status,
created_at,
delivered_at=None,
returned_at=None,
lost_at=None,
invoiced_at=None,
status_info=None,
)
recent_contact_lens_orders
module-attribute
¶
recent_contact_lens_orders = MemberAttributeDefinition[
list[EyewearContactLensOrderShortData]
](
name="recent_contact_lens_orders",
display_name="Recent contact lens orders",
description="Last 10 contact lens orders placed by the user — includes status, timestamps, amounts, and prescription reference",
getter=_get_recent_contact_lens_orders,
raw_type=list[EyewearContactLensOrderShortData],
scope=CONTACTING_MEMBER,
formatter=_format_contact_lens_orders,
)
recent_eyewear_frame_orders
module-attribute
¶
recent_eyewear_frame_orders = MemberAttributeDefinition[
list[EyewearFrameOrderShortData]
](
name="recent_eyewear_frame_orders",
display_name="Recent eyewear frame orders",
description="Last 10 eyewear frame orders placed by the user — includes status, timestamps, delivery address, and purchase reference",
getter=_get_recent_eyewear_frame_orders,
raw_type=list[EyewearFrameOrderShortData],
scope=CONTACTING_MEMBER,
formatter=_format_frame_orders,
)