/
product_order_create_responses.go
600 lines (442 loc) · 18.3 KB
/
product_order_create_responses.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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
// Code generated by go-swagger; DO NOT EDIT.
package product_order
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/qlcchain/go-sonata-server/models"
)
// ProductOrderCreateCreatedCode is the HTTP code returned for type ProductOrderCreateCreated
const ProductOrderCreateCreatedCode int = 201
/*ProductOrderCreateCreated Created
swagger:response productOrderCreateCreated
*/
type ProductOrderCreateCreated struct {
/*
In: Body
*/
Payload *models.ProductOrder `json:"body,omitempty"`
}
// NewProductOrderCreateCreated creates ProductOrderCreateCreated with default headers values
func NewProductOrderCreateCreated() *ProductOrderCreateCreated {
return &ProductOrderCreateCreated{}
}
// WithPayload adds the payload to the product order create created response
func (o *ProductOrderCreateCreated) WithPayload(payload *models.ProductOrder) *ProductOrderCreateCreated {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create created response
func (o *ProductOrderCreateCreated) SetPayload(payload *models.ProductOrder) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(201)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ProductOrderCreateBadRequestCode is the HTTP code returned for type ProductOrderCreateBadRequest
const ProductOrderCreateBadRequestCode int = 400
/*ProductOrderCreateBadRequest Bad Request
List of supported error codes:
- 20: Invalid URL parameter value
- 21: Missing body
- 22: Invalid body
- 23: Missing body field
- 24: Invalid body field
- 25: Missing header
- 26: Invalid header value
- 27: Missing query-string parameter
- 28: Invalid query-string parameter value
swagger:response productOrderCreateBadRequest
*/
type ProductOrderCreateBadRequest struct {
/*
In: Body
*/
Payload *models.ErrorRepresentation `json:"body,omitempty"`
}
// NewProductOrderCreateBadRequest creates ProductOrderCreateBadRequest with default headers values
func NewProductOrderCreateBadRequest() *ProductOrderCreateBadRequest {
return &ProductOrderCreateBadRequest{}
}
// WithPayload adds the payload to the product order create bad request response
func (o *ProductOrderCreateBadRequest) WithPayload(payload *models.ErrorRepresentation) *ProductOrderCreateBadRequest {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create bad request response
func (o *ProductOrderCreateBadRequest) SetPayload(payload *models.ErrorRepresentation) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(400)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ProductOrderCreateUnauthorizedCode is the HTTP code returned for type ProductOrderCreateUnauthorized
const ProductOrderCreateUnauthorizedCode int = 401
/*ProductOrderCreateUnauthorized Unauthorized
List of supported error codes:
- 40: Missing credentials
- 41: Invalid credentials
- 42: Expired credentials
swagger:response productOrderCreateUnauthorized
*/
type ProductOrderCreateUnauthorized struct {
/*
In: Body
*/
Payload *models.ErrorRepresentation `json:"body,omitempty"`
}
// NewProductOrderCreateUnauthorized creates ProductOrderCreateUnauthorized with default headers values
func NewProductOrderCreateUnauthorized() *ProductOrderCreateUnauthorized {
return &ProductOrderCreateUnauthorized{}
}
// WithPayload adds the payload to the product order create unauthorized response
func (o *ProductOrderCreateUnauthorized) WithPayload(payload *models.ErrorRepresentation) *ProductOrderCreateUnauthorized {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create unauthorized response
func (o *ProductOrderCreateUnauthorized) SetPayload(payload *models.ErrorRepresentation) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(401)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ProductOrderCreateForbiddenCode is the HTTP code returned for type ProductOrderCreateForbidden
const ProductOrderCreateForbiddenCode int = 403
/*ProductOrderCreateForbidden Forbidden
List of supported error codes:
- 50: Access denied
- 51: Forbidden requester
- 52: Forbidden user
- 53: Too many requests
swagger:response productOrderCreateForbidden
*/
type ProductOrderCreateForbidden struct {
/*
In: Body
*/
Payload *models.ErrorRepresentation `json:"body,omitempty"`
}
// NewProductOrderCreateForbidden creates ProductOrderCreateForbidden with default headers values
func NewProductOrderCreateForbidden() *ProductOrderCreateForbidden {
return &ProductOrderCreateForbidden{}
}
// WithPayload adds the payload to the product order create forbidden response
func (o *ProductOrderCreateForbidden) WithPayload(payload *models.ErrorRepresentation) *ProductOrderCreateForbidden {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create forbidden response
func (o *ProductOrderCreateForbidden) SetPayload(payload *models.ErrorRepresentation) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(403)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ProductOrderCreateNotFoundCode is the HTTP code returned for type ProductOrderCreateNotFound
const ProductOrderCreateNotFoundCode int = 404
/*ProductOrderCreateNotFound Not Found
List of supported error codes:
- 60: Resource not found
swagger:response productOrderCreateNotFound
*/
type ProductOrderCreateNotFound struct {
/*
In: Body
*/
Payload *models.ErrorRepresentation `json:"body,omitempty"`
}
// NewProductOrderCreateNotFound creates ProductOrderCreateNotFound with default headers values
func NewProductOrderCreateNotFound() *ProductOrderCreateNotFound {
return &ProductOrderCreateNotFound{}
}
// WithPayload adds the payload to the product order create not found response
func (o *ProductOrderCreateNotFound) WithPayload(payload *models.ErrorRepresentation) *ProductOrderCreateNotFound {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create not found response
func (o *ProductOrderCreateNotFound) SetPayload(payload *models.ErrorRepresentation) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(404)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ProductOrderCreateMethodNotAllowedCode is the HTTP code returned for type ProductOrderCreateMethodNotAllowed
const ProductOrderCreateMethodNotAllowedCode int = 405
/*ProductOrderCreateMethodNotAllowed Method Not Allowed
List of supported error codes:
- 61: Method not allowed
swagger:response productOrderCreateMethodNotAllowed
*/
type ProductOrderCreateMethodNotAllowed struct {
/*
In: Body
*/
Payload *models.ErrorRepresentation `json:"body,omitempty"`
}
// NewProductOrderCreateMethodNotAllowed creates ProductOrderCreateMethodNotAllowed with default headers values
func NewProductOrderCreateMethodNotAllowed() *ProductOrderCreateMethodNotAllowed {
return &ProductOrderCreateMethodNotAllowed{}
}
// WithPayload adds the payload to the product order create method not allowed response
func (o *ProductOrderCreateMethodNotAllowed) WithPayload(payload *models.ErrorRepresentation) *ProductOrderCreateMethodNotAllowed {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create method not allowed response
func (o *ProductOrderCreateMethodNotAllowed) SetPayload(payload *models.ErrorRepresentation) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(405)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ProductOrderCreateRequestTimeoutCode is the HTTP code returned for type ProductOrderCreateRequestTimeout
const ProductOrderCreateRequestTimeoutCode int = 408
/*ProductOrderCreateRequestTimeout Request Time-out
List of supported error codes:
- 63: Request time-out
swagger:response productOrderCreateRequestTimeout
*/
type ProductOrderCreateRequestTimeout struct {
/*
In: Body
*/
Payload *models.ErrorRepresentation `json:"body,omitempty"`
}
// NewProductOrderCreateRequestTimeout creates ProductOrderCreateRequestTimeout with default headers values
func NewProductOrderCreateRequestTimeout() *ProductOrderCreateRequestTimeout {
return &ProductOrderCreateRequestTimeout{}
}
// WithPayload adds the payload to the product order create request timeout response
func (o *ProductOrderCreateRequestTimeout) WithPayload(payload *models.ErrorRepresentation) *ProductOrderCreateRequestTimeout {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create request timeout response
func (o *ProductOrderCreateRequestTimeout) SetPayload(payload *models.ErrorRepresentation) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateRequestTimeout) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(408)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ProductOrderCreateUnprocessableEntityCode is the HTTP code returned for type ProductOrderCreateUnprocessableEntity
const ProductOrderCreateUnprocessableEntityCode int = 422
/*ProductOrderCreateUnprocessableEntity Unprocessable entity
Functional error
- code: 100
message: Missing order item (minimum 1)
description: At least one order item must be provided
- code: 101
message: Missing Buyer at order level
description: One and only one related partyRole with a "Buyer" role should be provided at the product order level.
- code: 114
message: Missing Seller at order level
description: One and only one related partyRole with a "Seller" role should be provided at the product order level.
- code: 102
message: A relatedParty is at the wrong level
description: The partyRole provided is not at the correct level - MEF allows to have
"Buyer", "Seller", "Billing Contact", "Order Contact", "Implementation Contact", "Technical Contact" roles at product order level and "UNI Site Contact", "UNI Alt Site Contact", "ENNI Site Contact", "ENNI Alt Site Contact" at product order item level.
- code: 103
message: Missing Buyer Order Contact at order level
description: One and only one related partyRole with a "Order Contact" role should be provided at the product order level.
Buyer Order Contact name & Telephone number must be provided.
- code: 104
message: Missing Buyer Implementation Contact at order level
description: One and only one related partyRole with a "Implementation Contact" role should be provided at the product order level.
Implementation Contact name & Telephone number must be provided.
- code: 105
message: Missing Buyer Technical contact at order level
description: One and only one related partyRole with a "Technical Contact" role should be provided at the product order level.
Technical Contact name, Telephone number and email address must be provided.
- code: 106
message: Address information must match place type
description: If place type is 'Formatted Address' : addrLine1, city, stateOrProvince, postCode and country must be there.
If place type is 'Fielded Address' : streetName, streetType, city, stateOrProvince, postCode and country must be there.
- code: 107
message: postCode extension requires postcode value to be filled
description: A postCode extension must not be present without a postcode being present
- code: 108
message: Product id is required for all OrderItem Actions other than INSTALL
description: If orderItemAction is not INSTALL, orderItem.product.id is mandatory
- code: 109
message: Order Activity must match all OrderItem Actions for INSTALL
description: If orderActivity is set to INSTALL, all orderItemAction must be INSTALL
- code: 110
message: Referred quote cannot be used for ordering due to its status
description: Quote cannot be used in the order if its status is in CANCELLED, UNABLE TO PROVIDE, REJECTED or EXPIRED state.
- code: 111
message: Billing Account information must not be both at order level and order item level
description: Billing Account must not be present both at order header level and order item level.
- code: 112
message: PricingMethod, pricing Reference & pricing term attributes must not be both at order level and order item level
description: Pricing data must not be present both at order header level and order item level.
- code: 113
message: Referred Serviceability request is expired
description: Serviceability information are expired.
- code: 114
message: A reccuring price is mentionned without a charge period.
description:
- code: 115
message: Referred Quote is not existing
description:
- code: 116
message: Referred ProductOfferingQualification is not existing
description:
- code: 117
message: Product /item relationship is missing
description:
- code: 118
message: Product Id refered in a relationship is not existing
description:
swagger:response productOrderCreateUnprocessableEntity
*/
type ProductOrderCreateUnprocessableEntity struct {
/*
In: Body
*/
Payload *models.ErrorRepresentation `json:"body,omitempty"`
}
// NewProductOrderCreateUnprocessableEntity creates ProductOrderCreateUnprocessableEntity with default headers values
func NewProductOrderCreateUnprocessableEntity() *ProductOrderCreateUnprocessableEntity {
return &ProductOrderCreateUnprocessableEntity{}
}
// WithPayload adds the payload to the product order create unprocessable entity response
func (o *ProductOrderCreateUnprocessableEntity) WithPayload(payload *models.ErrorRepresentation) *ProductOrderCreateUnprocessableEntity {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create unprocessable entity response
func (o *ProductOrderCreateUnprocessableEntity) SetPayload(payload *models.ErrorRepresentation) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(422)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ProductOrderCreateInternalServerErrorCode is the HTTP code returned for type ProductOrderCreateInternalServerError
const ProductOrderCreateInternalServerErrorCode int = 500
/*ProductOrderCreateInternalServerError Internal Server Error
List of supported error codes:
- 1: Internal error
swagger:response productOrderCreateInternalServerError
*/
type ProductOrderCreateInternalServerError struct {
/*
In: Body
*/
Payload *models.ErrorRepresentation `json:"body,omitempty"`
}
// NewProductOrderCreateInternalServerError creates ProductOrderCreateInternalServerError with default headers values
func NewProductOrderCreateInternalServerError() *ProductOrderCreateInternalServerError {
return &ProductOrderCreateInternalServerError{}
}
// WithPayload adds the payload to the product order create internal server error response
func (o *ProductOrderCreateInternalServerError) WithPayload(payload *models.ErrorRepresentation) *ProductOrderCreateInternalServerError {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create internal server error response
func (o *ProductOrderCreateInternalServerError) SetPayload(payload *models.ErrorRepresentation) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(500)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}
// ProductOrderCreateServiceUnavailableCode is the HTTP code returned for type ProductOrderCreateServiceUnavailable
const ProductOrderCreateServiceUnavailableCode int = 503
/*ProductOrderCreateServiceUnavailable Service Unavailable
swagger:response productOrderCreateServiceUnavailable
*/
type ProductOrderCreateServiceUnavailable struct {
/*
In: Body
*/
Payload *models.ErrorRepresentation `json:"body,omitempty"`
}
// NewProductOrderCreateServiceUnavailable creates ProductOrderCreateServiceUnavailable with default headers values
func NewProductOrderCreateServiceUnavailable() *ProductOrderCreateServiceUnavailable {
return &ProductOrderCreateServiceUnavailable{}
}
// WithPayload adds the payload to the product order create service unavailable response
func (o *ProductOrderCreateServiceUnavailable) WithPayload(payload *models.ErrorRepresentation) *ProductOrderCreateServiceUnavailable {
o.Payload = payload
return o
}
// SetPayload sets the payload to the product order create service unavailable response
func (o *ProductOrderCreateServiceUnavailable) SetPayload(payload *models.ErrorRepresentation) {
o.Payload = payload
}
// WriteResponse to the client
func (o *ProductOrderCreateServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(503)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}