-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcommand_add_fixed_price_item.go
56 lines (46 loc) · 1.68 KB
/
command_add_fixed_price_item.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
package ebay
import "encoding/xml"
type AddFixedPriceItem struct {
Currency string
Country string
DispatchTimeMax int `xml:",omitempty"`
ConditionID int `xml:",omitempty"`
Title string `xml:",omitempty"`
Description string `xml:",omitempty"`
StartPrice string
ListingType string `xml:",omitempty"`
Quantity uint `xml:",omitempty"`
BestOfferDetails *BestOfferDetails `xml:",omitempty"`
PaymentMethods string `xml:",omitempty"`
PayPalEmailAddress string `xml:",omitempty"`
ListingDuration string
ShippingDetails *ShippingDetails `xml:",omitempty"`
PrimaryCategory *PrimaryCategory
Storefront *Storefront `xml:",omitempty"`
PostalCode string `xml:",omitempty"`
ReturnPolicy *ReturnPolicy `xml:",omitempty"`
PictureDetails *PictureDetails `xml:",omitempty"`
ProductListingDetails *ProductListingDetails `xml:",omitempty"`
ItemSpecifics []ItemSpecifics `xml:",omitempty"`
}
func (c AddFixedPriceItem) CallName() string {
return "AddFixedPriceItem"
}
func (c AddFixedPriceItem) ParseResponse(r []byte) (EbayResponse, error) {
var xmlResponse AddFixedPriceItemResponse
err := xml.Unmarshal(r, &xmlResponse)
return xmlResponse, err
}
func (c AddFixedPriceItem) Body() interface{} {
type Item struct {
AddFixedPriceItem
}
return Item{c}
}
type AddFixedPriceItemResponse struct {
ebayResponse
ItemID string
}
func (r AddFixedPriceItemResponse) ResponseErrors() ebayErrors {
return r.ebayResponse.Errors
}