# generated by datamodel-codegen:
#   filename:  sell_account_v1_oas3.yaml
#   timestamp: 2026-04-07T06:59:16+00:00

from __future__ import annotations

from typing import List, Optional

from pydantic import BaseModel, Field


class Amount(BaseModel):
    """
    A complex type that describes the value of a monetary amount as represented by a global currency. When passing in an amount in a request payload, both <b>currency</b> and <b>value</b> fields are required, and both fields are also always returned for an amount in a response field.
    """

    currency: Optional[str] = Field(
        None,
        description='The base currency applied to the <b>value</b> field to establish a monetary amount.  <br><br>The currency is represented as a 3-letter <a href="https://www.iso.org/iso-4217-currency-codes.html " title="https://www.iso.org " target="_blank">ISO 4217</a> currency code. For example, the code for the Canadian Dollar is <code>CAD</code>.<br><br><b>Default:</b> The default currency of the eBay marketplace that hosts the listing. For implementation help, refer to <a href=\'https://developer.ebay.com/api-docs/sell/account/types/ba:CurrencyCodeEnum\'>eBay API documentation</a>',
    )
    value: Optional[str] = Field(
        None, description="The monetary amount in the specified <b>currency</b>."
    )


class CategoryType(BaseModel):
    """
    The category type discerns whether the policy applies to motor vehicle listings, or to any other items except motor vehicle listings. <br><br>Each business policy can be associated with either or both categories ('MOTORS_VEHICLES' and 'ALL_EXCLUDING_MOTORS_VEHICLES'); however, return business policies are not applicable for motor vehicle listings.
    """

    default: Optional[bool] = Field(
        None,
        description='<span class="tablenote"><strong>Note:</strong> This field has been deprecated and is no longer used.<ul><li>Do not include this field in any <b>create</b> or <b>update</b> method.</li><li>This field may be returned within the payload of a <b>get</b> method, but it can be ignored.</li></ul></span>',
    )
    name: Optional[str] = Field(
        None,
        description="The category type to which the policy applies (motor vehicles or non-motor vehicles). <br><br><span class=\"tablenote\"><strong>Note:</strong> The <code>MOTORS_VEHICLES</code> category type is not valid for return policies. eBay flows do not support the return of motor vehicles.</span> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:CategoryTypeEnum'>eBay API documentation</a>",
    )


class CompactCustomPolicyResponse(BaseModel):
    """
    The response payload for requests that return a list of custom policies.
    """

    customPolicyId: Optional[str] = Field(
        None,
        description='The unique custom policy identifier for the policy being returned.<br><br><span class="tablenote"><strong>Note:</strong> This value is automatically assigned by the system when the policy is created.</span>',
    )
    label: Optional[str] = Field(
        None,
        description="Customer-facing label shown on View Item pages for items to which the policy applies. This seller-defined string is displayed as a system-generated hyperlink pointing to the seller's policy information.<br><br><b>Max length:</b> 65",
    )
    name: Optional[str] = Field(
        None,
        description='The seller-defined name for the custom policy. Names must be unique for policies assigned to the same seller and policy type.<br><br><span class="tablenote"><strong>Note:</strong> This field is visible only to the seller. </span><br><b>Max length:</b> 65',
    )
    policyType: Optional[str] = Field(
        None,
        description="Specifies the type of Custom Policy being returned. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:CustomPolicyTypeEnum'>eBay API documentation</a>",
    )


class CustomPolicy(BaseModel):
    """
    This container defines a seller's custom policy identified by policy ID for the selected eBay marketplace. A successful call returns the requested policy information.
    """

    customPolicyId: Optional[str] = Field(
        None, description="The unique custom policy identifier for a policy."
    )
    description: Optional[str] = Field(
        None,
        description="Contains the seller's policy and policy terms. Buyers access this information from the View Item page for items to which the policy has been applied.<br><br><b>Max length:</b> 15,000",
    )
    label: Optional[str] = Field(
        None,
        description="Customer-facing label shown on View Item pages for items to which the policy applies. This seller-defined string is displayed as a system-generated hyperlink pointing to the seller's policy information.<br><br><b>Max length:</b> 65",
    )
    name: Optional[str] = Field(
        None,
        description='The seller-defined name for the custom policy. Names must be unique for policies assigned to the same seller and policy type.<br><br><span class="tablenote"><strong>Note:</strong> This field is visible only to the seller. </span><br><b>Max length:</b> 65',
    )
    policyType: Optional[str] = Field(
        None,
        description="Specifies the type of Custom Policy being returned. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:CustomPolicyTypeEnum'>eBay API documentation</a>",
    )


class CustomPolicyCreateRequest(BaseModel):
    """
    This type is used by the request payload of the createCustomPolicy method to define a new custom policy for a specific marketplace.
    """

    description: Optional[str] = Field(
        None,
        description="Contains the seller's policy and policy terms.<br><br><b>Max length:</b> 15,000",
    )
    label: Optional[str] = Field(
        None,
        description="Customer-facing label shown on View Item pages for items to which the policy applies. This seller-defined string is displayed as a system-generated hyperlink pointing to the seller's policy information.<br><br><b>Max length:</b> 65",
    )
    name: Optional[str] = Field(
        None,
        description='The seller-defined name for the custom policy. Names must be unique for policies assigned to the same seller and policy type.<br><br><span class="tablenote"><strong>Note:</strong> This field is visible only to the seller. </span><br><b>Max length:</b> 65',
    )
    policyType: Optional[str] = Field(
        None,
        description="Specifies the type of custom policy being created. <br><br>Two Custom Policy types are supported: <ul><li>Product Compliance (PRODUCT_COMPLIANCE)</li> <li>Takeback (TAKE_BACK)</li></ul> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:CustomPolicyTypeEnum'>eBay API documentation</a>",
    )


class CustomPolicyRequest(BaseModel):
    description: Optional[str] = Field(
        None,
        description='Contains the seller specified policy and policy terms.<br><br><span class="tablenote"><strong>Note:</strong> Always supply this field. If this field is not specified, any previous value is removed. Call the <a href="/api-docs/sell/account/resources/custom_policy/methods/getCustomPolicy">getCustomPolicy</a> method to return the present field value for this policy.</span><br><b>Max length:</b> 15,000',
    )
    label: Optional[str] = Field(
        None,
        description='Customer-facing label shown on View Item pages for items to which the policy applies. This seller-defined string is displayed as a system-generated hyperlink pointing to seller specified policy information.<br><br><span class="tablenote"><strong>Note:</strong> Always supply this field. If this field is not specified, any previous value is removed. Call the <a href="/api-docs/sell/account/resources/custom_policy/methods/getCustomPolicy">getCustomPolicy</a> method to return the present field value for this policy.</span><br><b>Max length:</b> 65',
    )
    name: Optional[str] = Field(
        None,
        description='The seller-defined name for the custom policy. Names must be unique for policies assigned to the same seller and policy type.<br><br><span class="tablenote"><strong>Note:</strong> This field is visible only to the seller. </span><br><br><span class="tablenote"><strong>Note:</strong> Always supply this field. If this field is not specified, any previous value is removed. Call the <a href="/api-docs/sell/account/resources/custom_policy/methods/getCustomPolicy">getCustomPolicy</a> method to return the present field value for this policy.</span><br><b>Max length:</b> 65',
    )


class CustomPolicyResponse(BaseModel):
    customPolicies: Optional[List[CompactCustomPolicyResponse]] = Field(
        None,
        description="This array contains the custom policies that match the input criteria.",
    )
    href: Optional[str] = Field(
        None, description="<i>This field is for future use.</i>"
    )
    limit: Optional[int] = Field(
        None, description="<i>This field is for future use.</i>"
    )
    next: Optional[str] = Field(
        None, description="<i>This field is for future use.</i>"
    )
    offset: Optional[int] = Field(
        None, description="<i>This field is for future use.</i>"
    )
    prev: Optional[str] = Field(
        None, description="<i>This field is for future use.</i>"
    )
    total: Optional[int] = Field(
        None, description="<i>This field is for future use.</i>"
    )


class ErrorParameter(BaseModel):
    """
    A complex type that indicates a parameter that caused an error and the value of the parameter which caused the error.
    """

    name: Optional[str] = Field(
        None, description="Name of the parameter that caused the error."
    )
    value: Optional[str] = Field(
        None, description="The value of the parameter that caused the error."
    )


class KycCheck(BaseModel):
    """
    This type is used to provide details about any KYC check that is applicable to the managed payments seller.
    """

    dataRequired: Optional[str] = Field(
        None,
        description="The enumeration value returned in this field categorizes the type of details needed for the KYC check. More information about the check is shown in the <b>detailMessage</b> and other applicable, corresponding fields. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/kyc:DetailsType'>eBay API documentation</a>",
    )
    dueDate: Optional[str] = Field(
        None,
        description='The timestamp in this field indicates the date by which the seller should resolve the KYC requirement.<br><br>The timestamp in this field uses the UTC date and time format described in the <a href="https://www.iso.org/iso-8601-date-and-time-format.html" target="_blank">ISO 8601 Standard</a>. See below for this format and an example: <br><br><i>MM-DD-YYYY HH:MM:SS</i><br/><code>06-05-2020 10:34:18</code>',
    )
    remedyUrl: Optional[str] = Field(
        None,
        description="If applicable and available, a URL will be returned in this field, and the link will take the seller to an eBay page where they can provide the requested information.",
    )
    alert: Optional[str] = Field(
        None,
        description="This field gives a short summary of what is required from the seller. An example might be, '<code>Upload bank document now.</code>'. The <b>detailMessage</b> field will often provide more details on what is required of the seller.",
    )
    detailMessage: Optional[str] = Field(
        None,
        description="This field gives a detailed message about what is required from the seller. An example might be, '<code>Please upload a bank document by 2020-08-01 to get your account back in good standing.</code>'.",
    )


class KycResponse(BaseModel):
    """
    This is the base response type of the <b>getKYC</b> method.
    """

    kycChecks: Optional[List[KycCheck]] = Field(
        None,
        description="This array contains one or more KYC checks required from a managed payments seller. The seller may need to provide more documentation and/or information about themselves, their company, or the bank account they are using for seller payouts.<br/><br/>If no KYC checks are currently required from the seller, this array is not returned, and the seller only receives a <code>204 No Content</code> HTTP status code.",
    )


class PaymentsProgramOnboardingSteps(BaseModel):
    """
    The payments program onboarding steps, status, and link.
    """

    name: Optional[str] = Field(
        None,
        description="The name of the step in the steps array. Over time, these names are subject to change as processes change. The output sample contains example step names. Review an actual call response for updated step names. ",
    )
    status: Optional[str] = Field(
        None,
        description="This enumeration value indicates the status of the associated step. <p> <span class=\"tablenote\"><strong>Note:</strong> Only one step can be <code>IN_PROGRESS</code> at a time.</span></p> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:PaymentsProgramOnboardingStepStatus'>eBay API documentation</a>",
    )
    webUrl: Optional[str] = Field(
        None,
        description="This URL provides access to the <code>IN_PROGRESS</code> step.",
    )


class PaymentsProgramResponse(BaseModel):
    """
    The response object containing the sellers status with regards to the specified payment program.
    """

    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which the payment program applies. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    paymentsProgramType: Optional[str] = Field(
        None,
        description="This parameter specifies the payment program whose status is returned by the call.  <br><br>Currently the only supported payments program is <code>EBAY_PAYMENTS</code>. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:PaymentsProgramType'>eBay API documentation</a>",
    )
    status: Optional[str] = Field(
        None,
        description="The enumeration value returned in this field indicates whether or not the seller's account is enabled for the payments program. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:PaymentsProgramStatus'>eBay API documentation</a>",
    )
    wasPreviouslyOptedIn: Optional[bool] = Field(
        None,
        description="If returned as <code>true</code>, the seller was at one point opted-in to the associated payment program, but they later opted out of the program. A value of <code>false</code> indicates the seller never opted-in to the program or if they did opt-in to the program, they never opted-out of it.  <br><br>It's important to note that the setting of this field does not indicate the seller's current status regarding the payment program. It is possible for this field to return <code>true</code> while the <b>status</b> field returns <code>OPTED_IN</code>.",
    )


