quotes

package
v0.0.0-...-fe2f4ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for quotes API

func (*Client) CreateaQuote

func (a *Client) CreateaQuote(params *CreateaQuoteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAQuoteCreated, error)

CreateaQuote At least one electricity or gas meter-point must be included. A maximum of one electricity and one gas meter-point can be included at this time. For all meter-points, at least one of gsp or postcode must be included. All meter-points must be based in the UK, excluding Northern Ireland. All meter-points must belong to the same gsp or postcode. WARNING: This endpoint is only available to partner organisations.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

func (*Client) ShareaQuoteViaEmail

func (a *Client) ShareaQuoteViaEmail(params *ShareaQuoteViaEmailParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ShareAQuoteViaEmailNoContent, error)

ShareaQuoteViaEmail Use this endpoint after quote creation to send a quote summary email to the specified recipients if they wish to enact the quote at a later time. A quote share record is saved to the database for each recipient’s email address. WARNING: This endpoint is only available to partner organisations.

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption may be used to customize the behavior of Client methods.

type ClientService

type ClientService interface {
	CreateaQuote(params *CreateaQuoteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateAQuoteCreated, error)

	ShareaQuoteViaEmail(params *ShareaQuoteViaEmailParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ShareAQuoteViaEmailNoContent, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new quotes API client.

func NewClientWithBasicAuth

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new quotes API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new quotes API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type CreateAQuoteBadRequest

type CreateAQuoteBadRequest struct {
	Payload *models.CreateQuoteError
}

CreateAQuoteBadRequest describes a response with status code 400, with default header values.

Validation errors. The error response payload will take the same field structure as the request payload.

func NewCreateAQuoteBadRequest

func NewCreateAQuoteBadRequest() *CreateAQuoteBadRequest

NewCreateAQuoteBadRequest creates a CreateAQuoteBadRequest with default headers values

func (*CreateAQuoteBadRequest) Code

func (o *CreateAQuoteBadRequest) Code() int

Code gets the status code for the create a quote bad request response

func (*CreateAQuoteBadRequest) Error

func (o *CreateAQuoteBadRequest) Error() string

func (*CreateAQuoteBadRequest) GetPayload

func (*CreateAQuoteBadRequest) IsClientError

func (o *CreateAQuoteBadRequest) IsClientError() bool

IsClientError returns true when this create a quote bad request response has a 4xx status code

func (*CreateAQuoteBadRequest) IsCode

func (o *CreateAQuoteBadRequest) IsCode(code int) bool

IsCode returns true when this create a quote bad request response a status code equal to that given

func (*CreateAQuoteBadRequest) IsRedirect

func (o *CreateAQuoteBadRequest) IsRedirect() bool

IsRedirect returns true when this create a quote bad request response has a 3xx status code

func (*CreateAQuoteBadRequest) IsServerError

func (o *CreateAQuoteBadRequest) IsServerError() bool

IsServerError returns true when this create a quote bad request response has a 5xx status code

func (*CreateAQuoteBadRequest) IsSuccess

func (o *CreateAQuoteBadRequest) IsSuccess() bool

IsSuccess returns true when this create a quote bad request response has a 2xx status code

func (*CreateAQuoteBadRequest) String

func (o *CreateAQuoteBadRequest) String() string

type CreateAQuoteCreated

type CreateAQuoteCreated struct {
	Payload *models.QuoteCreated
}

CreateAQuoteCreated describes a response with status code 201, with default header values.

The quote has been created

func NewCreateAQuoteCreated

func NewCreateAQuoteCreated() *CreateAQuoteCreated

NewCreateAQuoteCreated creates a CreateAQuoteCreated with default headers values

func (*CreateAQuoteCreated) Code

func (o *CreateAQuoteCreated) Code() int

Code gets the status code for the create a quote created response

func (*CreateAQuoteCreated) Error

func (o *CreateAQuoteCreated) Error() string

func (*CreateAQuoteCreated) GetPayload

func (o *CreateAQuoteCreated) GetPayload() *models.QuoteCreated

func (*CreateAQuoteCreated) IsClientError

func (o *CreateAQuoteCreated) IsClientError() bool

IsClientError returns true when this create a quote created response has a 4xx status code

func (*CreateAQuoteCreated) IsCode

func (o *CreateAQuoteCreated) IsCode(code int) bool

IsCode returns true when this create a quote created response a status code equal to that given

func (*CreateAQuoteCreated) IsRedirect

func (o *CreateAQuoteCreated) IsRedirect() bool

IsRedirect returns true when this create a quote created response has a 3xx status code

func (*CreateAQuoteCreated) IsServerError

func (o *CreateAQuoteCreated) IsServerError() bool

IsServerError returns true when this create a quote created response has a 5xx status code

func (*CreateAQuoteCreated) IsSuccess

func (o *CreateAQuoteCreated) IsSuccess() bool

IsSuccess returns true when this create a quote created response has a 2xx status code

func (*CreateAQuoteCreated) String

func (o *CreateAQuoteCreated) String() string

type CreateaQuoteParams

type CreateaQuoteParams struct {

	// Body.
	Body *models.Create

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

CreateaQuoteParams contains all the parameters to send to the API endpoint

for the create a quote operation.

Typically these are written to a http.Request.

func NewCreateaQuoteParams

func NewCreateaQuoteParams() *CreateaQuoteParams

NewCreateaQuoteParams creates a new CreateaQuoteParams 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 NewCreateaQuoteParamsWithContext

func NewCreateaQuoteParamsWithContext(ctx context.Context) *CreateaQuoteParams

NewCreateaQuoteParamsWithContext creates a new CreateaQuoteParams object with the ability to set a context for a request.

func NewCreateaQuoteParamsWithHTTPClient

func NewCreateaQuoteParamsWithHTTPClient(client *http.Client) *CreateaQuoteParams

NewCreateaQuoteParamsWithHTTPClient creates a new CreateaQuoteParams object with the ability to set a custom HTTPClient for a request.

func NewCreateaQuoteParamsWithTimeout

func NewCreateaQuoteParamsWithTimeout(timeout time.Duration) *CreateaQuoteParams

NewCreateaQuoteParamsWithTimeout creates a new CreateaQuoteParams object with the ability to set a timeout on a request.

func (*CreateaQuoteParams) SetBody

func (o *CreateaQuoteParams) SetBody(body *models.Create)

SetBody adds the body to the create a quote params

func (*CreateaQuoteParams) SetContext

func (o *CreateaQuoteParams) SetContext(ctx context.Context)

SetContext adds the context to the create a quote params

func (*CreateaQuoteParams) SetDefaults

func (o *CreateaQuoteParams) SetDefaults()

SetDefaults hydrates default values in the create a quote params (not the query body).

All values with no default are reset to their zero value.

func (*CreateaQuoteParams) SetHTTPClient

func (o *CreateaQuoteParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the create a quote params

func (*CreateaQuoteParams) SetTimeout

func (o *CreateaQuoteParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the create a quote params

func (*CreateaQuoteParams) WithBody

func (o *CreateaQuoteParams) WithBody(body *models.Create) *CreateaQuoteParams

WithBody adds the body to the create a quote params

func (*CreateaQuoteParams) WithContext

WithContext adds the context to the create a quote params

func (*CreateaQuoteParams) WithDefaults

func (o *CreateaQuoteParams) WithDefaults() *CreateaQuoteParams

WithDefaults hydrates default values in the create a quote params (not the query body).

All values with no default are reset to their zero value.

func (*CreateaQuoteParams) WithHTTPClient

func (o *CreateaQuoteParams) WithHTTPClient(client *http.Client) *CreateaQuoteParams

WithHTTPClient adds the HTTPClient to the create a quote params

func (*CreateaQuoteParams) WithTimeout

func (o *CreateaQuoteParams) WithTimeout(timeout time.Duration) *CreateaQuoteParams

WithTimeout adds the timeout to the create a quote params

func (*CreateaQuoteParams) WriteToRequest

func (o *CreateaQuoteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type CreateaQuoteReader

type CreateaQuoteReader struct {
	// contains filtered or unexported fields
}

CreateaQuoteReader is a Reader for the CreateaQuote structure.

func (*CreateaQuoteReader) ReadResponse

func (o *CreateaQuoteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type ShareAQuoteViaEmailBadRequest

type ShareAQuoteViaEmailBadRequest struct {
	Payload *models.ValidationErrors
}

ShareAQuoteViaEmailBadRequest describes a response with status code 400, with default header values.

Validation errors per index of the email

func NewShareAQuoteViaEmailBadRequest

func NewShareAQuoteViaEmailBadRequest() *ShareAQuoteViaEmailBadRequest

NewShareAQuoteViaEmailBadRequest creates a ShareAQuoteViaEmailBadRequest with default headers values

func (*ShareAQuoteViaEmailBadRequest) Code

Code gets the status code for the share a quote via email bad request response

func (*ShareAQuoteViaEmailBadRequest) Error

func (*ShareAQuoteViaEmailBadRequest) GetPayload

func (*ShareAQuoteViaEmailBadRequest) IsClientError

func (o *ShareAQuoteViaEmailBadRequest) IsClientError() bool

IsClientError returns true when this share a quote via email bad request response has a 4xx status code

func (*ShareAQuoteViaEmailBadRequest) IsCode

func (o *ShareAQuoteViaEmailBadRequest) IsCode(code int) bool

IsCode returns true when this share a quote via email bad request response a status code equal to that given

func (*ShareAQuoteViaEmailBadRequest) IsRedirect

func (o *ShareAQuoteViaEmailBadRequest) IsRedirect() bool

IsRedirect returns true when this share a quote via email bad request response has a 3xx status code

func (*ShareAQuoteViaEmailBadRequest) IsServerError

func (o *ShareAQuoteViaEmailBadRequest) IsServerError() bool

IsServerError returns true when this share a quote via email bad request response has a 5xx status code

func (*ShareAQuoteViaEmailBadRequest) IsSuccess

func (o *ShareAQuoteViaEmailBadRequest) IsSuccess() bool

IsSuccess returns true when this share a quote via email bad request response has a 2xx status code

func (*ShareAQuoteViaEmailBadRequest) String

type ShareAQuoteViaEmailNoContent

type ShareAQuoteViaEmailNoContent struct {
}

ShareAQuoteViaEmailNoContent describes a response with status code 204, with default header values.

No validation error and quote or quoted product found

func NewShareAQuoteViaEmailNoContent

func NewShareAQuoteViaEmailNoContent() *ShareAQuoteViaEmailNoContent

NewShareAQuoteViaEmailNoContent creates a ShareAQuoteViaEmailNoContent with default headers values

func (*ShareAQuoteViaEmailNoContent) Code

Code gets the status code for the share a quote via email no content response

func (*ShareAQuoteViaEmailNoContent) Error

func (*ShareAQuoteViaEmailNoContent) IsClientError

func (o *ShareAQuoteViaEmailNoContent) IsClientError() bool

IsClientError returns true when this share a quote via email no content response has a 4xx status code

func (*ShareAQuoteViaEmailNoContent) IsCode

func (o *ShareAQuoteViaEmailNoContent) IsCode(code int) bool

IsCode returns true when this share a quote via email no content response a status code equal to that given

func (*ShareAQuoteViaEmailNoContent) IsRedirect

func (o *ShareAQuoteViaEmailNoContent) IsRedirect() bool

IsRedirect returns true when this share a quote via email no content response has a 3xx status code

func (*ShareAQuoteViaEmailNoContent) IsServerError

func (o *ShareAQuoteViaEmailNoContent) IsServerError() bool

IsServerError returns true when this share a quote via email no content response has a 5xx status code

func (*ShareAQuoteViaEmailNoContent) IsSuccess

func (o *ShareAQuoteViaEmailNoContent) IsSuccess() bool

IsSuccess returns true when this share a quote via email no content response has a 2xx status code

func (*ShareAQuoteViaEmailNoContent) String

type ShareAQuoteViaEmailNotFound

type ShareAQuoteViaEmailNotFound struct {
}

ShareAQuoteViaEmailNotFound describes a response with status code 404, with default header values.

No quote / quoted product found for given quote_code / product_id

func NewShareAQuoteViaEmailNotFound

func NewShareAQuoteViaEmailNotFound() *ShareAQuoteViaEmailNotFound

NewShareAQuoteViaEmailNotFound creates a ShareAQuoteViaEmailNotFound with default headers values

func (*ShareAQuoteViaEmailNotFound) Code

func (o *ShareAQuoteViaEmailNotFound) Code() int

Code gets the status code for the share a quote via email not found response

func (*ShareAQuoteViaEmailNotFound) Error

func (*ShareAQuoteViaEmailNotFound) IsClientError

func (o *ShareAQuoteViaEmailNotFound) IsClientError() bool

IsClientError returns true when this share a quote via email not found response has a 4xx status code

func (*ShareAQuoteViaEmailNotFound) IsCode

func (o *ShareAQuoteViaEmailNotFound) IsCode(code int) bool

IsCode returns true when this share a quote via email not found response a status code equal to that given

func (*ShareAQuoteViaEmailNotFound) IsRedirect

func (o *ShareAQuoteViaEmailNotFound) IsRedirect() bool

IsRedirect returns true when this share a quote via email not found response has a 3xx status code

func (*ShareAQuoteViaEmailNotFound) IsServerError

func (o *ShareAQuoteViaEmailNotFound) IsServerError() bool

IsServerError returns true when this share a quote via email not found response has a 5xx status code

func (*ShareAQuoteViaEmailNotFound) IsSuccess

func (o *ShareAQuoteViaEmailNotFound) IsSuccess() bool

IsSuccess returns true when this share a quote via email not found response has a 2xx status code

func (*ShareAQuoteViaEmailNotFound) String

func (o *ShareAQuoteViaEmailNotFound) String() string

type ShareaQuoteViaEmailParams

type ShareaQuoteViaEmailParams struct {

	// Body.
	Body *models.Emails

	// Code.
	Code string

	// ProductID.
	ProductID string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ShareaQuoteViaEmailParams contains all the parameters to send to the API endpoint

for the share a quote via email operation.

Typically these are written to a http.Request.

func NewShareaQuoteViaEmailParams

func NewShareaQuoteViaEmailParams() *ShareaQuoteViaEmailParams

NewShareaQuoteViaEmailParams creates a new ShareaQuoteViaEmailParams 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 NewShareaQuoteViaEmailParamsWithContext

func NewShareaQuoteViaEmailParamsWithContext(ctx context.Context) *ShareaQuoteViaEmailParams

NewShareaQuoteViaEmailParamsWithContext creates a new ShareaQuoteViaEmailParams object with the ability to set a context for a request.

func NewShareaQuoteViaEmailParamsWithHTTPClient

func NewShareaQuoteViaEmailParamsWithHTTPClient(client *http.Client) *ShareaQuoteViaEmailParams

NewShareaQuoteViaEmailParamsWithHTTPClient creates a new ShareaQuoteViaEmailParams object with the ability to set a custom HTTPClient for a request.

func NewShareaQuoteViaEmailParamsWithTimeout

func NewShareaQuoteViaEmailParamsWithTimeout(timeout time.Duration) *ShareaQuoteViaEmailParams

NewShareaQuoteViaEmailParamsWithTimeout creates a new ShareaQuoteViaEmailParams object with the ability to set a timeout on a request.

func (*ShareaQuoteViaEmailParams) SetBody

func (o *ShareaQuoteViaEmailParams) SetBody(body *models.Emails)

SetBody adds the body to the share a quote via email params

func (*ShareaQuoteViaEmailParams) SetCode

func (o *ShareaQuoteViaEmailParams) SetCode(code string)

SetCode adds the code to the share a quote via email params

func (*ShareaQuoteViaEmailParams) SetContext

func (o *ShareaQuoteViaEmailParams) SetContext(ctx context.Context)

SetContext adds the context to the share a quote via email params

func (*ShareaQuoteViaEmailParams) SetDefaults

func (o *ShareaQuoteViaEmailParams) SetDefaults()

SetDefaults hydrates default values in the share a quote via email params (not the query body).

All values with no default are reset to their zero value.

func (*ShareaQuoteViaEmailParams) SetHTTPClient

func (o *ShareaQuoteViaEmailParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the share a quote via email params

func (*ShareaQuoteViaEmailParams) SetProductID

func (o *ShareaQuoteViaEmailParams) SetProductID(productID string)

SetProductID adds the productId to the share a quote via email params

func (*ShareaQuoteViaEmailParams) SetTimeout

func (o *ShareaQuoteViaEmailParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the share a quote via email params

func (*ShareaQuoteViaEmailParams) WithBody

WithBody adds the body to the share a quote via email params

func (*ShareaQuoteViaEmailParams) WithCode

WithCode adds the code to the share a quote via email params

func (*ShareaQuoteViaEmailParams) WithContext

WithContext adds the context to the share a quote via email params

func (*ShareaQuoteViaEmailParams) WithDefaults

WithDefaults hydrates default values in the share a quote via email params (not the query body).

All values with no default are reset to their zero value.

func (*ShareaQuoteViaEmailParams) WithHTTPClient

func (o *ShareaQuoteViaEmailParams) WithHTTPClient(client *http.Client) *ShareaQuoteViaEmailParams

WithHTTPClient adds the HTTPClient to the share a quote via email params

func (*ShareaQuoteViaEmailParams) WithProductID

func (o *ShareaQuoteViaEmailParams) WithProductID(productID string) *ShareaQuoteViaEmailParams

WithProductID adds the productID to the share a quote via email params

func (*ShareaQuoteViaEmailParams) WithTimeout

WithTimeout adds the timeout to the share a quote via email params

func (*ShareaQuoteViaEmailParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type ShareaQuoteViaEmailReader

type ShareaQuoteViaEmailReader struct {
	// contains filtered or unexported fields
}

ShareaQuoteViaEmailReader is a Reader for the ShareaQuoteViaEmail structure.

func (*ShareaQuoteViaEmailReader) ReadResponse

func (o *ShareaQuoteViaEmailReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL