chengkun
2025-09-12 b21e53f16f228d3192eb54178f081395878b2406
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
/**
* This class is autogenerated by the Spapi class generator
* Date of generation: 2022-05-26
* Specification: https://github.com/amzn/selling-partner-api-models/blob/main/models/feeds-api-model/feeds_2021-06-30.json
* Source MD5 signature: 4a8e0183990dcb4aac6345e841516871
*
*
* Selling Partner API for Feeds
* The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
*/
namespace DoubleBreak\Spapi\Api;
use DoubleBreak\Spapi\Client;
 
class Feeds extends Client {
 
  /**
  * Operation getFeeds
  *
  * @param array $queryParams
  *    - *feedTypes* array - A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required.
  *    - *marketplaceIds* array - A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
  *    - *pageSize* integer - The maximum number of feeds to return in a single call.
  *    - *processingStatuses* array - A list of processing statuses used to filter feeds.
  *    - *createdSince* string - The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days.
  *    - *createdUntil* string - The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
  *    - *nextToken* string - A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
  *
  */
  public function getFeeds($queryParams = [])
  {
    return $this->send("/feeds/2021-06-30/feeds", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getFeedsAsync($queryParams = [])
  {
    return $this->sendAsync("/feeds/2021-06-30/feeds", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation createFeed
  *
  */
  public function createFeed($body = [])
  {
    return $this->send("/feeds/2021-06-30/feeds", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  public function createFeedAsync($body = [])
  {
    return $this->sendAsync("/feeds/2021-06-30/feeds", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  /**
  * Operation cancelFeed
  *
  * @param string $feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
  *
  */
  public function cancelFeed($feedId)
  {
    return $this->send("/feeds/2021-06-30/feeds/{$feedId}", [
      'method' => 'DELETE',
    ]);
  }
 
  public function cancelFeedAsync($feedId)
  {
    return $this->sendAsync("/feeds/2021-06-30/feeds/{$feedId}", [
      'method' => 'DELETE',
    ]);
  }
 
  /**
  * Operation getFeed
  *
  * @param string $feedId The identifier for the feed. This identifier is unique only in combination with a seller ID.
  *
  */
  public function getFeed($feedId)
  {
    return $this->send("/feeds/2021-06-30/feeds/{$feedId}", [
      'method' => 'GET',
    ]);
  }
 
  public function getFeedAsync($feedId)
  {
    return $this->sendAsync("/feeds/2021-06-30/feeds/{$feedId}", [
      'method' => 'GET',
    ]);
  }
 
  /**
  * Operation createFeedDocument
  *
  */
  public function createFeedDocument($body = [])
  {
    return $this->send("/feeds/2021-06-30/documents", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  public function createFeedDocumentAsync($body = [])
  {
    return $this->sendAsync("/feeds/2021-06-30/documents", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  /**
  * Operation getFeedDocument
  *
  * @param string $feedDocumentId The identifier of the feed document.
  *
  */
  public function getFeedDocument($feedDocumentId)
  {
    return $this->send("/feeds/2021-06-30/documents/{$feedDocumentId}", [
      'method' => 'GET',
    ]);
  }
 
  public function getFeedDocumentAsync($feedDocumentId)
  {
    return $this->sendAsync("/feeds/2021-06-30/documents/{$feedDocumentId}", [
      'method' => 'GET',
    ]);
  }
}