class Program(BaseModel):
    """
    The seller program to opt in to when part of an <b>optInToProgram</b> request, or out of when part of an  <b>optOutOfProgram</b> request.
    """

    programType: Optional[str] = Field(
        None,
        description="The seller program to opt in to when part of an <b>optInToProgram</b> request, or out of when part of an  <b>optOutOfProgram</b> request. When returned in an <b>getOptedInPrograms</b> response, a separate <b>programType</b> field is returned for each seller program that the seller is opted in to. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ProgramTypeEnum'>eBay API documentation</a>",
    )


class Programs(BaseModel):
    """
    The base response type of the <b>getOptedInPrograms</b> method.
    """

    programs: Optional[List[Program]] = Field(
        None,
        description="An array of seller programs that the seller's account is opted in to. An empty array is returned if the seller is not opted in to any of the seller programs.",
    )


class RateTable(BaseModel):
    """
    This type is used to provide details about each shipping rate table that is returned in the <b>getRateTables</b> response.
    """

    countryCode: Optional[str] = Field(
        None,
        description='A two-letter <a href="https://www.iso.org/iso-3166-country-codes.html " title="https://www.iso.org " target="_blank">ISO 3166</a> country code representing the eBay marketplace where the shipping rate table is defined. For implementation help, refer to <a href=\'https://developer.ebay.com/api-docs/sell/account/types/ba:CountryCodeEnum\'>eBay API documentation</a>',
    )
    locality: Optional[str] = Field(
        None,
        description="This enumeration value returned here indicates whether the shipping rate table is a domestic or international shipping rate table. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ShippingOptionTypeEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None, description="The seller-defined name for the shipping rate table."
    )
    rateTableId: Optional[str] = Field(
        None,
        description="A unique eBay-assigned ID for a seller's shipping rate table. These <b>rateTableId</b> values are used to associate shipping rate tables to fulfillment business policies or directly to listings through an add/revise/relist call in the Trading API.",
    )


class RateTableResponse(BaseModel):
    """
    This type is the base response of the <b>getRateTables</b> method.
    """

    rateTables: Optional[List[RateTable]] = Field(
        None,
        description="An array of all shipping rate tables defined for a marketplace (or all marketplaces if no <b>country_code</b> query parameter is used). This array will be returned as empty if the seller has no defined shipping rate tables for the specified marketplace.",
    )


class RecipientAccountReference(BaseModel):
    """
    <span class="tablenote"><b>Note</b>: This type is no longer applicable. eBay now controls all electronic payment methods available for a marketplace, and a seller never has to specify any electronic payment methods.</span>
    """

    referenceId: Optional[str] = Field(
        None,
        description='<span class="tablenote"><b>Note</b>: DO NOT USE THIS FIELD. eBay now controls all electronic payment methods available for a marketplace, and a seller never has to specify any electronic payment methods.</span>',
    )
    referenceType: Optional[str] = Field(
        None,
        description="<span class=\"tablenote\"><b>Note</b>: DO NOT USE THIS FIELD. eBay now controls all electronic payment methods available for a marketplace, and a seller never has to specify any electronic payment methods.</span> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:RecipientAccountReferenceTypeEnum'>eBay API documentation</a>",
    )


class Region(BaseModel):
    """
    This type is used to define specific shipping regions. There are four 'levels' of shipping regions, including large geographical regions (like 'Asia', 'Europe', or 'Middle East'), individual countries, US states or Canadian provinces, and special locations/domestic regions within a country (like 'Alaska/Hawaii' or 'PO Box').
    """

    regionName: Optional[str] = Field(
        None,
        description='A string that indicates the name of a region, as defined by eBay. A "region" can be either a \'world region\' (e.g., the "Middle East" or "Southeast Asia"), a country (represented with a two-letter country code), a state or province (represented with a two-letter code), or a special domestic region within a country. <br><br>The <a href="/devzone/xml/docs/reference/ebay/GeteBayDetails.html">GeteBayDetails</a> call in the Trading API can be used to retrieve the world regions and special domestic regions within a specific country. To get these enumeration values, call <b>GeteBayDetails</b> with the <b>DetailName</b> value set to <b>ExcludeShippingLocationDetails</b>.',
    )
    regionType: Optional[str] = Field(
        None,
        description="Reserved for future use. <!--The region's type, which can be one of the following: 'COUNTRY', 'COUNTRY_REGION', 'STATE_OR_PROVINCE', 'WORLD_REGION', or 'WORLDWIDE'.--> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:RegionTypeEnum'>eBay API documentation</a>",
    )


class RegionSet(BaseModel):
    """
    This type consists of the <b>regionIncluded</b> and <b>regionExcluded</b> arrays, which indicate the areas to where the seller does and doesn't ship.
    """

    regionExcluded: Optional[List[Region]] = Field(
        None,
        description='An array of one or more <b>regionName</b> values that specify the areas to where a seller does not ship. A <b>regionExcluded</b> list should only be set in the top-level <b>shipToLocations</b> container and not within the <b>shippingServices.shipToLocations</b> container used to specify which shipping regions are serviced by each available shipping service option. <p>Many sellers are willing to ship to many international locations, but they may want to exclude some world regions or some countries as places they are willing to ship to.<br><br>This array will be returned as empty if no shipping regions are excluded with the fulfillment business policy.<br> <br><span class="tablenote"><b>Note: </b> The <b>regionExcluded</b> array is not applicable for motor vehicle business policies on the US, CA, or UK marketplaces. If this array is used in a <b>createFulfillmentPolicy</b> or <b>updateFulfillmentPolicy</b> request, it will be ignored.</span>',
    )
    regionIncluded: Optional[List[Region]] = Field(
        None,
        description='An array of one or more <b>regionName</b> fields that specify the areas to where a seller ships. <br>Each eBay marketplace supports its own set of allowable shipping locations.<br> <br><span class="tablenote"><b>Note: </b> The <b>regionIncluded</b> array is not applicable for motor vehicle business policies on the US, CA, or UK marketplaces. If this array is used in a <b>createFulfillmentPolicy</b> or <b>updateFulfillmentPolicy</b> request, it will be ignored.</span>',
    )


class SalesTax(BaseModel):
    """
    This type is used to provide sales tax settings for a specific tax jurisdiction.
    """

    countryCode: Optional[str] = Field(
        None,
        description="The country code enumeration value identifies the country to which this sales tax rate applies.<br><br><span class=\"tablenote\"><b>Note:</b> Sales-tax tables are available only for the US and Canada marketplaces. Therefore, the only supported values are:<ul><li><code>US</code></li><li><code>CA</code></li></ul></span> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:CountryCodeEnum'>eBay API documentation</a>",
    )
    salesTaxJurisdictionId: Optional[str] = Field(
        None,
        description='A unique ID that identifies the sales tax jurisdiction to which the sales tax rate applies.<br><br><span class="tablenote"><b>Note:</b> When the returned <code>countryCode</code> is <code>US</code>, the only supported return values for <code>salesTaxJurisdictionId</code> are:<ul><li><code>AS</code> (American Samoa)</li><li><code>GU</code> (Guam</li><li><code>MP</code> Northern Mariana Islands</li><li><code>PW (Palau)</li><li><code>VI</code> (US Virgin Islands)</li></ul></span>',
    )
    salesTaxPercentage: Optional[str] = Field(
        None,
        description="The sales tax rate that will be applied to sales price. The <b>shippingAndHandlingTaxed</b> value will indicate whether or not sales tax is also applied to shipping and handling charges<br><br>Although it is a string, a percentage value is returned here, such as <code>7.75</code>",
    )
    shippingAndHandlingTaxed: Optional[bool] = Field(
        None,
        description="If returned as <code>true</code>, sales tax is also applied to shipping and handling charges, and not just the total sales price of the order.",
    )


class SalesTaxBase(BaseModel):
    """
    This type is used by the base request of the <b>createOrReplaceSalesTax</b>.
    """

    salesTaxPercentage: Optional[str] = Field(
        None,
        description="This field is used to set the sales tax rate for the tax jurisdiction set in the call URI. When applicable to an order, this sales tax rate will be applied to sales price. The <b>shippingAndHandlingTaxed</b> value will indicate whether or not sales tax is also applied to shipping and handling charges<br><br>Although it is a string, a percentage value is set here, such as <code>7.75</code>.",
    )
    shippingAndHandlingTaxed: Optional[bool] = Field(
        None,
        description="This field is set to <code>true</code> if the seller wishes to apply sales tax to shipping and handling charges, and not just the total sales price of the order. Otherwise, this field's value should be set to <code>false</code>.",
    )


class SalesTaxInput(BaseModel):
    countryCode: Optional[str] = Field(
        None,
        description='This parameter specifies the two-letter <a href="https://www.iso.org/iso-3166-country-codes.html " title="https://www.iso.org " target="_blank">ISO 3166</a> code of the country for which a sales-tax table entry is to be created or updated.<br><br><span class="tablenote"><b>Note:</b> Sales-tax tables are available only for the US and Canada marketplaces. Therefore, the only supported values are:<ul><li><code>US</code></li><li><code>CA</code></li></ul></span>',
    )
    salesTaxJurisdictionId: Optional[str] = Field(
        None,
        description='This parameter specifies the ID of the tax jurisdiction for which a sales-tax table entry is to be created or updated.<br><br>Valid jurisdiction IDs can be retrieved using the <a href="/api-docs/sell/metadata/resources/country/methods/getSalesTaxJurisdictions" target="_blank ">getSalesTaxJurisdiction</a> method of the Metadata API.<br><br><span class="tablenote"><b>Note:</b> When <code>countryCode</code> is set to <code>US</code>, the only supported values for <code>jurisdictionId</code> are:<ul><li><code>AS</code> (American Samoa)</li><li><code>GU</code> (Guam)</li><li><code>MP</code> (Northern Mariana Islands)</li><li><code>PW</code> (Palau)</li><li><code>VI</code> (US Virgin Islands)</li></ul></span>',
    )
    salesTaxPercentage: Optional[str] = Field(
        None,
        description="This parameter specifies the sales tax rate for the specified <b>salesTaxJurisdictionId</b>. When applicable to an order, this sales tax rate will be applied to the sales price. The <b>shippingAndHandlingTaxed</b> value indicates whether or not sales tax is also applied to shipping and handling charges<br><br>Although it is a string, a percentage value is set here, such as <code>7.75</code>.",
    )
    shippingAndHandlingTaxed: Optional[bool] = Field(
        None,
        description="This parameter is set to <code>true</code> if the seller wishes to apply sales tax to shipping and handling charges and not just the total sales price of an order. Otherwise, this parameter's value should be set to <code>false</code>.",
    )


class SalesTaxes(BaseModel):
    """
    This type is used by the root response of the <b>getSalesTaxes</b> method.
    """

    salesTaxes: Optional[List[SalesTax]] = Field(
        None,
        description="An array of one or more sales-tax rate entries for a specified country.<br><br>If no sales-tax rate entries are set up, no response payload is returned, but an HTTP status code of <code>204 No Content</code> is returned.",
    )


class SellerEligibilityResponse(BaseModel):
    """
    A type that is used to provide the seller's eligibility status for an eBay advertising program.
    """

    programType: Optional[str] = Field(
        None,
        description="The eBay advertising program for which a seller may be eligible. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/plser:AdvertisingProgramEnum'>eBay API documentation</a>",
    )
    reason: Optional[str] = Field(
        None,
        description="The reason why a seller is ineligible for the specified eBay advertising program.<br /><br />This field is only returned if the seller is ineligible for the eBay advertising program. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/plser:SellerIneligibleReasonEnum'>eBay API documentation</a>",
    )
    status: Optional[str] = Field(
        None,
        description="The seller eligibility status for the specified eBay advertising program. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/cmlib:SellerEligibilityEnum'>eBay API documentation</a>",
    )


class SellingLimit(BaseModel):
    """
    Type used by the <b>sellingLimit</b> container, a container that lists the monthly cap for the quantity of items sold and total sales amount allowed for the seller's account.
    """

    amount: Optional[Amount] = Field(
        None,
        description="This container shows the monthly cap for total sales amount allowed for the seller's account. This container may not be returned if a seller does not have a monthly cap for total sales amount.",
    )
    quantity: Optional[int] = Field(
        None,
        description="This field shows the monthly cap for total quantity sold allowed for the seller's account. This field may not be returned if a seller does not have a monthly cap for total quantity sold.",
    )


class SellingPrivileges(BaseModel):
    """
    This type is used by the base response of the <b>getPrivileges</b> method.
    """

    sellerRegistrationCompleted: Optional[bool] = Field(
        None,
        description="If this field is returned as <code>true</code>, the seller's registration is completed. If this field is returned as <code>false</code>, the registration process is not complete.",
    )
    sellingLimit: Optional[SellingLimit] = Field(
        None,
        description='This container lists the monthly cap for the quantity of items sold and total sales amount allowed for the seller\'s account. This container may not be returned if a seller does not have a monthly cap for total quantity sold and total sales amount. <p><span class="tablenote"><span style="color:#004680"><strong>Note: </strong>The selling limit value returned in <b>getPrivileges</b> may vary slightly from the value displayed in Seller Hub. The value in Seller Hub is an abbreviated figure, where rounding is applied.</span></p>',
    )


class ShippingService(BaseModel):
    """
    This type is used by the <b>shippingServices</b> array, an array that provides details about every domestic and international shipping service option that is defined for the policy.
    """

    additionalShippingCost: Optional[Amount] = Field(
        None,
        description="This container is used by the seller to cover the use case when a single buyer purchases multiple quantities of the same line item. This cost cannot exceed the corresponding <b>shippingCost</b> value. A seller will generally set this field when he/she wants to pass on a shipping discount to the buyer if that buyer purchases multiple quantities of a line item. <br><br>The seller can ship multiple quantities of the line item in the same package and pass on the shipping savings to the buyer.<br><br>If this field is not set, and a buyer purchases multiple quantities of an item, the seller can technically charge the same cost set in the <b>shippingCost</b> container for each individual item, but in general, it behooves both the seller and the buyer (and saves both parties money) if they discuss combined shipping.<br><br>This field is not applicable to auction listings or single-quantity, fixed-price listings.<br><br>This container is returned if set.",
    )
    buyerResponsibleForPickup: Optional[bool] = Field(
        None,
        description="This field should be included and set to <code>true</code> for a motor vehicle listing if it will be the buyer's responsibility to pick up the purchased motor vehicle after full payment is made. <br><br>This field is only applicable to motor vehicle listings. In the majority of motor vehicle listings, the seller does make the buyer responsible for pickup or shipment of the vehicle. <br><br>This field is returned if set.<br><br><b>Default</b>: false",
    )
    buyerResponsibleForShipping: Optional[bool] = Field(
        None,
        description="This field should be included and set to <code>true</code> for a motor vehicle listing if it will be the buyer's responsibility to arrange for shipment of a motor vehicle. <br><br>This field is only applicable to motor vehicle listings. In the majority of motor vehicle listings, the seller does make the buyer responsible for pickup or shipment of the vehicle. <br><br>This field is returned if set.<br><br><b>Default</b>: false",
    )
    freeShipping: Optional[bool] = Field(
        None,
        description="This field is included and set to <code>true</code> if the seller offers a free domestic shipping option to the buyer. <br><br>This field can only be included and set to <code>true</code> for the first domestic shipping service option specified in the <b>shippingServices</b> array (it is ignored if set for subsequent shipping services or for any international shipping service option). <br><br>The first specified shipping service option has a <b>sortOrder</b> value of <code>1</code> or if the <b>sortOrderId</b> field is not used, it is the shipping service option that's specified first in the <b>shippingServices</b> array.<br><br>This container is returned if set.",
    )
    shippingCarrierCode: Optional[str] = Field(
        None,
        description='This field sets/indicates the shipping carrier, such as <code>USPS</code>, <code>FedEx</code>, or <code>UPS</code>. Although this field uses the <b>string</b> type, the seller must pass in a pre-defined enumeration value here. <br><br>For a full list of shipping carrier enum values for a specified eBay marketplace, the <a href="/devzone/xml/docs/reference/ebay/GeteBayDetails.html">GeteBayDetails</a> call of the <b>Trading API</b> can be used, and the <b>DetailName</b> field\'s value should be set to <code>ShippingCarrierDetails</code>. The enum values for each shipping carriers can be found in each <b>ShippingCarrierDetails.ShippingCarrier</b> field in the response payload.<br><br> This field is actually optional, as the shipping carrier is also tied into the <b>shippingServiceCode</b> enum value, and that field is required for every specified shipping service option.<br><br>This field is returned if set.',
    )
    shippingCost: Optional[Amount] = Field(
        None,
        description="This container is used to set the shipping cost to ship one item using the corresponding shipping service option. This container is conditionally required if the seller is using flat-rate shipping and is not using a domestic or international shipping rate table. <br><br>This container is not necessary for calculated shipping, since eBay will calculate the shipping cost and display it in the View Item page based off of the potential buyer's ship-to location.<br><br>This value is automatically set to <code>0.0</code> for the first specified domestic shipping service option and if the corresponding <b>freeShipping</b> field is set to <code>true</code>.  <br><br>This container is returned if set for the policy.",
    )
    shippingServiceCode: Optional[str] = Field(
        None,
        description='This field sets/indicates the domestic or international shipping service option, such as <code>USPSPriority</code>, <code>FedEx2Day</code>, or <code>UPS3rdDay</code>. Although this field uses the <b>string</b> type, the seller must pass in a pre-defined enumeration value here. <br><br>For a full list of shipping service option enum values for a specified eBay marketplace, the <a href="/devzone/xml/docs/reference/ebay/GeteBayDetails.html">GeteBayDetails</a> call of the <b>Trading API</b> can be used, and the <b>DetailName</b> field\'s value should be set to <code>ShippingServiceDetails</code>. <br><br>The enum values for each shipping service option can be found in each <b>ShippingServiceDetails.ShippingService</b> field in the response payload. The seller must make sure that the shipping service option is still valid, which is indicated by a <code>true</code> value in the corresponding <b>ValidForSellingFlow</b> boolean field. International shipping service options are typically returned at the top of the response payload, and are indicated by an <b>InternationalService</b> boolean field that reads <code>true</code>. <br><br>The <b>InternationalService</b> boolean field is not returned at all for domestic shipping service options. <br><br> This field is required for every specified shipping service option.',
    )
    shipToLocations: Optional[RegionSet] = Field(
        None,
        description='This container is used to set the ship-to locations applicable to the corresponding shipping service option. Although the <b>regionExcluded</b> container is defined for <b>RegionSet</b> type and could technically be used here, it is recommened that only the <b>regionIncluded</b> container be used at the shipping service level. The excluded shipping regions (if any) can instead be set up in the top-level <b>regionExcluded</b> container. <br><br>The <b>regionIncluded</b> and <b>regionExcluded</b> containers define the geographical regions/countries/states or provinces/domestic regions where the seller does and doesn\'t ship to with this fulfillment policy.<br><br>To retrieve the valid geographical shipping region values, two-digit country values, or special domestic regions for an eBay marketplace, call <a href="/devzone/xml/docs/reference/ebay/GeteBayDetails.html">GeteBayDetails</a> with <b>DetailName</b> value set to <code>ExcludeShippingLocationDetails</code>, then review the <b>ExcludeShippingLocationDetails</b> containers in the response for the strings you use in the <b>regionIncluded.regionName</b> field. <ul><li>For valid geographical region names, look for the <code>ExcludeShippingLocationDetails</code> containers in the <b>GeteBayDetails</b> response where the <b>Region</b> value is <code>Worldwide</code>, and the valid values will be shown in the corresponding <b>Location</b> fields.</li> <li>For valid two-digit country codes, look for <code>ExcludeShippingLocationDetails</code> in the <b>GeteBayDetails</b> response where the <b>Region</b> value is one of the defined geographical regions, and the valid values will be shown in the corresponding <b>Location</b> fields. Alternatively, you can find the two-digit country code values in the <a href="/api-docs/sell/account/types/ba:CountryCodeEnum">CountryCodeEnum</a> type definition.</li>  <li>For valid domestic region values, look for <code>ExcludeShippingLocationDetails</code> in the <b>GeteBayDetails</b> response where the <b>Region</b> value is either <code>Domestic Location</code> or <code>Additional Locations</code>, and the valid values will be shown in the corresponding <b>Location</b> fields.</li></ul> The <code>STATE_OR_PROVINCE</code> region type is only applicable to the US and Canada, and valid values for US states are the same <a href="https://about.usps.com/who-we-are/postal-history/state-abbreviations.htm ">two-digit abbreviations</a> used by the United States Postal Service, and valid values for Canadian provinces and territories are the same <a href="https://www.canadapost-postescanada.ca/cpc/en/support/articles/addressing-guidelines/symbols-and-abbreviations.page ">two-digit abbreviations</a> used by the Canada Post.',
    )
    sortOrder: Optional[int] = Field(
        None,
        description="The integer value set in this field controls the order of the corresponding domestic or international shipping service option in the View Item and Checkout pages. <br><br>If the <b>sortOrder</b> field is not supplied, the order of domestic and international shipping service options is determined by the order in which they are listed in the API call. <br><br><b>Min</b>: 1. <b>Max</b>: 4 (for domestic shipping service) or 5 (for international shipping service).",
    )
    surcharge: Optional[Amount] = Field(
        None,
        description='<span class="tablenote"> <strong>Note:</strong> DO NOT USE THIS FIELD. Shipping surcharges for domestic shipping service options can no longer be set with fulfillment business policies, except through shipping rate tables. <br><br>To do this, a seller would set up a surcharge-based shipping rate table and specify the surcharge in that table. Then, the seller would need to associate this shipping rate table to the fulfillment business policy by specifying the unique ID of the shipping rate table through the <b>shippingOptions.rateTableId</b> field. </span>Shipping surcharges cannot be applied at all to international shipping service options.',
    )


class TimeDuration(BaseModel):
    """
    A type used to specify a period of time using a specified time-measurement unit. Payment, return, and fulfillment business policies all use this type to specify time windows.<br><br>Whenever a container that uses this type is used in a request, both of these fields are required. Similarly, whenever a container that uses this type is returned in a response, both of these fields are always returned.
    """

    unit: Optional[str] = Field(
        None,
        description="These enum values represent the time measurement unit, such as <code>DAY</code>. A span of time is defined when you apply the value specified in the <b>value</b> field to the value specified for <b>unit</b>. <br><br>See <b>TimeDurationUnitEnum</b> for a complete list of possible time-measurement units. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:TimeDurationUnitEnum'>eBay API documentation</a>",
    )
    value: Optional[int] = Field(
        None,
        description="An integer that represents an amount of time, as measured by the time-measurement unit specified in the <b>unit</b> field.",
    )


class UpdatedSalesTaxEntry(BaseModel):
    """
    This container stores the array of sales-tax table entries that have been created or updated.
    """

    countryCode: Optional[str] = Field(
        None,
        description='The two-letter <a href="https://www.iso.org/iso-3166-country-codes.html " title="https://www.iso.org " target="_blank">ISO 3166</a> code of the country associated with the sales-tax table entry.',
    )
    jurisdictionId: Optional[str] = Field(
        None,
        description="The ID of the tax jurisdiction associated with the sales-tax table entry.",
    )
    statusCode: Optional[int] = Field(
        None,
        description='The HTTP status code for the call.<br><br><span class="tablenote"><b>Note:</b> The system returns one HTTP status code regardless of the number of sales-tax table entries provided. Therefore, the same HTTP <code>statusCode</code> will be listed for all sales-tax table entries returned in the payload.</span>',
    )


class UpdatedSalesTaxResponse(BaseModel):
    """
    This type is used to return the list of new and updated sales-tax table entries.
    """

    updatedSalesTaxEntries: Optional[List[UpdatedSalesTaxEntry]] = Field(
        None, description="The array of new and updated sales-tax table entries."
    )


class BulkSalesTaxInput(BaseModel):
    salesTaxInputList: Optional[List[SalesTaxInput]] = Field(
        None,
        description="The array of sales-tax table entries to be created or updated.",
    )


