forked from zombor/go-ebay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommand_relist_fixed_price_item.go
48 lines (38 loc) · 1.35 KB
/
command_relist_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
package ebay
import "encoding/xml"
type RelistFixedPriceItem struct {
ItemID string
StartPrice string `xml:",omitempty"`
ConditionID uint `xml:",omitempty"`
Quantity uint `xml:",omitempty"`
Title string `xml:",omitempty"`
Description string `xml:",omitempty"`
PayPalEmailAddress string `xml:",omitempty"`
PictureDetails *PictureDetails `xml:",omitempty"`
ShippingDetails *ShippingDetails `xml:",omitempty"`
PrimaryCategory *PrimaryCategory
ReturnPolicy *ReturnPolicy `xml:",omitempty"`
ProductListingDetails *ProductListingDetails `xml:",omitempty"`
ItemSpecifics []ItemSpecifics `xml:",omitempty"`
}
func (c RelistFixedPriceItem) CallName() string {
return "RelistFixedPriceItem"
}
func (c RelistFixedPriceItem) Body() interface{} {
type Item struct {
RelistFixedPriceItem
}
return Item{c}
}
func (c RelistFixedPriceItem) ParseResponse(r []byte) (EbayResponse, error) {
var xmlResponse RelistFixedPriceItemResponse
err := xml.Unmarshal(r, &xmlResponse)
return xmlResponse, err
}
type RelistFixedPriceItemResponse struct {
ebayResponse
ItemID string
}
func (r RelistFixedPriceItemResponse) ResponseErrors() ebayErrors {
return r.ebayResponse.Errors
}