/* eslint-disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A Versa itemized receipt */ export interface Receipt { version: string; header: { receipt_id: string; /** * ISO 4217 currency code */ currency: "usd" | "eur" | "jpy" | "gbp" | "aud" | "cad" | "chf" | "cnh"; total: number; subtotal: number; paid: number; invoiced_at: number; mcc: string | null; third_party: { first_party_relation: | "bnpl" | "delivery_service" | "marketplace" | "payment_processor" | "platform" | "point_of_sale"; /** * Determines whether the merchant or third party gets top billing on the receipt */ make_primary: boolean; merchant: Merchant; } | null; customer: { name: string; email: string | null; address: null | Address; phone: string | null; } | null; location: Place | null; }; itemization: Itemization; actions: | null | { name: string; url: string; }[]; payments: | null | { [k: string]: unknown; }[]; } export interface Merchant { name: string; brand_color: string | null; logo: string | null; website: string | null; } export interface Address { street_address: string | null; city: string | null; region: null | string; country: null | string; postal_code: string | null; lat: number | null; lon: number | null; } export interface Place { name: string | null; address: null | Address; phone: string | null; url: null | string; google_place_id: string | null; image: null | string; } export interface Itemization { general: GeneralItemization | null; lodging: Lodging | null; ecommerce: Ecommerce | null; car_rental: CarRental | null; transit_route: TransitRoute | null; subscription: Subscription | null; flight: Flight | null; } export interface GeneralItemization { /** * @minItems 1 */ line_items: Item[]; invoice_level_adjustments: null | Adjustment[]; } export interface Item { description: string; total: number; quantity?: null | number; unit_cost?: null | number; unit?: null | string; taxes?: null | Tax[]; metadata?: null | ItemMetadata[]; product_image?: null | string; group?: null | string; url?: null | string; adjustments?: null | Adjustment[]; } export interface Tax { amount: number; rate: number | null; name: string; } export interface ItemMetadata { key: string; value: string; } export interface Adjustment { amount: number; name: null | string; adjustment_type: "discount" | "tip" | "fee" | "other"; rate: null | number; } export interface Lodging { /** * @minItems 1 */ lodging_items: LodgingItem[]; invoice_level_adjustments: null | Adjustment[]; } export interface LodgingItem { check_in: number; check_out: number; location: Place; /** * @minItems 1 */ items: Item[]; room?: null | string; guests?: null | string; metadata?: null | ItemMetadata[]; } export interface Ecommerce { shipments: | null | { /** * @minItems 1 */ items: Item[]; tracking_number: string | null; expected_delivery_at: number | null; shipment_status: ("prep" | "in_transit" | "delivered") | null; destination_address: null | Address; }[]; invoice_level_line_items: null | Item[]; invoice_level_adjustments: null | Adjustment[]; } export interface CarRental { rental_at: number; return_at: number; rental_location: Place; return_location: Place; vehicle: { description: string; image: string | null; } | null; driver_name: string; odometer_reading_in: number; odometer_reading_out: number; /** * @minItems 1 */ items: Item[]; invoice_level_adjustments: null | Adjustment[]; } export interface TransitRoute { /** * @minItems 1 */ transit_route_items: { departure_location: null | Place; arrival_location: null | Place; departure_at: number | null; arrival_at: number | null; polyline: null | string; taxes: null | Tax[]; metadata: null | ItemMetadata[]; fare: number; passenger: string | null; mode?: ("car" | "taxi" | "rail" | "bus" | "ferry" | "other") | null; }[]; invoice_level_adjustments: null | Adjustment[]; } export interface Subscription { /** * @minItems 1 */ subscription_items: { total: number; subscription_type: "one_time" | "recurring"; description: string; interval: null | ("day" | "week" | "month" | "year"); interval_count: number | null; current_period_start: number | null; current_period_end: number | null; quantity: number | null; unit_cost: number | null; taxes: null | Tax[]; metadata: null | ItemMetadata[]; adjustments: null | Adjustment[]; }[]; invoice_level_adjustments: null | Adjustment[]; } export interface Flight { /** * @minItems 1 */ tickets: FlightTicket[]; itinerary_locator: null | string; invoice_level_adjustments: null | Adjustment[]; } export interface FlightTicket { /** * @minItems 1 */ segments: FlightSegment[]; number: null | string; record_locator: null | string; passenger: null | string; } export interface FlightSegment { fare: number; departure_airport_code: string; arrival_airport_code: string; departure_at: null | number; arrival_at: null | number; flight_number: null | string; class_of_service: null | string; taxes: null | Tax[]; adjustments: null | Adjustment[]; }