// Code generated by go-swagger; DO NOT EDIT. // All Code Copyright(c) 2018-2021 by Taxnexus, Inc. // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed package transactions // 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" ) // NewGetTransactionsParams creates a new GetTransactionsParams object // with the default values initialized. func NewGetTransactionsParams() *GetTransactionsParams { var () return &GetTransactionsParams{ timeout: cr.DefaultTimeout, } } // NewGetTransactionsParamsWithTimeout creates a new GetTransactionsParams object // with the default values initialized, and the ability to set a timeout on a request func NewGetTransactionsParamsWithTimeout(timeout time.Duration) *GetTransactionsParams { var () return &GetTransactionsParams{ timeout: timeout, } } // NewGetTransactionsParamsWithContext creates a new GetTransactionsParams object // with the default values initialized, and the ability to set a context for a request func NewGetTransactionsParamsWithContext(ctx context.Context) *GetTransactionsParams { var () return &GetTransactionsParams{ Context: ctx, } } // NewGetTransactionsParamsWithHTTPClient creates a new GetTransactionsParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request func NewGetTransactionsParamsWithHTTPClient(client *http.Client) *GetTransactionsParams { var () return &GetTransactionsParams{ HTTPClient: client, } } /*GetTransactionsParams contains all the parameters to send to the API endpoint for the get transactions operation typically these are written to a http.Request */ type GetTransactionsParams struct { /*EndDate The end date of transaction query */ EndDate string /*Limit The number of records to retrieve */ Limit *float64 /*Start The starting record in multi-record retrievals */ Start *float64 /*StartDate The start date of transaction query */ StartDate string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithTimeout adds the timeout to the get transactions params func (o *GetTransactionsParams) WithTimeout(timeout time.Duration) *GetTransactionsParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the get transactions params func (o *GetTransactionsParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the get transactions params func (o *GetTransactionsParams) WithContext(ctx context.Context) *GetTransactionsParams { o.SetContext(ctx) return o } // SetContext adds the context to the get transactions params func (o *GetTransactionsParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the get transactions params func (o *GetTransactionsParams) WithHTTPClient(client *http.Client) *GetTransactionsParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the get transactions params func (o *GetTransactionsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithEndDate adds the endDate to the get transactions params func (o *GetTransactionsParams) WithEndDate(endDate string) *GetTransactionsParams { o.SetEndDate(endDate) return o } // SetEndDate adds the endDate to the get transactions params func (o *GetTransactionsParams) SetEndDate(endDate string) { o.EndDate = endDate } // WithLimit adds the limit to the get transactions params func (o *GetTransactionsParams) WithLimit(limit *float64) *GetTransactionsParams { o.SetLimit(limit) return o } // SetLimit adds the limit to the get transactions params func (o *GetTransactionsParams) SetLimit(limit *float64) { o.Limit = limit } // WithStart adds the start to the get transactions params func (o *GetTransactionsParams) WithStart(start *float64) *GetTransactionsParams { o.SetStart(start) return o } // SetStart adds the start to the get transactions params func (o *GetTransactionsParams) SetStart(start *float64) { o.Start = start } // WithStartDate adds the startDate to the get transactions params func (o *GetTransactionsParams) WithStartDate(startDate string) *GetTransactionsParams { o.SetStartDate(startDate) return o } // SetStartDate adds the startDate to the get transactions params func (o *GetTransactionsParams) SetStartDate(startDate string) { o.StartDate = startDate } // WriteToRequest writes these params to a swagger request func (o *GetTransactionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // query param endDate qrEndDate := o.EndDate qEndDate := qrEndDate if qEndDate != "" { if err := r.SetQueryParam("endDate", qEndDate); err != nil { return err } } if o.Limit != nil { // query param limit var qrLimit float64 if o.Limit != nil { qrLimit = *o.Limit } qLimit := swag.FormatFloat64(qrLimit) if qLimit != "" { if err := r.SetQueryParam("limit", qLimit); err != nil { return err } } } if o.Start != nil { // query param start var qrStart float64 if o.Start != nil { qrStart = *o.Start } qStart := swag.FormatFloat64(qrStart) if qStart != "" { if err := r.SetQueryParam("start", qStart); err != nil { return err } } } // query param startDate qrStartDate := o.StartDate qStartDate := qrStartDate if qStartDate != "" { if err := r.SetQueryParam("startDate", qStartDate); err != nil { return err } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }