amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * Selling Partner API for Pricing
 *
 * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
 *
 * The version of the OpenAPI document: v0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ItemOffersRequest : List of request parameters can be accepted by `ItemOffersRequests` operation
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ItemOffersRequest {
    /// The resource path of the operation you are calling in batch without any query parameters.  If you are calling `getItemOffersBatch`, supply the path of `getItemOffers`.  **Example:** `/products/pricing/v0/items/B000P6Q7MY/offers`  If you are calling `getListingOffersBatch`, supply the path of `getListingOffers`.  **Example:** `/products/pricing/v0/listings/B000P6Q7MY/offers`
    #[serde(rename = "uri")]
    pub uri: String,
    #[serde(rename = "method")]
    pub method: models::product_pricing_v0::HttpMethod,
    /// A mapping of additional HTTP headers to send/receive for the individual batch request.
    #[serde(rename = "headers", skip_serializing_if = "Option::is_none")]
    pub headers: Option<std::collections::HashMap<String, String>>,
    /// A marketplace identifier. Specifies the marketplace for which prices are returned.
    #[serde(rename = "MarketplaceId")]
    pub marketplace_id: String,
    #[serde(rename = "ItemCondition")]
    pub item_condition: models::product_pricing_v0::ItemCondition,
    #[serde(rename = "CustomerType", skip_serializing_if = "Option::is_none")]
    pub customer_type: Option<models::product_pricing_v0::CustomerType>,
}

impl ItemOffersRequest {
    /// List of request parameters can be accepted by `ItemOffersRequests` operation
    pub fn new(uri: String, method: models::product_pricing_v0::HttpMethod, marketplace_id: String, item_condition: models::product_pricing_v0::ItemCondition) -> ItemOffersRequest {
        ItemOffersRequest {
            uri,
            method,
            headers: None,
            marketplace_id,
            item_condition,
            customer_type: None,
        }
    }
}