144 lines
4.0 KiB
Go
144 lines
4.0 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
|
|
// All rights reserved worldwide.
|
|
// Proprietary product; unlicensed use is not allowed
|
|
|
|
package invoice
|
|
|
|
// 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"
|
|
)
|
|
|
|
// NewGetRenderInvoiceParams creates a new GetRenderInvoiceParams object
|
|
// with the default values initialized.
|
|
func NewGetRenderInvoiceParams() *GetRenderInvoiceParams {
|
|
var ()
|
|
return &GetRenderInvoiceParams{
|
|
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewGetRenderInvoiceParamsWithTimeout creates a new GetRenderInvoiceParams object
|
|
// with the default values initialized, and the ability to set a timeout on a request
|
|
func NewGetRenderInvoiceParamsWithTimeout(timeout time.Duration) *GetRenderInvoiceParams {
|
|
var ()
|
|
return &GetRenderInvoiceParams{
|
|
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewGetRenderInvoiceParamsWithContext creates a new GetRenderInvoiceParams object
|
|
// with the default values initialized, and the ability to set a context for a request
|
|
func NewGetRenderInvoiceParamsWithContext(ctx context.Context) *GetRenderInvoiceParams {
|
|
var ()
|
|
return &GetRenderInvoiceParams{
|
|
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewGetRenderInvoiceParamsWithHTTPClient creates a new GetRenderInvoiceParams object
|
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
func NewGetRenderInvoiceParamsWithHTTPClient(client *http.Client) *GetRenderInvoiceParams {
|
|
var ()
|
|
return &GetRenderInvoiceParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*GetRenderInvoiceParams contains all the parameters to send to the API endpoint
|
|
for the get render invoice operation typically these are written to a http.Request
|
|
*/
|
|
type GetRenderInvoiceParams struct {
|
|
|
|
/*InvoiceID
|
|
Taxnexus Id of the Invoice to be retrieved
|
|
|
|
*/
|
|
InvoiceID string
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the get render invoice params
|
|
func (o *GetRenderInvoiceParams) WithTimeout(timeout time.Duration) *GetRenderInvoiceParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the get render invoice params
|
|
func (o *GetRenderInvoiceParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the get render invoice params
|
|
func (o *GetRenderInvoiceParams) WithContext(ctx context.Context) *GetRenderInvoiceParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the get render invoice params
|
|
func (o *GetRenderInvoiceParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the get render invoice params
|
|
func (o *GetRenderInvoiceParams) WithHTTPClient(client *http.Client) *GetRenderInvoiceParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the get render invoice params
|
|
func (o *GetRenderInvoiceParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithInvoiceID adds the invoiceID to the get render invoice params
|
|
func (o *GetRenderInvoiceParams) WithInvoiceID(invoiceID string) *GetRenderInvoiceParams {
|
|
o.SetInvoiceID(invoiceID)
|
|
return o
|
|
}
|
|
|
|
// SetInvoiceID adds the invoiceId to the get render invoice params
|
|
func (o *GetRenderInvoiceParams) SetInvoiceID(invoiceID string) {
|
|
o.InvoiceID = invoiceID
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *GetRenderInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
// query param invoiceId
|
|
qrInvoiceID := o.InvoiceID
|
|
qInvoiceID := qrInvoiceID
|
|
if qInvoiceID != "" {
|
|
if err := r.SetQueryParam("invoiceId", qInvoiceID); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|