/
list_certificates_for_customer_parameters.go
390 lines (305 loc) · 11.7 KB
/
list_certificates_for_customer_parameters.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
// Code generated by go-swagger; DO NOT EDIT.
package customers
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// NewListCertificatesForCustomerParams creates a new ListCertificatesForCustomerParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewListCertificatesForCustomerParams() *ListCertificatesForCustomerParams {
return &ListCertificatesForCustomerParams{
timeout: cr.DefaultTimeout,
}
}
// NewListCertificatesForCustomerParamsWithTimeout creates a new ListCertificatesForCustomerParams object
// with the ability to set a timeout on a request.
func NewListCertificatesForCustomerParamsWithTimeout(timeout time.Duration) *ListCertificatesForCustomerParams {
return &ListCertificatesForCustomerParams{
timeout: timeout,
}
}
// NewListCertificatesForCustomerParamsWithContext creates a new ListCertificatesForCustomerParams object
// with the ability to set a context for a request.
func NewListCertificatesForCustomerParamsWithContext(ctx context.Context) *ListCertificatesForCustomerParams {
return &ListCertificatesForCustomerParams{
Context: ctx,
}
}
// NewListCertificatesForCustomerParamsWithHTTPClient creates a new ListCertificatesForCustomerParams object
// with the ability to set a custom HTTPClient for a request.
func NewListCertificatesForCustomerParamsWithHTTPClient(client *http.Client) *ListCertificatesForCustomerParams {
return &ListCertificatesForCustomerParams{
HTTPClient: client,
}
}
/* ListCertificatesForCustomerParams contains all the parameters to send to the API endpoint
for the list certificates for customer operation.
Typically these are written to a http.Request.
*/
type ListCertificatesForCustomerParams struct {
/* DollarFilter.
A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages
*/
DollarFilter *string
/* DollarInclude.
OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following:
* customers - Retrieves the list of customers linked to the certificate.
* po_numbers - Retrieves all PO numbers tied to the certificate.
* attributes - Retrieves all attributes applied to the certificate.
*/
DollarInclude *string
/* DollarOrderBy.
A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
*/
DollarOrderBy *string
/* DollarSkip.
If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
Format: int32
*/
DollarSkip *int32
/* DollarTop.
If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
Format: int32
*/
DollarTop *int32
/* XAvalaraClient.
Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .
Default: "Swagger UI; 21.12.0; Custom; 1.0"
*/
XAvalaraClient *string
/* CompanyID.
The unique ID number of the company that recorded this customer
Format: int32
*/
CompanyID int32
/* CustomerCode.
The unique code representing this customer
*/
CustomerCode string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the list certificates for customer params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ListCertificatesForCustomerParams) WithDefaults() *ListCertificatesForCustomerParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the list certificates for customer params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *ListCertificatesForCustomerParams) SetDefaults() {
var (
xAvalaraClientDefault = string("Swagger UI; 21.12.0; Custom; 1.0")
)
val := ListCertificatesForCustomerParams{
XAvalaraClient: &xAvalaraClientDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithTimeout(timeout time.Duration) *ListCertificatesForCustomerParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithContext(ctx context.Context) *ListCertificatesForCustomerParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithHTTPClient(client *http.Client) *ListCertificatesForCustomerParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithDollarFilter adds the dollarFilter to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithDollarFilter(dollarFilter *string) *ListCertificatesForCustomerParams {
o.SetDollarFilter(dollarFilter)
return o
}
// SetDollarFilter adds the dollarFilter to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetDollarFilter(dollarFilter *string) {
o.DollarFilter = dollarFilter
}
// WithDollarInclude adds the dollarInclude to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithDollarInclude(dollarInclude *string) *ListCertificatesForCustomerParams {
o.SetDollarInclude(dollarInclude)
return o
}
// SetDollarInclude adds the dollarInclude to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetDollarInclude(dollarInclude *string) {
o.DollarInclude = dollarInclude
}
// WithDollarOrderBy adds the dollarOrderBy to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithDollarOrderBy(dollarOrderBy *string) *ListCertificatesForCustomerParams {
o.SetDollarOrderBy(dollarOrderBy)
return o
}
// SetDollarOrderBy adds the dollarOrderBy to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetDollarOrderBy(dollarOrderBy *string) {
o.DollarOrderBy = dollarOrderBy
}
// WithDollarSkip adds the dollarSkip to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithDollarSkip(dollarSkip *int32) *ListCertificatesForCustomerParams {
o.SetDollarSkip(dollarSkip)
return o
}
// SetDollarSkip adds the dollarSkip to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetDollarSkip(dollarSkip *int32) {
o.DollarSkip = dollarSkip
}
// WithDollarTop adds the dollarTop to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithDollarTop(dollarTop *int32) *ListCertificatesForCustomerParams {
o.SetDollarTop(dollarTop)
return o
}
// SetDollarTop adds the dollarTop to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetDollarTop(dollarTop *int32) {
o.DollarTop = dollarTop
}
// WithXAvalaraClient adds the xAvalaraClient to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithXAvalaraClient(xAvalaraClient *string) *ListCertificatesForCustomerParams {
o.SetXAvalaraClient(xAvalaraClient)
return o
}
// SetXAvalaraClient adds the xAvalaraClient to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetXAvalaraClient(xAvalaraClient *string) {
o.XAvalaraClient = xAvalaraClient
}
// WithCompanyID adds the companyID to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithCompanyID(companyID int32) *ListCertificatesForCustomerParams {
o.SetCompanyID(companyID)
return o
}
// SetCompanyID adds the companyId to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetCompanyID(companyID int32) {
o.CompanyID = companyID
}
// WithCustomerCode adds the customerCode to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) WithCustomerCode(customerCode string) *ListCertificatesForCustomerParams {
o.SetCustomerCode(customerCode)
return o
}
// SetCustomerCode adds the customerCode to the list certificates for customer params
func (o *ListCertificatesForCustomerParams) SetCustomerCode(customerCode string) {
o.CustomerCode = customerCode
}
// WriteToRequest writes these params to a swagger request
func (o *ListCertificatesForCustomerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.DollarFilter != nil {
// query param $filter
var qrDollarFilter string
if o.DollarFilter != nil {
qrDollarFilter = *o.DollarFilter
}
qDollarFilter := qrDollarFilter
if qDollarFilter != "" {
if err := r.SetQueryParam("$filter", qDollarFilter); err != nil {
return err
}
}
}
if o.DollarInclude != nil {
// query param $include
var qrDollarInclude string
if o.DollarInclude != nil {
qrDollarInclude = *o.DollarInclude
}
qDollarInclude := qrDollarInclude
if qDollarInclude != "" {
if err := r.SetQueryParam("$include", qDollarInclude); err != nil {
return err
}
}
}
if o.DollarOrderBy != nil {
// query param $orderBy
var qrDollarOrderBy string
if o.DollarOrderBy != nil {
qrDollarOrderBy = *o.DollarOrderBy
}
qDollarOrderBy := qrDollarOrderBy
if qDollarOrderBy != "" {
if err := r.SetQueryParam("$orderBy", qDollarOrderBy); err != nil {
return err
}
}
}
if o.DollarSkip != nil {
// query param $skip
var qrDollarSkip int32
if o.DollarSkip != nil {
qrDollarSkip = *o.DollarSkip
}
qDollarSkip := swag.FormatInt32(qrDollarSkip)
if qDollarSkip != "" {
if err := r.SetQueryParam("$skip", qDollarSkip); err != nil {
return err
}
}
}
if o.DollarTop != nil {
// query param $top
var qrDollarTop int32
if o.DollarTop != nil {
qrDollarTop = *o.DollarTop
}
qDollarTop := swag.FormatInt32(qrDollarTop)
if qDollarTop != "" {
if err := r.SetQueryParam("$top", qDollarTop); err != nil {
return err
}
}
}
if o.XAvalaraClient != nil {
// header param X-Avalara-Client
if err := r.SetHeaderParam("X-Avalara-Client", *o.XAvalaraClient); err != nil {
return err
}
}
// path param companyId
if err := r.SetPathParam("companyId", swag.FormatInt32(o.CompanyID)); err != nil {
return err
}
// path param customerCode
if err := r.SetPathParam("customerCode", o.CustomerCode); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}