hermes_ebay_sell_negotiation/models/create_offers_request.rs
1/*
2 * Negotiation API
3 *
4 * The <b>Negotiations API</b> gives sellers the ability to proactively send discount offers to buyers who have shown an \"interest\" in their listings. <br><br>By sending buyers discount offers on listings where they have shown an interest, sellers can increase the velocity of their sales. <br><br>There are various ways for a buyer to show <i>interest </i> in a listing. For example, if a buyer adds the listing to their <b>Watch</b> list, or if they add the listing to their shopping cart and later abandon the cart, they are deemed to have shown an interest in the listing. <br><br>In the offers that sellers send, they can discount their listings by either a percentage off the listing price, or they can set a new discounted price that is lower than the original listing price. <br><br>For details about how seller offers work, see <a href=\"/api-docs/sell/static/marketing/offers-to-buyers.html\" title=\"Selling Integration Guide\">Sending offers to buyers</a>.
5 *
6 * The version of the OpenAPI document: v1.1.0
7 * Contact: your-email@example.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CreateOffersRequest : This complex type contains the fields needed to create an offer to a buyer that is initiated by the seller.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateOffersRequest {
17 /// If set to <code>true</code>, the buyer is allowed to make a counter-offer to the seller's offer. <br><br><span class=\"tablenote\"><b>Note:</b> Currently, you must set this field to <code>false</code>; counter-offers are not supported in this release.</span> <br><br><b>Default:</b> <code>false</code>
18 #[serde(rename = "allowCounterOffer", skip_serializing_if = "Option::is_none")]
19 pub allow_counter_offer: Option<bool>,
20 /// A seller-defined message related to the offer being made. <br><br>This message is sent to the list of \"interested\" buyers. <br><br>To increase the conversion rate of the offers a seller makes to buyers, eBay recommends you always add a customized message to your offers. <br><br><b>Maximum length:</b> 2,000 characters
21 #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
22 pub message: Option<String>,
23 #[serde(rename = "offerDuration", skip_serializing_if = "Option::is_none")]
24 pub offer_duration: Option<Box<models::TimeDuration>>,
25 /// An array of objects where each object contains the details of an offer and the ID of the listing on which the offer is being made. <br><br>Note that the service does not currently support the creation of multiple offers with a single call to <b>sendOfferToInterestedBuyer</b>. With this, each request can target only one listing at a time and you must populate this array with a single element that contains the details of one offer.
26 #[serde(rename = "offeredItems", skip_serializing_if = "Option::is_none")]
27 pub offered_items: Option<Vec<models::OfferedItem>>,
28}
29
30impl CreateOffersRequest {
31 /// This complex type contains the fields needed to create an offer to a buyer that is initiated by the seller.
32 pub fn new() -> CreateOffersRequest {
33 CreateOffersRequest {
34 allow_counter_offer: None,
35 message: None,
36 offer_duration: None,
37 offered_items: None,
38 }
39 }
40}
41