<?php

declare (strict_types=1);
namespace DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Service\Ucp\Checkout\Response;

/**
 * Data source for building checkout session responses.
 *
 * @see https://ucp.dev/2026-01-23/schemas/shopping/checkout.json
 *
 * @phpstan-type Total array{type: string, amount: int}
 * @phpstan-type Item array{id: string, title: string, price: int}
 * @phpstan-type LineItem array{id: string, item: Item, quantity: int, totals: array<int, Total>}
 * @phpstan-type Buyer array{email: string, first_name: string, last_name: string, phone_number: string, consent?: array<string, mixed>}
 */
interface CheckoutDataSource
{
    /**
     * Get checkout status.
     *
     * @return string One of: incomplete, requires_escalation, ready_for_complete, completed, canceled
     */
    public function get_status(): string;
    /**
     * Get currency code.
     */
    public function get_currency(): string;
    /**
     * Get line items.
     *
     * @return array<int, LineItem>
     */
    public function get_line_items(): array;
    /**
     * Get top-level totals.
     *
     * @return array<int, Total>
     */
    public function get_totals(): array;
    /**
     * Get buyer information.
     *
     * @return Buyer
     */
    public function get_buyer(): array;
    /**
     * Get fulfillment information.
     *
     * @return array{methods: array<int, array<string, mixed>>}
     */
    public function get_fulfillment(): array;
    /**
     * Get discount information.
     *
     * @return array{codes: array<int, string>, applied: array<int, array<string, mixed>>}
     */
    public function get_discounts(): array;
}
