mirror of https://github.com/vernonkeenan/lib
158 lines
4.8 KiB
Go
158 lines
4.8 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||
|
// All rights reserved worldwide.
|
||
|
// Proprietary product; unlicensed use is not allowed
|
||
|
|
||
|
package payment_methods
|
||
|
|
||
|
// 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"
|
||
|
|
||
|
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||
|
)
|
||
|
|
||
|
// NewPutPaymentMethodsParams creates a new PutPaymentMethodsParams 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 NewPutPaymentMethodsParams() *PutPaymentMethodsParams {
|
||
|
return &PutPaymentMethodsParams{
|
||
|
timeout: cr.DefaultTimeout,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutPaymentMethodsParamsWithTimeout creates a new PutPaymentMethodsParams object
|
||
|
// with the ability to set a timeout on a request.
|
||
|
func NewPutPaymentMethodsParamsWithTimeout(timeout time.Duration) *PutPaymentMethodsParams {
|
||
|
return &PutPaymentMethodsParams{
|
||
|
timeout: timeout,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutPaymentMethodsParamsWithContext creates a new PutPaymentMethodsParams object
|
||
|
// with the ability to set a context for a request.
|
||
|
func NewPutPaymentMethodsParamsWithContext(ctx context.Context) *PutPaymentMethodsParams {
|
||
|
return &PutPaymentMethodsParams{
|
||
|
Context: ctx,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewPutPaymentMethodsParamsWithHTTPClient creates a new PutPaymentMethodsParams object
|
||
|
// with the ability to set a custom HTTPClient for a request.
|
||
|
func NewPutPaymentMethodsParamsWithHTTPClient(client *http.Client) *PutPaymentMethodsParams {
|
||
|
return &PutPaymentMethodsParams{
|
||
|
HTTPClient: client,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
PutPaymentMethodsParams contains all the parameters to send to the API endpoint
|
||
|
|
||
|
for the put payment methods operation.
|
||
|
|
||
|
Typically these are written to a http.Request.
|
||
|
*/
|
||
|
type PutPaymentMethodsParams struct {
|
||
|
|
||
|
/* PaymentMethodRequest.
|
||
|
|
||
|
An array of new PaymentMethod records
|
||
|
*/
|
||
|
PaymentMethodRequest *members_models.PaymentMethodRequest
|
||
|
|
||
|
timeout time.Duration
|
||
|
Context context.Context
|
||
|
HTTPClient *http.Client
|
||
|
}
|
||
|
|
||
|
// WithDefaults hydrates default values in the put payment methods params (not the query body).
|
||
|
//
|
||
|
// All values with no default are reset to their zero value.
|
||
|
func (o *PutPaymentMethodsParams) WithDefaults() *PutPaymentMethodsParams {
|
||
|
o.SetDefaults()
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetDefaults hydrates default values in the put payment methods params (not the query body).
|
||
|
//
|
||
|
// All values with no default are reset to their zero value.
|
||
|
func (o *PutPaymentMethodsParams) SetDefaults() {
|
||
|
// no default values defined for this parameter
|
||
|
}
|
||
|
|
||
|
// WithTimeout adds the timeout to the put payment methods params
|
||
|
func (o *PutPaymentMethodsParams) WithTimeout(timeout time.Duration) *PutPaymentMethodsParams {
|
||
|
o.SetTimeout(timeout)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetTimeout adds the timeout to the put payment methods params
|
||
|
func (o *PutPaymentMethodsParams) SetTimeout(timeout time.Duration) {
|
||
|
o.timeout = timeout
|
||
|
}
|
||
|
|
||
|
// WithContext adds the context to the put payment methods params
|
||
|
func (o *PutPaymentMethodsParams) WithContext(ctx context.Context) *PutPaymentMethodsParams {
|
||
|
o.SetContext(ctx)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetContext adds the context to the put payment methods params
|
||
|
func (o *PutPaymentMethodsParams) SetContext(ctx context.Context) {
|
||
|
o.Context = ctx
|
||
|
}
|
||
|
|
||
|
// WithHTTPClient adds the HTTPClient to the put payment methods params
|
||
|
func (o *PutPaymentMethodsParams) WithHTTPClient(client *http.Client) *PutPaymentMethodsParams {
|
||
|
o.SetHTTPClient(client)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetHTTPClient adds the HTTPClient to the put payment methods params
|
||
|
func (o *PutPaymentMethodsParams) SetHTTPClient(client *http.Client) {
|
||
|
o.HTTPClient = client
|
||
|
}
|
||
|
|
||
|
// WithPaymentMethodRequest adds the paymentMethodRequest to the put payment methods params
|
||
|
func (o *PutPaymentMethodsParams) WithPaymentMethodRequest(paymentMethodRequest *members_models.PaymentMethodRequest) *PutPaymentMethodsParams {
|
||
|
o.SetPaymentMethodRequest(paymentMethodRequest)
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetPaymentMethodRequest adds the paymentMethodRequest to the put payment methods params
|
||
|
func (o *PutPaymentMethodsParams) SetPaymentMethodRequest(paymentMethodRequest *members_models.PaymentMethodRequest) {
|
||
|
o.PaymentMethodRequest = paymentMethodRequest
|
||
|
}
|
||
|
|
||
|
// WriteToRequest writes these params to a swagger request
|
||
|
func (o *PutPaymentMethodsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||
|
|
||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
var res []error
|
||
|
if o.PaymentMethodRequest != nil {
|
||
|
if err := r.SetBodyParam(o.PaymentMethodRequest); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if len(res) > 0 {
|
||
|
return errors.CompositeValidationError(res...)
|
||
|
}
|
||
|
return nil
|
||
|
}
|