amazon_spapi/models/product_pricing_v0/batch_request.rs
1/*
2 * Selling Partner API for Pricing
3 *
4 * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
5 *
6 * The version of the OpenAPI document: v0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BatchRequest : Common properties of batch requests against individual APIs.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BatchRequest {
17 /// 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`
18 #[serde(rename = "uri")]
19 pub uri: String,
20 #[serde(rename = "method")]
21 pub method: models::product_pricing_v0::HttpMethod,
22 /// A mapping of additional HTTP headers to send/receive for the individual batch request.
23 #[serde(rename = "headers", skip_serializing_if = "Option::is_none")]
24 pub headers: Option<std::collections::HashMap<String, String>>,
25}
26
27impl BatchRequest {
28 /// Common properties of batch requests against individual APIs.
29 pub fn new(uri: String, method: models::product_pricing_v0::HttpMethod) -> BatchRequest {
30 BatchRequest {
31 uri,
32 method,
33 headers: None,
34 }
35 }
36}
37