class Error(BaseModel):
    """
    A container that defines the elements of error and warning messages.
    """

    category: Optional[str] = Field(
        None,
        description='The category type for this error or warning. It is a string that can have one of three values:<ul><li><code>Application</code>: Indicates an exception or error occurred in the application code or at runtime. Examples include catching an exception in a service\'s business logic, system failures, or request errors from a dependency.</li><li><code>Business</code>: Used when your service or a dependent service refused to continue processing on the resource because of a business rule violation such as "Seller does not ship item to Antarctica" or "Buyer ineligible to purchase an alcoholic item". Business errors are not syntactical input errors.</li><li><code>Request</code>: Used when there is anything wrong with the request, such as authentication, syntactical errors, rate limiting or missing headers, bad HTTP header values, and so on.</li></ul>',
    )
    domain: Optional[str] = Field(
        None,
        description="Name of the domain ,or primary system, of the service or application where the error occurred.",
    )
    errorId: Optional[int] = Field(
        None,
        description="A positive integer that uniquely identifies the specific error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.",
    )
    inputRefIds: Optional[List[str]] = Field(
        None,
        description="Identifies specific request elements associated with the error, if any. inputRefId's response is format specific. For JSON, use <i>JSONPath</i> notation.",
    )
    longMessage: Optional[str] = Field(
        None,
        description="A more detailed explanation of the error than given in the <code>message</code> error field.",
    )
    message: Optional[str] = Field(
        None,
        description="Information on how to correct the problem, in the end user's terms and language where applicable. Its value is at most 50 characters long. If applicable, the value is localized in the end user's requested locale.",
    )
    outputRefIds: Optional[List[str]] = Field(
        None,
        description="Identifies specific response elements associated with the error, if any. Path format is the same as <code>inputRefId</code>.",
    )
    parameters: Optional[List[ErrorParameter]] = Field(
        None,
        description="This optional list of name/value pairs that contain context-specific <code>ErrorParameter</code> objects, with each item in the list being a parameter (or input field name) that caused an error condition. Each <code>ErrorParameter</code> object consists of two fields, a <code>name</code> and a <code>value</code>.",
    )
    subdomain: Optional[str] = Field(
        None,
        description="If present, indicates the subsystem in which the error occurred.",
    )


class InternationalReturnOverrideType(BaseModel):
    """
    This type defines the fields for a seller's international return policy. Sellers have the ability to set separate domestic and international return policies, but if an international return policy is not set, the same return policy settings specified for the domestic return policy are also used for returns for international buyers.
    """

    returnMethod: Optional[str] = Field(
        None,
        description="This field sets/indicates if the seller offers replacement items to the buyer in the case of an international return. The buyer must be willing to accept a replacement item; otherwise, the seller will need to issue a refund for a return. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ReturnMethodEnum'>eBay API documentation</a>",
    )
    returnPeriod: Optional[TimeDuration] = Field(
        None,
        description='This container indicates the number of calendar days that the buyer has to return an item. The return period begins when the item is marked "delivered" at the buyer\'s specified ship-to location.  <br><br>You must set the value to one that\'s accepted by the marketplace and category where the item is listed. Most categories support 30-day and 60-day return periods. For a definitive list of return periods for one or more categories, call <a href="/api-docs/sell/metadata/resources/marketplace/methods/getReturnPolicies">getReturnPolicies</a> method of the <b>Metadata API</b>. <br><br>The <b>TimeDuration</b> type is used to set/indicate the return period, and you set the <b>unit</b> value to <code>DAY</code> and the <b>value</b> field to either <code>30</code> or <code>60</code> (or other value, as appropriate).  <br><br>Note that this value cannot be modified if the listing has bids or sales, or if the listing ends within 12 hours.  <br><br>This field is conditionally required if the <b>internationalOverride.returnsAccepted</b> field is set to <code>true</code>.',
    )
    returnsAccepted: Optional[bool] = Field(
        None,
        description="If set to <code>true</code>, the seller accepts international returns. If set to <code>false</code>, the seller does not accept international returns.  <br><br>This field is conditionally required if the seller chooses to have a separate international return policy.",
    )
    returnShippingCostPayer: Optional[str] = Field(
        None,
        description="This field indicates who is responsible for paying for the shipping charges for returned items. The field can be set to either <code>BUYER</code> or <code>SELLER</code>.  <br><br>Depending on the return policy and specifics of the return, either the buyer or the seller can be responsible for the return shipping costs. Note that the seller is always responsible for return shipping costs for 'significantly not as described' (SNAD) issues.  <br><br>This field is conditionally required if the <b>internationalOverride.returnsAccepted</b> field is set to <code>true</code>. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ReturnShippingCostPayerEnum'>eBay API documentation</a>",
    )


class PaymentMethod(BaseModel):
    """
    This type is used by the <b>paymentMethods</b> container, which is used by the seller to specify one or more offline payment methods. <br><br> <span class="tablenote"><b>Note</b>: eBay now controls all electronic payment methods available for a marketplace, so a seller will no longer use this type to specify any electronic payment methods.</span>
    """

    brands: Optional[List[str]] = Field(
        None,
        description='<span class="tablenote"><b>Note</b>: This array is no longer applicable and should not be used. eBay now controls all electronic payment methods available for a marketplace, and a seller never has to specify any electronic payment methods, including any credit card brands accepted. </span>',
    )
    paymentMethodType: Optional[str] = Field(
        None,
        description="This array is only applicable for listings supporting offline payment methods. See the <b>PaymentMethodTypeEnum</b> type for supported offline payment method enum values. If offline payments are enabled for the policy, provide at least one offline payment method.</p> For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:PaymentMethodTypeEnum'>eBay API documentation</a>",
    )
    recipientAccountReference: Optional[RecipientAccountReference] = Field(
        None,
        description='<span class="tablenote"><b>Note</b>: This container is no longer applicable and should not be used. eBay now controls all electronic payment methods available for a marketplace, and a seller never has to specify any electronic payment methods, including PayPal. </span>',
    )


class PaymentsProgramOnboardingResponse(BaseModel):
    """
    Type used by the payments program onboarding response
    """

    onboardingStatus: Optional[str] = Field(
        None,
        description="This enumeration value indicates the eligibility of payment onboarding for the registered site. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:PaymentsProgramOnboardingStatus'>eBay API documentation</a>",
    )
    steps: Optional[List[PaymentsProgramOnboardingSteps]] = Field(
        None,
        description="An array of the active process steps for payment onboarding and the status of each step. This array includes the step <strong>name</strong>, step <strong>status</strong>, and a <strong>webUrl</strong> to the <code>IN_PROGRESS</code> step. The step names are returned in sequential order. ",
    )


class ReturnPolicy(BaseModel):
    """
    This type is used by the <b>returnPolicy</b> response container, a container which defines a seller's return business policy for a specific marketplace.
    """

    categoryTypes: Optional[List[CategoryType]] = Field(
        None,
        description='This container indicates which category group that the return policy applies to.<br><br><span class="tablenote"><b>Note</b>: Return business policies are not applicable to motor vehicle listings, so the <b>categoryTypes.name</b> value will always be <code>ALL_EXCLUDING_MOTORS_VEHICLES</code> for return business policies.</span>',
    )
    description: Optional[str] = Field(
        None,
        description="A seller-defined description of the return business policy. This description is only for the seller's use, and is not exposed on any eBay pages.  <br><br><b>Max length</b>: 250",
    )
    extendedHolidayReturnsOffered: Optional[bool] = Field(
        None,
        description='<p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> This field is deprecated, since eBay no longer supports extended holiday returns. Any value supplied in this field is neither read nor returned.</p> ',
    )
    internationalOverride: Optional[InternationalReturnOverrideType] = Field(
        None,
        description="This container shows the seller's international return policy settings. This container is only returned if the seller has set a separate international return policy for the business policy. International return policies are optional, even if the seller ships to international locations. If a separate international return policy is not set, all of the domestic return policy settings also apply to international orders.",
    )
    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which this return business policy applies. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None,
        description="A seller-defined name for this return business policy. Names must be unique for policies assigned to the same marketplace.<br><br><b>Max length:</b> 64",
    )
    refundMethod: Optional[str] = Field(
        None,
        description="This field indicates the refund method offered by the seller. Its value will be <code>MONEY_BACK</code> unless the seller is enabled for <b>Buy online, Pickup in Store</b> or <b>Click and Collect</b>, and then it might be <code>MERCHANDISE_CREDIT</code>. Getting their money back for returned items is always an option for buyers, regardless of what the seller sets in this field. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:RefundMethodEnum'>eBay API documentation</a>",
    )
    restockingFeePercentage: Optional[str] = Field(
        None,
        description='<p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> This field is deprecated, since eBay no longer allows sellers to charge a restocking fee for buyer remorse returns. If this field is included, it is ignored and it is no longer returned.</p>',
    )
    returnInstructions: Optional[str] = Field(
        None,
        description='This text-based field provides more details on seller-specified return instructions. This field is only returned if set for the return business policy.<br><p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> This field is no longer supported on many eBay marketplaces. To see if a marketplace and eBay category does support this field, call <a href="/api-docs/sell/metadata/resources/marketplace/methods/getReturnPolicies">getReturnPolicies</a> method of the <b>Metadata API</b>. Then you will look for the <b>policyDescriptionEnabled</b> field with a value of <code>true</code> for the eBay category.</span></p><br><b>Max length</b>: 5000 (8000 for DE)',
    )
    returnMethod: Optional[str] = Field(
        None,
        description="This field is only returned if the seller is willing to offer a replacement item as an alternative to 'Money Back'. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ReturnMethodEnum'>eBay API documentation</a>",
    )
    returnPeriod: Optional[TimeDuration] = Field(
        None,
        description='This container indicates the number of calendar days that the buyer has to return an item. The return period begins when the item is marked "delivered" at the buyer\'s specified ship-to location.  <br><br>Most categories support 30-day and 60-day return periods.<br><br><span class="tablenote"><b>Note</b>: Unless the seller has set a separate international return policy through the <b>internationalOverride</b> container, this return period will be valid for domestic and international returns (if the seller ships internationally).</span>',
    )
    returnPolicyId: Optional[str] = Field(
        None,
        description="A unique eBay-assigned ID for a return business policy. This ID is generated when the policy is created.",
    )
    returnsAccepted: Optional[bool] = Field(
        None,
        description='If this field is returned as <code>true</code>, the seller accepts returns. If set to <code>false</code>, the seller does not accept returns.<br><br><span class="tablenote"><strong>Note:</strong> Top-Rated sellers must accept item returns and the <b>handlingTime</b> should be set to zero days or one day for a listing to receive a Top-Rated Plus badge on the View Item or search result pages. For more information on eBay\'s Top-Rated seller program, see <a href="https://pages.ebay.com/help/sell/top-rated.html ">Becoming a Top Rated Seller and qualifying for Top Rated Plus benefits</a>.</span>',
    )
    returnShippingCostPayer: Optional[str] = Field(
        None,
        description="This field indicates who is responsible for paying for the shipping charges for returned items. The field can be set to either <code>BUYER</code> or <code>SELLER</code>.  <br><br>Depending on the return policy and specifics of the return, either the buyer or the seller can be responsible for the return shipping costs. Note that the seller is always responsible for return shipping costs for SNAD-related issues. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ReturnShippingCostPayerEnum'>eBay API documentation</a>",
    )


