This repository has been archived by the owner on May 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
model-returns.go
126 lines (118 loc) Β· 6.75 KB
/
model-returns.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
package shopeego
type ConfirmReturnRequest struct {
// The serial number of return.
ReturnSN string `json:"return_sn,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type ConfirmReturnResponse struct {
// The serial number of return.
ReturnSN string `json:"return_sn,omitempty"`
//
Msg string `json:"msg,omitempty"`
// The identifier for an API request for error tracking
RequestID string `json:"request_id,omitempty"`
}
type DisputeReturnRequest struct {
// The serial number of return.
ReturnSN string `json:"return_sn,omitempty"`
// Seller's email.
Email string `json:"email,omitempty"`
// The reason for seller dispute the return. Available value: NON_RECEIPT/OTHER/NOT_RECEIVED. See Data Definition- ReturnDisputeReason
DisputeReason string `json:"dispute_reason,omitempty"`
// The reason description for seller dispute the return.
DisputeTextReason string `json:"dispute_text_reason,omitempty"`
// Image URLs that seller provide. Seller can upload up 3 images at most.
Images []string `json:"images,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type DisputeReturnResponse struct {
// The serial number of return.
ReturnSN string `json:"return_sn,omitempty"`
//
Msg string `json:"msg,omitempty"`
// The identifier for an API request for error tracking
RequestID string `json:"request_id,omitempty"`
}
type GetReturnListRequest struct {
// Specifies the starting entry of data to return in the current call. Default is 0. if data is more than one page, the offset can be some entry to start next call.
PaginationOffset int `json:"pagination_offset,omitempty"`
// If many items are available to retrieve, you may need to call GetReturnList multiple times to retrieve all the data. Each result set is returned as a page of entries. Default is 40. Use the Pagination filters to control the maximum number of entries (<= 100) to retrieve per page (i.e., per call), the offset number to start next call. This integer value is usUed to specify the maximum number of entries to return in a single ""page"" of data.
PaginationEntriesPerPage int `json:"pagination_entries_per_page,omitempty"`
// The create_time_from and create_time_to fields specify a date range for retrieving orders (based on the order create time). The create_time_from field is the starting date range. The maximum date range that may be specified with the create_time_from and create_time_to fields is 15 days.
CreateTimeFrom int `json:"create_time_from,omitempty"`
// The create_time_from and create_time_to fields specify a date range for retrieving orders (based on the order create time). The create_time_from field is the starting date range. The maximum date range that may be specified with the create_time_from and create_time_to fields is 15 days.
CreateTimeTo int `json:"create_time_to,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type GetReturnListResponse struct {
Returns []GetReturnListResponseReturn `json:"returns,omitempty"`
// This is to indicate whether the item list is more than one page. If this value is true, you may want to continue to check next page to retrieve the rest of items.
More bool `json:"more,omitempty"`
// The identifier for an API request for error tracking
RequestID string `json:"request_id,omitempty"`
}
type GetReturnDetailRequest struct {
// The serial number of return.
ReturnSN int `json:"return_sn,omitempty"`
// Partner ID is assigned upon registration is successful. Required for all requests.
PartnerID int64 `json:"partner_id,omitempty"`
// Shopee's unique identifier for a shop. Required for all requests.
ShopID int64 `json:"shopid,omitempty"`
// This is to indicate the timestamp of the request. Required for all requests.
Timestamp int `json:"timestamp,omitempty"`
}
type GetReturnDetailResponse struct {
// Image URLs of return.
Images []string `json:"images,omitempty"`
// Reason for return product. Applicable values: See Data Definition- ReturnReason.
Reason string `json:"reason,omitempty"`
// Reason that buyer provide.
TextReason string `json:"text_reason,omitempty"`
// The serial number of return.
ReturnSN int `json:"return_sn,omitempty"`
// Amount of the refund.
RefundAmount float64 `json:"refund_amount,omitempty,string"`
// Currency of the return.
Currency string `json:"currency,omitempty"`
// The time of return create.
CreateTime int `json:"create_time,omitempty"`
// The time of modify return.
UpdateTime int `json:"update_time,omitempty"`
// Enumerated type that defines the current status of the return. Applicable values: See Data Definition- ReturnStatus.
Status string `json:"status,omitempty"`
// The last time seller deal with this return.
DueDate int `json:"due_date,omitempty"`
// The tracking number assigned by the shipping carrier for item shipment.
TrackingNumber string `json:"tracking_number,omitempty"`
// The reason of seller dispute return. While the return has been disputed, this field is useful. Applicable values: See Data Definition- ReturnDisputeReason.
DisputeReason string `json:"dispute_reason,omitempty"`
// The reason that seller provide. While the return has been disputed, this field is useful.
DisputeTextReason string `json:"dispute_text_reason,omitempty"`
// Items to be sent back to seller. Can be either integrated/non-integrated.
NeedsLogistics bool `json:"needs_logistics,omitempty"`
// Order price before discount.
AmountBeforeDiscount float64 `json:"amount_before_discount,omitempty,string"`
//
User GetReturnDetailResponseUser `json:"user,omitempty"`
//
Item []GetReturnDetailResponseItem `json:"item,omitempty"`
// Shopee's unique identifier for an order.
OrderSN string `json:"ordersn,omitempty"`
// The identifier for an API request for error tracking
RequestID string `json:"request_id,omitempty"`
}