/
model_response_header.go
236 lines (195 loc) · 21.3 KB
/
model_response_header.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
/*
Tokopedia API
Tokopedia API
API version: 1.0
Contact: dev@sirclo.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package tokopedia
import (
"encoding/json"
)
// checks if the ResponseHeader type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ResponseHeader{}
// ResponseHeader struct for ResponseHeader
type ResponseHeader struct {
ProcessTime *float64 `json:"process_time,omitempty"`
Messages *string `json:"messages,omitempty"`
Reason *string `json:"reason,omitempty"`
// Error codes: * BDL_DLV_001 - Invalid request body, please check again - Invalid request body, please check again * BDL_DLV_002 - Invalid field %s format, value %v should be %s - Invalid params, please check again * BDL_DLV_013 - Filter type must be 1 or 2 and cannot be empty - Invalid filter value, please check again * BDL_USC_001 - FS ID is not associated with Shop ID or Warehouse ID - fs_id is not associated, please check again * BDL_USC_002 - Shop Info not found - Shop information cannot be found * BDL_USC_003 - Too many or too few bundle items given for this type of bundle - The number of bundle item is not right for this type of bundle * BDL_USC_004 - 2 or more same products in bundle - Multiple bundle must consist of minimum two different products * BDL_USC_005 - Different products in single bundle - Single bundle only accept same products * BDL_USC_006 - Please use different min order for each bundle item - Please use different min order * BDL_USC_007 - Min Order of single type bundle must be greater than 1 - Please set the minimum order more than 1 * BDL_USC_009 - Bundle item price must be lower than its original price - Please set the bundle item price lower than the original price * BDL_USC_010 - Bundle item stock cannot be empty - Please add the bundle item stock * BDL_USC_012 - One of the product variant is invalid - There is invalid product variant on the bundle * CMP_DLV_001 - Invalid field %s format, value %v should be %s - There is invalid request format * CMP_DLV_002 - Product IDs must be numeric and comma separated - Invalid Product IDs format, please kindly check * CMP_DLV_003 - Value of field %s exceed limit %s=%d - There is invalid request format * CMP_DLV_004 - product_id cannot be empty - Product ID is empty, please kindly check * CMP_GRPC_001 - Failed Send GRPC Request - Failed sending request to upstream * CMP_GRPC_003 - Data Not Found - Data not found from upstream * CMP_GRPC_004 - Failed Marshalling JSON - Failed processing request to upstream * CMP_GRPC_005 - Failed Unmarshal JSON - Failed processing response from upstream * CMP_USC_001 - fs_id Is Not Associated With Shop ID or Warehouse ID - FS ID is not associated * CMP_USC_002 - Some Product ID Is Not Own By Current Shop ID - Some Product ID is not owned by current Shop ID * CMP_USC_003 - Invalid Product ID Format - Invalid Product ID format, please kindly check * ETS_USC_001 - fs_id Is Not Associated With Shop ID or Warehouse ID - FS ID is not associated, please kindly check * ORD_API_001 - Failed To Initialize Request - Failed sending request to upstream * ORD_API_003 - Failed To Fetching Request - Failed fetching response from upstream * ORD_API_004 - Failed To Reading Response Body - Failed processing response from upstream * ORD_API_005 - Failed To Parsing Json Response - Failed processing response from upstream * ORD_API_006 - There Are Error From Ext Service - Failed getting response from upstream * ORD_API_008 - Data Not Found - Order data not found * ORD_API_009 - Error Data Order Too Big, Must Reduce Time Interval - Response is too large, please reduce the time interval * ORD_API_010 - Partial Fulfillment Quantity must be lower than ordered - POF request quantity must be lower than initial order quantity * ORD_API_011 - Partial Fulfillment Request have been made before - POF request has already been made * ORD_API_012 - Order Bundle is not eligible for partial order fulfillment - POF is not eligible with bundling * ORD_API_013 - There's no change in the product quantity for partial order fulfillment - POF request quantity is the same as initial order quantity * ORD_API_016 - FS ID not authorized to reject cancel request - FS ID is not eligible to reject the buyer request cancellation * ORD_DLV_001 - fs_id cannot be empty - fs_id field is empty, please check again * ORD_DLV_002 - invalid fs_id format - Invalid fs_id format, please check again * ORD_DLV_003 - error order id and invoice no is empty - Both Order ID and Invoice Number is empty * ORD_DLV_004 - error must choose either order id or invoice no as parameter - Please choose either Order ID or Invoice Number to be filled * ORD_DLV_005 - invalid order_id format - Invalid order_id format, please check again * ORD_DLV_006 - invalid shop_id format - Invalid shop_id format, please check again * ORD_DLV_007 - invalid warehouse_id format - Invalid warehouse_id format, please check again * ORD_DLV_008 - please choose one between shop id or warehouse id - Please choose either Shop ID or Warehouse ID to be filled * ORD_DLV_009 - from_date cannot be empty - from_date is empty, please check again * ORD_DLV_010 - invalid from_date format - Invalid from_date format, please check again * ORD_DLV_011 - to_date cannot be empty - to_date is empty, please check again * ORD_DLV_012 - invalid to_date format - Invalid to_date format, please check again * ORD_DLV_013 - Date Range must be less than %d days * ORD_DLV_014 - page cannot be empty - page is empty, please check again * ORD_DLV_015 - invalid page format - Invalid page format, please check again * ORD_DLV_016 - per_page cannot be empty - per_page is empty, please check again * ORD_DLV_017 - invalid per_page format - Invalid per_page format, please check again * ORD_DLV_018 - invalid status format - Invalid status format, please check again * ORD_DLV_019 - failed read body request - Failed read body request, please check again * ORD_DLV_020 - wrong json format - Wrong JSON body format, please check again * ORD_DLV_021 - shipping ref number cannot be empty for confirm shipping - Shipping Ref Number is empty and is needed for confirm shipping, please check again * ORD_DLV_022 - Shop ID cannot be empty for set delivered - Shop ID is empty and is needed for set delivered, please check again * ORD_DLV_023 - order status is not supported - Order Status is not supported * ORD_DLV_025 - invalid next_order_id format - Invalid next_order_id format, please check again * ORD_DLV_028 - invalid order_type param value - Invalid order_type param value, please check again * ORD_DLV_029 - invalid order_type param format - Invalid order_type format, please check again * ORD_USC_001 - Order Status not eligible to accept - Order status is not eligible to be changed to accept * ORD_USC_002 - Order ID is not fulfillment * ORD_USC_003 - Order ID from warehouse id is not authenticate - Order ID is not associated with Warehouse ID * ORD_USC_004 - Order ID need to be fulfilled by toko cabang * ORD_USC_005 - Order ID from shop id is not authenticate - Order ID is not associated with Shop ID * ORD_USC_006 - Admin ID Not Found From Shop ID * ORD_USC_007 - Error When Request Accept Order To Ext Service - Failed getting response from upstream * ORD_USC_008 - Order Status not eligible to reject - Order status it not eligible to changed to reject * ORD_USC_009 - Mandatory To Fill Reason - It is required to fill reject reason * ORD_USC_010 - Failed Getting Products - Failed getting product information * ORD_USC_011 - No Matching product id * ORD_USC_012 - Mandatory To Fill Shop Close End Date and Note - It is required to fill shop close end date and note * ORD_USC_013 - Shop Close End Date Present But Invalid - Invalid shop close end date value * ORD_USC_014 - Error When Request Reject Order To Ext Service - Failed getting response from upstream * ORD_USC_015 - FS ID Is Not Associated With Shop ID or Warehouse ID - FS ID is not associated with Shop ID or Warehouse ID * ORD_USC_016 - Order ID Status Must Be 500 (In Shipping Process) to Update Into Set Delivered * ORD_USC_018 - Order ID from warehouse id is not authenticate - Order ID is not associated with Warehouse ID * ORD_USC_019 - Order need to get request cancellation first from buyer * ORD_USC_020 - You are not allowed to reject this order * ORD_USC_024 - FS ID not associated with Shop ID - FS ID is not associated with Shop ID * PRD_API_001 - Failed To Initialize Request - Failed initialize request to upstream * PRD_API_003 - Failed To Fetching Request - Failed fetching request from upstream * PRD_API_004 - Failed To Reading Response Body - Error on processing data * PRD_API_005 - Failed To Parsing Json Response - Error on processing data * PRD_API_006 - There Are Error From Ext Service - There is error from external service * PRD_API_007 - Failed Marshalling JSON - Error on processing data * PRD_CACHE_001 - Failed retrieve new upload id - Error on processing data * PRD_CACHE_002 - Failed Marshall Cache Key Value - Error on processing data * PRD_CACHE_003 - Failed To Make Cache - Error on processing data * PRD_CACHE_005 - Data Not Found - Error on processing data * PRD_CACHE_006 - Failed to retrieve cache data - Error on processing data * PRD_CACHE_007 - Failed Unmarshal cache response - Error on processing data * PRD_DB_001 - Failed To Query DB Data - Failed getting data from database * PRD_DB_002 - Failed To Scan DB Data - Failed getting data from database * PRD_DB_003 - Data Not Found - Failed getting data from database * PRD_DLV_001 - fs_id cannot be empty - fs_id field is empty, please check again * PRD_DLV_002 - invalid fs_id format - fs_id is in the wrong format, please check again * PRD_DLV_003 - invalid shop_id format - shop_id is in the wrong format, please check again * PRD_DLV_005 - page cannot be empty when shop_id or warehouse_id is filled - fs_id is in the wrong format, please check * PRD_DLV_015 - failed read body request - Failed reading the body request * PRD_DLV_016 - shop_id cannot be empty - shop_id field is empty, please check again * PRD_DLV_018 - Max allowed products per-update are %d products - The request has exceed the max allowed product price edit per request * PRD_DLV_019 - invalid warehouse_id format - warehouse_id is in the wrong format, please check again * PRD_DLV_038 - Value %s of field %s is not allowed, the allowed fields are %s - There is something wrong with the request body * PRD_DLV_042 - Invalid field %s format, value %v should be %s - There is something wrong with the request body * PRD_DLV_043 - Invalid request body, please check again - There is something wrong with the request body * PRD_DLV_052 - warehouse_id cannot be empty - warehouse_id is empty, please check again * PRD_DLV_055 - warehouse_id is not eligible to perform this operation - warehouse_id is not eligible, please check again * PRD_GRPC_001 - Failed Send GRPC Request - Failed sending request to upstream * PRD_GRPC_002 - There Are Error From Ext Service - Failed getting response from upstream * PRD_GRPC_003 - Data Not Found - Product not found * PRD_USC_001 - fs_id Is Not Associated With Shop ID or Warehouse ID - fs_id not associated, please check again * PRD_USC_008 - Mandatory To Fill Warehouse ID - warehouse_id is empty, please check again * PRD_USC_009 - Warehouse is not owned by toko cabang * PRD_USC_010 - Warehouse is owned by toko cabang * PRD_USC_011 - Partner ID not found - Failed to get Partner ID * PRD_USC_012 - Shop ID Not Match - Shop ID did not match with warehouse data * PRD_USC_013 - FS Type cannot use warehouse - Failed to precess data * PRD_USC_015 - Failed Epoch converter today - Error on processing data * PRD_USC_021 - Warehouse Data Not Found - Warehouse ID not found * PRD_USC_024 - Error Convert number format into string - Failed getting response from upstream * PRD_USC_025 - Shop ID is not associated with upload id - Shop ID not associated, please check again * PRD_USC_027 - Invalid action parameter value - invalid action value, please check again * PRD_USC_028 - Product Status Not In Active or Warehouse. Edit Process Canceled - Unable to edit product because the status is not active or warehouse * PRD_USC_029 - Warehouse ID Information Not Found - Failed to get warehouse information * RBAC_MDLW_001 - FS ID is not associated with Shop ID or Warehouse ID - fs_id not assosiated, please check again * RBAC_MDLW_002 - This shop owner has not given permission for your app to use this API on the shop - Application does not have shop permission * RBAC_USC_008 - App is not associated with shop - Application not assosiated, please check again * RBAC_USC_012 - This shop owner has not given permission for your app to use this API on the shop - Application does not have shop permission * SHP_API_003 - Failed To Fetching Request - Failed fetching response from upstream * SHP_DLV_001 - FS ID is not valid - Invalid FS ID, please kindly check * SHP_DLV_002 - Shop ID is not valid - Invalid Shop ID, please kindly check * SHP_DLV_003 - Page format is not valid - Invalid Page format, please kindly check * SHP_DLV_004 - Per Page format is not valid - Invalid Per Page format, please kindly check * SHP_DLV_005 - Date format is not valid - Invalid Date format, please kindly check * SHP_DLV_007 - Date Range must be less than %d days - Invalid Date Range value, please kindly check * SHP_DLV_008 - failed read body request - Failed read body request, please kindly check * SHP_DLV_009 - invalid hide_zero format - Invalid hide_zero format, please kindly check * SHP_DLV_010 - page_count value exceed limit - Invalid page_count value, please kindly check * SHP_DLV_011 - invalid display value - Invalid display value, please kindly check * SHP_DLV_012 - fs_id cannot be empty - fs_id is empty, please kindly check * SHP_DLV_013 - shop_id cannot be empty - shop_id is empty, please kindly check * SHP_DLV_014 - invalid page_count format - invalid page_count format, please kindly check * PRD_DLV_045 - Field %s should not be empty, please fill the empty field - Please check the request params again * SHP_GRPC_001 - Failed Send GRPC Request - Failed sending request to upstream * SHP_GRPC_002 - There Are Error From Ext Service - Failed getting response from upstream * SHP_GRPC_003 - Data Not Found - Failed finding data from upstream * SHP_USC_001 - FS ID is not associated with Shop ID - FS ID is not connected with the Shop ID, please kindly check * SHP_USC_002 - Shop Owner is not found - Shop owner info not found, please kindly check * SHP_USC_004 - Shop information is empty - Failed getting shop info, please kindly check * SPE_DLV_001 - fs_id cannot be empty - FS ID is empty * SPE_DLV_005 - Invalid field %s format, value %v should be %s - Invalid field format, please kindly check * SPE_DLV_006 - Invalid request body, please check again - Invalid request body, please kindly check * SPE_DLV_007 - Value of field %s exceed limit %s=%d - Invalid field value, please kindly check * SPE_DLV_008 - Value %s of field %s is not allowed, the allowed fields are %s - Invalid field value, please kindly check * SPE_GRPC_001 - Failed Send GRPC Request - Failed sending request to upstream * SPE_GRPC_003 - Data Not Found - Data not found * SPE_GRPC_004 - Failed Marshalling JSON - Failed processing request to upstream * SPE_GRPC_005 - Failed Unmarshal JSON - Failed processing response from upstream * SPE_USC_001 - fs_id Is Not Associated With Shop ID or Warehouse ID - FS ID is not associated, please kindly check * SPE_USC_002 - Product ID does not belong to Shop ID or Warehouse ID - Product ID is not associated, please kindly check * SPE_USC_003 - Warehouse ID Information Not Found - Warehouse information not found, please kindly check * SPE_USC_004 - Cannot View Slash Price Information Parent Product Variant * VRT_DLV_001 - fs_id cannot be empty - There is invalid request params * VRT_DLV_002 - invalid fs_id format - There is invalid request params * VRT_DLV_004 - Invalid cat_id format - There is invalid request params * VRT_DLV_005 - invalid product_id format - There is invalid request params * VRT_USC_001 - fs_id Is Not Associated With Shop ID or Warehouse ID - fs_id not associated, please check again * VRT_USC_002 - Category ID Not Found - Category ID not found, please check again
ErrorCode *string `json:"error_code,omitempty"`
}
// NewResponseHeader instantiates a new ResponseHeader object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewResponseHeader() *ResponseHeader {
this := ResponseHeader{}
return &this
}
// NewResponseHeaderWithDefaults instantiates a new ResponseHeader object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewResponseHeaderWithDefaults() *ResponseHeader {
this := ResponseHeader{}
return &this
}
// GetProcessTime returns the ProcessTime field value if set, zero value otherwise.
func (o *ResponseHeader) GetProcessTime() float64 {
if o == nil || IsNil(o.ProcessTime) {
var ret float64
return ret
}
return *o.ProcessTime
}
// GetProcessTimeOk returns a tuple with the ProcessTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResponseHeader) GetProcessTimeOk() (*float64, bool) {
if o == nil || IsNil(o.ProcessTime) {
return nil, false
}
return o.ProcessTime, true
}
// HasProcessTime returns a boolean if a field has been set.
func (o *ResponseHeader) HasProcessTime() bool {
if o != nil && !IsNil(o.ProcessTime) {
return true
}
return false
}
// SetProcessTime gets a reference to the given float64 and assigns it to the ProcessTime field.
func (o *ResponseHeader) SetProcessTime(v float64) {
o.ProcessTime = &v
}
// GetMessages returns the Messages field value if set, zero value otherwise.
func (o *ResponseHeader) GetMessages() string {
if o == nil || IsNil(o.Messages) {
var ret string
return ret
}
return *o.Messages
}
// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResponseHeader) GetMessagesOk() (*string, bool) {
if o == nil || IsNil(o.Messages) {
return nil, false
}
return o.Messages, true
}
// HasMessages returns a boolean if a field has been set.
func (o *ResponseHeader) HasMessages() bool {
if o != nil && !IsNil(o.Messages) {
return true
}
return false
}
// SetMessages gets a reference to the given string and assigns it to the Messages field.
func (o *ResponseHeader) SetMessages(v string) {
o.Messages = &v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ResponseHeader) GetReason() string {
if o == nil || IsNil(o.Reason) {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResponseHeader) GetReasonOk() (*string, bool) {
if o == nil || IsNil(o.Reason) {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *ResponseHeader) HasReason() bool {
if o != nil && !IsNil(o.Reason) {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *ResponseHeader) SetReason(v string) {
o.Reason = &v
}
// GetErrorCode returns the ErrorCode field value if set, zero value otherwise.
func (o *ResponseHeader) GetErrorCode() string {
if o == nil || IsNil(o.ErrorCode) {
var ret string
return ret
}
return *o.ErrorCode
}
// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResponseHeader) GetErrorCodeOk() (*string, bool) {
if o == nil || IsNil(o.ErrorCode) {
return nil, false
}
return o.ErrorCode, true
}
// HasErrorCode returns a boolean if a field has been set.
func (o *ResponseHeader) HasErrorCode() bool {
if o != nil && !IsNil(o.ErrorCode) {
return true
}
return false
}
// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field.
func (o *ResponseHeader) SetErrorCode(v string) {
o.ErrorCode = &v
}
func (o ResponseHeader) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ResponseHeader) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ProcessTime) {
toSerialize["process_time"] = o.ProcessTime
}
if !IsNil(o.Messages) {
toSerialize["messages"] = o.Messages
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.ErrorCode) {
toSerialize["error_code"] = o.ErrorCode
}
return toSerialize, nil
}
type NullableResponseHeader struct {
value *ResponseHeader
isSet bool
}
func (v NullableResponseHeader) Get() *ResponseHeader {
return v.value
}
func (v *NullableResponseHeader) Set(val *ResponseHeader) {
v.value = val
v.isSet = true
}
func (v NullableResponseHeader) IsSet() bool {
return v.isSet
}
func (v *NullableResponseHeader) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResponseHeader(val *ResponseHeader) *NullableResponseHeader {
return &NullableResponseHeader{value: val, isSet: true}
}
func (v NullableResponseHeader) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResponseHeader) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}