class ReturnPolicyRequest(BaseModel):
    """
    This root container defines a seller's return business policy for a specific marketplace and category group. This type is used when creating or updating a return business policy.
    """

    categoryTypes: Optional[List[CategoryType]] = Field(
        None,
        description='This container indicates which category group that the return policy applies to.<br><br><span class="tablenote"><b>Note</b>: Return business policies are not applicable to motor vehicle listings, so the <b>categoryTypes.name</b> value must be set to <code>ALL_EXCLUDING_MOTORS_VEHICLES</code> for return business policies.</span>',
    )
    description: Optional[str] = Field(
        None,
        description="A seller-defined description of the return business policy. This description is only for the seller's use, and is not exposed on any eBay pages.  <br><br><b>Max length</b>: 250",
    )
    extendedHolidayReturnsOffered: Optional[bool] = Field(
        None,
        description='<p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> This field is deprecated, since eBay no longer supports extended holiday returns. Any value supplied in this field is neither read nor returned.</p> ',
    )
    internationalOverride: Optional[InternationalReturnOverrideType] = Field(
        None,
        description="This container is used by the seller to specify a separate  international return policy. If a separate international return policy is not defined by a seller, all of the domestic return policy settings will also apply to international orders.",
    )
    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which this return business policy applies.  For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None,
        description="A seller-defined name for this return business policy. Names must be unique for policies assigned to the same marketplace. <br><br><b>Max length</b>: 64",
    )
    refundMethod: Optional[str] = Field(
        None,
        description='This field sets the refund method to use for returned items. Its value defaults to <code>MONEY_BACK</code> if omitted, so this field is only needed for <b>Buy online, Pickup in Store</b> or <b>Click and Collect</b> items where the seller is willing to offer merchandise credit as an additional refund method to buyers. Getting their money back for returned items is always an option for buyers, regardless of what the seller sets in this field.<p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> If this field is not included in a return business policy, it will default to <code>MONEY_BACK</code>.</p> For implementation help, refer to <a href=\'https://developer.ebay.com/api-docs/sell/account/types/api:RefundMethodEnum\'>eBay API documentation</a>',
    )
    restockingFeePercentage: Optional[str] = Field(
        None,
        description='<p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> This field is deprecated, since eBay no longer allows sellers to charge a restocking fee for buyer remorse returns. If this field is included, it is ignored.</p>',
    )
    returnInstructions: Optional[str] = Field(
        None,
        description='This text-based field provides more details on seller-specified return instructions. <br><p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> This field is no longer supported on many eBay marketplaces. To see if a marketplace and eBay category does support this field, call <a href="/api-docs/sell/metadata/resources/marketplace/methods/getReturnPolicies">getReturnPolicies</a> method of the <b>Metadata API</b>. Then you will look for the <b>policyDescriptionEnabled</b> field with a value of <code>true</code> for the eBay category.</span></p><br><b>Max length</b>: 5000 (8000 for DE)',
    )
    returnMethod: Optional[str] = Field(
        None,
        description="This field can be used if the seller is willing and able to offer a replacement item as an alternative to 'Money Back'. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ReturnMethodEnum'>eBay API documentation</a>",
    )
    returnPeriod: Optional[TimeDuration] = Field(
        None,
        description='This container is used to specify the number of days that the buyer has to return an item. The return period begins when the item is marked "delivered" at the buyer\'s specified ship-to location.  <br><br>You must set the value to one that\'s accepted by the marketplace and category where the item is listed. Most categories support 30-day and 60-day return periods.  <p><span class="tablenote"><span style="color:#004680"><strong>Note: </strong>Eligible Parts & Accessories (P&A) listings require sellers to offer buyers free returns with a minimum return period of 30 days. See <a href="/api-docs/user-guides/static/trading-user-guide/ebay-motors-parts-accessories-easy-returns.html"  target="_blank">Support for easy returns in Parts and Accessories</a> for details.</span></p> <br>For a definitive list of return periods for one or more categories, call <a href="/api-docs/sell/metadata/resources/marketplace/methods/getReturnPolicies">getReturnPolicies</a> method of the <b>Metadata API</b>.<br><br>The return period is set using the <b>TimeDuration</b> type, where you set <b>unit</b> to <code>DAY</code> and <b>value</b> to either <code>30</code> or <code>60</code> (or other value, as appropriate).  <br><br>Note that this value cannot be modified if the listing has bids or sales, or if the listing ends within 12 hours.  <br><br><i>Required if </i> <b>returnsAccepted</b> is set to <code>true</code>.',
    )
    returnsAccepted: Optional[bool] = Field(
        None,
        description='If set to <code>true</code>, the seller accepts returns. If set to <code>false</code>, the seller does not accept returns.<br><p><span class="tablenote"><strong>Note:</strong>Top-Rated sellers must accept item returns and the <b>handlingTime</b> should be set to zero days or one day for a listing to receive a Top-Rated Plus badge on the View Item or search result pages. For more information on eBay\'s Top-Rated seller program, see <a href="http://pages.ebay.com/help/sell/top-rated.html ">Becoming a Top Rated Seller and qualifying for Top Rated Plus benefits</a>.</span></p>',
    )
    returnShippingCostPayer: Optional[str] = Field(
        None,
        description='This field indicates who is responsible for paying for the shipping charges for returned items. The field can be set to either <code>BUYER</code> or <code>SELLER</code>. <p><span class="tablenote"><span style="color:#004680"><strong>Note: </strong>Eligible Parts & Accessories (P&A) listings require sellers to offer buyers free returns with a minimum return period of 30 days. See <a href="/api-docs/user-guides/static/trading-user-guide/ebay-motors-parts-accessories-easy-returns.html"  target="_blank">Support for easy returns in Parts and Accessories</a> for details.</span></p> <br>Depending on the return policy and specifics of the return, either the buyer or the seller can be responsible for the return shipping costs. Note that the seller is always responsible for return shipping costs for SNAD-related issues.  <br><br>This field is conditionally required if <b>returnsAccepted</b> is set to <code>true</code>. For implementation help, refer to <a href=\'https://developer.ebay.com/api-docs/sell/account/types/api:ReturnShippingCostPayerEnum\'>eBay API documentation</a>',
    )


class ReturnPolicyResponse(BaseModel):
    """
    The response payload for the <b>getReturnPolicies</b> method. <br><br><span class="tablenote"><b>Note</b>: Pagination has not yet been enabled for <b>getReturnPolicies</b>, so all of the pagination-related fields are for future use.</span>
    """

    href: Optional[str] = Field(None, description="This field is for future use.")
    limit: Optional[int] = Field(None, description="This field is for future use.")
    next: Optional[str] = Field(None, description="This field is for future use.")
    offset: Optional[int] = Field(None, description="This field is for future use.")
    prev: Optional[str] = Field(None, description="This field is for future use.")
    returnPolicies: Optional[List[ReturnPolicy]] = Field(
        None,
        description="A list of all of the seller's return business policies defined for the specified marketplace. This array will be returned as empty if no return business policies are defined for the specified marketplace.",
    )
    total: Optional[int] = Field(
        None,
        description="The total number of return business policies retrieved in the result set.  <br><br>If no return business policies are defined for the specified marketplace, this field is returned with a value of <code>0</code>.",
    )


class SellerEligibilityMultiProgramResponse(BaseModel):
    """
    The base response of the <b>getAdvertisingEligibility</b> method that contains the seller eligibility information for one or more advertising programs.
    """

    advertisingEligibility: Optional[List[SellerEligibilityResponse]] = Field(
        None,
        description="An array of response fields that define the seller eligibility for eBay advertising programs.",
    )


class SetReturnPolicyResponse(BaseModel):
    """
    A complex type that is populated with a response containing a return policies.
    """

    categoryTypes: Optional[List[CategoryType]] = Field(
        None,
        description="This field always returns <code>ALL_EXCLUDING_MOTORS_VEHICLES</code> for return business policies, since return business policies are not applicable to motor vehicle listings.",
    )
    description: Optional[str] = Field(
        None,
        description="A seller-defined description of the return business policy. This description is only for the seller's use, and is not exposed on any eBay pages. This field is returned if set for the policy. <br><br><b>Max length</b>: 250",
    )
    extendedHolidayReturnsOffered: Optional[bool] = Field(
        None,
        description='<p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> This field is deprecated, since eBay no longer supports extended holiday returns. This field should no longer be returned.</p> ',
    )
    internationalOverride: Optional[InternationalReturnOverrideType] = Field(
        None,
        description="This container is used by the seller to specify a separate  international return policy, and will only be returned if the seller has set a separate return policy for international orders. If a separate international return policy is not defined by a seller, all of the domestic return policy settings will also apply to international orders.",
    )
    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which this return business policy applies. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None,
        description="A seller-defined name for this return business policy. Names must be unique for policies assigned to the same marketplace.<br><br><b>Max length:</b> 64",
    )
    refundMethod: Optional[str] = Field(
        None,
        description="If a seller indicates that they will accept buyer returns, this value will be <code>MONEY_BACK</code>. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:RefundMethodEnum'>eBay API documentation</a>",
    )
    restockingFeePercentage: Optional[str] = Field(
        None,
        description='<p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> This field is deprecated, since eBay no longer allows sellers to charge a restocking fee for buyer remorse returns.</p>',
    )
    returnInstructions: Optional[str] = Field(
        None,
        description='This text-based field provides more details on seller-specified return instructions. <br><p class="tablenote"><span  style="color: #dd1e31;"><b>Important!</b></span> This field is no longer supported on many eBay marketplaces. To see if a marketplace and eBay category does support this field, call <a href="/api-docs/sell/metadata/resources/marketplace/methods/getReturnPolicies">getReturnPolicies</a> method of the <b>Metadata API</b>. Then you will look for the <b>policyDescriptionEnabled</b> field with a value of <code>true</code> for the eBay category.</span></p><br><b>Max length</b>: 5000 (8000 for DE)',
    )
    returnMethod: Optional[str] = Field(
        None,
        description="This field will be returned if the seller is willing and able to offer a replacement item as an alternative to 'Money Back'. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ReturnMethodEnum'>eBay API documentation</a>",
    )
    returnPeriod: Optional[TimeDuration] = Field(
        None,
        description='This container specifies the amount of days that the buyer has to return the item after receiving it. The return period begins when the item is marked "delivered" at the buyer\'s specified ship-to location. This container will be returned unless the business policy states that the seller does not accept returns. <br><p><span class="tablenote"><span style="color:#004680"><strong>Note: </strong>Eligible Parts & Accessories (P&A) listings require sellers to offer buyers free returns with a minimum return period of 30 days. See <a href="/api-docs/user-guides/static/trading-user-guide/ebay-motors-parts-accessories-easy-returns.html"  target="_blank">Support for easy returns in Parts and Accessories</a> for details.</span></p>',
    )
    returnPolicyId: Optional[str] = Field(
        None,
        description="A unique eBay-assigned ID for a return business policy. This ID is generated when the policy is created.",
    )
    returnsAccepted: Optional[bool] = Field(
        None,
        description="If set to <code>true</code>, the seller accepts returns. If set to <code>false</code>, this field indicates that the seller does not accept returns.",
    )
    returnShippingCostPayer: Optional[str] = Field(
        None,
        description='This field indicates who is responsible for paying for the shipping charges for returned items. The field can be set to either <code>BUYER</code> or <code>SELLER</code>.  <p><span class="tablenote"><span style="color:#004680"><strong>Note: </strong>Eligible Parts & Accessories (P&A) listings require sellers to offer buyers free returns with a minimum return period of 30 days. See <a href="/api-docs/user-guides/static/trading-user-guide/ebay-motors-parts-accessories-easy-returns.html"  target="_blank">Support for easy returns in Parts and Accessories</a> for details.</span></p> <br>Note that the seller is always responsible for return shipping costs for SNAD-related issues.  <br><br>This container will be returned unless the business policy states that the seller does not accept returns. For implementation help, refer to <a href=\'https://developer.ebay.com/api-docs/sell/account/types/api:ReturnShippingCostPayerEnum\'>eBay API documentation</a>',
    )
    warnings: Optional[List[Error]] = Field(
        None,
        description="An array of one or more errors or warnings that were generated during the processing of the request. If there were no issues with the request, this array will return empty.",
    )


