Skip to main content

amazon_spapi/client_apis/
aplus_content_2020_11_01.rs

1use anyhow::Result;
2
3use crate::{client::SpapiClient, models};
4
5impl SpapiClient {
6    /// Creates a new A+ Content document.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
7    pub async fn create_content_document(
8        &self,
9        marketplace_id: &str,
10        post_content_document_request: models::aplus_content_2020_11_01::PostContentDocumentRequest,
11    ) -> Result<models::aplus_content_2020_11_01::PostContentDocumentResponse> {
12        let configuration = self.create_configuration().await?;
13        let guard = self
14            .limiter()
15            .wait("aplus_content_2020_11_01/create_content_document", 10.0, 10)
16            .await?;
17        let res = crate::apis::aplus_content_2020_11_01::create_content_document(
18            &configuration,
19            marketplace_id,
20            post_content_document_request,
21        )
22        .await?;
23        guard.mark_response().await;
24        Ok(res)
25    }
26
27    /// Returns an A+ Content document, if available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
28    pub async fn get_content_document(
29        &self,
30        content_reference_key: &str,
31        marketplace_id: &str,
32        included_data_set: Vec<String>,
33    ) -> Result<models::aplus_content_2020_11_01::GetContentDocumentResponse> {
34        let configuration = self.create_configuration().await?;
35        let guard = self
36            .limiter()
37            .wait("aplus_content_2020_11_01/get_content_document", 10.0, 10)
38            .await?;
39        let res = crate::apis::aplus_content_2020_11_01::get_content_document(
40            &configuration,
41            content_reference_key,
42            marketplace_id,
43            included_data_set,
44        )
45        .await?;
46        guard.mark_response().await;
47        Ok(res)
48    }
49
50    /// Returns a list of ASINs that are related to the specified A+ Content document, if available. If you don't include the `asinSet` parameter, this operation returns all ASINs related to the content document.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
51    pub async fn list_content_document_asin_relations(
52        &self,
53        content_reference_key: &str,
54        marketplace_id: &str,
55        included_data_set: Option<Vec<String>>,
56        asin_set: Option<Vec<String>>,
57        page_token: Option<&str>,
58    ) -> Result<models::aplus_content_2020_11_01::ListContentDocumentAsinRelationsResponse> {
59        let configuration = self.create_configuration().await?;
60        let guard = self
61            .limiter()
62            .wait("aplus_content_2020_11_01/list_content_document_asin_relations", 10.0, 10)
63            .await?;
64        let res = crate::apis::aplus_content_2020_11_01::list_content_document_asin_relations(
65            &configuration,
66            content_reference_key,
67            marketplace_id,
68            included_data_set,
69            asin_set,
70            page_token,
71        )
72        .await?;
73        guard.mark_response().await;
74        Ok(res)
75    }
76
77    /// Submits an A+ Content document for review, approval, and publishing.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
78    pub async fn post_content_document_approval_submission(
79        &self,
80        content_reference_key: &str,
81        marketplace_id: &str,
82    ) -> Result<models::aplus_content_2020_11_01::PostContentDocumentApprovalSubmissionResponse> {
83        let configuration = self.create_configuration().await?;
84        let guard = self
85            .limiter()
86            .wait("aplus_content_2020_11_01/post_content_document_approval_submission", 10.0, 10)
87            .await?;
88        let res = crate::apis::aplus_content_2020_11_01::post_content_document_approval_submission(
89            &configuration,
90            content_reference_key,
91            marketplace_id,
92        )
93        .await?;
94        guard.mark_response().await;
95        Ok(res)
96    }
97
98    /// Replaces all ASINs related to the specified A+ Content document, if available. This operation can add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN will suspend the content document from that ASIN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
99    pub async fn post_content_document_asin_relations(
100        &self,
101        content_reference_key: &str,
102        marketplace_id: &str,
103        post_content_document_asin_relations_request: models::aplus_content_2020_11_01::PostContentDocumentAsinRelationsRequest,
104    ) -> Result<models::aplus_content_2020_11_01::PostContentDocumentAsinRelationsResponse> {
105        let configuration = self.create_configuration().await?;
106        let guard = self
107            .limiter()
108            .wait("aplus_content_2020_11_01/post_content_document_asin_relations", 10.0, 10)
109            .await?;
110        let res = crate::apis::aplus_content_2020_11_01::post_content_document_asin_relations(
111            &configuration,
112            content_reference_key,
113            marketplace_id,
114            post_content_document_asin_relations_request,
115        )
116        .await?;
117        guard.mark_response().await;
118        Ok(res)
119    }
120
121    /// Submits a request to suspend visible A+ Content. This doesn't delete the content document or the ASIN relations.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
122    pub async fn post_content_document_suspend_submission(
123        &self,
124        content_reference_key: &str,
125        marketplace_id: &str,
126    ) -> Result<models::aplus_content_2020_11_01::PostContentDocumentSuspendSubmissionResponse> {
127        let configuration = self.create_configuration().await?;
128        let guard = self
129            .limiter()
130            .wait("aplus_content_2020_11_01/post_content_document_suspend_submission", 10.0, 10)
131            .await?;
132        let res = crate::apis::aplus_content_2020_11_01::post_content_document_suspend_submission(
133            &configuration,
134            content_reference_key,
135            marketplace_id,
136        )
137        .await?;
138        guard.mark_response().await;
139        Ok(res)
140    }
141
142    /// Returns a list of all A+ Content documents, including metadata, that are assigned to a selling partner. To get the actual contents of the A+ Content documents, call the `getContentDocument` operation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
143    pub async fn search_content_documents(
144        &self,
145        marketplace_id: &str,
146        page_token: Option<&str>,
147    ) -> Result<models::aplus_content_2020_11_01::SearchContentDocumentsResponse> {
148        let configuration = self.create_configuration().await?;
149        let guard = self
150            .limiter()
151            .wait("aplus_content_2020_11_01/search_content_documents", 10.0, 10)
152            .await?;
153        let res = crate::apis::aplus_content_2020_11_01::search_content_documents(
154            &configuration,
155            marketplace_id,
156            page_token,
157        )
158        .await?;
159        guard.mark_response().await;
160        Ok(res)
161    }
162
163    /// Searches for A+ Content publishing records, if available.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
164    pub async fn search_content_publish_records(
165        &self,
166        marketplace_id: &str,
167        asin: &str,
168        page_token: Option<&str>,
169    ) -> Result<models::aplus_content_2020_11_01::SearchContentPublishRecordsResponse> {
170        let configuration = self.create_configuration().await?;
171        let guard = self
172            .limiter()
173            .wait("aplus_content_2020_11_01/search_content_publish_records", 10.0, 10)
174            .await?;
175        let res = crate::apis::aplus_content_2020_11_01::search_content_publish_records(
176            &configuration,
177            marketplace_id,
178            asin,
179            page_token,
180        )
181        .await?;
182        guard.mark_response().await;
183        Ok(res)
184    }
185
186    /// Updates an existing A+ Content document.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
187    pub async fn update_content_document(
188        &self,
189        content_reference_key: &str,
190        marketplace_id: &str,
191        post_content_document_request: models::aplus_content_2020_11_01::PostContentDocumentRequest,
192    ) -> Result<models::aplus_content_2020_11_01::PostContentDocumentResponse> {
193        let configuration = self.create_configuration().await?;
194        let guard = self
195            .limiter()
196            .wait("aplus_content_2020_11_01/update_content_document", 10.0, 10)
197            .await?;
198        let res = crate::apis::aplus_content_2020_11_01::update_content_document(
199            &configuration,
200            content_reference_key,
201            marketplace_id,
202            post_content_document_request,
203        )
204        .await?;
205        guard.mark_response().await;
206        Ok(res)
207    }
208
209    /// Checks if the A+ Content document is valid for use on a set of ASINs.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |
210    pub async fn validate_content_document_asin_relations(
211        &self,
212        marketplace_id: &str,
213        post_content_document_request: models::aplus_content_2020_11_01::PostContentDocumentRequest,
214        asin_set: Option<Vec<String>>,
215    ) -> Result<models::aplus_content_2020_11_01::ValidateContentDocumentAsinRelationsResponse> {
216        let configuration = self.create_configuration().await?;
217        let guard = self
218            .limiter()
219            .wait("aplus_content_2020_11_01/validate_content_document_asin_relations", 10.0, 10)
220            .await?;
221        let res = crate::apis::aplus_content_2020_11_01::validate_content_document_asin_relations(
222            &configuration,
223            marketplace_id,
224            post_content_document_request,
225            asin_set,
226        )
227        .await?;
228        guard.mark_response().await;
229        Ok(res)
230    }
231}