-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.go
256 lines (226 loc) · 12.5 KB
/
constants.go
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
package finding
const EbayFindingAPIVersion = "1.13.0"
const EbayRequestDataFormat = "XML"
const EbayResponseDataFormat = "XML"
const EbayServiceName = "FindingService"
const DefaultItemsPerPage = 100
const EbayFindingNamespace = "http://www.ebay.com/marketplace/search/v1/services"
type EbayEndpoint string
const (
// EbayEndpointProduction is a production endpoint for Finding API
EbayEndpointProduction = "https://svcs.ebay.com/services/search/FindingService/v1"
// EbayEndpointSandbox is a sandbox endpoint for Finding API
EbayEndpointSandbox = "https://svcs.sandbox.ebay.com/services/search/FindingService/v1"
)
type EbayOperation string
const (
OperationFindItemsAdvanced EbayOperation = "findItemsAdvanced"
OperationFindItemsByCategory EbayOperation = "findItemsByCategory"
OperationFindItemsByKeywords EbayOperation = "findItemsByKeywords"
OperationFindItemsByProduct EbayOperation = "findItemsByProduct"
OperationFindItemsIneBayStores EbayOperation = "findItemsIneBayStores"
OperationGetSearchKeywordsRecommendation EbayOperation = "getSearchKeywordsRecommendation"
OperationGetHistograms EbayOperation = "getHistograms"
OperationGetVersion EbayOperation = "getVersion"
)
type GlobalID string
const (
GlobalIDEbayUS GlobalID = "EBAY-US"
GlobalIDEbayENCA GlobalID = "EBAY-ENCA"
GlobalIDEbayGB GlobalID = "EBAY-GB"
GlobalIDEbayAU GlobalID = "EBAY-AU"
GlobalIDEbayAT GlobalID = "EBAY-AT"
GlobalIDEbayFRBE GlobalID = "EBAY-FRBE"
GlobalIDEbayFR GlobalID = "EBAY-FR"
GlobalIDEbayDE GlobalID = "EBAY-DE"
GlobalIDEbayMOTOR GlobalID = "EBAY-MOTOR"
GlobalIDEbayIT GlobalID = "EBAY-IT"
GlobalIDEbayNLBE GlobalID = "EBAY-NLBE"
GlobalIDEbayNL GlobalID = "EBAY-NL"
GlobalIDEbayES GlobalID = "EBAY-ES"
GlobalIDEbayCH GlobalID = "EBAY-CH"
GlobalIDEbayHK GlobalID = "EBAY-HK"
GlobalIDEbayIN GlobalID = "EBAY-IN"
GlobalIDEbayIE GlobalID = "EBAY-IE"
GlobalIDEbayMY GlobalID = "EBAY-MY"
GlobalIDEbayFRCA GlobalID = "EBAY-FRCA"
GlobalIDEbayPH GlobalID = "EBAY-PH"
GlobalIDEbaySG GlobalID = "EBAY-SG"
)
type OutputSelectorParameter string
const (
OutputSelectorAspectHistogram OutputSelectorParameter = "AspectHistogram"
OutputSelectorCategoryHistogram OutputSelectorParameter = "CategoryHistogram"
OutputSelectorConditionHistogram OutputSelectorParameter = "ConditionHistogram"
OutputSelectorGalleryInfo OutputSelectorParameter = "GalleryInfo"
OutputSelectorPictureURLLarge OutputSelectorParameter = "PictureURLLarge"
OutputSelectorPictureURLSuperSize OutputSelectorParameter = "PictureURLSuperSize"
OutputSelectorSellerInfo OutputSelectorParameter = "SellerInfo"
OutputSelectorStoreInfo OutputSelectorParameter = "StoreInfo"
OutputSelectorUnitPriceInfo OutputSelectorParameter = "UnitPriceInfo"
)
type AspectNameParameter string
type ItemFilterParameter string
const (
ItemFilterAuthorizedSellerOnly ItemFilterParameter = "AuthorizedSellerOnly"
ItemFilterAvailableTo ItemFilterParameter = "AvailableTo"
ItemFilterBestOfferOnly ItemFilterParameter = "BestOfferOnly"
ItemFilterCharityOnly ItemFilterParameter = "CharityOnly"
ItemFilterCondition ItemFilterParameter = "Condition"
ItemFilterCurrency ItemFilterParameter = "Currency"
ItemFilterEndTimeFrom ItemFilterParameter = "EndTimeFrom"
ItemFilterEndTimeTo ItemFilterParameter = "EndTimeTo"
ItemFilterExcludeAutoPay ItemFilterParameter = "ExcludeAutoPay"
ItemFilterExcludeCategory ItemFilterParameter = "ExcludeCategory"
ItemFilterExcludeSeller ItemFilterParameter = "ExcludeSeller"
ItemFilterExpeditedShippingType ItemFilterParameter = "ExpeditedShippingType"
ItemFilterFeaturedOnly ItemFilterParameter = "FeaturedOnly"
ItemFilterFeedbackScoreMax ItemFilterParameter = "FeedbackScoreMax"
ItemFilterFeedbackScoreMin ItemFilterParameter = "FeedbackScoreMin"
ItemFilterFreeShippingOnly ItemFilterParameter = "FreeShippingOnly"
ItemFilterGetItFastOnly ItemFilterParameter = "GetItFastOnly"
ItemFilterHideDuplicateItems ItemFilterParameter = "HideDuplicateItems"
ItemFilterListedIn ItemFilterParameter = "ListedIn"
ItemFilterListingType ItemFilterParameter = "ListingType"
ItemFilterLocalPickupOnly ItemFilterParameter = "LocalPickupOnly"
ItemFilterLocalSearchOnly ItemFilterParameter = "LocalSearchOnly"
ItemFilterLocatedIn ItemFilterParameter = "LocatedIn"
ItemFilterLotsOnly ItemFilterParameter = "LotsOnly"
ItemFilterMaxBids ItemFilterParameter = "MaxBids"
ItemFilterMaxDistance ItemFilterParameter = "MaxDistance"
ItemFilterMaxHandlingTime ItemFilterParameter = "MaxHandlingTime"
ItemFilterMaxPrice ItemFilterParameter = "MaxPrice"
ItemFilterMaxQuantity ItemFilterParameter = "MaxQuantity"
ItemFilterMinBids ItemFilterParameter = "MinBids"
ItemFilterMinPrice ItemFilterParameter = "MinPrice"
ItemFilterMinQuantity ItemFilterParameter = "MinQuantity"
ItemFilterModTimeFrom ItemFilterParameter = "ModTimeFrom"
ItemFilterOutletSellerOnly ItemFilterParameter = "OutletSellerOnly"
ItemFilterPaymentMethod ItemFilterParameter = "PaymentMethod"
ItemFilterReturnsAcceptedOnly ItemFilterParameter = "ReturnsAcceptedOnly"
ItemFilterSeller ItemFilterParameter = "Seller"
ItemFilterSellerBusinessType ItemFilterParameter = "SellerBusinessType"
ItemFilterSoldItemsOnly ItemFilterParameter = "SoldItemsOnly"
ItemFilterStartTimeFrom ItemFilterParameter = "StartTimeFrom"
ItemFilterStartTimeTo ItemFilterParameter = "StartTimeTo"
ItemFilterTopRatedSellerOnly ItemFilterParameter = "TopRatedSellerOnly"
ItemFilterValueBoxInventory ItemFilterParameter = "ValueBoxInventory"
ItemFilterWorldOfGoodOnly ItemFilterParameter = "WorldOfGoodOnly"
)
type SortOrderParameter string
const (
SortOrderBestMatch SortOrderParameter = "BestMatch"
SortOrderBidCountFewest SortOrderParameter = "BidCountFewest"
SortOrderBidCountMost SortOrderParameter = "BidCountMost"
SortOrderCountryAscending SortOrderParameter = "CountryAscending"
SortOrderCountryDescending SortOrderParameter = "CountryDescending"
SortOrderCurrentPriceHighest SortOrderParameter = "CurrentPriceHighest"
SortOrderDistanceNearest SortOrderParameter = "DistanceNearest"
SortOrderEndTimeSoonest SortOrderParameter = "EndTimeSoonest"
SortOrderPricePlusShippingHighest SortOrderParameter = "PricePlusShippingHighest"
SortOrderPricePlusShippingLowest SortOrderParameter = "PricePlusShippingLowest"
SortOrderStartTimeNewest SortOrderParameter = "StartTimeNewest"
SortOrderWatchCountDecreaseSort SortOrderParameter = "WatchCountDecreaseSort"
)
type ItemFilterCurrencyIDOption string
const (
CurrencyIDAUD ItemFilterCurrencyIDOption = "AUD"
CurrencyIDCAD ItemFilterCurrencyIDOption = "CAD"
CurrencyIDCHF ItemFilterCurrencyIDOption = "CHF"
CurrencyIDCNY ItemFilterCurrencyIDOption = "CNY"
CurrencyIDEUR ItemFilterCurrencyIDOption = "EUR"
CurrencyIDGBP ItemFilterCurrencyIDOption = "GBP"
CurrencyIDHKD ItemFilterCurrencyIDOption = "HKD"
CurrencyIDINR ItemFilterCurrencyIDOption = "INR"
CurrencyIDMYR ItemFilterCurrencyIDOption = "MYR"
CurrencyIDPHP ItemFilterCurrencyIDOption = "PHP"
CurrencyIDPLN ItemFilterCurrencyIDOption = "PLN"
CurrencyIDSEK ItemFilterCurrencyIDOption = "SEK"
CurrencyIDSGD ItemFilterCurrencyIDOption = "SGD"
CurrencyIDTWD ItemFilterCurrencyIDOption = "TWD"
// CurrencyIDUSD is US Dollar.
// For eBay, you can only specify this currency for listings you submit to the US (site ID 0), eBayMotors (site 100), and Canada (site 2) sites.
CurrencyIDUSD ItemFilterCurrencyIDOption = "USD"
)
type ItemFilterExpeditedShippingTypeOption string
const (
ExpeditedShippingTypeExpedited ItemFilterExpeditedShippingTypeOption = "Expedited"
ExpeditedShippingTypeOneDayShipping ItemFilterExpeditedShippingTypeOption = "OneDayShipping"
)
type ItemFilterPaymentMethodOption string
const (
PaymentMethodPayPal ItemFilterPaymentMethodOption = "PayPal"
PaymentMethodPaisaPay ItemFilterPaymentMethodOption = "PaisaPay"
PaymentMethodPaisaPayEMI ItemFilterPaymentMethodOption = "PaisaPayEMI"
)
type ItemFilterSellerBusinessTypeOption string
const (
SellerBusinessTypeBusiness ItemFilterSellerBusinessTypeOption = "Business"
SellerBusinessTypePrivate ItemFilterSellerBusinessTypeOption = "Private"
)
type ItemFilterConditionOption string
const (
ConditionNew ItemFilterConditionOption = "1000"
ConditionNewOther ItemFilterConditionOption = "1500"
ConditionNewWithDefects ItemFilterConditionOption = "1750"
ConditionCertifiedRefurbished ItemFilterConditionOption = "2000"
// ConditionExcellentRefurbished is used in Cell Phones & Smartphones category (9355)
// on the US, Canada, UK, Germany, and Australia
ConditionExcellentRefurbished ItemFilterConditionOption = "2010"
// ConditionVeryGoodRefurbished is used in Cell Phones & Smartphones category (9355)
// on the US, Canada, UK, Germany, and Australia
ConditionVeryGoodRefurbished ItemFilterConditionOption = "2020"
// ConditionGoodRefurbished is used in Cell Phones & Smartphones category (9355)
// on the US, Canada, UK, Germany, and Australia
ConditionGoodRefurbished ItemFilterConditionOption = "2030"
// ConditionSellerRefurbished can't be used in Cell Phones & Smartphones category (9355)
// on the US, Canada, UK, Germany, and Australia
ConditionSellerRefurbished ItemFilterConditionOption = "2500"
ConditionLikeNew ItemFilterConditionOption = "2750"
ConditionUsed ItemFilterConditionOption = "3000"
ConditionVeryGood ItemFilterConditionOption = "4000"
ConditionGood ItemFilterConditionOption = "5000"
ConditionAcceptable ItemFilterConditionOption = "6000"
ConditionForPartsOrNotWorking ItemFilterConditionOption = "7000"
)
type ItemFilterConditionNameOption string
const (
ConditionNameNew ItemFilterConditionNameOption = "New"
ConditionNameNewOther ItemFilterConditionNameOption = "New other (see details)"
ConditionNameNewWithDefects ItemFilterConditionNameOption = "New with defects"
ConditionNameCertifiedRefurbished ItemFilterConditionNameOption = "Certified refurbished"
// ConditionNameExcellentRefurbished is used in Cell Phones & Smartphones category (9355)
// on the US, Canada, UK, Germany, and Australia
ConditionNameExcellentRefurbished ItemFilterConditionNameOption = "Excellent - Refurbished"
// ConditionNameVeryGoodRefurbished is used in Cell Phones & Smartphones category (9355)
// on the US, Canada, UK, Germany, and Australia
ConditionNameVeryGoodRefurbished ItemFilterConditionNameOption = "Very Good - Refurbished"
// ConditionNameGoodRefurbished is used in Cell Phones & Smartphones category (9355)
// on the US, Canada, UK, Germany, and Australia
ConditionNameGoodRefurbished ItemFilterConditionNameOption = "Good - Refurbished"
// ConditionNameSellerRefurbished can't be used in Cell Phones & Smartphones category (9355)
// on the US, Canada, UK, Germany, and Australia
ConditionNameSellerRefurbished ItemFilterConditionNameOption = "Seller refurbished"
ConditionNameLikeNew ItemFilterConditionNameOption = "Like New"
ConditionNameUsed ItemFilterConditionNameOption = "Used"
ConditionNameVeryGood ItemFilterConditionNameOption = "Very Good"
ConditionNameGood ItemFilterConditionNameOption = "Good"
ConditionNameAcceptable ItemFilterConditionNameOption = "Acceptable"
ConditionNameForPartsOrNotWorking ItemFilterConditionNameOption = "For parts or not working"
)
type ItemFilterListingTypeOption string
const (
ListingTypeAuction ItemFilterListingTypeOption = "Auction"
ListingTypeAuctionWithBIN ItemFilterListingTypeOption = "AuctionWithBIN"
ListingTypeClassified ItemFilterListingTypeOption = "Classified"
ListingTypeFixedPrice ItemFilterListingTypeOption = "FixedPrice"
ListingTypeStoreInventory ItemFilterListingTypeOption = "StoreInventory"
ListingTypeAll ItemFilterListingTypeOption = "All"
)
type ProductTypeOption string
const (
ProductTypeISBN ProductTypeOption = "ISBN"
ProductTypeUPC ProductTypeOption = "UPC"
ProductTypeEAN ProductTypeOption = "EAN"
ProductTypeReferenceID ProductTypeOption = "ReferenceID"
)