class ShippingOption(BaseModel):
    """
    This type is used by the <b>shippingOptions</b> array, which is used to provide detailed information on the domestic and international shipping options available for the policy. A separate <b>ShippingOption</b> object covers domestic shipping service options and international shipping service options (if the seller ships to international locations).
    """

    costType: Optional[str] = Field(
        None,
        description="This field defines whether the shipping cost model is <code>FLAT_RATE</code> (the same rate for all buyers, or buyers within a region if shipping rate tables are used) or <code>CALCULATED</code> (the shipping rate varies by the ship-to location and size and weight of the package). <br><br>This field is conditionally required if any shipping service options are specified (domestic and/or international). For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ShippingCostTypeEnum'>eBay API documentation</a>",
    )
    insuranceFee: Optional[Amount] = Field(
        None,
        description="This field has been deprecated. <br><br>Shipping insurance is offered only via a shipping carrier's shipping services and is no longer available via eBay shipping policies.",
    )
    insuranceOffered: Optional[bool] = Field(
        None,
        description="This field has been deprecated. <br><br>Shipping insurance is offered only via a shipping carrier's shipping services and is no longer available via eBay shipping policies.",
    )
    optionType: Optional[str] = Field(
        None,
        description="This field is used to indicate if the corresponding shipping service options (under <b>shippingServices</b> array) are domestic or international shipping service options. This field is conditionally required if any shipping service options are specified (domestic and/or international). For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:ShippingOptionTypeEnum'>eBay API documentation</a>",
    )
    packageHandlingCost: Optional[Amount] = Field(
        None,
        description="This container is used if the seller adds handling charges to domestic and/or international shipments. <br><br>Sellers can not specify any domestic handling charges if they offered 'free shipping' in the policy.<br><br>This container will only be returned if set for the policy.",
    )
    rateTableId: Optional[str] = Field(
        None,
        description='This field is used if the seller wants to associate a domestic or international shipping rate table to the fulfillment business policy. The <a href="/api-docs/sell/account/resources/rate_table/methods/getRateTables">getRateTables</a> method can be used to retrieve shipping rate table IDs.<br><br>With domestic and international shipping rate tables, the seller can set different shipping costs based on shipping regions and shipping speed/level of service (one-day, expedited, standard, economy). There are also options to add additional per-weight and handling charges.<br><br>Sellers need to be careful that shipping rate tables match the corresponding shipping service options. In other words, a domestic shipping rate table must not be specified in the same container where international shipping service options are being specified, and vice versa, and the shipping speed/level of service of the provided shipping service options should match the shipping speed/level of service options that are defined in the shipping rate tables. <br><br>For example, if the corresponding shipping rate table defines costs for one-day shipping services, there should be at least one one-day shipping service option specified under the <b>shippingServices</b> array.<br><br>This field is returned if set.',
    )
    shippingDiscountProfileId: Optional[str] = Field(
        None,
        description="This field is the unique identifier of a seller's domestic or international shipping discount profile. If a buyer satisfies the requirements of the discount rule, this buyer will receive a shipping discount for the order. <br><br>The seller can create and manage shipping discount profiles using (Get/Set) <b>ShippingDiscountProfiles</b> calls in the <b>Trading API</b> or through the <b>Shipping Preferences</b> in <b>My eBay</b>.",
    )
    shippingPromotionOffered: Optional[bool] = Field(
        None,
        description="This boolean indicates whether or not the seller has set up a promotional shipping discount that will be available to buyers who satisfy the requirements of the shipping discount rule. <br><br>The seller can create and manage shipping promotional discounts using (Get/Set) <b>ShippingDiscountProfiles</b> calls in the <b>Trading API</b> or through the <b>Shipping Preferences</b> in <b>My eBay</b>.",
    )
    shippingServices: Optional[List[ShippingService]] = Field(
        None,
        description='This array consists of the domestic or international shipping services options that are defined for the policy. The shipping service options defined under this array should match what is set in the corresponding <b>shippingOptions.optionType</b> field (which controls whether domestic or international shipping service options are being defined). If a shipping rate table is being used, the specified shipping service options should also match the shipping rate table settings (domestic or international, shipping speed/level of service, etc.) <br><br>Sellers can specify up to four domestic shipping services and up to five international shipping service options by using separate <b>shippingService</b> containers for each. If the seller is using the Global Shipping Program as an international option, only a total of four international shipping service options (including GSP) can be offered. <br><br> See <a href="/api-docs/sell/static/seller-accounts/ht_shipping-setting-shipping-carrier-and-service-values.html" target="_blank">How to set up shipping carrier and shipping service values</a>. <br><br>To use the eBay standard envelope service (eSE), see <a href="/api-docs/sell/static/seller-accounts/using-the-ebay-standard-envelope-service.html" target="_blank">Using eBay standard envelope (eSE) service</a>.<br><br>This array is conditionally required if the seller is offering one or more domestic and/or international shipping service options.',
    )


class Subscription(BaseModel):
    """
    This type is used by the <strong>getSubscription</strong> response container, which defines the subscription types and levels for the seller account.
    """

    marketplaceId: Optional[str] = Field(
        None,
        description="The marketplace with which the subscription is associated. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    subscriptionId: Optional[str] = Field(None, description="The subscription ID.")
    subscriptionLevel: Optional[str] = Field(
        None,
        description="The subscription level. For example, subscription levels for an eBay store include Starter, Basic, Featured, Anchor, and Enterprise levels.",
    )
    subscriptionType: Optional[str] = Field(
        None,
        description="The kind of entity with which the subscription is associated, such as an eBay store. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/api:SubscriptionTypeEnum'>eBay API documentation</a>",
    )
    term: Optional[TimeDuration] = Field(
        None, description="The term of the subscription plan (typically in months)."
    )


class SubscriptionResponse(BaseModel):
    """
    This type is used by the response payload for the <b>getSubscription</b> method.<br><br><span class="tablenote"><b>Note</b>: Pagination has not yet been enabled for <b>getSubscription</b>, so all of the pagination-related fields are for future use.</span>
    """

    href: Optional[str] = Field(None, description="This field is for future use.")
    limit: Optional[int] = Field(None, description="This field is for future use.")
    next: Optional[str] = Field(None, description="This field is for future use.")
    subscriptions: Optional[List[Subscription]] = Field(
        None,
        description="An array of subscriptions associated with the seller account.",
    )
    total: Optional[int] = Field(
        None,
        description="The total number of subscriptions displayed on the current page of results.",
    )


class Deposit(BaseModel):
    """
    This type is used to specify/indicate that an initial deposit is required for a motor vehicle listing.
    """

    amount: Optional[Amount] = Field(
        None,
        description="This value indicates the initial deposit amount required from the buyer in order to purchase a motor vehicle. This value can be as high as $2,000.00 if immediate payment is not required, and up to $500.00 if immediate payment is required.<br><br><b>Max</b>: <code>2000.0</code>",
    )
    dueIn: Optional[TimeDuration] = Field(
        None,
        description='This value indicates the number of hours that the buyer has (after they commit to buy) to pay the initial deposit on a motor vehicle. Valid <b>dueIn</b> times are 24, 48, and 72 hours. <code>HOUR</code> is set as the <b>unit</b> value, and <code>24</code>, <code>48</code> or <code>72</code> are set in the <b>value</b> field.<br><br><span class="tablenote"><b>Note</b>: The <b>dueIn</b> value is overridden if the seller has set the motor vehicle listing to require immediate payment. If the listing requires immediate payment, the buyer must pay the deposit immediately in order to be eligible to purchase the motor vehicle.</span><br><br><b>Min</b>=24 (hours)<b>Max</b>=72 (hours), <b>Default</b>=48 (hours)',
    )
    paymentMethods: Optional[List[PaymentMethod]] = Field(
        None,
        description="This array is no longer applicable and should not be used since eBay now manages the electronic payment options available to buyers to pay the deposit.",
    )


class FulfillmentPolicy(BaseModel):
    """
    This type is used by the <b>fulfillmentPolicy</b> response container, a container which defines a seller's fulfillment policy for a specific marketplace.
    """

    categoryTypes: Optional[List[CategoryType]] = Field(
        None,
        description="This container indicates whether the fulfillment policy applies to motor vehicle listings, or if it applies to non-motor vehicle listings.",
    )
    description: Optional[str] = Field(
        None,
        description="A seller-defined description of the fulfillment policy. This description is only for the seller's use, and is not exposed on any eBay pages. This field is returned if set for the policy. <br><br><b>Max length</b>: 250",
    )
    freightShipping: Optional[bool] = Field(
        None,
        description="If returned as <code>true</code>, the seller offers freight shipping. Freight shipping can be used for large items over 150 lbs.",
    )
    fulfillmentPolicyId: Optional[str] = Field(
        None,
        description="A unique eBay-assigned ID for the fulfillment policy. This ID is generated when the policy is created.",
    )
    globalShipping: Optional[bool] = Field(
        None,
        description="<span class=\"tablenote\"><b>Note</b>: This field is only applicable for the eBay United Kingdom marketplace (<code>EBAY_GB</code>).</span><br>If returned as <code>true</code>, eBay's Global Shipping Program will be used by the seller to ship items to international locations.<br><br>eBay International Shipping is an account level setting; no field needs to be set in a Fulfillment business policy to enable eBay International Shipping. If a US seller's account is opted in to eBay International Shipping, this shipping option will be enabled automatically for all listings where international shipping is available. A US seller who is opted in to eBay International Shipping can also specify individual international shipping service options for a Fulfillment business policy.",
    )
    handlingTime: Optional[TimeDuration] = Field(
        None,
        description="Specifies the maximum number of business days the seller commits to for preparing and shipping an order after receiving a cleared payment for the order. This time does not include the transit time it takes the shipping carrier to deliver the order. <p>If only local pickup or freight shipping is available for the item, this container may not get returned.</p>",
    )
    localPickup: Optional[bool] = Field(
        None,
        description="If returned as <code>true</code>, local pickup is available for this policy.",
    )
    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which this fulfillment policy applies. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None,
        description="A seller-defined name for this fulfillment policy. Names must be unique for policies assigned to the same marketplace. <br><br><b>Max length</b>: 64",
    )
    pickupDropOff: Optional[bool] = Field(
        None,
        description='If returned as <code>true</code>, the seller offers the "Click and Collect" option. <br><br>Currently, "Click and Collect" is available only to large retail merchants the eBay AU, UK, DE, FR, and IT marketplaces.',
    )
    shippingOptions: Optional[List[ShippingOption]] = Field(
        None,
        description="This array is used to provide detailed information on the domestic and international shipping options available for the policy. A separate <b>ShippingOption</b> object covers domestic shipping service options and international shipping service options (if the seller ships to international locations). <br><br>The <b>optionType</b> field indicates whether the <b>ShippingOption</b> object applies to domestic or international shipping, and the <b>costType</b> field indicates whether flat-rate shipping or calculated shipping will be used. <p>A separate <b>ShippingServices</b> object is used to specify cost and other details for every available domestic and international shipping service option. </p>",
    )
    shipToLocations: Optional[RegionSet] = Field(
        None,
        description="This container consists of the <b>regionIncluded</b> and <b>regionExcluded</b> containers, which define the geographical regions/countries/states or provinces/domestic regions where the seller does and doesn't ship to with this fulfillment policy.",
    )


