amazon_spapi/models/product_pricing_v0/
http_method.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/// HttpMethod : The HTTP method associated with the individual APIs being called as part of the batch request.
15/// The HTTP method associated with the individual APIs being called as part of the batch request.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum HttpMethod {
18    #[serde(rename = "GET")]
19    Get,
20    #[serde(rename = "PUT")]
21    Put,
22    #[serde(rename = "PATCH")]
23    Patch,
24    #[serde(rename = "DELETE")]
25    Delete,
26    #[serde(rename = "POST")]
27    Post,
28
29}
30
31impl std::fmt::Display for HttpMethod {
32    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
33        match self {
34            Self::Get => write!(f, "GET"),
35            Self::Put => write!(f, "PUT"),
36            Self::Patch => write!(f, "PATCH"),
37            Self::Delete => write!(f, "DELETE"),
38            Self::Post => write!(f, "POST"),
39        }
40    }
41}
42
43impl Default for HttpMethod {
44    fn default() -> HttpMethod {
45        Self::Get
46    }
47}
48