lib/eBay/API/XML/Call/GetOrders/GetOrdersRequestType.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 7 | 9 | 77.7 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | n/a | ||
total | 10 | 12 | 83.3 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||||
2 | |||||||
3 | package eBay::API::XML::Call::GetOrders::GetOrdersRequestType; | ||||||
4 | |||||||
5 | 1 | 1 | 1473 | use strict; | |||
1 | 3 | ||||||
1 | 26 | ||||||
6 | 1 | 1 | 5 | use warnings; | |||
1 | 179 | ||||||
1 | 30 | ||||||
7 | |||||||
8 | ########################################################################## | ||||||
9 | # | ||||||
10 | # Module: ............... |
||||||
11 | # File: ................. GetOrdersRequestType.pm | ||||||
12 | # Generated by: ......... genEBayApiDataTypes.pl | ||||||
13 | # Last Generated: ....... 08/24/2008 16:44 | ||||||
14 | # API Release Number: ... 579 | ||||||
15 | # | ||||||
16 | ########################################################################## | ||||||
17 | |||||||
18 | =head1 NAME | ||||||
19 | |||||||
20 | eBay::API::XML::Call::GetOrders::GetOrdersRequestType | ||||||
21 | |||||||
22 | =head1 DESCRIPTION | ||||||
23 | |||||||
24 | Retrieves all of the orders for which the user is a participant (as | ||||||
25 | either buyer or seller) that meet the criteria specified in the request. | ||||||
26 | |
||||||
27 | An order is a combination of two or more transactions. |
||||||
28 | |
||||||
29 | There are two mutually exclusive sets of filtering input arguments |
||||||
30 | that can be used to query for orders. The first set is based on specific | ||||||
31 | order IDs (one or more order IDs are passed in the call). The second set | ||||||
32 | is a combination of date range, order role, and order status. If one set | ||||||
33 | of filtering arguments is used, the arguments for the other set should not | ||||||
34 | be specified in the same call. If a given call to GetOrders includes both | ||||||
35 | criteria sets, the query based on order IDs is used, and the criteria for | ||||||
36 | date range/order status/order role is ignored. | ||||||
37 | This call can also be used to retrieve unshipped Half.com orders (i.e., | ||||||
38 | orders that the seller has received but has not yet processed). | ||||||
39 | |||||||
40 | |||||||
41 | |||||||
42 | =head1 SYNOPSIS | ||||||
43 | |||||||
44 | =cut | ||||||
45 | |||||||
46 | |||||||
47 | =head1 INHERITANCE | ||||||
48 | |||||||
49 | eBay::API::XML::Call::GetOrders::GetOrdersRequestType inherits from the L |
||||||
50 | |||||||
51 | =cut | ||||||
52 | |||||||
53 | 1 | 1 | 34 | use eBay::API::XML::RequestDataType; | |||
0 | |||||||
0 | |||||||
54 | our @ISA = ("eBay::API::XML::RequestDataType"); | ||||||
55 | |||||||
56 | use eBay::API::XML::DataType::OrderIDArrayType; | ||||||
57 | use eBay::API::XML::DataType::PaginationType; | ||||||
58 | use eBay::API::XML::DataType::Enum::ListingTypeCodeType; | ||||||
59 | use eBay::API::XML::DataType::Enum::OrderStatusCodeType; | ||||||
60 | use eBay::API::XML::DataType::Enum::TradingRoleCodeType; | ||||||
61 | |||||||
62 | |||||||
63 | my @gaProperties = ( [ 'CreateTimeFrom', 'xs:dateTime', '', '', '' ] | ||||||
64 | , [ 'CreateTimeTo', 'xs:dateTime', '', '', '' ] | ||||||
65 | , [ 'ListingType', 'ns:ListingTypeCodeType', '' | ||||||
66 | ,'eBay::API::XML::DataType::Enum::ListingTypeCodeType', '' ] | ||||||
67 | , [ 'OrderIDArray', 'ns:OrderIDArrayType', '' | ||||||
68 | ,'eBay::API::XML::DataType::OrderIDArrayType', '1' ] | ||||||
69 | , [ 'OrderRole', 'ns:TradingRoleCodeType', '' | ||||||
70 | ,'eBay::API::XML::DataType::Enum::TradingRoleCodeType', '' ] | ||||||
71 | , [ 'OrderStatus', 'ns:OrderStatusCodeType', '' | ||||||
72 | ,'eBay::API::XML::DataType::Enum::OrderStatusCodeType', '' ] | ||||||
73 | , [ 'Pagination', 'ns:PaginationType', '' | ||||||
74 | ,'eBay::API::XML::DataType::PaginationType', '1' ] | ||||||
75 | ); | ||||||
76 | push @gaProperties, @{eBay::API::XML::RequestDataType::getPropertiesList()}; | ||||||
77 | |||||||
78 | my @gaAttributes = ( | ||||||
79 | ); | ||||||
80 | push @gaAttributes, @{eBay::API::XML::RequestDataType::getAttributesList()}; | ||||||
81 | |||||||
82 | =head1 Subroutines: | ||||||
83 | |||||||
84 | =cut | ||||||
85 | |||||||
86 | sub new { | ||||||
87 | my $classname = shift; | ||||||
88 | my %args = @_; | ||||||
89 | my $self = $classname->SUPER::new(%args); | ||||||
90 | return $self; | ||||||
91 | } | ||||||
92 | |||||||
93 | sub isScalar { | ||||||
94 | return 0; | ||||||
95 | } | ||||||
96 | |||||||
97 | |||||||
98 | |||||||
99 | =head2 setCreateTimeFrom() | ||||||
100 | |||||||
101 | The starting date of the date range for the orders to retrieve. | ||||||
102 | Also applicable to Half.com. | ||||||
103 | |||||||
104 | RequiredInput: Conditionally | ||||||
105 | # Argument: 'xs:dateTime' | ||||||
106 | |||||||
107 | =cut | ||||||
108 | |||||||
109 | sub setCreateTimeFrom { | ||||||
110 | my $self = shift; | ||||||
111 | $self->{'CreateTimeFrom'} = shift | ||||||
112 | } | ||||||
113 | |||||||
114 | =head2 getCreateTimeFrom() | ||||||
115 | |||||||
116 | # Returns: 'xs:dateTime' | ||||||
117 | |||||||
118 | =cut | ||||||
119 | |||||||
120 | sub getCreateTimeFrom { | ||||||
121 | my $self = shift; | ||||||
122 | return $self->{'CreateTimeFrom'}; | ||||||
123 | } | ||||||
124 | |||||||
125 | |||||||
126 | =head2 setCreateTimeTo() | ||||||
127 | |||||||
128 | The ending date of the date range for the orders to retrieve. | ||||||
129 | Also applicable to Half.com. | ||||||
130 | |||||||
131 | RequiredInput: Conditionally | ||||||
132 | # Argument: 'xs:dateTime' | ||||||
133 | |||||||
134 | =cut | ||||||
135 | |||||||
136 | sub setCreateTimeTo { | ||||||
137 | my $self = shift; | ||||||
138 | $self->{'CreateTimeTo'} = shift | ||||||
139 | } | ||||||
140 | |||||||
141 | =head2 getCreateTimeTo() | ||||||
142 | |||||||
143 | # Returns: 'xs:dateTime' | ||||||
144 | |||||||
145 | =cut | ||||||
146 | |||||||
147 | sub getCreateTimeTo { | ||||||
148 | my $self = shift; | ||||||
149 | return $self->{'CreateTimeTo'}; | ||||||
150 | } | ||||||
151 | |||||||
152 | |||||||
153 | =head2 setListingType() | ||||||
154 | |||||||
155 | To retrieve Half.com orders, specify Half. To retrieve eBay | ||||||
156 | orders, don't specify this field at all. | ||||||
157 | (This field can't be used as a listing type filter on eBay.com. | ||||||
158 | If not provided or if any value other than Half is specified, | ||||||
159 | this field has no useful effect and the call retrieves | ||||||
160 | eBay orders of all types. | ||||||
161 | Also, you can't retrieve both eBay and Half.com orders | ||||||
162 | in the same response.) | ||||||
163 | |||||||
164 | RequiredInput: Conditionally | ||||||
165 | OnlyTheseValues: Half | ||||||
166 | # Argument: 'ns:ListingTypeCodeType' | ||||||
167 | |||||||
168 | =cut | ||||||
169 | |||||||
170 | sub setListingType { | ||||||
171 | my $self = shift; | ||||||
172 | $self->{'ListingType'} = shift | ||||||
173 | } | ||||||
174 | |||||||
175 | =head2 getListingType() | ||||||
176 | |||||||
177 | # Returns: 'ns:ListingTypeCodeType' | ||||||
178 | |||||||
179 | =cut | ||||||
180 | |||||||
181 | sub getListingType { | ||||||
182 | my $self = shift; | ||||||
183 | return $self->{'ListingType'}; | ||||||
184 | } | ||||||
185 | |||||||
186 | |||||||
187 | =head2 setOrderIDArray() | ||||||
188 | |||||||
189 | A set of orders to retrieve. | ||||||
190 | Does not retrieve Express orders, even when the explicit Express OrderID found on the eBay Express site is included in the request. | ||||||
191 | Not applicable to Half.com. | ||||||
192 | |||||||
193 | RequiredInput: Conditionally | ||||||
194 | # Argument: 'ns:OrderIDArrayType' | ||||||
195 | |||||||
196 | =cut | ||||||
197 | |||||||
198 | sub setOrderIDArray { | ||||||
199 | my $self = shift; | ||||||
200 | $self->{'OrderIDArray'} = shift | ||||||
201 | } | ||||||
202 | |||||||
203 | =head2 getOrderIDArray() | ||||||
204 | |||||||
205 | # Returns: 'ns:OrderIDArrayType' | ||||||
206 | |||||||
207 | =cut | ||||||
208 | |||||||
209 | sub getOrderIDArray { | ||||||
210 | my $self = shift; | ||||||
211 | return $self->_getDataTypeInstance( 'OrderIDArray' | ||||||
212 | ,'eBay::API::XML::DataType::OrderIDArrayType'); | ||||||
213 | } | ||||||
214 | |||||||
215 | |||||||
216 | =head2 setOrderRole() | ||||||
217 | |||||||
218 | Filters orders based on the role of the user making the | ||||||
219 | GetOrders request. | ||||||
220 | Not applicable to Half.com. | ||||||
221 | |||||||
222 | RequiredInput: Conditionally | ||||||
223 | # Argument: 'ns:TradingRoleCodeType' | ||||||
224 | |||||||
225 | =cut | ||||||
226 | |||||||
227 | sub setOrderRole { | ||||||
228 | my $self = shift; | ||||||
229 | $self->{'OrderRole'} = shift | ||||||
230 | } | ||||||
231 | |||||||
232 | =head2 getOrderRole() | ||||||
233 | |||||||
234 | # Returns: 'ns:TradingRoleCodeType' | ||||||
235 | |||||||
236 | =cut | ||||||
237 | |||||||
238 | sub getOrderRole { | ||||||
239 | my $self = shift; | ||||||
240 | return $self->{'OrderRole'}; | ||||||
241 | } | ||||||
242 | |||||||
243 | |||||||
244 | =head2 setOrderStatus() | ||||||
245 | |||||||
246 | Filters the returned orders by order status (Active or Completed). | ||||||
247 | To retrieve orders with a status of Inactive or Cancelled, you must | ||||||
248 | specify the order IDs (OrderIDArray.OrderID). When you specify | ||||||
249 | OrderIDArray.OrderID, no other filters are used. | ||||||
250 | |
||||||
251 | For Half.com, you can get some, but not all orders. | ||||||
252 | Orders on Half.com have different order status values from | ||||||
253 | eBay orders. When you set ListingType to Half, set OrderStatus | ||||||
254 | to Shipped. Otherwise, GetOrders may return incomplete information | ||||||
255 | or have indeterminate results. | ||||||
256 | |||||||
257 | RequiredInput: Conditionally | ||||||
258 | OnlyTheseValues: Active, Completed, Shipped | ||||||
259 | # Argument: 'ns:OrderStatusCodeType' | ||||||
260 | |||||||
261 | =cut | ||||||
262 | |||||||
263 | sub setOrderStatus { | ||||||
264 | my $self = shift; | ||||||
265 | $self->{'OrderStatus'} = shift | ||||||
266 | } | ||||||
267 | |||||||
268 | =head2 getOrderStatus() | ||||||
269 | |||||||
270 | # Returns: 'ns:OrderStatusCodeType' | ||||||
271 | |||||||
272 | =cut | ||||||
273 | |||||||
274 | sub getOrderStatus { | ||||||
275 | my $self = shift; | ||||||
276 | return $self->{'OrderStatus'}; | ||||||
277 | } | ||||||
278 | |||||||
279 | |||||||
280 | =head2 setPagination() | ||||||
281 | |||||||
282 | Not applicable to eBay.com. Applicable to Half.com. If many orders are available, | ||||||
283 | you may need to call GetOrders multiple times to retrieve all the data. | ||||||
284 | Each result set is returned as a page of entries. | ||||||
285 | Use this Pagination information to indicate the maximum number of entries to | ||||||
286 | retrieve per page (i.e., per call), the page number to retrieve, and other data. | ||||||
287 | |||||||
288 | RequiredInput: No | ||||||
289 | # Argument: 'ns:PaginationType' | ||||||
290 | |||||||
291 | =cut | ||||||
292 | |||||||
293 | sub setPagination { | ||||||
294 | my $self = shift; | ||||||
295 | $self->{'Pagination'} = shift | ||||||
296 | } | ||||||
297 | |||||||
298 | =head2 getPagination() | ||||||
299 | |||||||
300 | # Returns: 'ns:PaginationType' | ||||||
301 | |||||||
302 | =cut | ||||||
303 | |||||||
304 | sub getPagination { | ||||||
305 | my $self = shift; | ||||||
306 | return $self->_getDataTypeInstance( 'Pagination' | ||||||
307 | ,'eBay::API::XML::DataType::PaginationType'); | ||||||
308 | } | ||||||
309 | |||||||
310 | |||||||
311 | |||||||
312 | |||||||
313 | |||||||
314 | ## Attribute and Property lists | ||||||
315 | sub getPropertiesList { | ||||||
316 | my $self = shift; | ||||||
317 | return \@gaProperties; | ||||||
318 | } | ||||||
319 | |||||||
320 | sub getAttributesList { | ||||||
321 | my $self = shift; | ||||||
322 | return \@gaAttributes; | ||||||
323 | } | ||||||
324 | |||||||
325 | |||||||
326 | |||||||
327 | 1; |