class FulfillmentPolicyRequest(BaseModel):
    """
    This root container defines a seller's fulfillment policy for a specific marketplace and category group. This type is used when creating or updating a fulfillment business policy.
    """

    categoryTypes: Optional[List[CategoryType]] = Field(
        None,
        description="This container is used to specify whether the fulfillment business policy applies to motor vehicle listings, or if it applies to non-motor vehicle listings.",
    )
    description: Optional[str] = Field(
        None,
        description="A seller-defined description of the fulfillment policy. This description is only for the seller's use, and is not exposed on any eBay pages.  <br><br><b>Max length</b>: 250",
    )
    freightShipping: Optional[bool] = Field(
        None,
        description="This field is included and set to <code>true</code> if freight shipping is available for the item. Freight shipping can be used for large items over 150 lbs.<br><br><b>Default</b>: false",
    )
    globalShipping: Optional[bool] = Field(
        None,
        description='<span class="tablenote"><b>Note</b>: This field is only applicable for the eBay United Kingdom marketplace (<code>EBAY_GB</code>).</span><br>This field is included and set to <code>true</code> if the seller wants to use the Global Shipping Program for international shipments. See the <a href="https://pages.ebay.com/help/sell/shipping-globally.html ">Global Shipping Program</a> help topic for more details and requirements on the Global Shipping Program.<br><br>A seller can use a combination of the Global Shipping Program and other international shipping services. <br><br>If set to <code>false</code> or if the field is omitted, the seller has to manually specifying individual international shipping services (if the seller ships internationally), as described in <a href="https://developer.ebay.com/api-docs/sell/static/seller-accounts/ht_shipping-worldwide.html ">Setting up worldwide shipping</a>. <br><br>Sellers opt in or out of the Global Shipping Program through the Shipping preferences in My eBay.<br><br>eBay International Shipping is an account level setting; no field needs to be set in a Fulfillment business policy to enable eBay International Shipping. If a US seller\'s account is opted in to eBay International Shipping, this shipping option will be enabled automatically for all listings where international shipping is available. A US seller who is opted in to eBay International Shipping can also specify individual international shipping service options for a Fulfillment business policy.<p><b>Default</b>: false</p>',
    )
    handlingTime: Optional[TimeDuration] = Field(
        None,
        description='This container is used to specify the maximum number of business days the seller commits to for preparing and shipping an order after receiving a cleared payment for the order. This time does not include the transit time it takes the shipping carrier to deliver the order.<br><br>Valid values can vary by site and by category. To obtain the supported values for a site, call <a href="/devzone/xml/docs/reference/ebay/GeteBayDetails.html">GeteBayDetails</a> in the Trading API with <b>DetailName</b> set to <code>DispatchTimeMaxDetails</code>, then inspect the <b>DispatchTimeMaxDetails</b> container in the response for the time values supported by the site (typical handling times are <code>0</code>, <code>1</code>, <code>2</code>, <code>3</code>, <code>4</code>, <code>5</code>, <code>10</code>, <code>15</code>, and <code>20</code>, but these can vary by site and may change over time.) <p>This field is conditionally required when the seller is offering one or more domestic or international shipping options, but it is not applicable when the item is only available through local pickup (<code>"localPickup": "true"</code>), or if it will be shipped through a freight shipping service (<code>"freightShipping": "true"</code>). </p> <span class="tablenote"><b>Note: </b> Top-Rated sellers must offer same-day or one-day handling for a listing in order for that listing to receive a Top Rated Plus seal on the View Item or Search Results pages. To offer zero-day or one-day handling, set field to \'0\' or \'1\', respectively.</span>',
    )
    localPickup: Optional[bool] = Field(
        None,
        description="This field should be included and set to <code>true</code> if local pickup is one of the fulfillment options available to the buyer. It is possible for the seller to make local pickup and some shipping service options available to the buyer.<br><br>With local pickup, the buyer and seller make arrangements for pickup time and location.<br><br><b>Default</b>: <code>false</code>",
    )
    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which this fulfillment policy applies. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None,
        description="A seller-defined name for this fulfillment policy. Names must be unique for policies assigned to the same marketplace. <br><br><b>Max length</b>: 64",
    )
    pickupDropOff: Optional[bool] = Field(
        None,
        description='This field should be included and set to <code>true</code> if the seller offers the "Click and Collect" feature for an item. <p>To enable "Click and Collect" on a listing, a seller must be eligible for Click and Collect. Currently, Click and Collect is available to only large retail merchants selling in the eBay AU, UK, DE, FR, and IT marketplaces.</p>  <p>In addition to setting this field to <code>true</code>, the merchant must also do the following to enable the "Click and Collect" option on a listing: <ul><li>Have inventory for the product at one or more physical stores tied to the merchant\'s account. <p>Sellers can use the <b>createInventoryLocation</b> method in the Inventory API to associate physical stores to their account and they can then add inventory to specific store locations.</p></li><li>Set an immediate payment requirement on the item. The immediate payment feature requires the seller to: <ul><li>Set the <b>immediatePay</b> flag in the payment policy to \'true\'.</li><li>Have a valid store location with a complete street address.</li></ul></li></ul><p>When a merchant successfully lists an item with Click and Collect, prospective buyers within a reasonable distance from one of the merchant\'s stores (that has stock available) will see the "Available for Click and Collect" option on the listing, along with information on the closest store that has the item.</p><b>Default</b>: false',
    )
    shippingOptions: Optional[List[ShippingOption]] = Field(
        None,
        description="This array is used to provide detailed information on the domestic and international shipping options available for the policy. <br><br>A separate <b>ShippingOption</b> object is required for domestic shipping service options and for international shipping service options (if the seller ships to international locations). <ul><li>The <b>optionType</b> field is used to indicate whether the <b>ShippingOption</b> object applies to domestic or international shipping, and the <b>costType</b> field is used to indicate whether flat-rate shipping or calculated shipping will be used.</li> <li>The <b>rateTableId</b> field can be used to associate a defined shipping rate table to the policy, and the <b>packageHandlingCost</b> container can be used to set a handling charge for the policy.</li></ul> <p>A separate <b>ShippingServices</b> object will be used to specify cost and other details for every available domestic and international shipping service option. </p>",
    )
    shipToLocations: Optional[RegionSet] = Field(
        None,
        description='This container consists of the <b>regionIncluded</b> and <b>regionExcluded</b> arrays, which are used to define the geographical regions/countries/states or provinces/domestic regions that a seller does and does not ship to for the associated fulfillment policy. Note that this container can be considered the master list of where the seller ships and does not ship, but there is also a <b>shipToLocations</b> container that can be set at the shipping service option level.<br><br><span class="tablenote"><b>Note:</b> Any shipping exclusions specified through this container can be overridden by the eBay International Shipping exclusions toggle located under <b>Shipping Preferences</b> in <b>My eBay</b>. For more information on eBay International Shipping, see <a href="https://www.ebay.com/help/selling/shipping-items/setting-shipping-options/ebay-international-shipping-program?id=5348" target="_blank">eBay International Shipping program</a>.</span><br>To retrieve the valid geographical shipping region values, two-digit country values, or special domestic regions for an eBay marketplace, call <a href="/devzone/xml/docs/reference/ebay/GeteBayDetails.html">GeteBayDetails</a> with <b>DetailName</b> value set to <code>ExcludeShippingLocationDetails</code>, then review the <b>ExcludeShippingLocationDetails</b> containers in the response for the strings you use in both the <b>regionIncluded.regionName</b> and in the <b>regionExcluded.regionName</b> fields. <br><br>For valid geographical region names, look for the <code>ExcludeShippingLocationDetails</code> containers in the <b>GeteBayDetails</b> response where the <b>Region</b> value is <code>Worldwide</code>, and the valid values will be shown in the corresponding <b>Location</b> fields. <br><br>For valid two-digit country codes, look for <code>ExcludeShippingLocationDetails</code> in the <b>GeteBayDetails</b> response where the <b>Region</b> value is one of the defined geographical regions, and the valid values will be shown in the corresponding <b>Location</b> fields. Alternatively, you can find the two-digit country code values in the <a href="/api-docs/sell/account/types/ba:CountryCodeEnum">CountryCodeEnum</a> type definition. For valid domestic region values, look for <code>ExcludeShippingLocationDetails</code> in the <b>GeteBayDetails</b> response where the <b>Region</b> value is either <code>Domestic Location</code> or <code>Additional Locations</code>, and the valid values will be shown in the corresponding <b>Location</b> fields. <br><br>The <code>STATE_OR_PROVINCE</code> region type is only applicable to the US and Canada, and valid values for US states are the same <a href="https://about.usps.com/who-we-are/postal-history/state-abbreviations.htm ">two-digit abbreviations</a> used by the United States Postal Service, and valid values for Canadian provinces and territories are the same <a href="https://www.canadapost-postescanada.ca/cpc/en/support/articles/addressing-guidelines/symbols-and-abbreviations.page ">two-digit abbreviations</a> used by the Canada Post.',
    )


class FulfillmentPolicyResponse(BaseModel):
    """
    The response payload for the <b>getFulfillmentPolicies</b> method.<br><br><span class="tablenote"><b>Note</b>: Pagination has not yet been enabled for <b>getFulfillmentPolicies</b>, so all of the pagination-related fields are for future use.</span>
    """

    fulfillmentPolicies: Optional[List[FulfillmentPolicy]] = Field(
        None,
        description="A list of all of the seller's fulfillment policies defined for the specified marketplace. This array will be returned as empty if no fulfillment policies are defined for the specified marketplace.",
    )
    href: Optional[str] = Field(None, description="This field is for future use.")
    limit: Optional[int] = Field(None, description="This field is for future use.")
    next: Optional[str] = Field(None, description="This field is for future use.")
    offset: Optional[int] = Field(None, description="This field is for future use.")
    prev: Optional[str] = Field(None, description="This field is for future use.")
    total: Optional[int] = Field(
        None,
        description="The total number of fulfillment policies retrieved in the result set.  <br><br>If no fulfillment policies are defined for the specified marketplace, this field is returned with a value of <code>0</code>.",
    )


class PaymentPolicy(BaseModel):
    """
    This type is used by the <b>paymentPolicy</b> response container, a container which defines a seller's payment business policy for a specific marketplace.
    """

    categoryTypes: Optional[List[CategoryType]] = Field(
        None,
        description="This container indicates whether the payment policy applies to motor vehicle listings, or if it applies to non-motor vehicle listings.",
    )
    deposit: Optional[Deposit] = Field(
        None,
        description="This container is applicable only if the <b>categoryTypes.name</b> field is set to <code>MOTORS_VEHICLES</code>, and is only returned if the seller requires an initial deposit on motor vehicles.<br><br>The container shows the amount due for the deposit and when it is due (within 1-3 days after commitment to purchase, unless the listing requires immediate payment). <p class=\"tablenote\"><b>Note:</b> The due date that is specified in the <b>deposit</b> container will be overridden if the payment business policy requires immediate payment (in this case, for the deposit), and the buyer commits to purchasing the motor vehicle through a fixed-price listing or through the 'Buy it Now' option of an auction listing. </p>",
    )
    description: Optional[str] = Field(
        None,
        description="A seller-defined description of the payment policy. This description is only for the seller's use, and is not exposed on any eBay pages.  <br><br><b>Max length</b>: 250",
    )
    fullPaymentDueIn: Optional[TimeDuration] = Field(
        None,
        description='This container applies to motor vehicles listings only and indicates when a final payment for the vehicle is due. This value is always returned if <b>categoryTypes</b> is set to <code>MOTORS_VEHICLES</code>. <br><br>This container indicates the number of days that a buyer has to make their full payment to the seller and close the remaining balance on a motor vehicle transaction. The period starts when the buyer commits to buy. The valid values, as specified with <b>TimeDuration</b>, are:<ul><li>3 DAYS</li><li>7 DAYS (the default)</li><li>10 DAYS</li><li>14 DAYS</li></ul>A <code>MOTORS_VEHICLES</code>) payment business policy must specify at least one of the following <b>paymentMethods</b> values for the final payment: <ul> <li>CASH_ON_PICKUP<br><br><span class="tablenote"><b>Note:</b> This payment method is only available to sellers outside the US.</span></li> <li>CASHIER_CHECK</li> <li>MONEY_ORDER</li><li>PERSONAL_CHECK</li></ul>',
    )
    immediatePay: Optional[bool] = Field(
        None,
        description="If this field is returned as <code>true</code>, immediate payment is required from the buyer for: <ul><li>A fixed-price item</li><li>An auction item where the buyer uses the 'Buy it Now' option</li><li>A deposit for a motor vehicle listing</li></ul><br>It is possible for the seller to set this field as <code>true</code> in the payment business policy, but it will not apply in some scenarios. For example, immediate payment is not applicable for auction listings that have a winning bidder, for buyer purchases that involve the Best Offer feature, or for transactions that happen offline between the buyer and seller.",
    )
    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which the payment business policy applies. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None,
        description="A seller-defined name for this payment policy. Names must be unique for policies assigned to the same marketplace. <br><br><b>Max length</b>: 64",
    )
    paymentInstructions: Optional[str] = Field(
        None,
        description="Although this field may be returned for some older payment business policies, payment instructions are no longer supported by payment business policies. If this field is returned, it can be ignored and these payment instructions will not appear in any listings that use the corresponding business policy. <br><br><b>Max length</b>: 1000",
    )
    paymentMethods: Optional[List[PaymentMethod]] = Field(
        None,
        description="This container is returned to show the payment methods that are accepted for the payment business policy.  <br><br>Sellers do not have to specify any electronic payment methods for listings, so this array will often be returned empty unless the payment business policy is intended for motor vehicle listings or other items in categories where offline payments are required or supported. ",
    )
    paymentPolicyId: Optional[str] = Field(
        None,
        description="A unique eBay-assigned ID for a payment business policy. This ID is generated when the policy is created.",
    )


