<?php

/**
 * This file is auto-generated by Saloon SDK Generator
 * Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
 * Do not modify it directly.
 */

declare(strict_types=1);

namespace SellingPartnerApi\Seller\ReplenishmentV20221107\Dto;

use SellingPartnerApi\Dto;

final class GetSellingPartnerMetricsResponseMetric extends Dto
{
    protected static array $attributeMap = [
        'notDeliveredDueToOos' => 'notDeliveredDueToOOS',
        'lostRevenueDueToOos' => 'lostRevenueDueToOOS',
    ];

    /**
     * @param  ?float  $notDeliveredDueToOos  The percentage of items that were not shipped out of the total shipped units over a period of time due to being out of stock. Applicable only for the `PERFORMANCE` `timePeriodType`.
     * @param  ?float  $totalSubscriptionsRevenue  The revenue generated from subscriptions over a period of time. Applicable for both the `PERFORMANCE` and `FORECAST` `timePeriodType`.
     * @param  ?float  $shippedSubscriptionUnits  The number of units shipped to the subscribers over a period of time. Applicable for both the `PERFORMANCE` and `FORECAST` `timePeriodType`.
     * @param  ?float  $activeSubscriptions  The number of active subscriptions present at the end of the period. Applicable only for the `PERFORMANCE` `timePeriodType`.
     * @param  ?float  $subscriberAverageRevenue  The average revenue per subscriber of the program over a period of past 12 months for sellers and 6 months for vendors. Applicable only for the `PERFORMANCE` `timePeriodType`.
     * @param  ?float  $nonSubscriberAverageRevenue  The average revenue per non-subscriber of the program over a period of past 12 months for sellers and 6 months for vendors. Applicable only for the `PERFORMANCE` `timePeriodType`.
     * @param  ?float  $lostRevenueDueToOos  The revenue that would have been generated had there not been out of stock. Applicable only for the PERFORMANCE timePeriodType.
     * @param  ?float  $subscriberAverageReorders  The average reorders per subscriber of the program over a period of 12 months. Applicable only for the PERFORMANCE timePeriodType.
     * @param  ?float  $nonSubscriberAverageReorders  The average reorders per non-subscriber of the program over a period of past 12 months. Applicable only for the PERFORMANCE timePeriodType.
     * @param  ?float  $couponsRevenuePenetration  The percentage of revenue from ASINs with coupons out of total revenue from all ASINs. Applicable only for the PERFORMANCE timePeriodType.
     * @param  ?TimeInterval  $timeInterval  A date-time interval in ISO 8601 format which is used to compute metrics. Only the date is required, but you must pass the complete date and time value. For example, November 11, 2022 should be passed as "2022-11-07T00:00:00Z". Note that only data for the trailing 2 years is supported.
     *
     *  **Note**: The `listOfferMetrics` operation only supports a time interval which covers a single unit of the aggregation frequency. For example, for a MONTH aggregation frequency, the duration of the interval between the startDate and endDate can not be more than 1 month.
     * @param  ?string  $currencyCode  The currency code in ISO 4217 format.
     */
    public function __construct(
        public readonly ?float $notDeliveredDueToOos = null,
        public readonly ?float $totalSubscriptionsRevenue = null,
        public readonly ?float $shippedSubscriptionUnits = null,
        public readonly ?float $activeSubscriptions = null,
        public readonly ?float $subscriberAverageRevenue = null,
        public readonly ?float $nonSubscriberAverageRevenue = null,
        public readonly ?float $lostRevenueDueToOos = null,
        public readonly ?float $subscriberAverageReorders = null,
        public readonly ?float $nonSubscriberAverageReorders = null,
        public readonly ?float $couponsRevenuePenetration = null,
        public readonly ?TimeInterval $timeInterval = null,
        public readonly ?string $currencyCode = null,
    ) {}
}