class PaymentPolicyRequest(BaseModel):
    """
    This root container defines a seller's payment business policy for a specific marketplace and category group. This type is used when creating or updating a payment business policy.
    """

    categoryTypes: Optional[List[CategoryType]] = Field(
        None,
        description="This container is used to specify whether the payment business policy applies to motor vehicle listings, or if it applies to non-motor vehicle listings.",
    )
    deposit: Optional[Deposit] = Field(
        None,
        description="This container is used if the seller wants to require an initial deposit on a motor vehicle listing. In this container, the seller sets the deposit amount and the due date for the deposit.<br><br>Because eBay controls all electronic payment methods, sellers do not need to specify a payment method and the <b>deposit.paymentMethods</b> array is not needed.<p class=\"tablenote\"><b>Note: </b>The 'due date' specified in the <b>deposit</b> container will be overridden if the payment business policy requires immediate payment (in this case, for the deposit), and the buyer commits to purchase the motor vehicle through a fixed-price listing or through the 'Buy it Now' option of an auction listing. See <a href=\"/api-docs/sell/account/resources/payment_policy/methods/createPaymentPolicy#request.immediatePay\">immediatePay</a>.</p>",
    )
    description: Optional[str] = Field(
        None,
        description="A seller-defined description of the payment business policy. This description is only for the seller's use, and is not exposed on any eBay pages.  <br><br><b>Max length</b>: 250",
    )
    fullPaymentDueIn: Optional[TimeDuration] = Field(
        None,
        description="This container is used to specify the number of days that a buyer has to make their full payment to the seller and close the remaining balance on a motor vehicle transaction. This container must be specified for motor vehicles listings. <br><br>The period starts when the buyer commits to buy. The valid values, as specified with <b>TimeDuration</b>, are:<ul><li><code>3 DAYS</code></li><li><code>7 DAYS</code> (the default)</li><li><code>10 DAYS</code></li><li><code>14 DAYS</code></li></ul>In order for a buyer to make a full payment on a motor vehicle, at least one of the following <b>paymentMethods</b> values must be specified for the corresponding payment business policy: <ul> <li><code>CASH_ON_PICKUP</code></li> <li><code>CASHIER_CHECK</code></li> <li><code>MONEY_ORDER</code></li> <li><code>PERSONAL_CHECK</code></li></ul><b>Default:</b> <code>7 DAYS</code>",
    )
    immediatePay: Optional[bool] = Field(
        None,
        description="This field should be included and set to <code>true</code> if the seller wants to require immediate payment from the buyer for: <ul><li>A fixed-price item</li><li>An auction item where the buyer is using the 'Buy it Now' option</li><li>A deposit for a motor vehicle listing</li></ul><br><b>Default:</b> False",
    )
    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which this payment business policy applies. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None,
        description="A seller-defined name for this payment business policy. Names must be unique for policies assigned to the same marketplace.<br><br><b>Max length:</b> 64",
    )
    paymentInstructions: Optional[str] = Field(
        None,
        description='<p class="tablenote"><b>Note:</b> DO NOT USE THIS FIELD. Payment instructions are no longer supported by payment business policies.</p>A free-form string field that allows sellers to add detailed payment instructions to their listings.',
    )
    paymentMethods: Optional[List[PaymentMethod]] = Field(
        None,
        description='<p class="tablenote"><b>Note:</b> This field applies only when the seller needs to specify one or more offline payment methods. eBay now manages the electronic payment options available to buyers to pay for the item.</p>This array is used to specify one or more offline payment methods that will be accepted for payment that occurs off of eBay\'s platform.',
    )


class PaymentPolicyResponse(BaseModel):
    """
    The response payload for the <b>getPaymentPolicies</b> method. <br><br><span class="tablenote"><b>Note</b>: Pagination has not yet been enabled for <b>getPaymentPolicies</b>, so all of the pagination-related fields are for future use.</span>
    """

    href: Optional[str] = Field(None, description="This field is for future use.")
    limit: Optional[int] = Field(None, description="This field is for future use.")
    next: Optional[str] = Field(None, description="This field is for future use.")
    offset: Optional[int] = Field(None, description="This field is for future use.")
    paymentPolicies: Optional[List[PaymentPolicy]] = Field(
        None,
        description="A list of all of the seller's payment business policies defined for the specified marketplace. This array will be returned as empty if no payment business policies are defined for the specified marketplace.",
    )
    prev: Optional[str] = Field(None, description="This field is for future use.")
    total: Optional[int] = Field(
        None,
        description="The total number of payment business policies retrieved in the result set.  <br><br>If no payment business policies are defined for the specified marketplace, this field is returned with a value of <code>0</code>.",
    )


class SetFulfillmentPolicyResponse(BaseModel):
    """
    Complex type that that gets populated with a response containing a fulfillment policy.
    """

    categoryTypes: Optional[List[CategoryType]] = Field(
        None,
        description="This container indicates whether the fulfillment business policy applies to motor vehicle listings, or if it applies to non-motor vehicle listings.",
    )
    description: Optional[str] = Field(
        None,
        description="A seller-defined description of the fulfillment policy. This description is only for the seller's use, and is not exposed on any eBay pages. This field is returned if set for the policy. <br><br><b>Max length</b>: 250",
    )
    freightShipping: Optional[bool] = Field(
        None,
        description="If returned as <code>true</code>, the seller offers freight shipping. Freight shipping can be used for large items over 150 lbs.",
    )
    fulfillmentPolicyId: Optional[str] = Field(
        None,
        description="A unique eBay-assigned ID for a fulfillment business policy. This ID is generated when the policy is created.",
    )
    globalShipping: Optional[bool] = Field(
        None,
        description='<span class="tablenote"><b>Note</b>: This field is only applicable for the eBay United Kingdom marketplace (<code>EBAY_GB</code>).</span><br>This field is included and set to <code>true</code> if the seller wants to use the Global Shipping Program for international shipments. See the <a href="https://pages.ebay.com/help/sell/shipping-globally.html ">Global Shipping Program</a> help topic for more details and requirements on the Global Shipping Program.<br><br>A seller can use a combination of the Global Shipping Program and other international shipping services. <br><br>If set to <code>false</code> or if the field is omitted, the seller has to manually specifying individual international shipping services (if the seller ships internationally), as described in <a href="https://developer.ebay.com/api-docs/sell/static/seller-accounts/ht_shipping-worldwide.html ">Setting up worldwide shipping</a>. <br><br>Sellers opt in or out of the Global Shipping Program through the Shipping preferences in My eBay.<br><br>eBay International Shipping is an account level setting; no field needs to be set in a Fulfillment business policy to enable eBay International Shipping. If a US seller\'s account is opted in to eBay International Shipping, this shipping option will be enabled automatically for all listings where international shipping is available. A US seller who is opted in to eBay International Shipping can also specify individual international shipping service options for a Fulfillment business policy.</span>',
    )
    handlingTime: Optional[TimeDuration] = Field(
        None,
        description="Specifies the maximum number of business days the seller commits to for preparing and shipping an order after receiving a cleared payment for the order. This time does not include the transit time it takes the shipping carrier to deliver the order. <p>If only local pickup or freight shipping is available for the item, this container may not get returned.</p>",
    )
    localPickup: Optional[bool] = Field(
        None,
        description="If returned as <code>true</code>, local pickup is available for items using this policy.",
    )
    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which this fulfillment business policy applies. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None,
        description="A seller-defined name for this fulfillment business policy. <br><br><b>Max length</b>: 64",
    )
    pickupDropOff: Optional[bool] = Field(
        None,
        description='If returned as <code>true</code>, the seller offers the "Click and Collect" option. <br><br>Currently, "Click and Collect" is available only to large retail merchants the eBay AU, UK, DE, FR, and IT marketplaces.',
    )
    shippingOptions: Optional[List[ShippingOption]] = Field(
        None,
        description="This array is used to provide detailed information on the domestic and international shipping options available for the policy. A separate <b>ShippingOption</b> object covers domestic shipping service options and international shipping service options (if the seller ships to international locations). <br><br>The <b>optionType</b> field indicates whether the <b>ShippingOption</b> object applies to domestic or international shipping, and the <b>costType</b> field indicates whether flat-rate shipping or calculated shipping will be used. <p>A separate <b>ShippingServices</b> object is used to specify cost and other details for every available domestic and international shipping service option. </p>",
    )
    shipToLocations: Optional[RegionSet] = Field(
        None,
        description="This container consists of the <b>regionIncluded</b> and <b>regionExcluded</b> containers, which define the geographical regions/countries/states or provinces/domestic regions where the seller does and doesn't ship to with this fulfillment policy.",
    )
    warnings: Optional[List[Error]] = Field(
        None,
        description="An array of one or more errors or warnings that were generated during the processing of the request. If there were no issues with the request, this array will return empty.",
    )


class SetPaymentPolicyResponse(BaseModel):
    """
    Complex type that that gets populated with a response containing a payment policy.
    """

    categoryTypes: Optional[List[CategoryType]] = Field(
        None,
        description="This container indicates whether the payment business policy applies to motor vehicle listings, or if it applies to non-motor vehicle listings.",
    )
    deposit: Optional[Deposit] = Field(
        None,
        description="This container is only returned if the seller just created or updated a motor vehicles payment business policy and requires buyers to pay an initial deposit after they commit to buying a motor vehicle.",
    )
    description: Optional[str] = Field(
        None,
        description="A seller-defined description of the payment business policy. This description is only for the seller's use, and is not exposed on any eBay pages. This field is returned if set for the policy. <br><br><b>Max length</b>: 250",
    )
    fullPaymentDueIn: Optional[TimeDuration] = Field(
        None,
        description='The number of days (after the buyer commits to buy) that a buyer has to pay the remaining balance of a motor vehicle transaction. Sellers can set this value to 3, 7, 10, or 14 days.<p class="tablenote"><b>Note:</b> This value is always returned if <b>categoryTypes</b> is set to <code>MOTORS_VEHICLES</code>.</p> ',
    )
    immediatePay: Optional[bool] = Field(
        None,
        description="The value returned in this field will reflect the value set by the seller in the <b>immediatePay</b> request field. A value of <code>true</code> indicates that immediate payment is required from the buyer for: <ul><li>A fixed-price item</li><li>An auction item where the buyer is using the 'Buy it Now' option</li><li>A deposit for a motor vehicle listing</li></ul><br>It is possible for the seller to set this field as <code>true</code> in the payment business policy, but it will not apply in some scenarios. For example, immediate payment is not applicable for auction listings that have a winning bidder, for buyer purchases that involve the Best Offer feature, or for transactions that happen offline between the buyer and seller.",
    )
    marketplaceId: Optional[str] = Field(
        None,
        description="The ID of the eBay marketplace to which this payment business policy applies. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum'>eBay API documentation</a>",
    )
    name: Optional[str] = Field(
        None,
        description="A seller-defined name for this payment business policy. Names must be unique for policies assigned to the same marketplace.<br><br><b>Max length:</b> 64",
    )
    paymentInstructions: Optional[str] = Field(
        None,
        description='<p class="tablenote"><b>Note:</b> NO LONGER SUPPORTED. Although this field may be returned for some older payment business policies, payment instructions are no longer supported by payment business policies. If this field is returned, it can be ignored and these payment instructions will not appear in any listings that use the corresponding business policy.</p>A free-form string field that allows sellers to add detailed payment instructions to their listings.',
    )
    paymentMethods: Optional[List[PaymentMethod]] = Field(
        None,
        description="This array shows the available payment methods that the seller has set for the payment business policy.<br><br>Sellers do not have to specify any electronic payment methods for listings, so this array will often be returned empty unless the payment business policy is intended for motor vehicle listings or other items in categories where offline payments are required or supported.",
    )
    paymentPolicyId: Optional[str] = Field(
        None,
        description="A unique eBay-assigned ID for a payment business policy. This ID is generated when the policy is created.",
    )
    warnings: Optional[List[Error]] = Field(
        None,
        description="An array of one or more errors or warnings that were generated during the processing of the request. If there were no issues with the request, this array will return empty.",
    )
