Compare commits

..

No commits in common. "v0.3.2" and "v0.1.6" have entirely different histories.

1787 changed files with 31930 additions and 76648 deletions

View File

@ -1,9 +0,0 @@
Copyright (c) 2018-2021, Taxnexus, Inc. All rights reserved.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -6,7 +6,7 @@ swagger:
#
rm -rf ./api
mkdir -p api/auth
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-auth-client.log \
--copyright-file=./build/COPYRIGHT \
--name=auth \
@ -14,12 +14,12 @@ swagger:
--target=./api/auth \
--client-package=auth-client \
--model-package=auth-models \
--principal=app.User &
--principal=app.User
#
# generate auth0
#
mkdir -p api/auth0
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-auth0-client.log \
--copyright-file=./build/COPYRIGHT \
--name=auth0 \
@ -27,12 +27,12 @@ swagger:
--target=./api/auth0 \
--client-package=auth0-client \
--model-package=auth0-models \
--principal=app.User &
--principal=app.User
#
# generate blaze
#
mkdir api/blaze
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-blaze-client.log \
--copyright-file=./build/COPYRIGHT \
--name=blaze \
@ -40,12 +40,12 @@ swagger:
--target=./api/blaze \
--client-package=blaze-client \
--model-package=blaze-models \
--principal=app.User &
--principal=app.User
#
# generate crm
#
mkdir api/crm
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-crm-client.log \
--copyright-file=./build/COPYRIGHT \
--name=crm \
@ -53,12 +53,12 @@ swagger:
--target=./api/crm \
--client-package=crm-client \
--model-package=crm-models \
--principal=app.User &
--principal=app.User
#
# generate devops
#
mkdir api/devops
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-devops-client.log \
--copyright-file=./build/COPYRIGHT \
--name=devops \
@ -66,12 +66,12 @@ swagger:
--target=./api/devops \
--client-package=devops-client \
--model-package=devops-models \
--principal=app.User &
--principal=app.User
#
# generate geo
#
mkdir api/geo
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-geo-client.log \
--copyright-file=./build/COPYRIGHT \
--name=geo \
@ -79,12 +79,12 @@ swagger:
--target=./api/geo \
--client-package=geo-client \
--model-package=geo-models \
--principal=app.User &
--principal=app.User
#
# generate gov-gw
#
mkdir api/gov-gw
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-gov-gw-client.log \
--copyright-file=./build/COPYRIGHT \
--name=gov-gw \
@ -92,12 +92,12 @@ swagger:
--target=./api/gov-gw \
--client-package=gov-gw-client \
--model-package=gov-gw-models \
--principal=app.User &
--principal=app.User
#
# generate ledger
#
mkdir api/ledger
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-ledger-client.log \
--copyright-file=./build/COPYRIGHT \
--name=ledger \
@ -105,12 +105,12 @@ swagger:
--target=./api/ledger \
--client-package=ledger-client \
--model-package=ledger-models \
--principal=app.User &
--principal=app.User
#
# generate metrc-gw
#
mkdir api/metrc-gw
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-metrc-gw-client.log \
--copyright-file=./build/COPYRIGHT \
--name=metrc-gw \
@ -118,12 +118,12 @@ swagger:
--target=./api/metrc-gw \
--client-package=metrc-gw-client \
--model-package=metrc-gw-models \
--principal=app.User &
--principal=app.User
#
# generate ops
#
mkdir api/ops
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-ops-client.log \
--copyright-file=./build/COPYRIGHT \
--name=ops \
@ -131,12 +131,12 @@ swagger:
--target=./api/ops \
--client-package=ops-client \
--model-package=ops-models \
--principal=app.User &
--principal=app.User
#
# generate pdf
#
mkdir api/pdf
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-pdf-client.log \
--copyright-file=./build/COPYRIGHT \
--name=pdf \
@ -144,12 +144,12 @@ swagger:
--target=./api/pdf \
--client-package=pdf-client \
--model-package=pdf-models \
--principal=app.User &
--principal=app.User
#
# generate plex
#
mkdir api/plex
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-plex-client.log \
--copyright-file=./build/COPYRIGHT \
--name=plex \
@ -157,12 +157,12 @@ swagger:
--target=./api/plex \
--client-package=plex-client \
--model-package=plex-models \
--principal=app.User &
--principal=app.User
#
# generate regs
#
mkdir api/regs
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-regs-client.log \
--copyright-file=./build/COPYRIGHT \
--name=regs \
@ -170,12 +170,12 @@ swagger:
--target=./api/regs \
--client-package=regs-client \
--model-package=regs-models \
--principal=app.User &
--principal=app.User
#
# generate render
#
mkdir api/render
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-render-client.log \
--copyright-file=./build/COPYRIGHT \
--name=render \
@ -183,12 +183,12 @@ swagger:
--target=./api/render \
--client-package=render-client \
--model-package=render-models \
--principal=app.User &
--principal=app.User
#
# generate sf-gate
#
mkdir api/sf-gate
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-sf-gate-client.log \
--copyright-file=./build/COPYRIGHT \
--name=sf-gate \
@ -196,12 +196,12 @@ swagger:
--target=./api/sf-gate \
--client-package=sf-gate-client \
--model-package=sf-gate-models \
--principal=app.User &
--principal=app.User
#
# generate stash
#
mkdir api/stash
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-stash-client.log \
--copyright-file=./build/COPYRIGHT \
--name=stash \
@ -209,12 +209,12 @@ swagger:
--target=./api/stash \
--client-package=stash-client \
--model-package=stash-models \
--principal=app.User &
--principal=app.User
#
# generate vendor-gw
#
mkdir api/vendor-gw
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-vendor-gw-client.log \
--copyright-file=./build/COPYRIGHT \
--name=vendor-gw \
@ -222,12 +222,12 @@ swagger:
--target=./api/vendor-gw \
--client-package=vendor-gw-client \
--model-package=vendor-gw-models \
--principal=app.User &
--principal=app.User
#
# generate workflow
#
mkdir api/workflow
swagger-new generate client \
swagger generate client \
--log-output=./swagger/logs/generate-workflow-client.log \
--copyright-file=./build/COPYRIGHT \
--name=workflow \
@ -235,4 +235,4 @@ swagger:
--target=./api/workflow \
--client-package=workflow-client \
--model-package=workflow-models \
--principal=app.User &
--principal=app.User

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,52 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetUsersParams creates a new GetUsersParams 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.
// NewGetUsersParams creates a new GetUsersParams object
// with the default values initialized.
func NewGetUsersParams() *GetUsersParams {
var ()
return &GetUsersParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetUsersParamsWithTimeout creates a new GetUsersParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetUsersParamsWithTimeout(timeout time.Duration) *GetUsersParams {
var ()
return &GetUsersParams{
timeout: timeout,
}
}
// NewGetUsersParamsWithContext creates a new GetUsersParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetUsersParamsWithContext(ctx context.Context) *GetUsersParams {
var ()
return &GetUsersParams{
Context: ctx,
}
}
// NewGetUsersParamsWithHTTPClient creates a new GetUsersParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetUsersParamsWithHTTPClient(client *http.Client) *GetUsersParams {
var ()
return &GetUsersParams{
HTTPClient: client,
}
}
/* GetUsersParams contains all the parameters to send to the API endpoint
for the get users operation.
Typically these are written to a http.Request.
/*GetUsersParams contains all the parameters to send to the API endpoint
for the get users operation typically these are written to a http.Request
*/
type GetUsersParams struct {
/* Apikey.
/*Apikey
Service account or developer API key
*/
Apikey *string
@ -74,21 +75,6 @@ type GetUsersParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get users params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUsersParams) WithDefaults() *GetUsersParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get users params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUsersParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get users params
func (o *GetUsersParams) WithTimeout(timeout time.Duration) *GetUsersParams {
o.SetTimeout(timeout)
@ -145,17 +131,16 @@ func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regi
// query param apikey
var qrApikey string
if o.Apikey != nil {
qrApikey = *o.Apikey
}
qApikey := qrApikey
if qApikey != "" {
if err := r.SetQueryParam("apikey", qApikey); err != nil {
return err
}
}
}
if len(res) > 0 {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *GetUsersReader) ReadResponse(response runtime.ClientResponse, consumer
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,7 +74,7 @@ func NewGetUsersOK() *GetUsersOK {
return &GetUsersOK{}
}
/* GetUsersOK describes a response with status code 200, with default header values.
/*GetUsersOK handles this case with default header values.
Taxnexus Response with User objects
*/
@ -84,6 +85,7 @@ type GetUsersOK struct {
func (o *GetUsersOK) Error() string {
return fmt.Sprintf("[GET /users][%d] getUsersOK %+v", 200, o.Payload)
}
func (o *GetUsersOK) GetPayload() *auth_models.UserResponse {
return o.Payload
}
@ -105,7 +107,7 @@ func NewGetUsersUnauthorized() *GetUsersUnauthorized {
return &GetUsersUnauthorized{}
}
/* GetUsersUnauthorized describes a response with status code 401, with default header values.
/*GetUsersUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
@ -116,6 +118,7 @@ type GetUsersUnauthorized struct {
func (o *GetUsersUnauthorized) Error() string {
return fmt.Sprintf("[GET /users][%d] getUsersUnauthorized %+v", 401, o.Payload)
}
func (o *GetUsersUnauthorized) GetPayload() *auth_models.Error {
return o.Payload
}
@ -137,7 +140,7 @@ func NewGetUsersForbidden() *GetUsersForbidden {
return &GetUsersForbidden{}
}
/* GetUsersForbidden describes a response with status code 403, with default header values.
/*GetUsersForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -148,6 +151,7 @@ type GetUsersForbidden struct {
func (o *GetUsersForbidden) Error() string {
return fmt.Sprintf("[GET /users][%d] getUsersForbidden %+v", 403, o.Payload)
}
func (o *GetUsersForbidden) GetPayload() *auth_models.Error {
return o.Payload
}
@ -169,7 +173,7 @@ func NewGetUsersNotFound() *GetUsersNotFound {
return &GetUsersNotFound{}
}
/* GetUsersNotFound describes a response with status code 404, with default header values.
/*GetUsersNotFound handles this case with default header values.
Resource was not found
*/
@ -180,6 +184,7 @@ type GetUsersNotFound struct {
func (o *GetUsersNotFound) Error() string {
return fmt.Sprintf("[GET /users][%d] getUsersNotFound %+v", 404, o.Payload)
}
func (o *GetUsersNotFound) GetPayload() *auth_models.Error {
return o.Payload
}
@ -201,7 +206,7 @@ func NewGetUsersUnprocessableEntity() *GetUsersUnprocessableEntity {
return &GetUsersUnprocessableEntity{}
}
/* GetUsersUnprocessableEntity describes a response with status code 422, with default header values.
/*GetUsersUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -212,6 +217,7 @@ type GetUsersUnprocessableEntity struct {
func (o *GetUsersUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /users][%d] getUsersUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetUsersUnprocessableEntity) GetPayload() *auth_models.Error {
return o.Payload
}
@ -233,7 +239,7 @@ func NewGetUsersInternalServerError() *GetUsersInternalServerError {
return &GetUsersInternalServerError{}
}
/* GetUsersInternalServerError describes a response with status code 500, with default header values.
/*GetUsersInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -244,6 +250,7 @@ type GetUsersInternalServerError struct {
func (o *GetUsersInternalServerError) Error() string {
return fmt.Sprintf("[GET /users][%d] getUsersInternalServerError %+v", 500, o.Payload)
}
func (o *GetUsersInternalServerError) GetPayload() *auth_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,12 +29,9 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUsersOK, error)
GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter) (*GetUsersOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -44,12 +41,13 @@ type ClientService interface {
Checks for a valid API key, and returns full user record
*/
func (a *Client) GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUsersOK, error) {
func (a *Client) GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter) (*GetUsersOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetUsersParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getUsers",
Method: "GET",
PathPattern: "/users",
@ -61,12 +59,7 @@ func (a *Client) GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInf
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -48,11 +46,6 @@ func (m *Address) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this address based on context it is used
func (m *Address) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Address) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -36,11 +34,6 @@ func (m *Error) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this error based on context it is used
func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Error) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -60,11 +58,6 @@ func (m *ResponseMeta) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this response meta based on context it is used
func (m *ResponseMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ResponseMeta) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -75,11 +73,6 @@ func (m *TenantUser) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this tenant user based on context it is used
func (m *TenantUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *TenantUser) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,7 +10,6 @@ package auth_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@ -221,6 +220,7 @@ func (m *User) Validate(formats strfmt.Registry) error {
}
func (m *User) validateAddress(formats strfmt.Registry) error {
if swag.IsZero(m.Address) { // not required
return nil
}
@ -238,6 +238,7 @@ func (m *User) validateAddress(formats strfmt.Registry) error {
}
func (m *User) validateTenantUsers(formats strfmt.Registry) error {
if swag.IsZero(m.TenantUsers) { // not required
return nil
}
@ -262,6 +263,7 @@ func (m *User) validateTenantUsers(formats strfmt.Registry) error {
}
func (m *User) validateUserRoles(formats strfmt.Registry) error {
if swag.IsZero(m.UserRoles) { // not required
return nil
}
@ -285,78 +287,6 @@ func (m *User) validateUserRoles(formats strfmt.Registry) error {
return nil
}
// ContextValidate validate this user based on the context it is used
func (m *User) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAddress(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateTenantUsers(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateUserRoles(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *User) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error {
if m.Address != nil {
if err := m.Address.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("Address")
}
return err
}
}
return nil
}
func (m *User) contextValidateTenantUsers(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.TenantUsers); i++ {
if m.TenantUsers[i] != nil {
if err := m.TenantUsers[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("TenantUsers" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *User) contextValidateUserRoles(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.UserRoles); i++ {
if m.UserRoles[i] != nil {
if err := m.UserRoles[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("UserRoles" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *User) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,7 +10,6 @@ package auth_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@ -49,6 +48,7 @@ func (m *UserResponse) Validate(formats strfmt.Registry) error {
}
func (m *UserResponse) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
@ -73,6 +73,7 @@ func (m *UserResponse) validateData(formats strfmt.Registry) error {
}
func (m *UserResponse) validateMeta(formats strfmt.Registry) error {
if swag.IsZero(m.Meta) { // not required
return nil
}
@ -89,56 +90,6 @@ func (m *UserResponse) validateMeta(formats strfmt.Registry) error {
return nil
}
// ContextValidate validate this user response based on the context it is used
func (m *UserResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMeta(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *UserResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *UserResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
if m.Meta != nil {
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("Meta")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *UserResponse) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -66,11 +64,6 @@ func (m *UserRole) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this user role based on context it is used
func (m *UserRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *UserRole) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,12 +29,9 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
PostCredentials(params *PostCredentialsParams, opts ...ClientOption) (*PostCredentialsOK, error)
PostCredentials(params *PostCredentialsParams) (*PostCredentialsOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -44,12 +41,13 @@ type ClientService interface {
Get credential token
*/
func (a *Client) PostCredentials(params *PostCredentialsParams, opts ...ClientOption) (*PostCredentialsOK, error) {
func (a *Client) PostCredentials(params *PostCredentialsParams) (*PostCredentialsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostCredentialsParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "postCredentials",
Method: "POST",
PathPattern: "/oauth/token",
@ -60,12 +58,7 @@ func (a *Client) PostCredentials(params *PostCredentialsParams, opts ...ClientOp
Reader: &PostCredentialsReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -22,52 +22,53 @@ import (
"code.tnxs.net/taxnexus/lib/api/auth0/auth0_models"
)
// NewPostCredentialsParams creates a new PostCredentialsParams 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.
// NewPostCredentialsParams creates a new PostCredentialsParams object
// with the default values initialized.
func NewPostCredentialsParams() *PostCredentialsParams {
var ()
return &PostCredentialsParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostCredentialsParamsWithTimeout creates a new PostCredentialsParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewPostCredentialsParamsWithTimeout(timeout time.Duration) *PostCredentialsParams {
var ()
return &PostCredentialsParams{
timeout: timeout,
}
}
// NewPostCredentialsParamsWithContext creates a new PostCredentialsParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewPostCredentialsParamsWithContext(ctx context.Context) *PostCredentialsParams {
var ()
return &PostCredentialsParams{
Context: ctx,
}
}
// NewPostCredentialsParamsWithHTTPClient creates a new PostCredentialsParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPostCredentialsParamsWithHTTPClient(client *http.Client) *PostCredentialsParams {
var ()
return &PostCredentialsParams{
HTTPClient: client,
}
}
/* PostCredentialsParams contains all the parameters to send to the API endpoint
for the post credentials operation.
Typically these are written to a http.Request.
/*PostCredentialsParams contains all the parameters to send to the API endpoint
for the post credentials operation typically these are written to a http.Request
*/
type PostCredentialsParams struct {
/* CredentialsRequest.
/*CredentialsRequest
Get Authentation Token
*/
CredentialsRequest *auth0_models.CredentialsRequest
@ -76,21 +77,6 @@ type PostCredentialsParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post credentials params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostCredentialsParams) WithDefaults() *PostCredentialsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post credentials params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostCredentialsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post credentials params
func (o *PostCredentialsParams) WithTimeout(timeout time.Duration) *PostCredentialsParams {
o.SetTimeout(timeout)
@ -142,6 +128,7 @@ func (o *PostCredentialsParams) WriteToRequest(r runtime.ClientRequest, reg strf
return err
}
var res []error
if o.CredentialsRequest != nil {
if err := r.SetBodyParam(o.CredentialsRequest); err != nil {
return err

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *PostCredentialsReader) ReadResponse(response runtime.ClientResponse, co
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,7 +74,7 @@ func NewPostCredentialsOK() *PostCredentialsOK {
return &PostCredentialsOK{}
}
/* PostCredentialsOK describes a response with status code 200, with default header values.
/*PostCredentialsOK handles this case with default header values.
Credentials response from Auth0
*/
@ -84,6 +85,7 @@ type PostCredentialsOK struct {
func (o *PostCredentialsOK) Error() string {
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsOK %+v", 200, o.Payload)
}
func (o *PostCredentialsOK) GetPayload() *auth0_models.CredentialsResponse {
return o.Payload
}
@ -105,7 +107,7 @@ func NewPostCredentialsUnauthorized() *PostCredentialsUnauthorized {
return &PostCredentialsUnauthorized{}
}
/* PostCredentialsUnauthorized describes a response with status code 401, with default header values.
/*PostCredentialsUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
@ -116,6 +118,7 @@ type PostCredentialsUnauthorized struct {
func (o *PostCredentialsUnauthorized) Error() string {
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsUnauthorized %+v", 401, o.Payload)
}
func (o *PostCredentialsUnauthorized) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -137,7 +140,7 @@ func NewPostCredentialsForbidden() *PostCredentialsForbidden {
return &PostCredentialsForbidden{}
}
/* PostCredentialsForbidden describes a response with status code 403, with default header values.
/*PostCredentialsForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -148,6 +151,7 @@ type PostCredentialsForbidden struct {
func (o *PostCredentialsForbidden) Error() string {
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsForbidden %+v", 403, o.Payload)
}
func (o *PostCredentialsForbidden) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -169,7 +173,7 @@ func NewPostCredentialsNotFound() *PostCredentialsNotFound {
return &PostCredentialsNotFound{}
}
/* PostCredentialsNotFound describes a response with status code 404, with default header values.
/*PostCredentialsNotFound handles this case with default header values.
Resource was not found
*/
@ -180,6 +184,7 @@ type PostCredentialsNotFound struct {
func (o *PostCredentialsNotFound) Error() string {
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsNotFound %+v", 404, o.Payload)
}
func (o *PostCredentialsNotFound) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -201,7 +206,7 @@ func NewPostCredentialsUnprocessableEntity() *PostCredentialsUnprocessableEntity
return &PostCredentialsUnprocessableEntity{}
}
/* PostCredentialsUnprocessableEntity describes a response with status code 422, with default header values.
/*PostCredentialsUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -212,6 +217,7 @@ type PostCredentialsUnprocessableEntity struct {
func (o *PostCredentialsUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostCredentialsUnprocessableEntity) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -233,7 +239,7 @@ func NewPostCredentialsInternalServerError() *PostCredentialsInternalServerError
return &PostCredentialsInternalServerError{}
}
/* PostCredentialsInternalServerError describes a response with status code 500, with default header values.
/*PostCredentialsInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -244,6 +250,7 @@ type PostCredentialsInternalServerError struct {
func (o *PostCredentialsInternalServerError) Error() string {
return fmt.Sprintf("[POST /oauth/token][%d] postCredentialsInternalServerError %+v", 500, o.Payload)
}
func (o *PostCredentialsInternalServerError) GetPayload() *auth0_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,50 +20,51 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetRolesParams creates a new GetRolesParams 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.
// NewGetRolesParams creates a new GetRolesParams object
// with the default values initialized.
func NewGetRolesParams() *GetRolesParams {
var ()
return &GetRolesParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetRolesParamsWithTimeout creates a new GetRolesParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetRolesParamsWithTimeout(timeout time.Duration) *GetRolesParams {
var ()
return &GetRolesParams{
timeout: timeout,
}
}
// NewGetRolesParamsWithContext creates a new GetRolesParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetRolesParamsWithContext(ctx context.Context) *GetRolesParams {
var ()
return &GetRolesParams{
Context: ctx,
}
}
// NewGetRolesParamsWithHTTPClient creates a new GetRolesParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetRolesParamsWithHTTPClient(client *http.Client) *GetRolesParams {
var ()
return &GetRolesParams{
HTTPClient: client,
}
}
/* GetRolesParams contains all the parameters to send to the API endpoint
for the get roles operation.
Typically these are written to a http.Request.
/*GetRolesParams contains all the parameters to send to the API endpoint
for the get roles operation typically these are written to a http.Request
*/
type GetRolesParams struct {
// Authorization.
/*Authorization*/
Authorization string
timeout time.Duration
@ -71,21 +72,6 @@ type GetRolesParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get roles params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetRolesParams) WithDefaults() *GetRolesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get roles params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetRolesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get roles params
func (o *GetRolesParams) WithTimeout(timeout time.Duration) *GetRolesParams {
o.SetTimeout(timeout)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *GetRolesReader) ReadResponse(response runtime.ClientResponse, consumer
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,7 +74,7 @@ func NewGetRolesOK() *GetRolesOK {
return &GetRolesOK{}
}
/* GetRolesOK describes a response with status code 200, with default header values.
/*GetRolesOK handles this case with default header values.
Taxnexus Response with User objects
*/
@ -84,6 +85,7 @@ type GetRolesOK struct {
func (o *GetRolesOK) Error() string {
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesOK %+v", 200, o.Payload)
}
func (o *GetRolesOK) GetPayload() []*auth0_models.User {
return o.Payload
}
@ -103,7 +105,7 @@ func NewGetRolesUnauthorized() *GetRolesUnauthorized {
return &GetRolesUnauthorized{}
}
/* GetRolesUnauthorized describes a response with status code 401, with default header values.
/*GetRolesUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
@ -114,6 +116,7 @@ type GetRolesUnauthorized struct {
func (o *GetRolesUnauthorized) Error() string {
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesUnauthorized %+v", 401, o.Payload)
}
func (o *GetRolesUnauthorized) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -135,7 +138,7 @@ func NewGetRolesForbidden() *GetRolesForbidden {
return &GetRolesForbidden{}
}
/* GetRolesForbidden describes a response with status code 403, with default header values.
/*GetRolesForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -146,6 +149,7 @@ type GetRolesForbidden struct {
func (o *GetRolesForbidden) Error() string {
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesForbidden %+v", 403, o.Payload)
}
func (o *GetRolesForbidden) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -167,7 +171,7 @@ func NewGetRolesNotFound() *GetRolesNotFound {
return &GetRolesNotFound{}
}
/* GetRolesNotFound describes a response with status code 404, with default header values.
/*GetRolesNotFound handles this case with default header values.
Resource was not found
*/
@ -178,6 +182,7 @@ type GetRolesNotFound struct {
func (o *GetRolesNotFound) Error() string {
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesNotFound %+v", 404, o.Payload)
}
func (o *GetRolesNotFound) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -199,7 +204,7 @@ func NewGetRolesUnprocessableEntity() *GetRolesUnprocessableEntity {
return &GetRolesUnprocessableEntity{}
}
/* GetRolesUnprocessableEntity describes a response with status code 422, with default header values.
/*GetRolesUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -210,6 +215,7 @@ type GetRolesUnprocessableEntity struct {
func (o *GetRolesUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetRolesUnprocessableEntity) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -231,7 +237,7 @@ func NewGetRolesInternalServerError() *GetRolesInternalServerError {
return &GetRolesInternalServerError{}
}
/* GetRolesInternalServerError describes a response with status code 500, with default header values.
/*GetRolesInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -242,6 +248,7 @@ type GetRolesInternalServerError struct {
func (o *GetRolesInternalServerError) Error() string {
return fmt.Sprintf("[GET /api/v2/roles][%d] getRolesInternalServerError %+v", 500, o.Payload)
}
func (o *GetRolesInternalServerError) GetPayload() *auth0_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -22,61 +22,60 @@ import (
"code.tnxs.net/taxnexus/lib/api/auth0/auth0_models"
)
// NewPostRoleUsersParams creates a new PostRoleUsersParams 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.
// NewPostRoleUsersParams creates a new PostRoleUsersParams object
// with the default values initialized.
func NewPostRoleUsersParams() *PostRoleUsersParams {
var ()
return &PostRoleUsersParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostRoleUsersParamsWithTimeout creates a new PostRoleUsersParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewPostRoleUsersParamsWithTimeout(timeout time.Duration) *PostRoleUsersParams {
var ()
return &PostRoleUsersParams{
timeout: timeout,
}
}
// NewPostRoleUsersParamsWithContext creates a new PostRoleUsersParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewPostRoleUsersParamsWithContext(ctx context.Context) *PostRoleUsersParams {
var ()
return &PostRoleUsersParams{
Context: ctx,
}
}
// NewPostRoleUsersParamsWithHTTPClient creates a new PostRoleUsersParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPostRoleUsersParamsWithHTTPClient(client *http.Client) *PostRoleUsersParams {
var ()
return &PostRoleUsersParams{
HTTPClient: client,
}
}
/* PostRoleUsersParams contains all the parameters to send to the API endpoint
for the post role users operation.
Typically these are written to a http.Request.
/*PostRoleUsersParams contains all the parameters to send to the API endpoint
for the post role users operation typically these are written to a http.Request
*/
type PostRoleUsersParams struct {
// Authorization.
/*Authorization*/
Authorization string
/* RoleUsersRequest.
/*RoleUsersRequest
An array of User IDs to add to a Role
*/
RoleUsersRequest *auth0_models.RoleUsersRequest
/* RoleID.
/*RoleID
An Auth0 Role ID
*/
RoleID string
@ -85,21 +84,6 @@ type PostRoleUsersParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post role users params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostRoleUsersParams) WithDefaults() *PostRoleUsersParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post role users params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostRoleUsersParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post role users params
func (o *PostRoleUsersParams) WithTimeout(timeout time.Duration) *PostRoleUsersParams {
o.SetTimeout(timeout)
@ -178,6 +162,7 @@ func (o *PostRoleUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
return err
}
if o.RoleUsersRequest != nil {
if err := r.SetBodyParam(o.RoleUsersRequest); err != nil {
return err

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *PostRoleUsersReader) ReadResponse(response runtime.ClientResponse, cons
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewPostRoleUsersOK() *PostRoleUsersOK {
return &PostRoleUsersOK{}
}
/* PostRoleUsersOK describes a response with status code 200, with default header values.
/*PostRoleUsersOK handles this case with default header values.
Role users successfully updated
*/
@ -88,7 +89,7 @@ func NewPostRoleUsersUnauthorized() *PostRoleUsersUnauthorized {
return &PostRoleUsersUnauthorized{}
}
/* PostRoleUsersUnauthorized describes a response with status code 401, with default header values.
/*PostRoleUsersUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
@ -99,6 +100,7 @@ type PostRoleUsersUnauthorized struct {
func (o *PostRoleUsersUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersUnauthorized %+v", 401, o.Payload)
}
func (o *PostRoleUsersUnauthorized) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -120,7 +122,7 @@ func NewPostRoleUsersForbidden() *PostRoleUsersForbidden {
return &PostRoleUsersForbidden{}
}
/* PostRoleUsersForbidden describes a response with status code 403, with default header values.
/*PostRoleUsersForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -131,6 +133,7 @@ type PostRoleUsersForbidden struct {
func (o *PostRoleUsersForbidden) Error() string {
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersForbidden %+v", 403, o.Payload)
}
func (o *PostRoleUsersForbidden) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -152,7 +155,7 @@ func NewPostRoleUsersNotFound() *PostRoleUsersNotFound {
return &PostRoleUsersNotFound{}
}
/* PostRoleUsersNotFound describes a response with status code 404, with default header values.
/*PostRoleUsersNotFound handles this case with default header values.
Resource was not found
*/
@ -163,6 +166,7 @@ type PostRoleUsersNotFound struct {
func (o *PostRoleUsersNotFound) Error() string {
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersNotFound %+v", 404, o.Payload)
}
func (o *PostRoleUsersNotFound) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -184,7 +188,7 @@ func NewPostRoleUsersInternalServerError() *PostRoleUsersInternalServerError {
return &PostRoleUsersInternalServerError{}
}
/* PostRoleUsersInternalServerError describes a response with status code 500, with default header values.
/*PostRoleUsersInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -195,6 +199,7 @@ type PostRoleUsersInternalServerError struct {
func (o *PostRoleUsersInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v2/roles/{roleId}/users][%d] postRoleUsersInternalServerError %+v", 500, o.Payload)
}
func (o *PostRoleUsersInternalServerError) GetPayload() *auth0_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,14 +29,11 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetRoles(params *GetRolesParams, opts ...ClientOption) (*GetRolesOK, error)
GetRoles(params *GetRolesParams) (*GetRolesOK, error)
PostRoleUsers(params *PostRoleUsersParams, opts ...ClientOption) (*PostRoleUsersOK, error)
PostRoleUsers(params *PostRoleUsersParams) (*PostRoleUsersOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -46,12 +43,13 @@ type ClientService interface {
Get Roles from Auth0
*/
func (a *Client) GetRoles(params *GetRolesParams, opts ...ClientOption) (*GetRolesOK, error) {
func (a *Client) GetRoles(params *GetRolesParams) (*GetRolesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetRolesParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getRoles",
Method: "GET",
PathPattern: "/api/v2/roles",
@ -62,12 +60,7 @@ func (a *Client) GetRoles(params *GetRolesParams, opts ...ClientOption) (*GetRol
Reader: &GetRolesReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -86,12 +79,13 @@ func (a *Client) GetRoles(params *GetRolesParams, opts ...ClientOption) (*GetRol
Add users to role
*/
func (a *Client) PostRoleUsers(params *PostRoleUsersParams, opts ...ClientOption) (*PostRoleUsersOK, error) {
func (a *Client) PostRoleUsers(params *PostRoleUsersParams) (*PostRoleUsersOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostRoleUsersParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "postRoleUsers",
Method: "POST",
PathPattern: "/api/v2/roles/{roleId}/users",
@ -102,12 +96,7 @@ func (a *Client) PostRoleUsers(params *PostRoleUsersParams, opts ...ClientOption
Reader: &PostRoleUsersReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -22,61 +22,60 @@ import (
"code.tnxs.net/taxnexus/lib/api/auth0/auth0_models"
)
// NewDeleteAPIV2UsersUserIDRolesParams creates a new DeleteAPIV2UsersUserIDRolesParams 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.
// NewDeleteAPIV2UsersUserIDRolesParams creates a new DeleteAPIV2UsersUserIDRolesParams object
// with the default values initialized.
func NewDeleteAPIV2UsersUserIDRolesParams() *DeleteAPIV2UsersUserIDRolesParams {
var ()
return &DeleteAPIV2UsersUserIDRolesParams{
timeout: cr.DefaultTimeout,
}
}
// NewDeleteAPIV2UsersUserIDRolesParamsWithTimeout creates a new DeleteAPIV2UsersUserIDRolesParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewDeleteAPIV2UsersUserIDRolesParamsWithTimeout(timeout time.Duration) *DeleteAPIV2UsersUserIDRolesParams {
var ()
return &DeleteAPIV2UsersUserIDRolesParams{
timeout: timeout,
}
}
// NewDeleteAPIV2UsersUserIDRolesParamsWithContext creates a new DeleteAPIV2UsersUserIDRolesParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewDeleteAPIV2UsersUserIDRolesParamsWithContext(ctx context.Context) *DeleteAPIV2UsersUserIDRolesParams {
var ()
return &DeleteAPIV2UsersUserIDRolesParams{
Context: ctx,
}
}
// NewDeleteAPIV2UsersUserIDRolesParamsWithHTTPClient creates a new DeleteAPIV2UsersUserIDRolesParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewDeleteAPIV2UsersUserIDRolesParamsWithHTTPClient(client *http.Client) *DeleteAPIV2UsersUserIDRolesParams {
var ()
return &DeleteAPIV2UsersUserIDRolesParams{
HTTPClient: client,
}
}
/* DeleteAPIV2UsersUserIDRolesParams contains all the parameters to send to the API endpoint
for the delete API v2 users user ID roles operation.
Typically these are written to a http.Request.
/*DeleteAPIV2UsersUserIDRolesParams contains all the parameters to send to the API endpoint
for the delete API v2 users user ID roles operation typically these are written to a http.Request
*/
type DeleteAPIV2UsersUserIDRolesParams struct {
// Authorization.
/*Authorization*/
Authorization string
/* UserRolesRequest.
/*UserRolesRequest
An array of User IDs to add to a Role
*/
UserRolesRequest *auth0_models.UserRolesRequest
/* UserID.
/*UserID
An Auth0 User ID
*/
UserID string
@ -85,21 +84,6 @@ type DeleteAPIV2UsersUserIDRolesParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the delete API v2 users user ID roles params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteAPIV2UsersUserIDRolesParams) WithDefaults() *DeleteAPIV2UsersUserIDRolesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the delete API v2 users user ID roles params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteAPIV2UsersUserIDRolesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the delete API v2 users user ID roles params
func (o *DeleteAPIV2UsersUserIDRolesParams) WithTimeout(timeout time.Duration) *DeleteAPIV2UsersUserIDRolesParams {
o.SetTimeout(timeout)
@ -178,6 +162,7 @@ func (o *DeleteAPIV2UsersUserIDRolesParams) WriteToRequest(r runtime.ClientReque
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
return err
}
if o.UserRolesRequest != nil {
if err := r.SetBodyParam(o.UserRolesRequest); err != nil {
return err

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *DeleteAPIV2UsersUserIDRolesReader) ReadResponse(response runtime.Client
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewDeleteAPIV2UsersUserIDRolesNoContent() *DeleteAPIV2UsersUserIDRolesNoCon
return &DeleteAPIV2UsersUserIDRolesNoContent{}
}
/* DeleteAPIV2UsersUserIDRolesNoContent describes a response with status code 204, with default header values.
/*DeleteAPIV2UsersUserIDRolesNoContent handles this case with default header values.
User roles successfully removed
*/
@ -88,7 +89,7 @@ func NewDeleteAPIV2UsersUserIDRolesUnauthorized() *DeleteAPIV2UsersUserIDRolesUn
return &DeleteAPIV2UsersUserIDRolesUnauthorized{}
}
/* DeleteAPIV2UsersUserIDRolesUnauthorized describes a response with status code 401, with default header values.
/*DeleteAPIV2UsersUserIDRolesUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
@ -99,6 +100,7 @@ type DeleteAPIV2UsersUserIDRolesUnauthorized struct {
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesUnauthorized %+v", 401, o.Payload)
}
func (o *DeleteAPIV2UsersUserIDRolesUnauthorized) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -120,7 +122,7 @@ func NewDeleteAPIV2UsersUserIDRolesForbidden() *DeleteAPIV2UsersUserIDRolesForbi
return &DeleteAPIV2UsersUserIDRolesForbidden{}
}
/* DeleteAPIV2UsersUserIDRolesForbidden describes a response with status code 403, with default header values.
/*DeleteAPIV2UsersUserIDRolesForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -131,6 +133,7 @@ type DeleteAPIV2UsersUserIDRolesForbidden struct {
func (o *DeleteAPIV2UsersUserIDRolesForbidden) Error() string {
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesForbidden %+v", 403, o.Payload)
}
func (o *DeleteAPIV2UsersUserIDRolesForbidden) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -152,7 +155,7 @@ func NewDeleteAPIV2UsersUserIDRolesNotFound() *DeleteAPIV2UsersUserIDRolesNotFou
return &DeleteAPIV2UsersUserIDRolesNotFound{}
}
/* DeleteAPIV2UsersUserIDRolesNotFound describes a response with status code 404, with default header values.
/*DeleteAPIV2UsersUserIDRolesNotFound handles this case with default header values.
Resource was not found
*/
@ -163,6 +166,7 @@ type DeleteAPIV2UsersUserIDRolesNotFound struct {
func (o *DeleteAPIV2UsersUserIDRolesNotFound) Error() string {
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesNotFound %+v", 404, o.Payload)
}
func (o *DeleteAPIV2UsersUserIDRolesNotFound) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -184,7 +188,7 @@ func NewDeleteAPIV2UsersUserIDRolesInternalServerError() *DeleteAPIV2UsersUserID
return &DeleteAPIV2UsersUserIDRolesInternalServerError{}
}
/* DeleteAPIV2UsersUserIDRolesInternalServerError describes a response with status code 500, with default header values.
/*DeleteAPIV2UsersUserIDRolesInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -195,6 +199,7 @@ type DeleteAPIV2UsersUserIDRolesInternalServerError struct {
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) Error() string {
return fmt.Sprintf("[DELETE /api/v2/users/{userId}/roles][%d] deleteApiV2UsersUserIdRolesInternalServerError %+v", 500, o.Payload)
}
func (o *DeleteAPIV2UsersUserIDRolesInternalServerError) GetPayload() *auth0_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,53 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetUserByEmailParams creates a new GetUserByEmailParams 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.
// NewGetUserByEmailParams creates a new GetUserByEmailParams object
// with the default values initialized.
func NewGetUserByEmailParams() *GetUserByEmailParams {
var ()
return &GetUserByEmailParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetUserByEmailParamsWithTimeout creates a new GetUserByEmailParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetUserByEmailParamsWithTimeout(timeout time.Duration) *GetUserByEmailParams {
var ()
return &GetUserByEmailParams{
timeout: timeout,
}
}
// NewGetUserByEmailParamsWithContext creates a new GetUserByEmailParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetUserByEmailParamsWithContext(ctx context.Context) *GetUserByEmailParams {
var ()
return &GetUserByEmailParams{
Context: ctx,
}
}
// NewGetUserByEmailParamsWithHTTPClient creates a new GetUserByEmailParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetUserByEmailParamsWithHTTPClient(client *http.Client) *GetUserByEmailParams {
var ()
return &GetUserByEmailParams{
HTTPClient: client,
}
}
/* GetUserByEmailParams contains all the parameters to send to the API endpoint
for the get user by email operation.
Typically these are written to a http.Request.
/*GetUserByEmailParams contains all the parameters to send to the API endpoint
for the get user by email operation typically these are written to a http.Request
*/
type GetUserByEmailParams struct {
// Authorization.
/*Authorization*/
Authorization string
// Email.
/*Email*/
Email string
timeout time.Duration
@ -74,21 +74,6 @@ type GetUserByEmailParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get user by email params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUserByEmailParams) WithDefaults() *GetUserByEmailParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get user by email params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUserByEmailParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get user by email params
func (o *GetUserByEmailParams) WithTimeout(timeout time.Duration) *GetUserByEmailParams {
o.SetTimeout(timeout)
@ -161,7 +146,6 @@ func (o *GetUserByEmailParams) WriteToRequest(r runtime.ClientRequest, reg strfm
qrEmail := o.Email
qEmail := qrEmail
if qEmail != "" {
if err := r.SetQueryParam("email", qEmail); err != nil {
return err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetUserByEmailReader) ReadResponse(response runtime.ClientResponse, con
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetUserByEmailOK() *GetUserByEmailOK {
return &GetUserByEmailOK{}
}
/* GetUserByEmailOK describes a response with status code 200, with default header values.
/*GetUserByEmailOK handles this case with default header values.
Taxnexus Response with User objects
*/
@ -78,6 +79,7 @@ type GetUserByEmailOK struct {
func (o *GetUserByEmailOK) Error() string {
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailOK %+v", 200, o.Payload)
}
func (o *GetUserByEmailOK) GetPayload() []*auth0_models.User {
return o.Payload
}
@ -97,7 +99,7 @@ func NewGetUserByEmailUnauthorized() *GetUserByEmailUnauthorized {
return &GetUserByEmailUnauthorized{}
}
/* GetUserByEmailUnauthorized describes a response with status code 401, with default header values.
/*GetUserByEmailUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
@ -108,6 +110,7 @@ type GetUserByEmailUnauthorized struct {
func (o *GetUserByEmailUnauthorized) Error() string {
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailUnauthorized %+v", 401, o.Payload)
}
func (o *GetUserByEmailUnauthorized) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -129,7 +132,7 @@ func NewGetUserByEmailForbidden() *GetUserByEmailForbidden {
return &GetUserByEmailForbidden{}
}
/* GetUserByEmailForbidden describes a response with status code 403, with default header values.
/*GetUserByEmailForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -140,6 +143,7 @@ type GetUserByEmailForbidden struct {
func (o *GetUserByEmailForbidden) Error() string {
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailForbidden %+v", 403, o.Payload)
}
func (o *GetUserByEmailForbidden) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -161,7 +165,7 @@ func NewGetUserByEmailNotFound() *GetUserByEmailNotFound {
return &GetUserByEmailNotFound{}
}
/* GetUserByEmailNotFound describes a response with status code 404, with default header values.
/*GetUserByEmailNotFound handles this case with default header values.
Resource was not found
*/
@ -172,6 +176,7 @@ type GetUserByEmailNotFound struct {
func (o *GetUserByEmailNotFound) Error() string {
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailNotFound %+v", 404, o.Payload)
}
func (o *GetUserByEmailNotFound) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -193,7 +198,7 @@ func NewGetUserByEmailInternalServerError() *GetUserByEmailInternalServerError {
return &GetUserByEmailInternalServerError{}
}
/* GetUserByEmailInternalServerError describes a response with status code 500, with default header values.
/*GetUserByEmailInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -204,6 +209,7 @@ type GetUserByEmailInternalServerError struct {
func (o *GetUserByEmailInternalServerError) Error() string {
return fmt.Sprintf("[GET /api/v2/users-by-email][%d] getUserByEmailInternalServerError %+v", 500, o.Payload)
}
func (o *GetUserByEmailInternalServerError) GetPayload() *auth0_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,55 +20,55 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetUserRolesParams creates a new GetUserRolesParams 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.
// NewGetUserRolesParams creates a new GetUserRolesParams object
// with the default values initialized.
func NewGetUserRolesParams() *GetUserRolesParams {
var ()
return &GetUserRolesParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetUserRolesParamsWithTimeout creates a new GetUserRolesParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetUserRolesParamsWithTimeout(timeout time.Duration) *GetUserRolesParams {
var ()
return &GetUserRolesParams{
timeout: timeout,
}
}
// NewGetUserRolesParamsWithContext creates a new GetUserRolesParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetUserRolesParamsWithContext(ctx context.Context) *GetUserRolesParams {
var ()
return &GetUserRolesParams{
Context: ctx,
}
}
// NewGetUserRolesParamsWithHTTPClient creates a new GetUserRolesParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetUserRolesParamsWithHTTPClient(client *http.Client) *GetUserRolesParams {
var ()
return &GetUserRolesParams{
HTTPClient: client,
}
}
/* GetUserRolesParams contains all the parameters to send to the API endpoint
for the get user roles operation.
Typically these are written to a http.Request.
/*GetUserRolesParams contains all the parameters to send to the API endpoint
for the get user roles operation typically these are written to a http.Request
*/
type GetUserRolesParams struct {
// Authorization.
/*Authorization*/
Authorization string
/* UserID.
/*UserID
An Auth0 User ID
*/
UserID string
@ -77,21 +77,6 @@ type GetUserRolesParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get user roles params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUserRolesParams) WithDefaults() *GetUserRolesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get user roles params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUserRolesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get user roles params
func (o *GetUserRolesParams) WithTimeout(timeout time.Duration) *GetUserRolesParams {
o.SetTimeout(timeout)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetUserRolesReader) ReadResponse(response runtime.ClientResponse, consu
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetUserRolesOK() *GetUserRolesOK {
return &GetUserRolesOK{}
}
/* GetUserRolesOK describes a response with status code 200, with default header values.
/*GetUserRolesOK handles this case with default header values.
Taxnexus Response with User objects
*/
@ -78,6 +79,7 @@ type GetUserRolesOK struct {
func (o *GetUserRolesOK) Error() string {
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesOK %+v", 200, o.Payload)
}
func (o *GetUserRolesOK) GetPayload() *auth0_models.RoleResponse {
return o.Payload
}
@ -99,7 +101,7 @@ func NewGetUserRolesUnauthorized() *GetUserRolesUnauthorized {
return &GetUserRolesUnauthorized{}
}
/* GetUserRolesUnauthorized describes a response with status code 401, with default header values.
/*GetUserRolesUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
@ -110,6 +112,7 @@ type GetUserRolesUnauthorized struct {
func (o *GetUserRolesUnauthorized) Error() string {
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesUnauthorized %+v", 401, o.Payload)
}
func (o *GetUserRolesUnauthorized) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -131,7 +134,7 @@ func NewGetUserRolesForbidden() *GetUserRolesForbidden {
return &GetUserRolesForbidden{}
}
/* GetUserRolesForbidden describes a response with status code 403, with default header values.
/*GetUserRolesForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -142,6 +145,7 @@ type GetUserRolesForbidden struct {
func (o *GetUserRolesForbidden) Error() string {
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesForbidden %+v", 403, o.Payload)
}
func (o *GetUserRolesForbidden) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -163,7 +167,7 @@ func NewGetUserRolesNotFound() *GetUserRolesNotFound {
return &GetUserRolesNotFound{}
}
/* GetUserRolesNotFound describes a response with status code 404, with default header values.
/*GetUserRolesNotFound handles this case with default header values.
Resource was not found
*/
@ -174,6 +178,7 @@ type GetUserRolesNotFound struct {
func (o *GetUserRolesNotFound) Error() string {
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesNotFound %+v", 404, o.Payload)
}
func (o *GetUserRolesNotFound) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -195,7 +200,7 @@ func NewGetUserRolesInternalServerError() *GetUserRolesInternalServerError {
return &GetUserRolesInternalServerError{}
}
/* GetUserRolesInternalServerError describes a response with status code 500, with default header values.
/*GetUserRolesInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -206,6 +211,7 @@ type GetUserRolesInternalServerError struct {
func (o *GetUserRolesInternalServerError) Error() string {
return fmt.Sprintf("[GET /api/v2/users/{userId}/roles][%d] getUserRolesInternalServerError %+v", 500, o.Payload)
}
func (o *GetUserRolesInternalServerError) GetPayload() *auth0_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,50 +20,51 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetUsersParams creates a new GetUsersParams 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.
// NewGetUsersParams creates a new GetUsersParams object
// with the default values initialized.
func NewGetUsersParams() *GetUsersParams {
var ()
return &GetUsersParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetUsersParamsWithTimeout creates a new GetUsersParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetUsersParamsWithTimeout(timeout time.Duration) *GetUsersParams {
var ()
return &GetUsersParams{
timeout: timeout,
}
}
// NewGetUsersParamsWithContext creates a new GetUsersParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetUsersParamsWithContext(ctx context.Context) *GetUsersParams {
var ()
return &GetUsersParams{
Context: ctx,
}
}
// NewGetUsersParamsWithHTTPClient creates a new GetUsersParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetUsersParamsWithHTTPClient(client *http.Client) *GetUsersParams {
var ()
return &GetUsersParams{
HTTPClient: client,
}
}
/* GetUsersParams contains all the parameters to send to the API endpoint
for the get users operation.
Typically these are written to a http.Request.
/*GetUsersParams contains all the parameters to send to the API endpoint
for the get users operation typically these are written to a http.Request
*/
type GetUsersParams struct {
// Authorization.
/*Authorization*/
Authorization string
timeout time.Duration
@ -71,21 +72,6 @@ type GetUsersParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get users params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUsersParams) WithDefaults() *GetUsersParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get users params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetUsersParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get users params
func (o *GetUsersParams) WithTimeout(timeout time.Duration) *GetUsersParams {
o.SetTimeout(timeout)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetUsersReader) ReadResponse(response runtime.ClientResponse, consumer
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetUsersOK() *GetUsersOK {
return &GetUsersOK{}
}
/* GetUsersOK describes a response with status code 200, with default header values.
/*GetUsersOK handles this case with default header values.
Taxnexus Response with User objects
*/
@ -78,6 +79,7 @@ type GetUsersOK struct {
func (o *GetUsersOK) Error() string {
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersOK %+v", 200, o.Payload)
}
func (o *GetUsersOK) GetPayload() []*auth0_models.User {
return o.Payload
}
@ -97,7 +99,7 @@ func NewGetUsersUnauthorized() *GetUsersUnauthorized {
return &GetUsersUnauthorized{}
}
/* GetUsersUnauthorized describes a response with status code 401, with default header values.
/*GetUsersUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
@ -108,6 +110,7 @@ type GetUsersUnauthorized struct {
func (o *GetUsersUnauthorized) Error() string {
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersUnauthorized %+v", 401, o.Payload)
}
func (o *GetUsersUnauthorized) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -129,7 +132,7 @@ func NewGetUsersForbidden() *GetUsersForbidden {
return &GetUsersForbidden{}
}
/* GetUsersForbidden describes a response with status code 403, with default header values.
/*GetUsersForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -140,6 +143,7 @@ type GetUsersForbidden struct {
func (o *GetUsersForbidden) Error() string {
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersForbidden %+v", 403, o.Payload)
}
func (o *GetUsersForbidden) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -161,7 +165,7 @@ func NewGetUsersNotFound() *GetUsersNotFound {
return &GetUsersNotFound{}
}
/* GetUsersNotFound describes a response with status code 404, with default header values.
/*GetUsersNotFound handles this case with default header values.
Resource was not found
*/
@ -172,6 +176,7 @@ type GetUsersNotFound struct {
func (o *GetUsersNotFound) Error() string {
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersNotFound %+v", 404, o.Payload)
}
func (o *GetUsersNotFound) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -193,7 +198,7 @@ func NewGetUsersInternalServerError() *GetUsersInternalServerError {
return &GetUsersInternalServerError{}
}
/* GetUsersInternalServerError describes a response with status code 500, with default header values.
/*GetUsersInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -204,6 +209,7 @@ type GetUsersInternalServerError struct {
func (o *GetUsersInternalServerError) Error() string {
return fmt.Sprintf("[GET /api/v2/users][%d] getUsersInternalServerError %+v", 500, o.Payload)
}
func (o *GetUsersInternalServerError) GetPayload() *auth0_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -22,55 +22,55 @@ import (
"code.tnxs.net/taxnexus/lib/api/auth0/auth0_models"
)
// NewPostUsersParams creates a new PostUsersParams 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.
// NewPostUsersParams creates a new PostUsersParams object
// with the default values initialized.
func NewPostUsersParams() *PostUsersParams {
var ()
return &PostUsersParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostUsersParamsWithTimeout creates a new PostUsersParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewPostUsersParamsWithTimeout(timeout time.Duration) *PostUsersParams {
var ()
return &PostUsersParams{
timeout: timeout,
}
}
// NewPostUsersParamsWithContext creates a new PostUsersParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewPostUsersParamsWithContext(ctx context.Context) *PostUsersParams {
var ()
return &PostUsersParams{
Context: ctx,
}
}
// NewPostUsersParamsWithHTTPClient creates a new PostUsersParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPostUsersParamsWithHTTPClient(client *http.Client) *PostUsersParams {
var ()
return &PostUsersParams{
HTTPClient: client,
}
}
/* PostUsersParams contains all the parameters to send to the API endpoint
for the post users operation.
Typically these are written to a http.Request.
/*PostUsersParams contains all the parameters to send to the API endpoint
for the post users operation typically these are written to a http.Request
*/
type PostUsersParams struct {
// Authorization.
/*Authorization*/
Authorization string
/* UserRequest.
/*UserRequest
An array of User records
*/
UserRequest *auth0_models.UserRequest
@ -79,21 +79,6 @@ type PostUsersParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post users params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostUsersParams) WithDefaults() *PostUsersParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post users params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostUsersParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post users params
func (o *PostUsersParams) WithTimeout(timeout time.Duration) *PostUsersParams {
o.SetTimeout(timeout)
@ -161,6 +146,7 @@ func (o *PostUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg
if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil {
return err
}
if o.UserRequest != nil {
if err := r.SetBodyParam(o.UserRequest); err != nil {
return err

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *PostUsersReader) ReadResponse(response runtime.ClientResponse, consumer
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,7 +74,7 @@ func NewPostUsersCreated() *PostUsersCreated {
return &PostUsersCreated{}
}
/* PostUsersCreated describes a response with status code 201, with default header values.
/*PostUsersCreated handles this case with default header values.
New user created
*/
@ -94,7 +95,7 @@ func NewPostUsersUnauthorized() *PostUsersUnauthorized {
return &PostUsersUnauthorized{}
}
/* PostUsersUnauthorized describes a response with status code 401, with default header values.
/*PostUsersUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
@ -105,6 +106,7 @@ type PostUsersUnauthorized struct {
func (o *PostUsersUnauthorized) Error() string {
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersUnauthorized %+v", 401, o.Payload)
}
func (o *PostUsersUnauthorized) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -126,7 +128,7 @@ func NewPostUsersForbidden() *PostUsersForbidden {
return &PostUsersForbidden{}
}
/* PostUsersForbidden describes a response with status code 403, with default header values.
/*PostUsersForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -137,6 +139,7 @@ type PostUsersForbidden struct {
func (o *PostUsersForbidden) Error() string {
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersForbidden %+v", 403, o.Payload)
}
func (o *PostUsersForbidden) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -158,7 +161,7 @@ func NewPostUsersNotFound() *PostUsersNotFound {
return &PostUsersNotFound{}
}
/* PostUsersNotFound describes a response with status code 404, with default header values.
/*PostUsersNotFound handles this case with default header values.
Resource was not found
*/
@ -169,6 +172,7 @@ type PostUsersNotFound struct {
func (o *PostUsersNotFound) Error() string {
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersNotFound %+v", 404, o.Payload)
}
func (o *PostUsersNotFound) GetPayload() *auth0_models.Error {
return o.Payload
}
@ -190,7 +194,7 @@ func NewPostUsersConflict() *PostUsersConflict {
return &PostUsersConflict{}
}
/* PostUsersConflict describes a response with status code 409, with default header values.
/*PostUsersConflict handles this case with default header values.
User already exists
*/
@ -211,7 +215,7 @@ func NewPostUsersInternalServerError() *PostUsersInternalServerError {
return &PostUsersInternalServerError{}
}
/* PostUsersInternalServerError describes a response with status code 500, with default header values.
/*PostUsersInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -222,6 +226,7 @@ type PostUsersInternalServerError struct {
func (o *PostUsersInternalServerError) Error() string {
return fmt.Sprintf("[POST /api/v2/users-by-email][%d] postUsersInternalServerError %+v", 500, o.Payload)
}
func (o *PostUsersInternalServerError) GetPayload() *auth0_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,20 +29,17 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRolesParams, opts ...ClientOption) (*DeleteAPIV2UsersUserIDRolesNoContent, error)
DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRolesParams) (*DeleteAPIV2UsersUserIDRolesNoContent, error)
GetUserByEmail(params *GetUserByEmailParams, opts ...ClientOption) (*GetUserByEmailOK, error)
GetUserByEmail(params *GetUserByEmailParams) (*GetUserByEmailOK, error)
GetUserRoles(params *GetUserRolesParams, opts ...ClientOption) (*GetUserRolesOK, error)
GetUserRoles(params *GetUserRolesParams) (*GetUserRolesOK, error)
GetUsers(params *GetUsersParams, opts ...ClientOption) (*GetUsersOK, error)
GetUsers(params *GetUsersParams) (*GetUsersOK, error)
PostUsers(params *PostUsersParams, opts ...ClientOption) (*PostUsersCreated, error)
PostUsers(params *PostUsersParams) (*PostUsersCreated, error)
SetTransport(transport runtime.ClientTransport)
}
@ -50,12 +47,13 @@ type ClientService interface {
/*
DeleteAPIV2UsersUserIDRoles delete API v2 users user ID roles API
*/
func (a *Client) DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRolesParams, opts ...ClientOption) (*DeleteAPIV2UsersUserIDRolesNoContent, error) {
func (a *Client) DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRolesParams) (*DeleteAPIV2UsersUserIDRolesNoContent, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteAPIV2UsersUserIDRolesParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "DeleteAPIV2UsersUserIDRoles",
Method: "DELETE",
PathPattern: "/api/v2/users/{userId}/roles",
@ -66,12 +64,7 @@ func (a *Client) DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRoles
Reader: &DeleteAPIV2UsersUserIDRolesReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -90,12 +83,13 @@ func (a *Client) DeleteAPIV2UsersUserIDRoles(params *DeleteAPIV2UsersUserIDRoles
Get a single user from Auth0 by Email Address
*/
func (a *Client) GetUserByEmail(params *GetUserByEmailParams, opts ...ClientOption) (*GetUserByEmailOK, error) {
func (a *Client) GetUserByEmail(params *GetUserByEmailParams) (*GetUserByEmailOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetUserByEmailParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getUserByEmail",
Method: "GET",
PathPattern: "/api/v2/users-by-email",
@ -106,12 +100,7 @@ func (a *Client) GetUserByEmail(params *GetUserByEmailParams, opts ...ClientOpti
Reader: &GetUserByEmailReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -130,12 +119,13 @@ func (a *Client) GetUserByEmail(params *GetUserByEmailParams, opts ...ClientOpti
Get a User's Roles
*/
func (a *Client) GetUserRoles(params *GetUserRolesParams, opts ...ClientOption) (*GetUserRolesOK, error) {
func (a *Client) GetUserRoles(params *GetUserRolesParams) (*GetUserRolesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetUserRolesParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getUserRoles",
Method: "GET",
PathPattern: "/api/v2/users/{userId}/roles",
@ -146,12 +136,7 @@ func (a *Client) GetUserRoles(params *GetUserRolesParams, opts ...ClientOption)
Reader: &GetUserRolesReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -170,12 +155,13 @@ func (a *Client) GetUserRoles(params *GetUserRolesParams, opts ...ClientOption)
Get all users from Auth0
*/
func (a *Client) GetUsers(params *GetUsersParams, opts ...ClientOption) (*GetUsersOK, error) {
func (a *Client) GetUsers(params *GetUsersParams) (*GetUsersOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetUsersParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getUsers",
Method: "GET",
PathPattern: "/api/v2/users",
@ -186,12 +172,7 @@ func (a *Client) GetUsers(params *GetUsersParams, opts ...ClientOption) (*GetUse
Reader: &GetUsersReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -210,12 +191,13 @@ func (a *Client) GetUsers(params *GetUsersParams, opts ...ClientOption) (*GetUse
create new Auth0 user
*/
func (a *Client) PostUsers(params *PostUsersParams, opts ...ClientOption) (*PostUsersCreated, error) {
func (a *Client) PostUsers(params *PostUsersParams) (*PostUsersCreated, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostUsersParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "postUsers",
Method: "POST",
PathPattern: "/api/v2/users-by-email",
@ -226,12 +208,7 @@ func (a *Client) PostUsers(params *PostUsersParams, opts ...ClientOption) (*Post
Reader: &PostUsersReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -39,11 +37,6 @@ func (m *CredentialsRequest) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this credentials request based on context it is used
func (m *CredentialsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CredentialsRequest) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -39,11 +37,6 @@ func (m *CredentialsResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this credentials response based on context it is used
func (m *CredentialsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CredentialsResponse) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -36,11 +34,6 @@ func (m *Error) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this error based on context it is used
func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Error) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -22,63 +20,48 @@ import (
type NewUser struct {
// blocked
// Example: false
Blocked bool `json:"blocked,omitempty"`
// connection
// Example: Initial-Connection
Connection string `json:"connection,omitempty"`
// email
// Example: john.doe@gmail.com
Email string `json:"email,omitempty"`
// email verified
// Example: false
EmailVerified bool `json:"email_verified,omitempty"`
// family name
// Example: Doe
FamilyName string `json:"family_name,omitempty"`
// given name
// Example: John
GivenName string `json:"given_name,omitempty"`
// name
// Example: John Doe
Name string `json:"name,omitempty"`
// nickname
// Example: Johnny
Nickname string `json:"nickname,omitempty"`
// password
// Example: secret
Password string `json:"password,omitempty"`
// phone number
// Example: +199999999999999
PhoneNumber string `json:"phone_number,omitempty"`
// phone verified
// Example: false
PhoneVerified bool `json:"phone_verified,omitempty"`
// picture
// Example: https://secure.gravatar.com/avatar/15626c5e0c749cb912f9d1ad48dba440?s=480\u0026r=pg\u0026d=https%3A%2F%2Fssl.gstatic.com%2Fs2%2Fprofiles%2Fimages%2Fsilhouette80.png
Picture string `json:"picture,omitempty"`
// user id
// Example: abc
UserID string `json:"user_id,omitempty"`
// username
// Example: johndoe
Username string `json:"username,omitempty"`
// verify email
// Example: false
VerifyEmail bool `json:"verify_email,omitempty"`
}
@ -87,11 +70,6 @@ func (m *NewUser) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this new user based on context it is used
func (m *NewUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *NewUser) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -22,15 +20,12 @@ import (
type Role struct {
// description
// Example: Taxnexus API Developer
Description string `json:"description,omitempty"`
// id
// Example: rol_oWVoMn2Zx2qDSGUL
ID string `json:"id,omitempty"`
// name
// Example: Developer
Name string `json:"name,omitempty"`
}
@ -39,11 +34,6 @@ func (m *Role) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this role based on context it is used
func (m *Role) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Role) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,7 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@ -42,6 +41,7 @@ func (m *RoleResponse) Validate(formats strfmt.Registry) error {
}
func (m *RoleResponse) validateRoles(formats strfmt.Registry) error {
if swag.IsZero(m.Roles) { // not required
return nil
}
@ -65,38 +65,6 @@ func (m *RoleResponse) validateRoles(formats strfmt.Registry) error {
return nil
}
// ContextValidate validate this role response based on the context it is used
func (m *RoleResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateRoles(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *RoleResponse) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Roles); i++ {
if m.Roles[i] != nil {
if err := m.Roles[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("roles" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *RoleResponse) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -30,11 +28,6 @@ func (m *RoleUsersRequest) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this role users request based on context it is used
func (m *RoleUsersRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *RoleUsersRequest) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,7 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@ -27,66 +26,51 @@ type User struct {
AppMetadata *UserAppMetadata `json:"app_metadata,omitempty"`
// created at
// Example: 2018-06-06T16:00:55.930Z
CreatedAt string `json:"created_at,omitempty"`
// email
// Example: vern@taxnexus.net
Email string `json:"email,omitempty"`
// email verified
// Example: true
EmailVerified bool `json:"email_verified,omitempty"`
// family name
// Example: Keenan
FamilyName string `json:"family_name,omitempty"`
// given name
// Example: Vernon
GivenName string `json:"given_name,omitempty"`
// identities
Identities []*UserIdentitiesItems0 `json:"identities"`
// last ip
// Example: 67.188.106.161
LastIP string `json:"last_ip,omitempty"`
// last login
// Example: 2020-09-22T19:19:02.706Z
LastLogin string `json:"last_login,omitempty"`
// last password reset
// Example: 2020-09-21T00:11:47.397Z
LastPasswordReset string `json:"last_password_reset,omitempty"`
// logins count
// Example: 178
LoginsCount int64 `json:"logins_count,omitempty"`
// multifactor last modified
// Example: 2020-09-21T00:30:34.081Z
MultifactorLastModified string `json:"multifactor_last_modified,omitempty"`
// name
// Example: Vernon Keenan
Name string `json:"name,omitempty"`
// nickname
// Example: vern
Nickname string `json:"nickname,omitempty"`
// picture
// Example: https://s.gravatar.com/avatar/a08710b8d49416c729a0da8a9c34cdb0?s=480\u0026r=pg\u0026d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fve.png
Picture string `json:"picture,omitempty"`
// updated at
// Example: 2020-09-22T19:19:02.706Z
UpdatedAt string `json:"updated_at,omitempty"`
// user id
// Example: auth0|5b180537157859716f2c9df5
UserID string `json:"user_id,omitempty"`
// user metadata
@ -116,6 +100,7 @@ func (m *User) Validate(formats strfmt.Registry) error {
}
func (m *User) validateAppMetadata(formats strfmt.Registry) error {
if swag.IsZero(m.AppMetadata) { // not required
return nil
}
@ -133,6 +118,7 @@ func (m *User) validateAppMetadata(formats strfmt.Registry) error {
}
func (m *User) validateIdentities(formats strfmt.Registry) error {
if swag.IsZero(m.Identities) { // not required
return nil
}
@ -157,6 +143,7 @@ func (m *User) validateIdentities(formats strfmt.Registry) error {
}
func (m *User) validateUserMetadata(formats strfmt.Registry) error {
if swag.IsZero(m.UserMetadata) { // not required
return nil
}
@ -173,74 +160,6 @@ func (m *User) validateUserMetadata(formats strfmt.Registry) error {
return nil
}
// ContextValidate validate this user based on the context it is used
func (m *User) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAppMetadata(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateIdentities(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateUserMetadata(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *User) contextValidateAppMetadata(ctx context.Context, formats strfmt.Registry) error {
if m.AppMetadata != nil {
if err := m.AppMetadata.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("app_metadata")
}
return err
}
}
return nil
}
func (m *User) contextValidateIdentities(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Identities); i++ {
if m.Identities[i] != nil {
if err := m.Identities[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("identities" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *User) contextValidateUserMetadata(ctx context.Context, formats strfmt.Registry) error {
if m.UserMetadata != nil {
if err := m.UserMetadata.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("user_metadata")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *User) MarshalBinary() ([]byte, error) {
if m == nil {
@ -265,19 +184,15 @@ func (m *User) UnmarshalBinary(b []byte) error {
type UserAppMetadata struct {
// roles
// Example: ["login"]
Roles []string `json:"roles"`
// taxnexus account id
// Example: 7f661ca6-ae4a-486f-9c3c-cd292685a46d
TaxnexusAccountID string `json:"taxnexus_account_id,omitempty"`
// taxnexus contact id
// Example: 9f79dca8-e875-4e2b-a5ad-001a3d32e83d
TaxnexusContactID string `json:"taxnexus_contact_id,omitempty"`
// taxnexus user id
// Example: f04da03d-70ad-46df-a46c-a676388aadd7
TaxnexusUserID string `json:"taxnexus_user_id,omitempty"`
}
@ -286,11 +201,6 @@ func (m *UserAppMetadata) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this user app metadata based on context it is used
func (m *UserAppMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *UserAppMetadata) MarshalBinary() ([]byte, error) {
if m == nil {
@ -315,19 +225,15 @@ func (m *UserAppMetadata) UnmarshalBinary(b []byte) error {
type UserIdentitiesItems0 struct {
// connection
// Example: Username-Password-Authentication
Connection string `json:"connection,omitempty"`
// is social
// Example: false
IsSocial bool `json:"isSocial,omitempty"`
// provider
// Example: auth0
Provider string `json:"provider,omitempty"`
// user id
// Example: 5b180537157859716f2c9df5
UserID string `json:"user_id,omitempty"`
}
@ -336,11 +242,6 @@ func (m *UserIdentitiesItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this user identities items0 based on context it is used
func (m *UserIdentitiesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *UserIdentitiesItems0) MarshalBinary() ([]byte, error) {
if m == nil {
@ -365,23 +266,18 @@ func (m *UserIdentitiesItems0) UnmarshalBinary(b []byte) error {
type UserUserMetadata struct {
// taxnexus email
// Example: vern@taxnexus.net
TaxnexusEmail string `json:"taxnexus_email,omitempty"`
// taxnexus firstname
// Example: Vernon
TaxnexusFirstname string `json:"taxnexus_firstname,omitempty"`
// taxnexus fullname
// Example: Vernon Keenan
TaxnexusFullname string `json:"taxnexus_fullname,omitempty"`
// taxnexus lastname
// Example: Keenan
TaxnexusLastname string `json:"taxnexus_lastname,omitempty"`
// taxnexus phone
// Example: +15106791900
TaxnexusPhone string `json:"taxnexus_phone,omitempty"`
}
@ -390,11 +286,6 @@ func (m *UserUserMetadata) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this user user metadata based on context it is used
func (m *UserUserMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *UserUserMetadata) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,7 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@ -42,6 +41,7 @@ func (m *UserRequest) Validate(formats strfmt.Registry) error {
}
func (m *UserRequest) validateUsers(formats strfmt.Registry) error {
if swag.IsZero(m.Users) { // not required
return nil
}
@ -65,38 +65,6 @@ func (m *UserRequest) validateUsers(formats strfmt.Registry) error {
return nil
}
// ContextValidate validate this user request based on the context it is used
func (m *UserRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateUsers(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *UserRequest) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Users); i++ {
if m.Users[i] != nil {
if err := m.Users[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("users" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *UserRequest) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package auth0_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -30,11 +28,6 @@ func (m *UserRolesRequest) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this user roles request based on context it is used
func (m *UserRolesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *UserRolesRequest) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,52 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetMemberParams creates a new GetMemberParams 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.
// NewGetMemberParams creates a new GetMemberParams object
// with the default values initialized.
func NewGetMemberParams() *GetMemberParams {
var ()
return &GetMemberParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetMemberParamsWithTimeout creates a new GetMemberParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetMemberParamsWithTimeout(timeout time.Duration) *GetMemberParams {
var ()
return &GetMemberParams{
timeout: timeout,
}
}
// NewGetMemberParamsWithContext creates a new GetMemberParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetMemberParamsWithContext(ctx context.Context) *GetMemberParams {
var ()
return &GetMemberParams{
Context: ctx,
}
}
// NewGetMemberParamsWithHTTPClient creates a new GetMemberParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetMemberParamsWithHTTPClient(client *http.Client) *GetMemberParams {
var ()
return &GetMemberParams{
HTTPClient: client,
}
}
/* GetMemberParams contains all the parameters to send to the API endpoint
for the get member operation.
Typically these are written to a http.Request.
/*GetMemberParams contains all the parameters to send to the API endpoint
for the get member operation typically these are written to a http.Request
*/
type GetMemberParams struct {
/* MemberID.
/*MemberID
The Blaze Member Object Id
*/
MemberID string
@ -74,21 +75,6 @@ type GetMemberParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get member params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetMemberParams) WithDefaults() *GetMemberParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get member params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetMemberParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get member params
func (o *GetMemberParams) WithTimeout(timeout time.Duration) *GetMemberParams {
o.SetTimeout(timeout)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetMemberReader) ReadResponse(response runtime.ClientResponse, consumer
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetMemberOK() *GetMemberOK {
return &GetMemberOK{}
}
/* GetMemberOK describes a response with status code 200, with default header values.
/*GetMemberOK handles this case with default header values.
Product was successfully retrieved
*/
@ -78,6 +79,7 @@ type GetMemberOK struct {
func (o *GetMemberOK) Error() string {
return fmt.Sprintf("[GET /partner/members/{memberId}][%d] getMemberOK %+v", 200, o.Payload)
}
func (o *GetMemberOK) GetPayload() *blaze_models.MemberResponse {
return o.Payload
}
@ -99,7 +101,7 @@ func NewGetMemberUnauthorized() *GetMemberUnauthorized {
return &GetMemberUnauthorized{}
}
/* GetMemberUnauthorized describes a response with status code 401, with default header values.
/*GetMemberUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -110,6 +112,7 @@ type GetMemberUnauthorized struct {
func (o *GetMemberUnauthorized) Error() string {
return fmt.Sprintf("[GET /partner/members/{memberId}][%d] getMemberUnauthorized %+v", 401, o.Payload)
}
func (o *GetMemberUnauthorized) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -131,7 +134,7 @@ func NewGetMemberForbidden() *GetMemberForbidden {
return &GetMemberForbidden{}
}
/* GetMemberForbidden describes a response with status code 403, with default header values.
/*GetMemberForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -142,6 +145,7 @@ type GetMemberForbidden struct {
func (o *GetMemberForbidden) Error() string {
return fmt.Sprintf("[GET /partner/members/{memberId}][%d] getMemberForbidden %+v", 403, o.Payload)
}
func (o *GetMemberForbidden) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -163,7 +167,7 @@ func NewGetMemberNotFound() *GetMemberNotFound {
return &GetMemberNotFound{}
}
/* GetMemberNotFound describes a response with status code 404, with default header values.
/*GetMemberNotFound handles this case with default header values.
Resource was not found
*/
@ -174,6 +178,7 @@ type GetMemberNotFound struct {
func (o *GetMemberNotFound) Error() string {
return fmt.Sprintf("[GET /partner/members/{memberId}][%d] getMemberNotFound %+v", 404, o.Payload)
}
func (o *GetMemberNotFound) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -195,7 +200,7 @@ func NewGetMemberInternalServerError() *GetMemberInternalServerError {
return &GetMemberInternalServerError{}
}
/* GetMemberInternalServerError describes a response with status code 500, with default header values.
/*GetMemberInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -206,6 +211,7 @@ type GetMemberInternalServerError struct {
func (o *GetMemberInternalServerError) Error() string {
return fmt.Sprintf("[GET /partner/members/{memberId}][%d] getMemberInternalServerError %+v", 500, o.Payload)
}
func (o *GetMemberInternalServerError) GetPayload() *blaze_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,12 +29,9 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetMember(params *GetMemberParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMemberOK, error)
GetMember(params *GetMemberParams, authInfo runtime.ClientAuthInfoWriter) (*GetMemberOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -42,12 +39,13 @@ type ClientService interface {
/*
GetMember Get A Member (contact)
*/
func (a *Client) GetMember(params *GetMemberParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMemberOK, error) {
func (a *Client) GetMember(params *GetMemberParams, authInfo runtime.ClientAuthInfoWriter) (*GetMemberOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetMemberParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getMember",
Method: "GET",
PathPattern: "/partner/members/{memberId}",
@ -59,12 +57,7 @@ func (a *Client) GetMember(params *GetMemberParams, authInfo runtime.ClientAuthI
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,52 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetProductParams creates a new GetProductParams 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.
// NewGetProductParams creates a new GetProductParams object
// with the default values initialized.
func NewGetProductParams() *GetProductParams {
var ()
return &GetProductParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetProductParamsWithTimeout creates a new GetProductParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetProductParamsWithTimeout(timeout time.Duration) *GetProductParams {
var ()
return &GetProductParams{
timeout: timeout,
}
}
// NewGetProductParamsWithContext creates a new GetProductParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetProductParamsWithContext(ctx context.Context) *GetProductParams {
var ()
return &GetProductParams{
Context: ctx,
}
}
// NewGetProductParamsWithHTTPClient creates a new GetProductParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetProductParamsWithHTTPClient(client *http.Client) *GetProductParams {
var ()
return &GetProductParams{
HTTPClient: client,
}
}
/* GetProductParams contains all the parameters to send to the API endpoint
for the get product operation.
Typically these are written to a http.Request.
/*GetProductParams contains all the parameters to send to the API endpoint
for the get product operation typically these are written to a http.Request
*/
type GetProductParams struct {
/* ProductID.
/*ProductID
The Blaze Product Object Id
*/
ProductID string
@ -74,21 +75,6 @@ type GetProductParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get product params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetProductParams) WithDefaults() *GetProductParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get product params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetProductParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get product params
func (o *GetProductParams) WithTimeout(timeout time.Duration) *GetProductParams {
o.SetTimeout(timeout)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetProductReader) ReadResponse(response runtime.ClientResponse, consume
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetProductOK() *GetProductOK {
return &GetProductOK{}
}
/* GetProductOK describes a response with status code 200, with default header values.
/*GetProductOK handles this case with default header values.
Product was successfully retrieved
*/
@ -78,6 +79,7 @@ type GetProductOK struct {
func (o *GetProductOK) Error() string {
return fmt.Sprintf("[GET /partner/products/{productId}][%d] getProductOK %+v", 200, o.Payload)
}
func (o *GetProductOK) GetPayload() *blaze_models.ProductResponse {
return o.Payload
}
@ -99,7 +101,7 @@ func NewGetProductUnauthorized() *GetProductUnauthorized {
return &GetProductUnauthorized{}
}
/* GetProductUnauthorized describes a response with status code 401, with default header values.
/*GetProductUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -110,6 +112,7 @@ type GetProductUnauthorized struct {
func (o *GetProductUnauthorized) Error() string {
return fmt.Sprintf("[GET /partner/products/{productId}][%d] getProductUnauthorized %+v", 401, o.Payload)
}
func (o *GetProductUnauthorized) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -131,7 +134,7 @@ func NewGetProductForbidden() *GetProductForbidden {
return &GetProductForbidden{}
}
/* GetProductForbidden describes a response with status code 403, with default header values.
/*GetProductForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -142,6 +145,7 @@ type GetProductForbidden struct {
func (o *GetProductForbidden) Error() string {
return fmt.Sprintf("[GET /partner/products/{productId}][%d] getProductForbidden %+v", 403, o.Payload)
}
func (o *GetProductForbidden) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -163,7 +167,7 @@ func NewGetProductNotFound() *GetProductNotFound {
return &GetProductNotFound{}
}
/* GetProductNotFound describes a response with status code 404, with default header values.
/*GetProductNotFound handles this case with default header values.
Resource was not found
*/
@ -174,6 +178,7 @@ type GetProductNotFound struct {
func (o *GetProductNotFound) Error() string {
return fmt.Sprintf("[GET /partner/products/{productId}][%d] getProductNotFound %+v", 404, o.Payload)
}
func (o *GetProductNotFound) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -195,7 +200,7 @@ func NewGetProductInternalServerError() *GetProductInternalServerError {
return &GetProductInternalServerError{}
}
/* GetProductInternalServerError describes a response with status code 500, with default header values.
/*GetProductInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -206,6 +211,7 @@ type GetProductInternalServerError struct {
func (o *GetProductInternalServerError) Error() string {
return fmt.Sprintf("[GET /partner/products/{productId}][%d] getProductInternalServerError %+v", 500, o.Payload)
}
func (o *GetProductInternalServerError) GetPayload() *blaze_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,46 +20,47 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetProductsParams creates a new GetProductsParams 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.
// NewGetProductsParams creates a new GetProductsParams object
// with the default values initialized.
func NewGetProductsParams() *GetProductsParams {
return &GetProductsParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetProductsParamsWithTimeout creates a new GetProductsParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetProductsParamsWithTimeout(timeout time.Duration) *GetProductsParams {
return &GetProductsParams{
timeout: timeout,
}
}
// NewGetProductsParamsWithContext creates a new GetProductsParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetProductsParamsWithContext(ctx context.Context) *GetProductsParams {
return &GetProductsParams{
Context: ctx,
}
}
// NewGetProductsParamsWithHTTPClient creates a new GetProductsParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetProductsParamsWithHTTPClient(client *http.Client) *GetProductsParams {
return &GetProductsParams{
HTTPClient: client,
}
}
/* GetProductsParams contains all the parameters to send to the API endpoint
for the get products operation.
Typically these are written to a http.Request.
/*GetProductsParams contains all the parameters to send to the API endpoint
for the get products operation typically these are written to a http.Request
*/
type GetProductsParams struct {
timeout time.Duration
@ -67,21 +68,6 @@ type GetProductsParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get products params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetProductsParams) WithDefaults() *GetProductsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get products params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetProductsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get products params
func (o *GetProductsParams) WithTimeout(timeout time.Duration) *GetProductsParams {
o.SetTimeout(timeout)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetProductsReader) ReadResponse(response runtime.ClientResponse, consum
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetProductsOK() *GetProductsOK {
return &GetProductsOK{}
}
/* GetProductsOK describes a response with status code 200, with default header values.
/*GetProductsOK handles this case with default header values.
Products were successfully retrieved
*/
@ -78,6 +79,7 @@ type GetProductsOK struct {
func (o *GetProductsOK) Error() string {
return fmt.Sprintf("[GET /partner/products][%d] getProductsOK %+v", 200, o.Payload)
}
func (o *GetProductsOK) GetPayload() *blaze_models.ProductsResponse {
return o.Payload
}
@ -99,7 +101,7 @@ func NewGetProductsUnauthorized() *GetProductsUnauthorized {
return &GetProductsUnauthorized{}
}
/* GetProductsUnauthorized describes a response with status code 401, with default header values.
/*GetProductsUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -110,6 +112,7 @@ type GetProductsUnauthorized struct {
func (o *GetProductsUnauthorized) Error() string {
return fmt.Sprintf("[GET /partner/products][%d] getProductsUnauthorized %+v", 401, o.Payload)
}
func (o *GetProductsUnauthorized) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -131,7 +134,7 @@ func NewGetProductsForbidden() *GetProductsForbidden {
return &GetProductsForbidden{}
}
/* GetProductsForbidden describes a response with status code 403, with default header values.
/*GetProductsForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -142,6 +145,7 @@ type GetProductsForbidden struct {
func (o *GetProductsForbidden) Error() string {
return fmt.Sprintf("[GET /partner/products][%d] getProductsForbidden %+v", 403, o.Payload)
}
func (o *GetProductsForbidden) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -163,7 +167,7 @@ func NewGetProductsNotFound() *GetProductsNotFound {
return &GetProductsNotFound{}
}
/* GetProductsNotFound describes a response with status code 404, with default header values.
/*GetProductsNotFound handles this case with default header values.
Resource was not found
*/
@ -174,6 +178,7 @@ type GetProductsNotFound struct {
func (o *GetProductsNotFound) Error() string {
return fmt.Sprintf("[GET /partner/products][%d] getProductsNotFound %+v", 404, o.Payload)
}
func (o *GetProductsNotFound) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -195,7 +200,7 @@ func NewGetProductsInternalServerError() *GetProductsInternalServerError {
return &GetProductsInternalServerError{}
}
/* GetProductsInternalServerError describes a response with status code 500, with default header values.
/*GetProductsInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -206,6 +211,7 @@ type GetProductsInternalServerError struct {
func (o *GetProductsInternalServerError) Error() string {
return fmt.Sprintf("[GET /partner/products][%d] getProductsInternalServerError %+v", 500, o.Payload)
}
func (o *GetProductsInternalServerError) GetPayload() *blaze_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,14 +29,11 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetProduct(params *GetProductParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProductOK, error)
GetProduct(params *GetProductParams, authInfo runtime.ClientAuthInfoWriter) (*GetProductOK, error)
GetProducts(params *GetProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProductsOK, error)
GetProducts(params *GetProductsParams, authInfo runtime.ClientAuthInfoWriter) (*GetProductsOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -44,12 +41,13 @@ type ClientService interface {
/*
GetProduct Get A Product
*/
func (a *Client) GetProduct(params *GetProductParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProductOK, error) {
func (a *Client) GetProduct(params *GetProductParams, authInfo runtime.ClientAuthInfoWriter) (*GetProductOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetProductParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getProduct",
Method: "GET",
PathPattern: "/partner/products/{productId}",
@ -61,12 +59,7 @@ func (a *Client) GetProduct(params *GetProductParams, authInfo runtime.ClientAut
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -83,12 +76,13 @@ func (a *Client) GetProduct(params *GetProductParams, authInfo runtime.ClientAut
/*
GetProducts Get All Products
*/
func (a *Client) GetProducts(params *GetProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProductsOK, error) {
func (a *Client) GetProducts(params *GetProductsParams, authInfo runtime.ClientAuthInfoWriter) (*GetProductsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetProductsParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getProducts",
Method: "GET",
PathPattern: "/partner/products",
@ -100,12 +94,7 @@ func (a *Client) GetProducts(params *GetProductsParams, authInfo runtime.ClientA
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -21,70 +21,68 @@ import (
"github.com/go-openapi/swag"
)
// NewGetPurchaseOrderListParams creates a new GetPurchaseOrderListParams 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.
// NewGetPurchaseOrderListParams creates a new GetPurchaseOrderListParams object
// with the default values initialized.
func NewGetPurchaseOrderListParams() *GetPurchaseOrderListParams {
var ()
return &GetPurchaseOrderListParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetPurchaseOrderListParamsWithTimeout creates a new GetPurchaseOrderListParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetPurchaseOrderListParamsWithTimeout(timeout time.Duration) *GetPurchaseOrderListParams {
var ()
return &GetPurchaseOrderListParams{
timeout: timeout,
}
}
// NewGetPurchaseOrderListParamsWithContext creates a new GetPurchaseOrderListParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetPurchaseOrderListParamsWithContext(ctx context.Context) *GetPurchaseOrderListParams {
var ()
return &GetPurchaseOrderListParams{
Context: ctx,
}
}
// NewGetPurchaseOrderListParamsWithHTTPClient creates a new GetPurchaseOrderListParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetPurchaseOrderListParamsWithHTTPClient(client *http.Client) *GetPurchaseOrderListParams {
var ()
return &GetPurchaseOrderListParams{
HTTPClient: client,
}
}
/* GetPurchaseOrderListParams contains all the parameters to send to the API endpoint
for the get purchase order list operation.
Typically these are written to a http.Request.
/*GetPurchaseOrderListParams contains all the parameters to send to the API endpoint
for the get purchase order list operation typically these are written to a http.Request
*/
type GetPurchaseOrderListParams struct {
/* EndDate.
/*EndDate
The end date of transaction query
*/
EndDate string
/* Limit.
/*Limit
The number of records to retrieve
*/
Limit *float64
/* Start.
/*Start
The starting record in multi-record retrievals
*/
Start *float64
/* StartDate.
/*StartDate
The start date of transaction query
*/
StartDate string
@ -93,21 +91,6 @@ type GetPurchaseOrderListParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get purchase order list params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetPurchaseOrderListParams) WithDefaults() *GetPurchaseOrderListParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get purchase order list params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetPurchaseOrderListParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get purchase order list params
func (o *GetPurchaseOrderListParams) WithTimeout(timeout time.Duration) *GetPurchaseOrderListParams {
o.SetTimeout(timeout)
@ -197,7 +180,6 @@ func (o *GetPurchaseOrderListParams) WriteToRequest(r runtime.ClientRequest, reg
qrEndDate := o.EndDate
qEndDate := qrEndDate
if qEndDate != "" {
if err := r.SetQueryParam("endDate", qEndDate); err != nil {
return err
}
@ -207,41 +189,38 @@ func (o *GetPurchaseOrderListParams) WriteToRequest(r runtime.ClientRequest, reg
// 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
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetPurchaseOrderListReader) ReadResponse(response runtime.ClientRespons
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetPurchaseOrderListOK() *GetPurchaseOrderListOK {
return &GetPurchaseOrderListOK{}
}
/* GetPurchaseOrderListOK describes a response with status code 200, with default header values.
/*GetPurchaseOrderListOK handles this case with default header values.
Shop was successfully retrieved
*/
@ -78,6 +79,7 @@ type GetPurchaseOrderListOK struct {
func (o *GetPurchaseOrderListOK) Error() string {
return fmt.Sprintf("[GET /partner/store/purchaseOrder/list][%d] getPurchaseOrderListOK %+v", 200, o.Payload)
}
func (o *GetPurchaseOrderListOK) GetPayload() *blaze_models.PurchaseOrderListResponse {
return o.Payload
}
@ -99,7 +101,7 @@ func NewGetPurchaseOrderListUnauthorized() *GetPurchaseOrderListUnauthorized {
return &GetPurchaseOrderListUnauthorized{}
}
/* GetPurchaseOrderListUnauthorized describes a response with status code 401, with default header values.
/*GetPurchaseOrderListUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -110,6 +112,7 @@ type GetPurchaseOrderListUnauthorized struct {
func (o *GetPurchaseOrderListUnauthorized) Error() string {
return fmt.Sprintf("[GET /partner/store/purchaseOrder/list][%d] getPurchaseOrderListUnauthorized %+v", 401, o.Payload)
}
func (o *GetPurchaseOrderListUnauthorized) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -131,7 +134,7 @@ func NewGetPurchaseOrderListForbidden() *GetPurchaseOrderListForbidden {
return &GetPurchaseOrderListForbidden{}
}
/* GetPurchaseOrderListForbidden describes a response with status code 403, with default header values.
/*GetPurchaseOrderListForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -142,6 +145,7 @@ type GetPurchaseOrderListForbidden struct {
func (o *GetPurchaseOrderListForbidden) Error() string {
return fmt.Sprintf("[GET /partner/store/purchaseOrder/list][%d] getPurchaseOrderListForbidden %+v", 403, o.Payload)
}
func (o *GetPurchaseOrderListForbidden) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -163,7 +167,7 @@ func NewGetPurchaseOrderListNotFound() *GetPurchaseOrderListNotFound {
return &GetPurchaseOrderListNotFound{}
}
/* GetPurchaseOrderListNotFound describes a response with status code 404, with default header values.
/*GetPurchaseOrderListNotFound handles this case with default header values.
Resource was not found
*/
@ -174,6 +178,7 @@ type GetPurchaseOrderListNotFound struct {
func (o *GetPurchaseOrderListNotFound) Error() string {
return fmt.Sprintf("[GET /partner/store/purchaseOrder/list][%d] getPurchaseOrderListNotFound %+v", 404, o.Payload)
}
func (o *GetPurchaseOrderListNotFound) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -195,7 +200,7 @@ func NewGetPurchaseOrderListInternalServerError() *GetPurchaseOrderListInternalS
return &GetPurchaseOrderListInternalServerError{}
}
/* GetPurchaseOrderListInternalServerError describes a response with status code 500, with default header values.
/*GetPurchaseOrderListInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -206,6 +211,7 @@ type GetPurchaseOrderListInternalServerError struct {
func (o *GetPurchaseOrderListInternalServerError) Error() string {
return fmt.Sprintf("[GET /partner/store/purchaseOrder/list][%d] getPurchaseOrderListInternalServerError %+v", 500, o.Payload)
}
func (o *GetPurchaseOrderListInternalServerError) GetPayload() *blaze_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,12 +29,9 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetPurchaseOrderList(params *GetPurchaseOrderListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPurchaseOrderListOK, error)
GetPurchaseOrderList(params *GetPurchaseOrderListParams, authInfo runtime.ClientAuthInfoWriter) (*GetPurchaseOrderListOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -42,12 +39,13 @@ type ClientService interface {
/*
GetPurchaseOrderList Get a list of purchase orders
*/
func (a *Client) GetPurchaseOrderList(params *GetPurchaseOrderListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPurchaseOrderListOK, error) {
func (a *Client) GetPurchaseOrderList(params *GetPurchaseOrderListParams, authInfo runtime.ClientAuthInfoWriter) (*GetPurchaseOrderListOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetPurchaseOrderListParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getPurchaseOrderList",
Method: "GET",
PathPattern: "/partner/store/purchaseOrder/list",
@ -59,12 +57,7 @@ func (a *Client) GetPurchaseOrderList(params *GetPurchaseOrderListParams, authIn
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,46 +20,47 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetShopParams creates a new GetShopParams 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.
// NewGetShopParams creates a new GetShopParams object
// with the default values initialized.
func NewGetShopParams() *GetShopParams {
return &GetShopParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetShopParamsWithTimeout creates a new GetShopParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetShopParamsWithTimeout(timeout time.Duration) *GetShopParams {
return &GetShopParams{
timeout: timeout,
}
}
// NewGetShopParamsWithContext creates a new GetShopParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetShopParamsWithContext(ctx context.Context) *GetShopParams {
return &GetShopParams{
Context: ctx,
}
}
// NewGetShopParamsWithHTTPClient creates a new GetShopParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetShopParamsWithHTTPClient(client *http.Client) *GetShopParams {
return &GetShopParams{
HTTPClient: client,
}
}
/* GetShopParams contains all the parameters to send to the API endpoint
for the get shop operation.
Typically these are written to a http.Request.
/*GetShopParams contains all the parameters to send to the API endpoint
for the get shop operation typically these are written to a http.Request
*/
type GetShopParams struct {
timeout time.Duration
@ -67,21 +68,6 @@ type GetShopParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get shop params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetShopParams) WithDefaults() *GetShopParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get shop params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetShopParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get shop params
func (o *GetShopParams) WithTimeout(timeout time.Duration) *GetShopParams {
o.SetTimeout(timeout)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetShopReader) ReadResponse(response runtime.ClientResponse, consumer r
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetShopOK() *GetShopOK {
return &GetShopOK{}
}
/* GetShopOK describes a response with status code 200, with default header values.
/*GetShopOK handles this case with default header values.
Shop was successfully retrieved
*/
@ -78,6 +79,7 @@ type GetShopOK struct {
func (o *GetShopOK) Error() string {
return fmt.Sprintf("[GET /partner/store][%d] getShopOK %+v", 200, o.Payload)
}
func (o *GetShopOK) GetPayload() *blaze_models.ShopResponse {
return o.Payload
}
@ -99,7 +101,7 @@ func NewGetShopUnauthorized() *GetShopUnauthorized {
return &GetShopUnauthorized{}
}
/* GetShopUnauthorized describes a response with status code 401, with default header values.
/*GetShopUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -110,6 +112,7 @@ type GetShopUnauthorized struct {
func (o *GetShopUnauthorized) Error() string {
return fmt.Sprintf("[GET /partner/store][%d] getShopUnauthorized %+v", 401, o.Payload)
}
func (o *GetShopUnauthorized) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -131,7 +134,7 @@ func NewGetShopForbidden() *GetShopForbidden {
return &GetShopForbidden{}
}
/* GetShopForbidden describes a response with status code 403, with default header values.
/*GetShopForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -142,6 +145,7 @@ type GetShopForbidden struct {
func (o *GetShopForbidden) Error() string {
return fmt.Sprintf("[GET /partner/store][%d] getShopForbidden %+v", 403, o.Payload)
}
func (o *GetShopForbidden) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -163,7 +167,7 @@ func NewGetShopNotFound() *GetShopNotFound {
return &GetShopNotFound{}
}
/* GetShopNotFound describes a response with status code 404, with default header values.
/*GetShopNotFound handles this case with default header values.
Resource was not found
*/
@ -174,6 +178,7 @@ type GetShopNotFound struct {
func (o *GetShopNotFound) Error() string {
return fmt.Sprintf("[GET /partner/store][%d] getShopNotFound %+v", 404, o.Payload)
}
func (o *GetShopNotFound) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -195,7 +200,7 @@ func NewGetShopInternalServerError() *GetShopInternalServerError {
return &GetShopInternalServerError{}
}
/* GetShopInternalServerError describes a response with status code 500, with default header values.
/*GetShopInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -206,6 +211,7 @@ type GetShopInternalServerError struct {
func (o *GetShopInternalServerError) Error() string {
return fmt.Sprintf("[GET /partner/store][%d] getShopInternalServerError %+v", 500, o.Payload)
}
func (o *GetShopInternalServerError) GetPayload() *blaze_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,12 +29,9 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetShop(params *GetShopParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetShopOK, error)
GetShop(params *GetShopParams, authInfo runtime.ClientAuthInfoWriter) (*GetShopOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -42,12 +39,13 @@ type ClientService interface {
/*
GetShop Get basic Shop parameters
*/
func (a *Client) GetShop(params *GetShopParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetShopOK, error) {
func (a *Client) GetShop(params *GetShopParams, authInfo runtime.ClientAuthInfoWriter) (*GetShopOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetShopParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getShop",
Method: "GET",
PathPattern: "/partner/store",
@ -59,12 +57,7 @@ func (a *Client) GetShop(params *GetShopParams, authInfo runtime.ClientAuthInfoW
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,52 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetTransactionByIDParams creates a new GetTransactionByIDParams 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.
// NewGetTransactionByIDParams creates a new GetTransactionByIDParams object
// with the default values initialized.
func NewGetTransactionByIDParams() *GetTransactionByIDParams {
var ()
return &GetTransactionByIDParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetTransactionByIDParamsWithTimeout creates a new GetTransactionByIDParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetTransactionByIDParamsWithTimeout(timeout time.Duration) *GetTransactionByIDParams {
var ()
return &GetTransactionByIDParams{
timeout: timeout,
}
}
// NewGetTransactionByIDParamsWithContext creates a new GetTransactionByIDParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetTransactionByIDParamsWithContext(ctx context.Context) *GetTransactionByIDParams {
var ()
return &GetTransactionByIDParams{
Context: ctx,
}
}
// NewGetTransactionByIDParamsWithHTTPClient creates a new GetTransactionByIDParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetTransactionByIDParamsWithHTTPClient(client *http.Client) *GetTransactionByIDParams {
var ()
return &GetTransactionByIDParams{
HTTPClient: client,
}
}
/* GetTransactionByIDParams contains all the parameters to send to the API endpoint
for the get transaction by Id operation.
Typically these are written to a http.Request.
/*GetTransactionByIDParams contains all the parameters to send to the API endpoint
for the get transaction by Id operation typically these are written to a http.Request
*/
type GetTransactionByIDParams struct {
/* ItemNumber.
/*ItemNumber
The Blaze Transaction Number
*/
ItemNumber string
@ -74,21 +75,6 @@ type GetTransactionByIDParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get transaction by Id params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTransactionByIDParams) WithDefaults() *GetTransactionByIDParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get transaction by Id params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTransactionByIDParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get transaction by Id params
func (o *GetTransactionByIDParams) WithTimeout(timeout time.Duration) *GetTransactionByIDParams {
o.SetTimeout(timeout)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetTransactionByIDReader) ReadResponse(response runtime.ClientResponse,
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetTransactionByIDOK() *GetTransactionByIDOK {
return &GetTransactionByIDOK{}
}
/* GetTransactionByIDOK describes a response with status code 200, with default header values.
/*GetTransactionByIDOK handles this case with default header values.
A Transaction was successfully retrieved
*/
@ -78,6 +79,7 @@ type GetTransactionByIDOK struct {
func (o *GetTransactionByIDOK) Error() string {
return fmt.Sprintf("[GET /partner/transactions/{itemNumber}][%d] getTransactionByIdOK %+v", 200, o.Payload)
}
func (o *GetTransactionByIDOK) GetPayload() *blaze_models.TransactionByIDResponse {
return o.Payload
}
@ -99,7 +101,7 @@ func NewGetTransactionByIDUnauthorized() *GetTransactionByIDUnauthorized {
return &GetTransactionByIDUnauthorized{}
}
/* GetTransactionByIDUnauthorized describes a response with status code 401, with default header values.
/*GetTransactionByIDUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -110,6 +112,7 @@ type GetTransactionByIDUnauthorized struct {
func (o *GetTransactionByIDUnauthorized) Error() string {
return fmt.Sprintf("[GET /partner/transactions/{itemNumber}][%d] getTransactionByIdUnauthorized %+v", 401, o.Payload)
}
func (o *GetTransactionByIDUnauthorized) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -131,7 +134,7 @@ func NewGetTransactionByIDForbidden() *GetTransactionByIDForbidden {
return &GetTransactionByIDForbidden{}
}
/* GetTransactionByIDForbidden describes a response with status code 403, with default header values.
/*GetTransactionByIDForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -142,6 +145,7 @@ type GetTransactionByIDForbidden struct {
func (o *GetTransactionByIDForbidden) Error() string {
return fmt.Sprintf("[GET /partner/transactions/{itemNumber}][%d] getTransactionByIdForbidden %+v", 403, o.Payload)
}
func (o *GetTransactionByIDForbidden) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -163,7 +167,7 @@ func NewGetTransactionByIDNotFound() *GetTransactionByIDNotFound {
return &GetTransactionByIDNotFound{}
}
/* GetTransactionByIDNotFound describes a response with status code 404, with default header values.
/*GetTransactionByIDNotFound handles this case with default header values.
Resource was not found
*/
@ -174,6 +178,7 @@ type GetTransactionByIDNotFound struct {
func (o *GetTransactionByIDNotFound) Error() string {
return fmt.Sprintf("[GET /partner/transactions/{itemNumber}][%d] getTransactionByIdNotFound %+v", 404, o.Payload)
}
func (o *GetTransactionByIDNotFound) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -195,7 +200,7 @@ func NewGetTransactionByIDInternalServerError() *GetTransactionByIDInternalServe
return &GetTransactionByIDInternalServerError{}
}
/* GetTransactionByIDInternalServerError describes a response with status code 500, with default header values.
/*GetTransactionByIDInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -206,6 +211,7 @@ type GetTransactionByIDInternalServerError struct {
func (o *GetTransactionByIDInternalServerError) Error() string {
return fmt.Sprintf("[GET /partner/transactions/{itemNumber}][%d] getTransactionByIdInternalServerError %+v", 500, o.Payload)
}
func (o *GetTransactionByIDInternalServerError) GetPayload() *blaze_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -21,70 +21,68 @@ import (
"github.com/go-openapi/swag"
)
// NewGetTransactionsParams creates a new GetTransactionsParams 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.
// 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 ability to set a timeout on a request.
// 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 ability to set a context for a request.
// 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 ability to set a custom HTTPClient for a request.
// 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.
/*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.
/*EndDate
The end date of transaction query
*/
EndDate string
/* Limit.
/*Limit
The number of records to retrieve
*/
Limit *float64
/* Start.
/*Start
The starting record in multi-record retrievals
*/
Start *float64
/* StartDate.
/*StartDate
The start date of transaction query
*/
StartDate string
@ -93,21 +91,6 @@ type GetTransactionsParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get transactions params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTransactionsParams) WithDefaults() *GetTransactionsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get transactions params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetTransactionsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get transactions params
func (o *GetTransactionsParams) WithTimeout(timeout time.Duration) *GetTransactionsParams {
o.SetTimeout(timeout)
@ -197,7 +180,6 @@ func (o *GetTransactionsParams) WriteToRequest(r runtime.ClientRequest, reg strf
qrEndDate := o.EndDate
qEndDate := qrEndDate
if qEndDate != "" {
if err := r.SetQueryParam("endDate", qEndDate); err != nil {
return err
}
@ -207,41 +189,38 @@ func (o *GetTransactionsParams) WriteToRequest(r runtime.ClientRequest, reg strf
// 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
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetTransactionsReader) ReadResponse(response runtime.ClientResponse, co
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetTransactionsOK() *GetTransactionsOK {
return &GetTransactionsOK{}
}
/* GetTransactionsOK describes a response with status code 200, with default header values.
/*GetTransactionsOK handles this case with default header values.
Transactions were successfully retrieved
*/
@ -78,6 +79,7 @@ type GetTransactionsOK struct {
func (o *GetTransactionsOK) Error() string {
return fmt.Sprintf("[GET /partner/transactions][%d] getTransactionsOK %+v", 200, o.Payload)
}
func (o *GetTransactionsOK) GetPayload() *blaze_models.TransactionsResponse {
return o.Payload
}
@ -99,7 +101,7 @@ func NewGetTransactionsUnauthorized() *GetTransactionsUnauthorized {
return &GetTransactionsUnauthorized{}
}
/* GetTransactionsUnauthorized describes a response with status code 401, with default header values.
/*GetTransactionsUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -110,6 +112,7 @@ type GetTransactionsUnauthorized struct {
func (o *GetTransactionsUnauthorized) Error() string {
return fmt.Sprintf("[GET /partner/transactions][%d] getTransactionsUnauthorized %+v", 401, o.Payload)
}
func (o *GetTransactionsUnauthorized) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -131,7 +134,7 @@ func NewGetTransactionsForbidden() *GetTransactionsForbidden {
return &GetTransactionsForbidden{}
}
/* GetTransactionsForbidden describes a response with status code 403, with default header values.
/*GetTransactionsForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -142,6 +145,7 @@ type GetTransactionsForbidden struct {
func (o *GetTransactionsForbidden) Error() string {
return fmt.Sprintf("[GET /partner/transactions][%d] getTransactionsForbidden %+v", 403, o.Payload)
}
func (o *GetTransactionsForbidden) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -163,7 +167,7 @@ func NewGetTransactionsNotFound() *GetTransactionsNotFound {
return &GetTransactionsNotFound{}
}
/* GetTransactionsNotFound describes a response with status code 404, with default header values.
/*GetTransactionsNotFound handles this case with default header values.
Resource was not found
*/
@ -174,6 +178,7 @@ type GetTransactionsNotFound struct {
func (o *GetTransactionsNotFound) Error() string {
return fmt.Sprintf("[GET /partner/transactions][%d] getTransactionsNotFound %+v", 404, o.Payload)
}
func (o *GetTransactionsNotFound) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -195,7 +200,7 @@ func NewGetTransactionsInternalServerError() *GetTransactionsInternalServerError
return &GetTransactionsInternalServerError{}
}
/* GetTransactionsInternalServerError describes a response with status code 500, with default header values.
/*GetTransactionsInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -206,6 +211,7 @@ type GetTransactionsInternalServerError struct {
func (o *GetTransactionsInternalServerError) Error() string {
return fmt.Sprintf("[GET /partner/transactions][%d] getTransactionsInternalServerError %+v", 500, o.Payload)
}
func (o *GetTransactionsInternalServerError) GetPayload() *blaze_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,14 +29,11 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetTransactionByID(params *GetTransactionByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTransactionByIDOK, error)
GetTransactionByID(params *GetTransactionByIDParams, authInfo runtime.ClientAuthInfoWriter) (*GetTransactionByIDOK, error)
GetTransactions(params *GetTransactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTransactionsOK, error)
GetTransactions(params *GetTransactionsParams, authInfo runtime.ClientAuthInfoWriter) (*GetTransactionsOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -44,12 +41,13 @@ type ClientService interface {
/*
GetTransactionByID Get a single transaction by ID
*/
func (a *Client) GetTransactionByID(params *GetTransactionByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTransactionByIDOK, error) {
func (a *Client) GetTransactionByID(params *GetTransactionByIDParams, authInfo runtime.ClientAuthInfoWriter) (*GetTransactionByIDOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetTransactionByIDParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getTransactionById",
Method: "GET",
PathPattern: "/partner/transactions/{itemNumber}",
@ -61,12 +59,7 @@ func (a *Client) GetTransactionByID(params *GetTransactionByIDParams, authInfo r
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -83,12 +76,13 @@ func (a *Client) GetTransactionByID(params *GetTransactionByIDParams, authInfo r
/*
GetTransactions Get a Range of Transactions
*/
func (a *Client) GetTransactions(params *GetTransactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetTransactionsOK, error) {
func (a *Client) GetTransactions(params *GetTransactionsParams, authInfo runtime.ClientAuthInfoWriter) (*GetTransactionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetTransactionsParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getTransactions",
Method: "GET",
PathPattern: "/partner/transactions",
@ -100,12 +94,7 @@ func (a *Client) GetTransactions(params *GetTransactionsParams, authInfo runtime
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,52 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetVendorParams creates a new GetVendorParams 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.
// NewGetVendorParams creates a new GetVendorParams object
// with the default values initialized.
func NewGetVendorParams() *GetVendorParams {
var ()
return &GetVendorParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetVendorParamsWithTimeout creates a new GetVendorParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetVendorParamsWithTimeout(timeout time.Duration) *GetVendorParams {
var ()
return &GetVendorParams{
timeout: timeout,
}
}
// NewGetVendorParamsWithContext creates a new GetVendorParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetVendorParamsWithContext(ctx context.Context) *GetVendorParams {
var ()
return &GetVendorParams{
Context: ctx,
}
}
// NewGetVendorParamsWithHTTPClient creates a new GetVendorParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetVendorParamsWithHTTPClient(client *http.Client) *GetVendorParams {
var ()
return &GetVendorParams{
HTTPClient: client,
}
}
/* GetVendorParams contains all the parameters to send to the API endpoint
for the get vendor operation.
Typically these are written to a http.Request.
/*GetVendorParams contains all the parameters to send to the API endpoint
for the get vendor operation typically these are written to a http.Request
*/
type GetVendorParams struct {
/* VendorID.
/*VendorID
The Blaze Vendor Object Id
*/
VendorID string
@ -74,21 +75,6 @@ type GetVendorParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get vendor params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetVendorParams) WithDefaults() *GetVendorParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get vendor params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetVendorParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get vendor params
func (o *GetVendorParams) WithTimeout(timeout time.Duration) *GetVendorParams {
o.SetTimeout(timeout)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -57,8 +57,9 @@ func (o *GetVendorReader) ReadResponse(response runtime.ClientResponse, consumer
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -67,7 +68,7 @@ func NewGetVendorOK() *GetVendorOK {
return &GetVendorOK{}
}
/* GetVendorOK describes a response with status code 200, with default header values.
/*GetVendorOK handles this case with default header values.
Product was successfully retrieved
*/
@ -78,6 +79,7 @@ type GetVendorOK struct {
func (o *GetVendorOK) Error() string {
return fmt.Sprintf("[GET /partner/vendors/{vendorId}][%d] getVendorOK %+v", 200, o.Payload)
}
func (o *GetVendorOK) GetPayload() *blaze_models.VendorResponse {
return o.Payload
}
@ -99,7 +101,7 @@ func NewGetVendorUnauthorized() *GetVendorUnauthorized {
return &GetVendorUnauthorized{}
}
/* GetVendorUnauthorized describes a response with status code 401, with default header values.
/*GetVendorUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -110,6 +112,7 @@ type GetVendorUnauthorized struct {
func (o *GetVendorUnauthorized) Error() string {
return fmt.Sprintf("[GET /partner/vendors/{vendorId}][%d] getVendorUnauthorized %+v", 401, o.Payload)
}
func (o *GetVendorUnauthorized) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -131,7 +134,7 @@ func NewGetVendorForbidden() *GetVendorForbidden {
return &GetVendorForbidden{}
}
/* GetVendorForbidden describes a response with status code 403, with default header values.
/*GetVendorForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -142,6 +145,7 @@ type GetVendorForbidden struct {
func (o *GetVendorForbidden) Error() string {
return fmt.Sprintf("[GET /partner/vendors/{vendorId}][%d] getVendorForbidden %+v", 403, o.Payload)
}
func (o *GetVendorForbidden) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -163,7 +167,7 @@ func NewGetVendorNotFound() *GetVendorNotFound {
return &GetVendorNotFound{}
}
/* GetVendorNotFound describes a response with status code 404, with default header values.
/*GetVendorNotFound handles this case with default header values.
Resource was not found
*/
@ -174,6 +178,7 @@ type GetVendorNotFound struct {
func (o *GetVendorNotFound) Error() string {
return fmt.Sprintf("[GET /partner/vendors/{vendorId}][%d] getVendorNotFound %+v", 404, o.Payload)
}
func (o *GetVendorNotFound) GetPayload() *blaze_models.Error {
return o.Payload
}
@ -195,7 +200,7 @@ func NewGetVendorInternalServerError() *GetVendorInternalServerError {
return &GetVendorInternalServerError{}
}
/* GetVendorInternalServerError describes a response with status code 500, with default header values.
/*GetVendorInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -206,6 +211,7 @@ type GetVendorInternalServerError struct {
func (o *GetVendorInternalServerError) Error() string {
return fmt.Sprintf("[GET /partner/vendors/{vendorId}][%d] getVendorInternalServerError %+v", 500, o.Payload)
}
func (o *GetVendorInternalServerError) GetPayload() *blaze_models.Error {
return o.Payload
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,12 +29,9 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetVendor(params *GetVendorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVendorOK, error)
GetVendor(params *GetVendorParams, authInfo runtime.ClientAuthInfoWriter) (*GetVendorOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -42,12 +39,13 @@ type ClientService interface {
/*
GetVendor Get A Vendor
*/
func (a *Client) GetVendor(params *GetVendorParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetVendorOK, error) {
func (a *Client) GetVendor(params *GetVendorParams, authInfo runtime.ClientAuthInfoWriter) (*GetVendorOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetVendorParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getVendor",
Method: "GET",
PathPattern: "/partner/vendors/{vendorId}",
@ -59,12 +57,7 @@ func (a *Client) GetVendor(params *GetVendorParams, authInfo runtime.ClientAuthI
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package blaze_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
@ -47,26 +45,22 @@ func (m *Error) Validate(formats strfmt.Registry) error {
}
func (m *Error) validateStatus(formats strfmt.Registry) error {
if swag.IsZero(m.Status) { // not required
return nil
}
if err := validate.MinimumInt("status", "body", m.Status, 100, false); err != nil {
if err := validate.MinimumInt("status", "body", int64(m.Status), 100, false); err != nil {
return err
}
if err := validate.MaximumInt("status", "body", m.Status, 600, false); err != nil {
if err := validate.MaximumInt("status", "body", int64(m.Status), 600, false); err != nil {
return err
}
return nil
}
// ContextValidate validates this error based on context it is used
func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Error) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package blaze_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
@ -87,21 +85,6 @@ func (m *InvalidError) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validate this invalid error based on the context it is used
func (m *InvalidError) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
// validation for a type composition with Error
if err := m.Error.ContextValidate(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// MarshalBinary interface implementation
func (m *InvalidError) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,7 +10,6 @@ package blaze_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@ -24,238 +23,183 @@ import (
type MemberResponse struct {
// active transaction
// Example: 0
ActiveTransaction float64 `json:"activeTransaction,omitempty"`
// address
Address *MemberResponseAddress `json:"address,omitempty"`
// addresses
// Example: ["string"]
Addresses []string `json:"addresses"`
// agreement expired
// Example: false
AgreementExpired bool `json:"agreementExpired,omitempty"`
// anonymous
// Example: false
Anonymous bool `json:"anonymous,omitempty"`
// ban patient
// Example: false
BanPatient bool `json:"banPatient,omitempty"`
// cannabis result
// Example: string
CannabisResult string `json:"cannabisResult,omitempty"`
// care giver list
// Example: ["string"]
CareGiverList []string `json:"careGiverList"`
// care givers
// Example: ["string"]
CareGivers []string `json:"careGivers"`
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// consumer type
// Example: AdultUse
ConsumerType string `json:"consumerType,omitempty"`
// consumer user Id
// Example: string
ConsumerUserID string `json:"consumerUserId,omitempty"`
// contracts
// Example: ["string"]
Contracts []string `json:"contracts"`
// created
// Example: 1554826014780
Created int64 `json:"created,omitempty"`
// current cannabis limit
// Example: string
CurrentCannabisLimit string `json:"currentCannabisLimit,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// dirty
// Example: false
Dirty bool `json:"dirty,omitempty"`
// dl expired
// Example: false
DlExpired bool `json:"dlExpired,omitempty"`
// dob
// Example: 631180800000
Dob float64 `json:"dob,omitempty"`
// email
// Example: hokus@taxnexus.net
Email string `json:"email,omitempty"`
// email opt in
// Example: true
EmailOptIn bool `json:"emailOptIn,omitempty"`
// email verified
// Example: false
EmailVerified bool `json:"emailVerified,omitempty"`
// enable loyalty
// Example: true
EnableLoyalty bool `json:"enableLoyalty,omitempty"`
// enabled care giver
// Example: false
EnabledCareGiver bool `json:"enabledCareGiver,omitempty"`
// exp statuses
// Example: ["string"]
ExpStatuses []string `json:"expStatuses"`
// first name
// Example: Hokus
FirstName string `json:"firstName,omitempty"`
// id
// Example: 5cacc31e6218d174d3f17b70
ID string `json:"id,omitempty"`
// identifications
Identifications []*MemberResponseIdentificationsItems0 `json:"identifications"`
// import Id
// Example: string
ImportID string `json:"importId,omitempty"`
// in queue
// Example: false
InQueue bool `json:"inQueue,omitempty"`
// last name
// Example: Pokus
LastName string `json:"lastName,omitempty"`
// last visit date
// Example: 1554826633661
LastVisitDate int64 `json:"lastVisitDate,omitempty"`
// lifetime points
// Example: 0
LifetimePoints float64 `json:"lifetimePoints,omitempty"`
// loyalty points
// Example: 0
LoyaltyPoints float64 `json:"loyaltyPoints,omitempty"`
// marketing source
MarketingSource string `json:"marketingSource,omitempty"`
// medical
// Example: false
Medical bool `json:"medical,omitempty"`
// member activities
// Example: ["string"]
MemberActivities []string `json:"memberActivities"`
// member group
MemberGroup *MemberResponseMemberGroup `json:"memberGroup,omitempty"`
// member group Id
// Example: 5cabd4ba6218d148395b404b
MemberGroupID string `json:"memberGroupId,omitempty"`
// middle name
// Example: string
MiddleName string `json:"middleName,omitempty"`
// modified
// Example: 1554826633661
Modified int64 `json:"modified,omitempty"`
// notes
// Example: ["string"]
Notes []string `json:"notes"`
// preferences
// Example: ["string"]
Preferences []string `json:"preferences"`
// primary phone
// Example: (510) 859-7000
PrimaryPhone string `json:"primaryPhone,omitempty"`
// qb customer ref
// Example: ["string"]
QbCustomerRef []string `json:"qbCustomerRef"`
// qb desktop customer ref
// Example: string
QbDesktopCustomerRef string `json:"qbDesktopCustomerRef,omitempty"`
// recent products
// Example: ["Binsky Flower","Tommy's Bong"]
RecentProducts []string `json:"recentProducts"`
// recommendation expired
// Example: true
RecommendationExpired bool `json:"recommendationExpired,omitempty"`
// recommendation expiry left
// Example: 0
RecommendationExpiryLeft float64 `json:"recommendationExpiryLeft,omitempty"`
// recommendations
Recommendations []*MemberResponseRecommendationsItems0 `json:"recommendations"`
// region Id
// Example: string
RegionID string `json:"regionId,omitempty"`
// search text
// Example: hokus pokus 5125 miles ave hokus@taxnexus.net (510) 859-7000 delivery
SearchText string `json:"searchText,omitempty"`
// sex
// Example: 0
Sex float64 `json:"sex,omitempty"`
// shop Id
// Example: 5cabd4ba6218d148395b4043
ShopID string `json:"shopId,omitempty"`
// start date
// Example: 1554826014781
StartDate int64 `json:"startDate,omitempty"`
// state cannabis limit
// Example: string
StateCannabisLimit string `json:"stateCannabisLimit,omitempty"`
// status
// Example: Active
Status string `json:"status,omitempty"`
// tags
// Example: ["string"]
Tags []string `json:"tags"`
// text opt in
// Example: true
TextOptIn bool `json:"textOptIn,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -286,6 +230,7 @@ func (m *MemberResponse) Validate(formats strfmt.Registry) error {
}
func (m *MemberResponse) validateAddress(formats strfmt.Registry) error {
if swag.IsZero(m.Address) { // not required
return nil
}
@ -303,6 +248,7 @@ func (m *MemberResponse) validateAddress(formats strfmt.Registry) error {
}
func (m *MemberResponse) validateIdentifications(formats strfmt.Registry) error {
if swag.IsZero(m.Identifications) { // not required
return nil
}
@ -327,6 +273,7 @@ func (m *MemberResponse) validateIdentifications(formats strfmt.Registry) error
}
func (m *MemberResponse) validateMemberGroup(formats strfmt.Registry) error {
if swag.IsZero(m.MemberGroup) { // not required
return nil
}
@ -344,6 +291,7 @@ func (m *MemberResponse) validateMemberGroup(formats strfmt.Registry) error {
}
func (m *MemberResponse) validateRecommendations(formats strfmt.Registry) error {
if swag.IsZero(m.Recommendations) { // not required
return nil
}
@ -367,96 +315,6 @@ func (m *MemberResponse) validateRecommendations(formats strfmt.Registry) error
return nil
}
// ContextValidate validate this member response based on the context it is used
func (m *MemberResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAddress(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateIdentifications(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMemberGroup(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateRecommendations(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *MemberResponse) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error {
if m.Address != nil {
if err := m.Address.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("address")
}
return err
}
}
return nil
}
func (m *MemberResponse) contextValidateIdentifications(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Identifications); i++ {
if m.Identifications[i] != nil {
if err := m.Identifications[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("identifications" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *MemberResponse) contextValidateMemberGroup(ctx context.Context, formats strfmt.Registry) error {
if m.MemberGroup != nil {
if err := m.MemberGroup.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("memberGroup")
}
return err
}
}
return nil
}
func (m *MemberResponse) contextValidateRecommendations(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Recommendations); i++ {
if m.Recommendations[i] != nil {
if err := m.Recommendations[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("recommendations" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *MemberResponse) MarshalBinary() ([]byte, error) {
if m == nil {
@ -481,47 +339,36 @@ func (m *MemberResponse) UnmarshalBinary(b []byte) error {
type MemberResponseAddress struct {
// address
// Example: 5125 Miles Ave
Address string `json:"address,omitempty"`
// city
// Example: Oakland
City string `json:"city,omitempty"`
// company Id
// Example: string
CompanyID string `json:"companyId,omitempty"`
// country
// Example: US
Country string `json:"country,omitempty"`
// created
// Example: 1554826014782
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// id
// Example: 5cacc31e6218d174d3f17b6d
ID string `json:"id,omitempty"`
// modified
// Example: 1554826014782
Modified int64 `json:"modified,omitempty"`
// state
// Example: CA
State string `json:"state,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
// zip code
// Example: 94618
ZipCode string `json:"zipCode,omitempty"`
}
@ -530,11 +377,6 @@ func (m *MemberResponseAddress) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this member response address based on context it is used
func (m *MemberResponseAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *MemberResponseAddress) MarshalBinary() ([]byte, error) {
if m == nil {
@ -562,47 +404,36 @@ type MemberResponseIdentificationsItems0 struct {
Assets []*MemberResponseIdentificationsItems0AssetsItems0 `json:"assets"`
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1554826014782
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// expiration date
// Example: 1577779200000
ExpirationDate int64 `json:"expirationDate,omitempty"`
// front photo
// Example: string
FrontPhoto string `json:"frontPhoto,omitempty"`
// id
// Example: 5cacc31e6218d174d3f17b6e
ID string `json:"id,omitempty"`
// license number
// Example: MYLICENSENUM
LicenseNumber string `json:"licenseNumber,omitempty"`
// modified
// Example: 1554826014782
Modified int64 `json:"modified,omitempty"`
// state
// Example: string
State string `json:"state,omitempty"`
// type
// Example: string
Type string `json:"type,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -621,6 +452,7 @@ func (m *MemberResponseIdentificationsItems0) Validate(formats strfmt.Registry)
}
func (m *MemberResponseIdentificationsItems0) validateAssets(formats strfmt.Registry) error {
if swag.IsZero(m.Assets) { // not required
return nil
}
@ -644,38 +476,6 @@ func (m *MemberResponseIdentificationsItems0) validateAssets(formats strfmt.Regi
return nil
}
// ContextValidate validate this member response identifications items0 based on the context it is used
func (m *MemberResponseIdentificationsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAssets(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *MemberResponseIdentificationsItems0) contextValidateAssets(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Assets); i++ {
if m.Assets[i] != nil {
if err := m.Assets[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *MemberResponseIdentificationsItems0) MarshalBinary() ([]byte, error) {
if m == nil {
@ -700,71 +500,54 @@ func (m *MemberResponseIdentificationsItems0) UnmarshalBinary(b []byte) error {
type MemberResponseIdentificationsItems0AssetsItems0 struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// asset type
// Example: Photo
AssetType string `json:"assetType,omitempty"`
// company Id
// Example: 5c7e8c7b722ed607e61edb06
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1556052368662
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// id
// Example: 5cbf79908a29f808183540e7
ID string `json:"id,omitempty"`
// key
// Example: c71adc95-bb07-47f2-b9f6-cc4db7936686.png
Key string `json:"key,omitempty"`
// large URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-800x800.png
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-1600x1600.png
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-500x500.png
MediumURL string `json:"mediumURL,omitempty"`
// modified
// Example: 1556052368662
Modified int64 `json:"modified,omitempty"`
// name
// Example: Brian Main DL.png
Name string `json:"name,omitempty"`
// priority
// Example: 0
Priority float64 `json:"priority,omitempty"`
// secured
// Example: true
Secured bool `json:"secured,omitempty"`
// thumb URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-200x200.png
ThumbURL string `json:"thumbURL,omitempty"`
// type
// Example: Photo
Type string `json:"type,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -773,11 +556,6 @@ func (m *MemberResponseIdentificationsItems0AssetsItems0) Validate(formats strfm
return nil
}
// ContextValidate validates this member response identifications items0 assets items0 based on context it is used
func (m *MemberResponseIdentificationsItems0AssetsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *MemberResponseIdentificationsItems0AssetsItems0) MarshalBinary() ([]byte, error) {
if m == nil {
@ -802,75 +580,57 @@ func (m *MemberResponseIdentificationsItems0AssetsItems0) UnmarshalBinary(b []by
type MemberResponseMemberGroup struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1554746451740
Created int64 `json:"created,omitempty"`
// default group
// Example: true
DefaultGroup bool `json:"defaultGroup,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// dirty
// Example: false
Dirty bool `json:"dirty,omitempty"`
// discount
// Example: 0
Discount float64 `json:"discount,omitempty"`
// discount type
// Example: Percentage
DiscountType string `json:"discountType,omitempty"`
// enable promotion
// Example: false
EnablePromotion bool `json:"enablePromotion,omitempty"`
// id
// Example: 5cabd4ba6218d148395b404b
ID string `json:"id,omitempty"`
// member count
// Example: 0
MemberCount float64 `json:"memberCount,omitempty"`
// member count email opt in
// Example: 0
MemberCountEmailOptIn float64 `json:"memberCountEmailOptIn,omitempty"`
// member count text opt in
// Example: 0
MemberCountTextOptIn float64 `json:"memberCountTextOptIn,omitempty"`
// modified
// Example: 1554824536062
Modified int64 `json:"modified,omitempty"`
// name
// Example: Delivery
Name string `json:"name,omitempty"`
// promotion Id
// Example: string
PromotionID string `json:"promotionId,omitempty"`
// shop Id
// Example: 5cabd4ba6218d148395b4043
ShopID string `json:"shopId,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -879,11 +639,6 @@ func (m *MemberResponseMemberGroup) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this member response member group based on context it is used
func (m *MemberResponseMemberGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *MemberResponseMemberGroup) MarshalBinary() ([]byte, error) {
if m == nil {
@ -911,71 +666,54 @@ type MemberResponseRecommendationsItems0 struct {
Assets []*MemberResponseRecommendationsItems0AssetsItems0 `json:"assets"`
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1554826014782
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// doctor
// Example: string
Doctor string `json:"doctor,omitempty"`
// doctor Id
// Example: string
DoctorID string `json:"doctorId,omitempty"`
// expiration date
// Example: string
ExpirationDate string `json:"expirationDate,omitempty"`
// front photo
// Example: string
FrontPhoto string `json:"frontPhoto,omitempty"`
// id
// Example: 5cacc31e6218d174d3f17b6f
ID string `json:"id,omitempty"`
// issue date
// Example: string
IssueDate string `json:"issueDate,omitempty"`
// modified
// Example: 1554826014782
Modified int64 `json:"modified,omitempty"`
// recommendation number
// Example: string
RecommendationNumber string `json:"recommendationNumber,omitempty"`
// state
// Example: string
State string `json:"state,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
// verified
// Example: false
Verified bool `json:"verified,omitempty"`
// verify method
// Example: MANUAL
VerifyMethod string `json:"verifyMethod,omitempty"`
// verify phone number
// Example: string
VerifyPhoneNumber string `json:"verifyPhoneNumber,omitempty"`
// verify website
// Example: string
VerifyWebsite string `json:"verifyWebsite,omitempty"`
}
@ -994,6 +732,7 @@ func (m *MemberResponseRecommendationsItems0) Validate(formats strfmt.Registry)
}
func (m *MemberResponseRecommendationsItems0) validateAssets(formats strfmt.Registry) error {
if swag.IsZero(m.Assets) { // not required
return nil
}
@ -1017,38 +756,6 @@ func (m *MemberResponseRecommendationsItems0) validateAssets(formats strfmt.Regi
return nil
}
// ContextValidate validate this member response recommendations items0 based on the context it is used
func (m *MemberResponseRecommendationsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAssets(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *MemberResponseRecommendationsItems0) contextValidateAssets(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Assets); i++ {
if m.Assets[i] != nil {
if err := m.Assets[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *MemberResponseRecommendationsItems0) MarshalBinary() ([]byte, error) {
if m == nil {
@ -1073,71 +780,54 @@ func (m *MemberResponseRecommendationsItems0) UnmarshalBinary(b []byte) error {
type MemberResponseRecommendationsItems0AssetsItems0 struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// asset type
// Example: Photo
AssetType string `json:"assetType,omitempty"`
// company Id
// Example: 5c7e8c7b722ed607e61edb06
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1556052368662
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// id
// Example: 5cbf79908a29f808183540e7
ID string `json:"id,omitempty"`
// key
// Example: c71adc95-bb07-47f2-b9f6-cc4db7936686.png
Key string `json:"key,omitempty"`
// large URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-800x800.png
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-1600x1600.png
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-500x500.png
MediumURL string `json:"mediumURL,omitempty"`
// modified
// Example: 1556052368662
Modified int64 `json:"modified,omitempty"`
// name
// Example: Brian Main DL.png
Name string `json:"name,omitempty"`
// priority
// Example: 0
Priority float64 `json:"priority,omitempty"`
// secured
// Example: true
Secured bool `json:"secured,omitempty"`
// thumb URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-200x200.png
ThumbURL string `json:"thumbURL,omitempty"`
// type
// Example: Photo
Type string `json:"type,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -1146,11 +836,6 @@ func (m *MemberResponseRecommendationsItems0AssetsItems0) Validate(formats strfm
return nil
}
// ContextValidate validates this member response recommendations items0 assets items0 based on context it is used
func (m *MemberResponseRecommendationsItems0AssetsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *MemberResponseRecommendationsItems0AssetsItems0) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,8 +10,6 @@ package blaze_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
@ -22,11 +20,9 @@ import (
type Message struct {
// code
// Example: 200
Code float64 `json:"code,omitempty"`
// message
// Example: successful operation
Message string `json:"message,omitempty"`
}
@ -35,11 +31,6 @@ func (m *Message) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this message based on context it is used
func (m *Message) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *Message) MarshalBinary() ([]byte, error) {
if m == nil {

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,7 +10,6 @@ package blaze_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@ -24,15 +23,12 @@ import (
type ProductsResponse struct {
// limit
// Example: 200
Limit float64 `json:"limit,omitempty"`
// skip
// Example: 0
Skip float64 `json:"skip,omitempty"`
// total
// Example: 2
Total float64 `json:"total,omitempty"`
// values
@ -54,6 +50,7 @@ func (m *ProductsResponse) Validate(formats strfmt.Registry) error {
}
func (m *ProductsResponse) validateValues(formats strfmt.Registry) error {
if swag.IsZero(m.Values) { // not required
return nil
}
@ -77,38 +74,6 @@ func (m *ProductsResponse) validateValues(formats strfmt.Registry) error {
return nil
}
// ContextValidate validate this products response based on the context it is used
func (m *ProductsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateValues(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductsResponse) contextValidateValues(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Values); i++ {
if m.Values[i] != nil {
if err := m.Values[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("values" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *ProductsResponse) MarshalBinary() ([]byte, error) {
if m == nil {
@ -133,267 +98,204 @@ func (m *ProductsResponse) UnmarshalBinary(b []byte) error {
type ProductsResponseValuesItems0 struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// assets
// Example: ["string"]
Assets []*ProductsResponseValuesItems0AssetsItems0 `json:"assets"`
// automatic re order
// Example: false
AutomaticReOrder bool `json:"automaticReOrder,omitempty"`
// brand
// Example: string
Brand string `json:"brand,omitempty"`
// brand Id
// Example: string
BrandID string `json:"brandId,omitempty"`
// bundle items
// Example: ["string"]
BundleItems []string `json:"bundleItems"`
// by gram
// Example: true
ByGram bool `json:"byGram,omitempty"`
// by prepackage
// Example: false
ByPrepackage bool `json:"byPrepackage,omitempty"`
// cannabis type
// Example: DEFAULT
CannabisType string `json:"cannabisType,omitempty"`
// category
Category *ProductsResponseValuesItems0Category `json:"category,omitempty"`
// category Id
// Example: 5cabd4ba6218d148395b405b
CategoryID string `json:"categoryId,omitempty"`
// cbd
// Example: 0
Cbd float64 `json:"cbd,omitempty"`
// cbda
// Example: 0
Cbda float64 `json:"cbda,omitempty"`
// cbn
// Example: 0
Cbn float64 `json:"cbn,omitempty"`
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// company link Id
// Example: VEIxMFBSTzE=
CompanyLinkID string `json:"companyLinkId,omitempty"`
// created
// Example: 1554825555219
Created int64 `json:"created,omitempty"`
// custom gram type
// Example: GRAM
CustomGramType string `json:"customGramType,omitempty"`
// custom tax info
// Example: string
CustomTaxInfo string `json:"customTaxInfo,omitempty"`
// custom weight
// Example: 0
CustomWeight float64 `json:"customWeight,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// description
Description string `json:"description,omitempty"`
// dirty
// Example: false
Dirty bool `json:"dirty,omitempty"`
// discountable
// Example: true
Discountable bool `json:"discountable,omitempty"`
// enable excise tax
// Example: false
EnableExciseTax bool `json:"enableExciseTax,omitempty"`
// enable mix match
// Example: false
EnableMixMatch bool `json:"enableMixMatch,omitempty"`
// enable weedmap
// Example: false
EnableWeedmap bool `json:"enableWeedmap,omitempty"`
// flower type
// Example: Sativa
FlowerType string `json:"flowerType,omitempty"`
// genetics
// Example: string
Genetics string `json:"genetics,omitempty"`
// id
// Example: 5cacc1536218d174d3f17b10
ID string `json:"id,omitempty"`
// import Id
// Example: string
ImportID string `json:"importId,omitempty"`
// import src
// Example: string
ImportSrc string `json:"importSrc,omitempty"`
// low inventory notification
// Example: false
LowInventoryNotification bool `json:"lowInventoryNotification,omitempty"`
// low threshold
// Example: 0
LowThreshold float64 `json:"lowThreshold,omitempty"`
// medical conditions
// Example: ["string"]
MedicalConditions []string `json:"medicalConditions"`
// medicinal
// Example: true
Medicinal bool `json:"medicinal,omitempty"`
// modified
// Example: 1554942857511
Modified int64 `json:"modified,omitempty"`
// name
// Example: Binsky Flower
Name string `json:"name,omitempty"`
// notes
// Example: ["string"]
Notes []string `json:"notes"`
// potency
// Example: false
Potency bool `json:"potency,omitempty"`
// potency amount
// Example: string
PotencyAmount string `json:"potencyAmount,omitempty"`
// price breaks
// Example: ["1234"]
PriceBreaks []string `json:"priceBreaks"`
// price includes a l excise
// Example: false
PriceIncludesALExcise bool `json:"priceIncludesALExcise,omitempty"`
// price includes excise
// Example: false
PriceIncludesExcise bool `json:"priceIncludesExcise,omitempty"`
// price ranges
PriceRanges []*ProductsResponseValuesItems0PriceRangesItems0 `json:"priceRanges"`
// pricing template Id
// Example: string
PricingTemplateID string `json:"pricingTemplateId,omitempty"`
// product sale type
// Example: Both
ProductSaleType string `json:"productSaleType,omitempty"`
// product type
// Example: REGULAR
ProductType string `json:"productType,omitempty"`
// qb desktop item ref
// Example: string
QbDesktopItemRef string `json:"qbDesktopItemRef,omitempty"`
// qb item ref
// Example: string
QbItemRef string `json:"qbItemRef,omitempty"`
// quantities
Quantities []*ProductsResponseValuesItems0QuantitiesItems0 `json:"quantities"`
// re order level
// Example: 0
ReOrderLevel float64 `json:"reOrderLevel,omitempty"`
// shop Id
// Example: 5cabd4ba6218d148395b4043
ShopID string `json:"shopId,omitempty"`
// show in widget
// Example: true
ShowInWidget bool `json:"showInWidget,omitempty"`
// sku
// Example: TB10PRO1
Sku string `json:"sku,omitempty"`
// tags
// Example: ["string"]
Tags []string `json:"tags"`
// tax order
// Example: PostTaxed
TaxOrder string `json:"taxOrder,omitempty"`
// tax tables
// Example: ["string"]
TaxTables []string `json:"taxTables"`
// tax type
// Example: Inherit
TaxType string `json:"taxType,omitempty"`
// thc
// Example: 0
Thc float64 `json:"thc,omitempty"`
// thca
// Example: 0
Thca float64 `json:"thca,omitempty"`
// unit price
// Example: 0
UnitPrice float64 `json:"unitPrice,omitempty"`
// unit value
// Example: 1
UnitValue float64 `json:"unitValue,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
// vendor
// Example: string
Vendor string `json:"vendor,omitempty"`
// vendor Id
// Example: 5cacc0c66218d174d3f17b0d
VendorID string `json:"vendorId,omitempty"`
// weight per unit
// Example: EACH
WeightPerUnit string `json:"weightPerUnit,omitempty"`
}
@ -424,6 +326,7 @@ func (m *ProductsResponseValuesItems0) Validate(formats strfmt.Registry) error {
}
func (m *ProductsResponseValuesItems0) validateAssets(formats strfmt.Registry) error {
if swag.IsZero(m.Assets) { // not required
return nil
}
@ -448,6 +351,7 @@ func (m *ProductsResponseValuesItems0) validateAssets(formats strfmt.Registry) e
}
func (m *ProductsResponseValuesItems0) validateCategory(formats strfmt.Registry) error {
if swag.IsZero(m.Category) { // not required
return nil
}
@ -465,6 +369,7 @@ func (m *ProductsResponseValuesItems0) validateCategory(formats strfmt.Registry)
}
func (m *ProductsResponseValuesItems0) validatePriceRanges(formats strfmt.Registry) error {
if swag.IsZero(m.PriceRanges) { // not required
return nil
}
@ -489,6 +394,7 @@ func (m *ProductsResponseValuesItems0) validatePriceRanges(formats strfmt.Regist
}
func (m *ProductsResponseValuesItems0) validateQuantities(formats strfmt.Registry) error {
if swag.IsZero(m.Quantities) { // not required
return nil
}
@ -512,100 +418,6 @@ func (m *ProductsResponseValuesItems0) validateQuantities(formats strfmt.Registr
return nil
}
// ContextValidate validate this products response values items0 based on the context it is used
func (m *ProductsResponseValuesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAssets(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateCategory(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidatePriceRanges(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateQuantities(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductsResponseValuesItems0) contextValidateAssets(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Assets); i++ {
if m.Assets[i] != nil {
if err := m.Assets[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductsResponseValuesItems0) contextValidateCategory(ctx context.Context, formats strfmt.Registry) error {
if m.Category != nil {
if err := m.Category.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("category")
}
return err
}
}
return nil
}
func (m *ProductsResponseValuesItems0) contextValidatePriceRanges(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.PriceRanges); i++ {
if m.PriceRanges[i] != nil {
if err := m.PriceRanges[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("priceRanges" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductsResponseValuesItems0) contextValidateQuantities(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Quantities); i++ {
if m.Quantities[i] != nil {
if err := m.Quantities[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("quantities" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *ProductsResponseValuesItems0) MarshalBinary() ([]byte, error) {
if m == nil {
@ -630,71 +442,54 @@ func (m *ProductsResponseValuesItems0) UnmarshalBinary(b []byte) error {
type ProductsResponseValuesItems0AssetsItems0 struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// asset type
// Example: Photo
AssetType string `json:"assetType,omitempty"`
// company Id
// Example: 5c7e8c7b722ed607e61edb06
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1556052368662
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// id
// Example: 5cbf79908a29f808183540e7
ID string `json:"id,omitempty"`
// key
// Example: c71adc95-bb07-47f2-b9f6-cc4db7936686.png
Key string `json:"key,omitempty"`
// large URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-800x800.png
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-1600x1600.png
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-500x500.png
MediumURL string `json:"mediumURL,omitempty"`
// modified
// Example: 1556052368662
Modified int64 `json:"modified,omitempty"`
// name
// Example: Brian Main DL.png
Name string `json:"name,omitempty"`
// priority
// Example: 0
Priority float64 `json:"priority,omitempty"`
// secured
// Example: true
Secured bool `json:"secured,omitempty"`
// thumb URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-200x200.png
ThumbURL string `json:"thumbURL,omitempty"`
// type
// Example: Photo
Type string `json:"type,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -703,11 +498,6 @@ func (m *ProductsResponseValuesItems0AssetsItems0) Validate(formats strfmt.Regis
return nil
}
// ContextValidate validates this products response values items0 assets items0 based on context it is used
func (m *ProductsResponseValuesItems0AssetsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductsResponseValuesItems0AssetsItems0) MarshalBinary() ([]byte, error) {
if m == nil {
@ -732,66 +522,51 @@ func (m *ProductsResponseValuesItems0AssetsItems0) UnmarshalBinary(b []byte) err
type ProductsResponseValuesItems0Category struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// cannabis
// Example: true
Cannabis bool `json:"cannabis,omitempty"`
// cannabis type
// Example: DEFAULT
CannabisType string `json:"cannabisType,omitempty"`
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1554764986388
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// dirty
// Example: false
Dirty bool `json:"dirty,omitempty"`
// id
// Example: 5cabd4ba6218d148395b405b
ID string `json:"id,omitempty"`
// low threshold
// Example: string
LowThreshold string `json:"lowThreshold,omitempty"`
// modified
// Example: 1554764986388
Modified int64 `json:"modified,omitempty"`
// name
// Example: Flowers
Name string `json:"name,omitempty"`
// photo
Photo *ProductsResponseValuesItems0CategoryPhoto `json:"photo,omitempty"`
// priority
// Example: 0
Priority float64 `json:"priority,omitempty"`
// shop Id
// Example: 5cabd4ba6218d148395b4043
ShopID string `json:"shopId,omitempty"`
// unit type
// Example: grams
UnitType string `json:"unitType,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -810,6 +585,7 @@ func (m *ProductsResponseValuesItems0Category) Validate(formats strfmt.Registry)
}
func (m *ProductsResponseValuesItems0Category) validatePhoto(formats strfmt.Registry) error {
if swag.IsZero(m.Photo) { // not required
return nil
}
@ -826,34 +602,6 @@ func (m *ProductsResponseValuesItems0Category) validatePhoto(formats strfmt.Regi
return nil
}
// ContextValidate validate this products response values items0 category based on the context it is used
func (m *ProductsResponseValuesItems0Category) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidatePhoto(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductsResponseValuesItems0Category) contextValidatePhoto(ctx context.Context, formats strfmt.Registry) error {
if m.Photo != nil {
if err := m.Photo.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("category" + "." + "photo")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *ProductsResponseValuesItems0Category) MarshalBinary() ([]byte, error) {
if m == nil {
@ -878,79 +626,60 @@ func (m *ProductsResponseValuesItems0Category) UnmarshalBinary(b []byte) error {
type ProductsResponseValuesItems0CategoryPhoto struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// asset type
// Example: Photo
AssetType string `json:"assetType,omitempty"`
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1554764986388
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// id
// Example: 5cabd4ba6218d148395b404f
ID string `json:"id,omitempty"`
// key
// Example: 420default-Flower.jpg
Key string `json:"key,omitempty"`
// large URL
// Example: string
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
// Example: string
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
// Example: string
MediumURL string `json:"mediumURL,omitempty"`
// modified
// Example: 1554764986388
Modified int64 `json:"modified,omitempty"`
// name
// Example: Flower.jpg
Name string `json:"name,omitempty"`
// orig URL
// Example: string
OrigURL string `json:"origURL,omitempty"`
// priority
// Example: 0
Priority float64 `json:"priority,omitempty"`
// public URL
// Example: https://s3.amazonaws.com/connect-files-public/420default-Flower.jpg
PublicURL string `json:"publicURL,omitempty"`
// secured
// Example: false
Secured bool `json:"secured,omitempty"`
// thumb URL
// Example: string
ThumbURL string `json:"thumbURL,omitempty"`
// type
// Example: Photo
Type string `json:"type,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -959,11 +688,6 @@ func (m *ProductsResponseValuesItems0CategoryPhoto) Validate(formats strfmt.Regi
return nil
}
// ContextValidate validates this products response values items0 category photo based on context it is used
func (m *ProductsResponseValuesItems0CategoryPhoto) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductsResponseValuesItems0CategoryPhoto) MarshalBinary() ([]byte, error) {
if m == nil {
@ -988,22 +712,18 @@ func (m *ProductsResponseValuesItems0CategoryPhoto) UnmarshalBinary(b []byte) er
type ProductsResponseValuesItems0PriceRangesItems0 struct {
// id
// Example: 5cacc1536218d174d3f17b10_5cabd4ba6218d148395b402e
ID string `json:"id,omitempty"`
// price
// Example: 10
Price float64 `json:"price,omitempty"`
// priority
// Example: 0
Priority float64 `json:"priority,omitempty"`
// weight tolerance
WeightTolerance *ProductsResponseValuesItems0PriceRangesItems0WeightTolerance `json:"weightTolerance,omitempty"`
// weight tolerance Id
// Example: 5cabd4ba6218d148395b402e
WeightToleranceID string `json:"weightToleranceId,omitempty"`
}
@ -1022,6 +742,7 @@ func (m *ProductsResponseValuesItems0PriceRangesItems0) Validate(formats strfmt.
}
func (m *ProductsResponseValuesItems0PriceRangesItems0) validateWeightTolerance(formats strfmt.Registry) error {
if swag.IsZero(m.WeightTolerance) { // not required
return nil
}
@ -1038,34 +759,6 @@ func (m *ProductsResponseValuesItems0PriceRangesItems0) validateWeightTolerance(
return nil
}
// ContextValidate validate this products response values items0 price ranges items0 based on the context it is used
func (m *ProductsResponseValuesItems0PriceRangesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateWeightTolerance(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductsResponseValuesItems0PriceRangesItems0) contextValidateWeightTolerance(ctx context.Context, formats strfmt.Registry) error {
if m.WeightTolerance != nil {
if err := m.WeightTolerance.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("weightTolerance")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *ProductsResponseValuesItems0PriceRangesItems0) MarshalBinary() ([]byte, error) {
if m == nil {
@ -1090,59 +783,45 @@ func (m *ProductsResponseValuesItems0PriceRangesItems0) UnmarshalBinary(b []byte
type ProductsResponseValuesItems0PriceRangesItems0WeightTolerance struct {
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1554746451739
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// enabled
// Example: true
Enabled bool `json:"enabled,omitempty"`
// end weight
// Example: 0.6
EndWeight float64 `json:"endWeight,omitempty"`
// id
// Example: 5cabd4ba6218d148395b402e
ID string `json:"id,omitempty"`
// modified
// Example: 1554746451739
Modified int64 `json:"modified,omitempty"`
// name
// Example: .5 Gram
Name string `json:"name,omitempty"`
// priority
// Example: 0
Priority float64 `json:"priority,omitempty"`
// start weight
// Example: 0.5
StartWeight float64 `json:"startWeight,omitempty"`
// unit value
// Example: 0.5
UnitValue float64 `json:"unitValue,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
// weight key
// Example: HALF_GRAM
WeightKey string `json:"weightKey,omitempty"`
// weight value
// Example: 0.5
WeightValue float64 `json:"weightValue,omitempty"`
}
@ -1151,11 +830,6 @@ func (m *ProductsResponseValuesItems0PriceRangesItems0WeightTolerance) Validate(
return nil
}
// ContextValidate validates this products response values items0 price ranges items0 weight tolerance based on context it is used
func (m *ProductsResponseValuesItems0PriceRangesItems0WeightTolerance) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductsResponseValuesItems0PriceRangesItems0WeightTolerance) MarshalBinary() ([]byte, error) {
if m == nil {
@ -1180,43 +854,33 @@ func (m *ProductsResponseValuesItems0PriceRangesItems0WeightTolerance) Unmarshal
type ProductsResponseValuesItems0QuantitiesItems0 struct {
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1554825661504
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// dirty
// Example: false
Dirty bool `json:"dirty,omitempty"`
// id
// Example: 5cacc1bd6218d174d3f17b38
ID string `json:"id,omitempty"`
// inventory Id
// Example: 5cabd4ba6218d148395b4067
InventoryID string `json:"inventoryId,omitempty"`
// modified
// Example: 1554825661504
Modified int64 `json:"modified,omitempty"`
// quantity
// Example: 890
Quantity float64 `json:"quantity,omitempty"`
// shop Id
// Example: 5cabd4ba6218d148395b4043
ShopID string `json:"shopId,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -1225,11 +889,6 @@ func (m *ProductsResponseValuesItems0QuantitiesItems0) Validate(formats strfmt.R
return nil
}
// ContextValidate validates this products response values items0 quantities items0 based on context it is used
func (m *ProductsResponseValuesItems0QuantitiesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductsResponseValuesItems0QuantitiesItems0) MarshalBinary() ([]byte, error) {
if m == nil {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -10,7 +10,6 @@ package blaze_models
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
@ -24,62 +23,48 @@ import (
type VendorResponse struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// additional address list
// Example: ["string"]
AdditionalAddressList []string `json:"additionalAddressList"`
// address
Address *VendorResponseAddress `json:"address,omitempty"`
// arms length type
// Example: ARMS_LENGTH
ArmsLengthType string `json:"armsLengthType,omitempty"`
// assets
// Example: ["string"]
Assets []*VendorResponseAssetsItems0 `json:"assets"`
// back order enabled
// Example: false
BackOrderEnabled bool `json:"backOrderEnabled,omitempty"`
// brand list
// Example: ["string"]
BrandList []string `json:"brandList"`
// brands
// Example: ["string"]
Brands []string `json:"brands"`
// company Id
// Example: 5cabd4ba6218d148395b402c
CompanyID string `json:"companyId,omitempty"`
// company licenses
// Example: ["string"]
CompanyLicenses []string `json:"companyLicenses"`
// company type
// Example: string
CompanyType string `json:"companyType,omitempty"`
// created
// Example: 1554825414778
Created int64 `json:"created,omitempty"`
// credits
// Example: 0
Credits float64 `json:"credits,omitempty"`
// dba name
// Example: string
DbaName string `json:"dbaName,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// description
@ -95,68 +80,54 @@ type VendorResponse struct {
FirstName string `json:"firstName,omitempty"`
// id
// Example: 5cacc0c66218d174d3f17b0d
ID string `json:"id,omitempty"`
// import Id
// Example: string
ImportID string `json:"importId,omitempty"`
// last name
LastName string `json:"lastName,omitempty"`
// licence type
// Example: string
LicenceType string `json:"licenceType,omitempty"`
// license expiration date
// Example: 0
LicenseExpirationDate float64 `json:"licenseExpirationDate,omitempty"`
// license number
LicenseNumber string `json:"licenseNumber,omitempty"`
// mobile number
// Example: string
MobileNumber string `json:"mobileNumber,omitempty"`
// modified
// Example: 1554825414778
Modified int64 `json:"modified,omitempty"`
// name
// Example: Binsky
Name string `json:"name,omitempty"`
// notes
// Example: ["string"]
Notes []string `json:"notes"`
// phone
Phone string `json:"phone,omitempty"`
// qb desktop ref
// Example: string
QbDesktopRef string `json:"qbDesktopRef,omitempty"`
// qb vendor ref
// Example: ["string"]
QbVendorRef []string `json:"qbVendorRef"`
// related entity
// Example: false
RelatedEntity bool `json:"relatedEntity,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
// vendor key
// Example: NWNhYmQ0YmE2MjE4ZDE0ODM5NWI0MDJjX2JpbnNreQ==
VendorKey string `json:"vendorKey,omitempty"`
// vendor type
// Example: VENDOR
VendorType string `json:"vendorType,omitempty"`
// website
@ -182,6 +153,7 @@ func (m *VendorResponse) Validate(formats strfmt.Registry) error {
}
func (m *VendorResponse) validateAddress(formats strfmt.Registry) error {
if swag.IsZero(m.Address) { // not required
return nil
}
@ -199,6 +171,7 @@ func (m *VendorResponse) validateAddress(formats strfmt.Registry) error {
}
func (m *VendorResponse) validateAssets(formats strfmt.Registry) error {
if swag.IsZero(m.Assets) { // not required
return nil
}
@ -222,56 +195,6 @@ func (m *VendorResponse) validateAssets(formats strfmt.Registry) error {
return nil
}
// ContextValidate validate this vendor response based on the context it is used
func (m *VendorResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAddress(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateAssets(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *VendorResponse) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error {
if m.Address != nil {
if err := m.Address.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("address")
}
return err
}
}
return nil
}
func (m *VendorResponse) contextValidateAssets(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Assets); i++ {
if m.Assets[i] != nil {
if err := m.Assets[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *VendorResponse) MarshalBinary() ([]byte, error) {
if m == nil {
@ -302,34 +225,27 @@ type VendorResponseAddress struct {
City string `json:"city,omitempty"`
// company Id
// Example: string
CompanyID string `json:"companyId,omitempty"`
// country
// Example: US
Country string `json:"country,omitempty"`
// created
// Example: 1554825414778
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// id
// Example: 5cacc0c66218d174d3f17b0c
ID string `json:"id,omitempty"`
// modified
// Example: 1554825414778
Modified int64 `json:"modified,omitempty"`
// state
State string `json:"state,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
// zip code
@ -341,11 +257,6 @@ func (m *VendorResponseAddress) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this vendor response address based on context it is used
func (m *VendorResponseAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *VendorResponseAddress) MarshalBinary() ([]byte, error) {
if m == nil {
@ -370,71 +281,54 @@ func (m *VendorResponseAddress) UnmarshalBinary(b []byte) error {
type VendorResponseAssetsItems0 struct {
// active
// Example: true
Active bool `json:"active,omitempty"`
// asset type
// Example: Photo
AssetType string `json:"assetType,omitempty"`
// company Id
// Example: 5c7e8c7b722ed607e61edb06
CompanyID string `json:"companyId,omitempty"`
// created
// Example: 1556052368662
Created int64 `json:"created,omitempty"`
// deleted
// Example: false
Deleted bool `json:"deleted,omitempty"`
// id
// Example: 5cbf79908a29f808183540e7
ID string `json:"id,omitempty"`
// key
// Example: c71adc95-bb07-47f2-b9f6-cc4db7936686.png
Key string `json:"key,omitempty"`
// large URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-800x800.png
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-1600x1600.png
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-500x500.png
MediumURL string `json:"mediumURL,omitempty"`
// modified
// Example: 1556052368662
Modified int64 `json:"modified,omitempty"`
// name
// Example: Brian Main DL.png
Name string `json:"name,omitempty"`
// priority
// Example: 0
Priority float64 `json:"priority,omitempty"`
// secured
// Example: true
Secured bool `json:"secured,omitempty"`
// thumb URL
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-200x200.png
ThumbURL string `json:"thumbURL,omitempty"`
// type
// Example: Photo
Type string `json:"type,omitempty"`
// updated
// Example: false
Updated bool `json:"updated,omitempty"`
}
@ -443,11 +337,6 @@ func (m *VendorResponseAssetsItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this vendor response assets items0 based on context it is used
func (m *VendorResponseAssetsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *VendorResponseAssetsItems0) MarshalBinary() ([]byte, error) {
if m == nil {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,20 +29,17 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
DeleteAccount(params *DeleteAccountParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAccountOK, error)
DeleteAccount(params *DeleteAccountParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteAccountOK, error)
GetAccounts(params *GetAccountsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountsOK, error)
GetAccounts(params *GetAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountsOK, error)
GetAccountsObservable(params *GetAccountsObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountsObservableOK, error)
GetAccountsObservable(params *GetAccountsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountsObservableOK, error)
PostAccounts(params *PostAccountsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAccountsOK, error)
PostAccounts(params *PostAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PostAccountsOK, error)
PutAccount(params *PutAccountParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutAccountOK, error)
PutAccount(params *PutAccountParams, authInfo runtime.ClientAuthInfoWriter) (*PutAccountOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -52,12 +49,13 @@ type ClientService interface {
Delete Taxnexus Account record
*/
func (a *Client) DeleteAccount(params *DeleteAccountParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteAccountOK, error) {
func (a *Client) DeleteAccount(params *DeleteAccountParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteAccountOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteAccountParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "deleteAccount",
Method: "DELETE",
PathPattern: "/accounts",
@ -69,12 +67,7 @@ func (a *Client) DeleteAccount(params *DeleteAccountParams, authInfo runtime.Cli
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -93,12 +86,13 @@ func (a *Client) DeleteAccount(params *DeleteAccountParams, authInfo runtime.Cli
Return a list of all available Accounts
*/
func (a *Client) GetAccounts(params *GetAccountsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountsOK, error) {
func (a *Client) GetAccounts(params *GetAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetAccountsParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getAccounts",
Method: "GET",
PathPattern: "/accounts",
@ -110,12 +104,7 @@ func (a *Client) GetAccounts(params *GetAccountsParams, authInfo runtime.ClientA
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -134,12 +123,13 @@ func (a *Client) GetAccounts(params *GetAccountsParams, authInfo runtime.ClientA
A list of accounts in a simple JSON array
*/
func (a *Client) GetAccountsObservable(params *GetAccountsObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAccountsObservableOK, error) {
func (a *Client) GetAccountsObservable(params *GetAccountsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountsObservableOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetAccountsObservableParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getAccountsObservable",
Method: "GET",
PathPattern: "/accounts/observable",
@ -151,12 +141,7 @@ func (a *Client) GetAccountsObservable(params *GetAccountsObservableParams, auth
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -175,12 +160,13 @@ func (a *Client) GetAccountsObservable(params *GetAccountsObservableParams, auth
Account record to be added
*/
func (a *Client) PostAccounts(params *PostAccountsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAccountsOK, error) {
func (a *Client) PostAccounts(params *PostAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PostAccountsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostAccountsParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "postAccounts",
Method: "POST",
PathPattern: "/accounts",
@ -192,12 +178,7 @@ func (a *Client) PostAccounts(params *PostAccountsParams, authInfo runtime.Clien
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -216,12 +197,13 @@ func (a *Client) PostAccounts(params *PostAccountsParams, authInfo runtime.Clien
Update a single account specified by accountId
*/
func (a *Client) PutAccount(params *PutAccountParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutAccountOK, error) {
func (a *Client) PutAccount(params *PutAccountParams, authInfo runtime.ClientAuthInfoWriter) (*PutAccountOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPutAccountParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "putAccount",
Method: "PUT",
PathPattern: "/accounts",
@ -233,12 +215,7 @@ func (a *Client) PutAccount(params *PutAccountParams, authInfo runtime.ClientAut
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,52 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewDeleteAccountParams creates a new DeleteAccountParams 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.
// NewDeleteAccountParams creates a new DeleteAccountParams object
// with the default values initialized.
func NewDeleteAccountParams() *DeleteAccountParams {
var ()
return &DeleteAccountParams{
timeout: cr.DefaultTimeout,
}
}
// NewDeleteAccountParamsWithTimeout creates a new DeleteAccountParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewDeleteAccountParamsWithTimeout(timeout time.Duration) *DeleteAccountParams {
var ()
return &DeleteAccountParams{
timeout: timeout,
}
}
// NewDeleteAccountParamsWithContext creates a new DeleteAccountParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewDeleteAccountParamsWithContext(ctx context.Context) *DeleteAccountParams {
var ()
return &DeleteAccountParams{
Context: ctx,
}
}
// NewDeleteAccountParamsWithHTTPClient creates a new DeleteAccountParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewDeleteAccountParamsWithHTTPClient(client *http.Client) *DeleteAccountParams {
var ()
return &DeleteAccountParams{
HTTPClient: client,
}
}
/* DeleteAccountParams contains all the parameters to send to the API endpoint
for the delete account operation.
Typically these are written to a http.Request.
/*DeleteAccountParams contains all the parameters to send to the API endpoint
for the delete account operation typically these are written to a http.Request
*/
type DeleteAccountParams struct {
/* AccountID.
/*AccountID
Taxnexus Record Id of an Account
*/
AccountID *string
@ -74,21 +75,6 @@ type DeleteAccountParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the delete account params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteAccountParams) WithDefaults() *DeleteAccountParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the delete account params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteAccountParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the delete account params
func (o *DeleteAccountParams) WithTimeout(timeout time.Duration) *DeleteAccountParams {
o.SetTimeout(timeout)
@ -145,17 +131,16 @@ func (o *DeleteAccountParams) WriteToRequest(r runtime.ClientRequest, reg strfmt
// query param accountId
var qrAccountID string
if o.AccountID != nil {
qrAccountID = *o.AccountID
}
qAccountID := qrAccountID
if qAccountID != "" {
if err := r.SetQueryParam("accountId", qAccountID); err != nil {
return err
}
}
}
if len(res) > 0 {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *DeleteAccountReader) ReadResponse(response runtime.ClientResponse, cons
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,7 +74,7 @@ func NewDeleteAccountOK() *DeleteAccountOK {
return &DeleteAccountOK{}
}
/* DeleteAccountOK describes a response with status code 200, with default header values.
/*DeleteAccountOK handles this case with default header values.
Taxnexus Response with Message Objects with Delete Status
*/
@ -86,18 +87,15 @@ type DeleteAccountOK struct {
func (o *DeleteAccountOK) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountOK %+v", 200, o.Payload)
}
func (o *DeleteAccountOK) GetPayload() *crm_models.DeleteResponse {
return o.Payload
}
func (o *DeleteAccountOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.DeleteResponse)
@ -114,7 +112,7 @@ func NewDeleteAccountUnauthorized() *DeleteAccountUnauthorized {
return &DeleteAccountUnauthorized{}
}
/* DeleteAccountUnauthorized describes a response with status code 401, with default header values.
/*DeleteAccountUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -127,18 +125,15 @@ type DeleteAccountUnauthorized struct {
func (o *DeleteAccountUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnauthorized %+v", 401, o.Payload)
}
func (o *DeleteAccountUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAccountUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -155,7 +150,7 @@ func NewDeleteAccountForbidden() *DeleteAccountForbidden {
return &DeleteAccountForbidden{}
}
/* DeleteAccountForbidden describes a response with status code 403, with default header values.
/*DeleteAccountForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -168,18 +163,15 @@ type DeleteAccountForbidden struct {
func (o *DeleteAccountForbidden) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountForbidden %+v", 403, o.Payload)
}
func (o *DeleteAccountForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAccountForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -196,7 +188,7 @@ func NewDeleteAccountNotFound() *DeleteAccountNotFound {
return &DeleteAccountNotFound{}
}
/* DeleteAccountNotFound describes a response with status code 404, with default header values.
/*DeleteAccountNotFound handles this case with default header values.
Resource was not found
*/
@ -209,18 +201,15 @@ type DeleteAccountNotFound struct {
func (o *DeleteAccountNotFound) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountNotFound %+v", 404, o.Payload)
}
func (o *DeleteAccountNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAccountNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -237,7 +226,7 @@ func NewDeleteAccountUnprocessableEntity() *DeleteAccountUnprocessableEntity {
return &DeleteAccountUnprocessableEntity{}
}
/* DeleteAccountUnprocessableEntity describes a response with status code 422, with default header values.
/*DeleteAccountUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -250,18 +239,15 @@ type DeleteAccountUnprocessableEntity struct {
func (o *DeleteAccountUnprocessableEntity) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnprocessableEntity %+v", 422, o.Payload)
}
func (o *DeleteAccountUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAccountUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -278,7 +264,7 @@ func NewDeleteAccountInternalServerError() *DeleteAccountInternalServerError {
return &DeleteAccountInternalServerError{}
}
/* DeleteAccountInternalServerError describes a response with status code 500, with default header values.
/*DeleteAccountInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -291,18 +277,15 @@ type DeleteAccountInternalServerError struct {
func (o *DeleteAccountInternalServerError) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountInternalServerError %+v", 500, o.Payload)
}
func (o *DeleteAccountInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAccountInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -21,70 +21,68 @@ import (
"github.com/go-openapi/swag"
)
// NewGetAccountsObservableParams creates a new GetAccountsObservableParams 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.
// NewGetAccountsObservableParams creates a new GetAccountsObservableParams object
// with the default values initialized.
func NewGetAccountsObservableParams() *GetAccountsObservableParams {
var ()
return &GetAccountsObservableParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetAccountsObservableParamsWithTimeout creates a new GetAccountsObservableParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetAccountsObservableParamsWithTimeout(timeout time.Duration) *GetAccountsObservableParams {
var ()
return &GetAccountsObservableParams{
timeout: timeout,
}
}
// NewGetAccountsObservableParamsWithContext creates a new GetAccountsObservableParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetAccountsObservableParamsWithContext(ctx context.Context) *GetAccountsObservableParams {
var ()
return &GetAccountsObservableParams{
Context: ctx,
}
}
// NewGetAccountsObservableParamsWithHTTPClient creates a new GetAccountsObservableParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetAccountsObservableParamsWithHTTPClient(client *http.Client) *GetAccountsObservableParams {
var ()
return &GetAccountsObservableParams{
HTTPClient: client,
}
}
/* GetAccountsObservableParams contains all the parameters to send to the API endpoint
for the get accounts observable operation.
Typically these are written to a http.Request.
/*GetAccountsObservableParams contains all the parameters to send to the API endpoint
for the get accounts observable operation typically these are written to a http.Request
*/
type GetAccountsObservableParams struct {
/* AccountID.
/*AccountID
Taxnexus Record Id of an Account
*/
AccountID *string
/* Active.
/*Active
Only retrieve active records?
*/
Active *bool
/* Email.
/*Email
Email address used for identity lookup
*/
Email *string
/* Name.
/*Name
The Name of this Object
*/
Name *string
@ -93,21 +91,6 @@ type GetAccountsObservableParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get accounts observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetAccountsObservableParams) WithDefaults() *GetAccountsObservableParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get accounts observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetAccountsObservableParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get accounts observable params
func (o *GetAccountsObservableParams) WithTimeout(timeout time.Duration) *GetAccountsObservableParams {
o.SetTimeout(timeout)
@ -197,68 +180,64 @@ func (o *GetAccountsObservableParams) WriteToRequest(r runtime.ClientRequest, re
// query param accountId
var qrAccountID string
if o.AccountID != nil {
qrAccountID = *o.AccountID
}
qAccountID := qrAccountID
if qAccountID != "" {
if err := r.SetQueryParam("accountId", qAccountID); err != nil {
return err
}
}
}
if o.Active != nil {
// query param active
var qrActive bool
if o.Active != nil {
qrActive = *o.Active
}
qActive := swag.FormatBool(qrActive)
if qActive != "" {
if err := r.SetQueryParam("active", qActive); err != nil {
return err
}
}
}
if o.Email != nil {
// query param email
var qrEmail string
if o.Email != nil {
qrEmail = *o.Email
}
qEmail := qrEmail
if qEmail != "" {
if err := r.SetQueryParam("email", qEmail); err != nil {
return err
}
}
}
if o.Name != nil {
// query param name
var qrName string
if o.Name != nil {
qrName = *o.Name
}
qName := qrName
if qName != "" {
if err := r.SetQueryParam("name", qName); err != nil {
return err
}
}
}
if len(res) > 0 {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *GetAccountsObservableReader) ReadResponse(response runtime.ClientRespon
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,12 +74,13 @@ func NewGetAccountsObservableOK() *GetAccountsObservableOK {
return &GetAccountsObservableOK{}
}
/* GetAccountsObservableOK describes a response with status code 200, with default header values.
/*GetAccountsObservableOK handles this case with default header values.
Taxnexus Response with an array of Account objects
*/
type GetAccountsObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload []*crm_models.Account
@ -87,25 +89,18 @@ type GetAccountsObservableOK struct {
func (o *GetAccountsObservableOK) Error() string {
return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableOK %+v", 200, o.Payload)
}
func (o *GetAccountsObservableOK) GetPayload() []*crm_models.Account {
return o.Payload
}
func (o *GetAccountsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
@ -120,7 +115,7 @@ func NewGetAccountsObservableUnauthorized() *GetAccountsObservableUnauthorized {
return &GetAccountsObservableUnauthorized{}
}
/* GetAccountsObservableUnauthorized describes a response with status code 401, with default header values.
/*GetAccountsObservableUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -133,18 +128,15 @@ type GetAccountsObservableUnauthorized struct {
func (o *GetAccountsObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetAccountsObservableUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -161,7 +153,7 @@ func NewGetAccountsObservableForbidden() *GetAccountsObservableForbidden {
return &GetAccountsObservableForbidden{}
}
/* GetAccountsObservableForbidden describes a response with status code 403, with default header values.
/*GetAccountsObservableForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -174,18 +166,15 @@ type GetAccountsObservableForbidden struct {
func (o *GetAccountsObservableForbidden) Error() string {
return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableForbidden %+v", 403, o.Payload)
}
func (o *GetAccountsObservableForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -202,7 +191,7 @@ func NewGetAccountsObservableNotFound() *GetAccountsObservableNotFound {
return &GetAccountsObservableNotFound{}
}
/* GetAccountsObservableNotFound describes a response with status code 404, with default header values.
/*GetAccountsObservableNotFound handles this case with default header values.
Resource was not found
*/
@ -215,18 +204,15 @@ type GetAccountsObservableNotFound struct {
func (o *GetAccountsObservableNotFound) Error() string {
return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableNotFound %+v", 404, o.Payload)
}
func (o *GetAccountsObservableNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -243,7 +229,7 @@ func NewGetAccountsObservableUnprocessableEntity() *GetAccountsObservableUnproce
return &GetAccountsObservableUnprocessableEntity{}
}
/* GetAccountsObservableUnprocessableEntity describes a response with status code 422, with default header values.
/*GetAccountsObservableUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -256,18 +242,15 @@ type GetAccountsObservableUnprocessableEntity struct {
func (o *GetAccountsObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetAccountsObservableUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -284,7 +267,7 @@ func NewGetAccountsObservableInternalServerError() *GetAccountsObservableInterna
return &GetAccountsObservableInternalServerError{}
}
/* GetAccountsObservableInternalServerError describes a response with status code 500, with default header values.
/*GetAccountsObservableInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -297,18 +280,15 @@ type GetAccountsObservableInternalServerError struct {
func (o *GetAccountsObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetAccountsObservableInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -21,86 +21,78 @@ import (
"github.com/go-openapi/swag"
)
// NewGetAccountsParams creates a new GetAccountsParams 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.
// NewGetAccountsParams creates a new GetAccountsParams object
// with the default values initialized.
func NewGetAccountsParams() *GetAccountsParams {
var ()
return &GetAccountsParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetAccountsParamsWithTimeout creates a new GetAccountsParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetAccountsParamsWithTimeout(timeout time.Duration) *GetAccountsParams {
var ()
return &GetAccountsParams{
timeout: timeout,
}
}
// NewGetAccountsParamsWithContext creates a new GetAccountsParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetAccountsParamsWithContext(ctx context.Context) *GetAccountsParams {
var ()
return &GetAccountsParams{
Context: ctx,
}
}
// NewGetAccountsParamsWithHTTPClient creates a new GetAccountsParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetAccountsParamsWithHTTPClient(client *http.Client) *GetAccountsParams {
var ()
return &GetAccountsParams{
HTTPClient: client,
}
}
/* GetAccountsParams contains all the parameters to send to the API endpoint
for the get accounts operation.
Typically these are written to a http.Request.
/*GetAccountsParams contains all the parameters to send to the API endpoint
for the get accounts operation typically these are written to a http.Request
*/
type GetAccountsParams struct {
/* AccountID.
/*AccountID
Taxnexus Record Id of an Account
*/
AccountID *string
/* Active.
/*Active
Only retrieve active records?
*/
Active *bool
/* Email.
/*Email
Email address used for identity lookup
*/
Email *string
/* Limit.
/*Limit
How many objects to return at one time
Format: int64
*/
Limit *int64
/* Name.
/*Name
The Name of this Object
*/
Name *string
/* Offset.
/*Offset
How many objects to skip?
Format: int64
*/
Offset *int64
@ -109,21 +101,6 @@ type GetAccountsParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get accounts params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetAccountsParams) WithDefaults() *GetAccountsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get accounts params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetAccountsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get accounts params
func (o *GetAccountsParams) WithTimeout(timeout time.Duration) *GetAccountsParams {
o.SetTimeout(timeout)
@ -235,102 +212,96 @@ func (o *GetAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R
// query param accountId
var qrAccountID string
if o.AccountID != nil {
qrAccountID = *o.AccountID
}
qAccountID := qrAccountID
if qAccountID != "" {
if err := r.SetQueryParam("accountId", qAccountID); err != nil {
return err
}
}
}
if o.Active != nil {
// query param active
var qrActive bool
if o.Active != nil {
qrActive = *o.Active
}
qActive := swag.FormatBool(qrActive)
if qActive != "" {
if err := r.SetQueryParam("active", qActive); err != nil {
return err
}
}
}
if o.Email != nil {
// query param email
var qrEmail string
if o.Email != nil {
qrEmail = *o.Email
}
qEmail := qrEmail
if qEmail != "" {
if err := r.SetQueryParam("email", qEmail); err != nil {
return err
}
}
}
if o.Limit != nil {
// query param limit
var qrLimit int64
if o.Limit != nil {
qrLimit = *o.Limit
}
qLimit := swag.FormatInt64(qrLimit)
if qLimit != "" {
if err := r.SetQueryParam("limit", qLimit); err != nil {
return err
}
}
}
if o.Name != nil {
// query param name
var qrName string
if o.Name != nil {
qrName = *o.Name
}
qName := qrName
if qName != "" {
if err := r.SetQueryParam("name", qName); err != nil {
return err
}
}
}
if o.Offset != nil {
// query param offset
var qrOffset int64
if o.Offset != nil {
qrOffset = *o.Offset
}
qOffset := swag.FormatInt64(qrOffset)
if qOffset != "" {
if err := r.SetQueryParam("offset", qOffset); err != nil {
return err
}
}
}
if len(res) > 0 {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *GetAccountsReader) ReadResponse(response runtime.ClientResponse, consum
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,12 +74,13 @@ func NewGetAccountsOK() *GetAccountsOK {
return &GetAccountsOK{}
}
/* GetAccountsOK describes a response with status code 200, with default header values.
/*GetAccountsOK handles this case with default header values.
Taxnexus Response with Account objects with Contacts
*/
type GetAccountsOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *crm_models.AccountResponse
@ -87,25 +89,18 @@ type GetAccountsOK struct {
func (o *GetAccountsOK) Error() string {
return fmt.Sprintf("[GET /accounts][%d] getAccountsOK %+v", 200, o.Payload)
}
func (o *GetAccountsOK) GetPayload() *crm_models.AccountResponse {
return o.Payload
}
func (o *GetAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
o.Payload = new(crm_models.AccountResponse)
@ -122,7 +117,7 @@ func NewGetAccountsUnauthorized() *GetAccountsUnauthorized {
return &GetAccountsUnauthorized{}
}
/* GetAccountsUnauthorized describes a response with status code 401, with default header values.
/*GetAccountsUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -135,18 +130,15 @@ type GetAccountsUnauthorized struct {
func (o *GetAccountsUnauthorized) Error() string {
return fmt.Sprintf("[GET /accounts][%d] getAccountsUnauthorized %+v", 401, o.Payload)
}
func (o *GetAccountsUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -163,7 +155,7 @@ func NewGetAccountsForbidden() *GetAccountsForbidden {
return &GetAccountsForbidden{}
}
/* GetAccountsForbidden describes a response with status code 403, with default header values.
/*GetAccountsForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -176,18 +168,15 @@ type GetAccountsForbidden struct {
func (o *GetAccountsForbidden) Error() string {
return fmt.Sprintf("[GET /accounts][%d] getAccountsForbidden %+v", 403, o.Payload)
}
func (o *GetAccountsForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -204,7 +193,7 @@ func NewGetAccountsNotFound() *GetAccountsNotFound {
return &GetAccountsNotFound{}
}
/* GetAccountsNotFound describes a response with status code 404, with default header values.
/*GetAccountsNotFound handles this case with default header values.
Resource was not found
*/
@ -217,18 +206,15 @@ type GetAccountsNotFound struct {
func (o *GetAccountsNotFound) Error() string {
return fmt.Sprintf("[GET /accounts][%d] getAccountsNotFound %+v", 404, o.Payload)
}
func (o *GetAccountsNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -245,7 +231,7 @@ func NewGetAccountsUnprocessableEntity() *GetAccountsUnprocessableEntity {
return &GetAccountsUnprocessableEntity{}
}
/* GetAccountsUnprocessableEntity describes a response with status code 422, with default header values.
/*GetAccountsUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -258,18 +244,15 @@ type GetAccountsUnprocessableEntity struct {
func (o *GetAccountsUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /accounts][%d] getAccountsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetAccountsUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -286,7 +269,7 @@ func NewGetAccountsInternalServerError() *GetAccountsInternalServerError {
return &GetAccountsInternalServerError{}
}
/* GetAccountsInternalServerError describes a response with status code 500, with default header values.
/*GetAccountsInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -299,18 +282,15 @@ type GetAccountsInternalServerError struct {
func (o *GetAccountsInternalServerError) Error() string {
return fmt.Sprintf("[GET /accounts][%d] getAccountsInternalServerError %+v", 500, o.Payload)
}
func (o *GetAccountsInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -22,52 +22,53 @@ import (
"code.tnxs.net/taxnexus/lib/api/crm/crm_models"
)
// NewPostAccountsParams creates a new PostAccountsParams 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.
// NewPostAccountsParams creates a new PostAccountsParams object
// with the default values initialized.
func NewPostAccountsParams() *PostAccountsParams {
var ()
return &PostAccountsParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostAccountsParamsWithTimeout creates a new PostAccountsParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewPostAccountsParamsWithTimeout(timeout time.Duration) *PostAccountsParams {
var ()
return &PostAccountsParams{
timeout: timeout,
}
}
// NewPostAccountsParamsWithContext creates a new PostAccountsParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewPostAccountsParamsWithContext(ctx context.Context) *PostAccountsParams {
var ()
return &PostAccountsParams{
Context: ctx,
}
}
// NewPostAccountsParamsWithHTTPClient creates a new PostAccountsParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPostAccountsParamsWithHTTPClient(client *http.Client) *PostAccountsParams {
var ()
return &PostAccountsParams{
HTTPClient: client,
}
}
/* PostAccountsParams contains all the parameters to send to the API endpoint
for the post accounts operation.
Typically these are written to a http.Request.
/*PostAccountsParams contains all the parameters to send to the API endpoint
for the post accounts operation typically these are written to a http.Request
*/
type PostAccountsParams struct {
/* AccountRequest.
/*AccountRequest
An array of new Account records
*/
AccountRequest *crm_models.AccountRequest
@ -76,21 +77,6 @@ type PostAccountsParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post accounts params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostAccountsParams) WithDefaults() *PostAccountsParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post accounts params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostAccountsParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post accounts params
func (o *PostAccountsParams) WithTimeout(timeout time.Duration) *PostAccountsParams {
o.SetTimeout(timeout)
@ -142,6 +128,7 @@ func (o *PostAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.
return err
}
var res []error
if o.AccountRequest != nil {
if err := r.SetBodyParam(o.AccountRequest); err != nil {
return err

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *PostAccountsReader) ReadResponse(response runtime.ClientResponse, consu
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,12 +74,13 @@ func NewPostAccountsOK() *PostAccountsOK {
return &PostAccountsOK{}
}
/* PostAccountsOK describes a response with status code 200, with default header values.
/*PostAccountsOK handles this case with default header values.
Taxnexus Response with Account objects with Contacts
*/
type PostAccountsOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *crm_models.AccountResponse
@ -87,25 +89,18 @@ type PostAccountsOK struct {
func (o *PostAccountsOK) Error() string {
return fmt.Sprintf("[POST /accounts][%d] postAccountsOK %+v", 200, o.Payload)
}
func (o *PostAccountsOK) GetPayload() *crm_models.AccountResponse {
return o.Payload
}
func (o *PostAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
o.Payload = new(crm_models.AccountResponse)
@ -122,7 +117,7 @@ func NewPostAccountsUnauthorized() *PostAccountsUnauthorized {
return &PostAccountsUnauthorized{}
}
/* PostAccountsUnauthorized describes a response with status code 401, with default header values.
/*PostAccountsUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -135,18 +130,15 @@ type PostAccountsUnauthorized struct {
func (o *PostAccountsUnauthorized) Error() string {
return fmt.Sprintf("[POST /accounts][%d] postAccountsUnauthorized %+v", 401, o.Payload)
}
func (o *PostAccountsUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -163,7 +155,7 @@ func NewPostAccountsForbidden() *PostAccountsForbidden {
return &PostAccountsForbidden{}
}
/* PostAccountsForbidden describes a response with status code 403, with default header values.
/*PostAccountsForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -176,18 +168,15 @@ type PostAccountsForbidden struct {
func (o *PostAccountsForbidden) Error() string {
return fmt.Sprintf("[POST /accounts][%d] postAccountsForbidden %+v", 403, o.Payload)
}
func (o *PostAccountsForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -204,7 +193,7 @@ func NewPostAccountsNotFound() *PostAccountsNotFound {
return &PostAccountsNotFound{}
}
/* PostAccountsNotFound describes a response with status code 404, with default header values.
/*PostAccountsNotFound handles this case with default header values.
Resource was not found
*/
@ -217,18 +206,15 @@ type PostAccountsNotFound struct {
func (o *PostAccountsNotFound) Error() string {
return fmt.Sprintf("[POST /accounts][%d] postAccountsNotFound %+v", 404, o.Payload)
}
func (o *PostAccountsNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -245,7 +231,7 @@ func NewPostAccountsUnprocessableEntity() *PostAccountsUnprocessableEntity {
return &PostAccountsUnprocessableEntity{}
}
/* PostAccountsUnprocessableEntity describes a response with status code 422, with default header values.
/*PostAccountsUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -258,18 +244,15 @@ type PostAccountsUnprocessableEntity struct {
func (o *PostAccountsUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /accounts][%d] postAccountsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostAccountsUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -286,7 +269,7 @@ func NewPostAccountsInternalServerError() *PostAccountsInternalServerError {
return &PostAccountsInternalServerError{}
}
/* PostAccountsInternalServerError describes a response with status code 500, with default header values.
/*PostAccountsInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -299,18 +282,15 @@ type PostAccountsInternalServerError struct {
func (o *PostAccountsInternalServerError) Error() string {
return fmt.Sprintf("[POST /accounts][%d] postAccountsInternalServerError %+v", 500, o.Payload)
}
func (o *PostAccountsInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -22,52 +22,53 @@ import (
"code.tnxs.net/taxnexus/lib/api/crm/crm_models"
)
// NewPutAccountParams creates a new PutAccountParams 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.
// NewPutAccountParams creates a new PutAccountParams object
// with the default values initialized.
func NewPutAccountParams() *PutAccountParams {
var ()
return &PutAccountParams{
timeout: cr.DefaultTimeout,
}
}
// NewPutAccountParamsWithTimeout creates a new PutAccountParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewPutAccountParamsWithTimeout(timeout time.Duration) *PutAccountParams {
var ()
return &PutAccountParams{
timeout: timeout,
}
}
// NewPutAccountParamsWithContext creates a new PutAccountParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewPutAccountParamsWithContext(ctx context.Context) *PutAccountParams {
var ()
return &PutAccountParams{
Context: ctx,
}
}
// NewPutAccountParamsWithHTTPClient creates a new PutAccountParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPutAccountParamsWithHTTPClient(client *http.Client) *PutAccountParams {
var ()
return &PutAccountParams{
HTTPClient: client,
}
}
/* PutAccountParams contains all the parameters to send to the API endpoint
for the put account operation.
Typically these are written to a http.Request.
/*PutAccountParams contains all the parameters to send to the API endpoint
for the put account operation typically these are written to a http.Request
*/
type PutAccountParams struct {
/* AccountRequest.
/*AccountRequest
An array of new Account records
*/
AccountRequest *crm_models.AccountRequest
@ -76,21 +77,6 @@ type PutAccountParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the put account params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutAccountParams) WithDefaults() *PutAccountParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the put account params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PutAccountParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the put account params
func (o *PutAccountParams) WithTimeout(timeout time.Duration) *PutAccountParams {
o.SetTimeout(timeout)
@ -142,6 +128,7 @@ func (o *PutAccountParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re
return err
}
var res []error
if o.AccountRequest != nil {
if err := r.SetBodyParam(o.AccountRequest); err != nil {
return err

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *PutAccountReader) ReadResponse(response runtime.ClientResponse, consume
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,12 +74,13 @@ func NewPutAccountOK() *PutAccountOK {
return &PutAccountOK{}
}
/* PutAccountOK describes a response with status code 200, with default header values.
/*PutAccountOK handles this case with default header values.
Taxnexus Response with Account objects with Contacts
*/
type PutAccountOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *crm_models.AccountResponse
@ -87,25 +89,18 @@ type PutAccountOK struct {
func (o *PutAccountOK) Error() string {
return fmt.Sprintf("[PUT /accounts][%d] putAccountOK %+v", 200, o.Payload)
}
func (o *PutAccountOK) GetPayload() *crm_models.AccountResponse {
return o.Payload
}
func (o *PutAccountOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
o.Payload = new(crm_models.AccountResponse)
@ -122,7 +117,7 @@ func NewPutAccountUnauthorized() *PutAccountUnauthorized {
return &PutAccountUnauthorized{}
}
/* PutAccountUnauthorized describes a response with status code 401, with default header values.
/*PutAccountUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -135,18 +130,15 @@ type PutAccountUnauthorized struct {
func (o *PutAccountUnauthorized) Error() string {
return fmt.Sprintf("[PUT /accounts][%d] putAccountUnauthorized %+v", 401, o.Payload)
}
func (o *PutAccountUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PutAccountUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -163,7 +155,7 @@ func NewPutAccountForbidden() *PutAccountForbidden {
return &PutAccountForbidden{}
}
/* PutAccountForbidden describes a response with status code 403, with default header values.
/*PutAccountForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -176,18 +168,15 @@ type PutAccountForbidden struct {
func (o *PutAccountForbidden) Error() string {
return fmt.Sprintf("[PUT /accounts][%d] putAccountForbidden %+v", 403, o.Payload)
}
func (o *PutAccountForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PutAccountForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -204,7 +193,7 @@ func NewPutAccountNotFound() *PutAccountNotFound {
return &PutAccountNotFound{}
}
/* PutAccountNotFound describes a response with status code 404, with default header values.
/*PutAccountNotFound handles this case with default header values.
Resource was not found
*/
@ -217,18 +206,15 @@ type PutAccountNotFound struct {
func (o *PutAccountNotFound) Error() string {
return fmt.Sprintf("[PUT /accounts][%d] putAccountNotFound %+v", 404, o.Payload)
}
func (o *PutAccountNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PutAccountNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -245,7 +231,7 @@ func NewPutAccountUnprocessableEntity() *PutAccountUnprocessableEntity {
return &PutAccountUnprocessableEntity{}
}
/* PutAccountUnprocessableEntity describes a response with status code 422, with default header values.
/*PutAccountUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -258,18 +244,15 @@ type PutAccountUnprocessableEntity struct {
func (o *PutAccountUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /accounts][%d] putAccountUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PutAccountUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PutAccountUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -286,7 +269,7 @@ func NewPutAccountInternalServerError() *PutAccountInternalServerError {
return &PutAccountInternalServerError{}
}
/* PutAccountInternalServerError describes a response with status code 500, with default header values.
/*PutAccountInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -299,18 +282,15 @@ type PutAccountInternalServerError struct {
func (o *PutAccountInternalServerError) Error() string {
return fmt.Sprintf("[PUT /accounts][%d] putAccountInternalServerError %+v", 500, o.Payload)
}
func (o *PutAccountInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PutAccountInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,16 +29,13 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompaniesOK, error)
GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCompaniesOK, error)
GetCompaniesObservable(params *GetCompaniesObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompaniesObservableOK, error)
GetCompaniesObservable(params *GetCompaniesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCompaniesObservableOK, error)
PostCompanies(params *PostCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCompaniesOK, error)
PostCompanies(params *PostCompaniesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCompaniesOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -48,12 +45,13 @@ type ClientService interface {
Retrieve Company records from the datastore
*/
func (a *Client) GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompaniesOK, error) {
func (a *Client) GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCompaniesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetCompaniesParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getCompanies",
Method: "GET",
PathPattern: "/companies",
@ -65,12 +63,7 @@ func (a *Client) GetCompanies(params *GetCompaniesParams, authInfo runtime.Clien
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -89,12 +82,13 @@ func (a *Client) GetCompanies(params *GetCompaniesParams, authInfo runtime.Clien
A list of companies in a simple JSON array
*/
func (a *Client) GetCompaniesObservable(params *GetCompaniesObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompaniesObservableOK, error) {
func (a *Client) GetCompaniesObservable(params *GetCompaniesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCompaniesObservableOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetCompaniesObservableParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getCompaniesObservable",
Method: "GET",
PathPattern: "/companies/observable",
@ -106,12 +100,7 @@ func (a *Client) GetCompaniesObservable(params *GetCompaniesObservableParams, au
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -130,12 +119,13 @@ func (a *Client) GetCompaniesObservable(params *GetCompaniesObservableParams, au
Add new companies
*/
func (a *Client) PostCompanies(params *PostCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCompaniesOK, error) {
func (a *Client) PostCompanies(params *PostCompaniesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCompaniesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostCompaniesParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "postCompanies",
Method: "POST",
PathPattern: "/companies",
@ -147,12 +137,7 @@ func (a *Client) PostCompanies(params *PostCompaniesParams, authInfo runtime.Cli
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,52 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetCompaniesObservableParams creates a new GetCompaniesObservableParams 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.
// NewGetCompaniesObservableParams creates a new GetCompaniesObservableParams object
// with the default values initialized.
func NewGetCompaniesObservableParams() *GetCompaniesObservableParams {
var ()
return &GetCompaniesObservableParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetCompaniesObservableParamsWithTimeout creates a new GetCompaniesObservableParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetCompaniesObservableParamsWithTimeout(timeout time.Duration) *GetCompaniesObservableParams {
var ()
return &GetCompaniesObservableParams{
timeout: timeout,
}
}
// NewGetCompaniesObservableParamsWithContext creates a new GetCompaniesObservableParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetCompaniesObservableParamsWithContext(ctx context.Context) *GetCompaniesObservableParams {
var ()
return &GetCompaniesObservableParams{
Context: ctx,
}
}
// NewGetCompaniesObservableParamsWithHTTPClient creates a new GetCompaniesObservableParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetCompaniesObservableParamsWithHTTPClient(client *http.Client) *GetCompaniesObservableParams {
var ()
return &GetCompaniesObservableParams{
HTTPClient: client,
}
}
/* GetCompaniesObservableParams contains all the parameters to send to the API endpoint
for the get companies observable operation.
Typically these are written to a http.Request.
/*GetCompaniesObservableParams contains all the parameters to send to the API endpoint
for the get companies observable operation typically these are written to a http.Request
*/
type GetCompaniesObservableParams struct {
/* CompanyID.
/*CompanyID
Taxnexus Company record ID
*/
CompanyID *string
@ -74,21 +75,6 @@ type GetCompaniesObservableParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get companies observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetCompaniesObservableParams) WithDefaults() *GetCompaniesObservableParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get companies observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetCompaniesObservableParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get companies observable params
func (o *GetCompaniesObservableParams) WithTimeout(timeout time.Duration) *GetCompaniesObservableParams {
o.SetTimeout(timeout)
@ -145,17 +131,16 @@ func (o *GetCompaniesObservableParams) WriteToRequest(r runtime.ClientRequest, r
// query param companyId
var qrCompanyID string
if o.CompanyID != nil {
qrCompanyID = *o.CompanyID
}
qCompanyID := qrCompanyID
if qCompanyID != "" {
if err := r.SetQueryParam("companyId", qCompanyID); err != nil {
return err
}
}
}
if len(res) > 0 {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *GetCompaniesObservableReader) ReadResponse(response runtime.ClientRespo
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,12 +74,13 @@ func NewGetCompaniesObservableOK() *GetCompaniesObservableOK {
return &GetCompaniesObservableOK{}
}
/* GetCompaniesObservableOK describes a response with status code 200, with default header values.
/*GetCompaniesObservableOK handles this case with default header values.
Taxnexus Response with an array of Company objects
*/
type GetCompaniesObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload []*crm_models.Company
@ -87,25 +89,18 @@ type GetCompaniesObservableOK struct {
func (o *GetCompaniesObservableOK) Error() string {
return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableOK %+v", 200, o.Payload)
}
func (o *GetCompaniesObservableOK) GetPayload() []*crm_models.Company {
return o.Payload
}
func (o *GetCompaniesObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
@ -120,7 +115,7 @@ func NewGetCompaniesObservableUnauthorized() *GetCompaniesObservableUnauthorized
return &GetCompaniesObservableUnauthorized{}
}
/* GetCompaniesObservableUnauthorized describes a response with status code 401, with default header values.
/*GetCompaniesObservableUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -133,18 +128,15 @@ type GetCompaniesObservableUnauthorized struct {
func (o *GetCompaniesObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetCompaniesObservableUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -161,7 +153,7 @@ func NewGetCompaniesObservableForbidden() *GetCompaniesObservableForbidden {
return &GetCompaniesObservableForbidden{}
}
/* GetCompaniesObservableForbidden describes a response with status code 403, with default header values.
/*GetCompaniesObservableForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -174,18 +166,15 @@ type GetCompaniesObservableForbidden struct {
func (o *GetCompaniesObservableForbidden) Error() string {
return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableForbidden %+v", 403, o.Payload)
}
func (o *GetCompaniesObservableForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -202,7 +191,7 @@ func NewGetCompaniesObservableNotFound() *GetCompaniesObservableNotFound {
return &GetCompaniesObservableNotFound{}
}
/* GetCompaniesObservableNotFound describes a response with status code 404, with default header values.
/*GetCompaniesObservableNotFound handles this case with default header values.
Resource was not found
*/
@ -215,18 +204,15 @@ type GetCompaniesObservableNotFound struct {
func (o *GetCompaniesObservableNotFound) Error() string {
return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableNotFound %+v", 404, o.Payload)
}
func (o *GetCompaniesObservableNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -243,7 +229,7 @@ func NewGetCompaniesObservableUnprocessableEntity() *GetCompaniesObservableUnpro
return &GetCompaniesObservableUnprocessableEntity{}
}
/* GetCompaniesObservableUnprocessableEntity describes a response with status code 422, with default header values.
/*GetCompaniesObservableUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -256,18 +242,15 @@ type GetCompaniesObservableUnprocessableEntity struct {
func (o *GetCompaniesObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetCompaniesObservableUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -284,7 +267,7 @@ func NewGetCompaniesObservableInternalServerError() *GetCompaniesObservableInter
return &GetCompaniesObservableInternalServerError{}
}
/* GetCompaniesObservableInternalServerError describes a response with status code 500, with default header values.
/*GetCompaniesObservableInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -297,18 +280,15 @@ type GetCompaniesObservableInternalServerError struct {
func (o *GetCompaniesObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetCompaniesObservableInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,52 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewGetCompaniesParams creates a new GetCompaniesParams 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.
// NewGetCompaniesParams creates a new GetCompaniesParams object
// with the default values initialized.
func NewGetCompaniesParams() *GetCompaniesParams {
var ()
return &GetCompaniesParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetCompaniesParamsWithTimeout creates a new GetCompaniesParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetCompaniesParamsWithTimeout(timeout time.Duration) *GetCompaniesParams {
var ()
return &GetCompaniesParams{
timeout: timeout,
}
}
// NewGetCompaniesParamsWithContext creates a new GetCompaniesParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetCompaniesParamsWithContext(ctx context.Context) *GetCompaniesParams {
var ()
return &GetCompaniesParams{
Context: ctx,
}
}
// NewGetCompaniesParamsWithHTTPClient creates a new GetCompaniesParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetCompaniesParamsWithHTTPClient(client *http.Client) *GetCompaniesParams {
var ()
return &GetCompaniesParams{
HTTPClient: client,
}
}
/* GetCompaniesParams contains all the parameters to send to the API endpoint
for the get companies operation.
Typically these are written to a http.Request.
/*GetCompaniesParams contains all the parameters to send to the API endpoint
for the get companies operation typically these are written to a http.Request
*/
type GetCompaniesParams struct {
/* CompanyID.
/*CompanyID
Taxnexus Company record ID
*/
CompanyID *string
@ -74,21 +75,6 @@ type GetCompaniesParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get companies params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetCompaniesParams) WithDefaults() *GetCompaniesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get companies params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetCompaniesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get companies params
func (o *GetCompaniesParams) WithTimeout(timeout time.Duration) *GetCompaniesParams {
o.SetTimeout(timeout)
@ -145,17 +131,16 @@ func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.
// query param companyId
var qrCompanyID string
if o.CompanyID != nil {
qrCompanyID = *o.CompanyID
}
qCompanyID := qrCompanyID
if qCompanyID != "" {
if err := r.SetQueryParam("companyId", qCompanyID); err != nil {
return err
}
}
}
if len(res) > 0 {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *GetCompaniesReader) ReadResponse(response runtime.ClientResponse, consu
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,12 +74,13 @@ func NewGetCompaniesOK() *GetCompaniesOK {
return &GetCompaniesOK{}
}
/* GetCompaniesOK describes a response with status code 200, with default header values.
/*GetCompaniesOK handles this case with default header values.
Taxnexus Response with Company objects
*/
type GetCompaniesOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *crm_models.CompanyResponse
@ -87,25 +89,18 @@ type GetCompaniesOK struct {
func (o *GetCompaniesOK) Error() string {
return fmt.Sprintf("[GET /companies][%d] getCompaniesOK %+v", 200, o.Payload)
}
func (o *GetCompaniesOK) GetPayload() *crm_models.CompanyResponse {
return o.Payload
}
func (o *GetCompaniesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
o.Payload = new(crm_models.CompanyResponse)
@ -122,7 +117,7 @@ func NewGetCompaniesUnauthorized() *GetCompaniesUnauthorized {
return &GetCompaniesUnauthorized{}
}
/* GetCompaniesUnauthorized describes a response with status code 401, with default header values.
/*GetCompaniesUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -135,18 +130,15 @@ type GetCompaniesUnauthorized struct {
func (o *GetCompaniesUnauthorized) Error() string {
return fmt.Sprintf("[GET /companies][%d] getCompaniesUnauthorized %+v", 401, o.Payload)
}
func (o *GetCompaniesUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -163,7 +155,7 @@ func NewGetCompaniesForbidden() *GetCompaniesForbidden {
return &GetCompaniesForbidden{}
}
/* GetCompaniesForbidden describes a response with status code 403, with default header values.
/*GetCompaniesForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -176,18 +168,15 @@ type GetCompaniesForbidden struct {
func (o *GetCompaniesForbidden) Error() string {
return fmt.Sprintf("[GET /companies][%d] getCompaniesForbidden %+v", 403, o.Payload)
}
func (o *GetCompaniesForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -204,7 +193,7 @@ func NewGetCompaniesNotFound() *GetCompaniesNotFound {
return &GetCompaniesNotFound{}
}
/* GetCompaniesNotFound describes a response with status code 404, with default header values.
/*GetCompaniesNotFound handles this case with default header values.
Resource was not found
*/
@ -217,18 +206,15 @@ type GetCompaniesNotFound struct {
func (o *GetCompaniesNotFound) Error() string {
return fmt.Sprintf("[GET /companies][%d] getCompaniesNotFound %+v", 404, o.Payload)
}
func (o *GetCompaniesNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -245,7 +231,7 @@ func NewGetCompaniesUnprocessableEntity() *GetCompaniesUnprocessableEntity {
return &GetCompaniesUnprocessableEntity{}
}
/* GetCompaniesUnprocessableEntity describes a response with status code 422, with default header values.
/*GetCompaniesUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -258,18 +244,15 @@ type GetCompaniesUnprocessableEntity struct {
func (o *GetCompaniesUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /companies][%d] getCompaniesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetCompaniesUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -286,7 +269,7 @@ func NewGetCompaniesInternalServerError() *GetCompaniesInternalServerError {
return &GetCompaniesInternalServerError{}
}
/* GetCompaniesInternalServerError describes a response with status code 500, with default header values.
/*GetCompaniesInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -299,18 +282,15 @@ type GetCompaniesInternalServerError struct {
func (o *GetCompaniesInternalServerError) Error() string {
return fmt.Sprintf("[GET /companies][%d] getCompaniesInternalServerError %+v", 500, o.Payload)
}
func (o *GetCompaniesInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetCompaniesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -22,52 +22,53 @@ import (
"code.tnxs.net/taxnexus/lib/api/crm/crm_models"
)
// NewPostCompaniesParams creates a new PostCompaniesParams 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.
// NewPostCompaniesParams creates a new PostCompaniesParams object
// with the default values initialized.
func NewPostCompaniesParams() *PostCompaniesParams {
var ()
return &PostCompaniesParams{
timeout: cr.DefaultTimeout,
}
}
// NewPostCompaniesParamsWithTimeout creates a new PostCompaniesParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewPostCompaniesParamsWithTimeout(timeout time.Duration) *PostCompaniesParams {
var ()
return &PostCompaniesParams{
timeout: timeout,
}
}
// NewPostCompaniesParamsWithContext creates a new PostCompaniesParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewPostCompaniesParamsWithContext(ctx context.Context) *PostCompaniesParams {
var ()
return &PostCompaniesParams{
Context: ctx,
}
}
// NewPostCompaniesParamsWithHTTPClient creates a new PostCompaniesParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewPostCompaniesParamsWithHTTPClient(client *http.Client) *PostCompaniesParams {
var ()
return &PostCompaniesParams{
HTTPClient: client,
}
}
/* PostCompaniesParams contains all the parameters to send to the API endpoint
for the post companies operation.
Typically these are written to a http.Request.
/*PostCompaniesParams contains all the parameters to send to the API endpoint
for the post companies operation typically these are written to a http.Request
*/
type PostCompaniesParams struct {
/* CompaniesRequest.
/*CompaniesRequest
An array of new Contact records
*/
CompaniesRequest *crm_models.CompanyRequest
@ -76,21 +77,6 @@ type PostCompaniesParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the post companies params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostCompaniesParams) WithDefaults() *PostCompaniesParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the post companies params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *PostCompaniesParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the post companies params
func (o *PostCompaniesParams) WithTimeout(timeout time.Duration) *PostCompaniesParams {
o.SetTimeout(timeout)
@ -142,6 +128,7 @@ func (o *PostCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt
return err
}
var res []error
if o.CompaniesRequest != nil {
if err := r.SetBodyParam(o.CompaniesRequest); err != nil {
return err

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *PostCompaniesReader) ReadResponse(response runtime.ClientResponse, cons
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,12 +74,13 @@ func NewPostCompaniesOK() *PostCompaniesOK {
return &PostCompaniesOK{}
}
/* PostCompaniesOK describes a response with status code 200, with default header values.
/*PostCompaniesOK handles this case with default header values.
Taxnexus Response with Company objects
*/
type PostCompaniesOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload *crm_models.CompanyResponse
@ -87,25 +89,18 @@ type PostCompaniesOK struct {
func (o *PostCompaniesOK) Error() string {
return fmt.Sprintf("[POST /companies][%d] postCompaniesOK %+v", 200, o.Payload)
}
func (o *PostCompaniesOK) GetPayload() *crm_models.CompanyResponse {
return o.Payload
}
func (o *PostCompaniesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
o.Payload = new(crm_models.CompanyResponse)
@ -122,7 +117,7 @@ func NewPostCompaniesUnauthorized() *PostCompaniesUnauthorized {
return &PostCompaniesUnauthorized{}
}
/* PostCompaniesUnauthorized describes a response with status code 401, with default header values.
/*PostCompaniesUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -135,18 +130,15 @@ type PostCompaniesUnauthorized struct {
func (o *PostCompaniesUnauthorized) Error() string {
return fmt.Sprintf("[POST /companies][%d] postCompaniesUnauthorized %+v", 401, o.Payload)
}
func (o *PostCompaniesUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostCompaniesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -163,7 +155,7 @@ func NewPostCompaniesForbidden() *PostCompaniesForbidden {
return &PostCompaniesForbidden{}
}
/* PostCompaniesForbidden describes a response with status code 403, with default header values.
/*PostCompaniesForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -176,18 +168,15 @@ type PostCompaniesForbidden struct {
func (o *PostCompaniesForbidden) Error() string {
return fmt.Sprintf("[POST /companies][%d] postCompaniesForbidden %+v", 403, o.Payload)
}
func (o *PostCompaniesForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostCompaniesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -204,7 +193,7 @@ func NewPostCompaniesNotFound() *PostCompaniesNotFound {
return &PostCompaniesNotFound{}
}
/* PostCompaniesNotFound describes a response with status code 404, with default header values.
/*PostCompaniesNotFound handles this case with default header values.
Resource was not found
*/
@ -217,18 +206,15 @@ type PostCompaniesNotFound struct {
func (o *PostCompaniesNotFound) Error() string {
return fmt.Sprintf("[POST /companies][%d] postCompaniesNotFound %+v", 404, o.Payload)
}
func (o *PostCompaniesNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostCompaniesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -245,7 +231,7 @@ func NewPostCompaniesUnprocessableEntity() *PostCompaniesUnprocessableEntity {
return &PostCompaniesUnprocessableEntity{}
}
/* PostCompaniesUnprocessableEntity describes a response with status code 422, with default header values.
/*PostCompaniesUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -258,18 +244,15 @@ type PostCompaniesUnprocessableEntity struct {
func (o *PostCompaniesUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /companies][%d] postCompaniesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostCompaniesUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostCompaniesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -286,7 +269,7 @@ func NewPostCompaniesInternalServerError() *PostCompaniesInternalServerError {
return &PostCompaniesInternalServerError{}
}
/* PostCompaniesInternalServerError describes a response with status code 500, with default header values.
/*PostCompaniesInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -299,18 +282,15 @@ type PostCompaniesInternalServerError struct {
func (o *PostCompaniesInternalServerError) Error() string {
return fmt.Sprintf("[POST /companies][%d] postCompaniesInternalServerError %+v", 500, o.Payload)
}
func (o *PostCompaniesInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *PostCompaniesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -29,20 +29,17 @@ type Client struct {
formats strfmt.Registry
}
// ClientOption is the option for Client methods
type ClientOption func(*runtime.ClientOperation)
// ClientService is the interface for Client methods
type ClientService interface {
DeleteContact(params *DeleteContactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteContactOK, error)
DeleteContact(params *DeleteContactParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteContactOK, error)
GetContacts(params *GetContactsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetContactsOK, error)
GetContacts(params *GetContactsParams, authInfo runtime.ClientAuthInfoWriter) (*GetContactsOK, error)
GetContactsObservable(params *GetContactsObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetContactsObservableOK, error)
GetContactsObservable(params *GetContactsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetContactsObservableOK, error)
PostContacts(params *PostContactsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostContactsOK, error)
PostContacts(params *PostContactsParams, authInfo runtime.ClientAuthInfoWriter) (*PostContactsOK, error)
PutContacts(params *PutContactsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutContactsOK, error)
PutContacts(params *PutContactsParams, authInfo runtime.ClientAuthInfoWriter) (*PutContactsOK, error)
SetTransport(transport runtime.ClientTransport)
}
@ -52,12 +49,13 @@ type ClientService interface {
Delete Taxnexus Contact record
*/
func (a *Client) DeleteContact(params *DeleteContactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteContactOK, error) {
func (a *Client) DeleteContact(params *DeleteContactParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteContactOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteContactParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "deleteContact",
Method: "DELETE",
PathPattern: "/contacts",
@ -69,12 +67,7 @@ func (a *Client) DeleteContact(params *DeleteContactParams, authInfo runtime.Cli
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -93,12 +86,13 @@ func (a *Client) DeleteContact(params *DeleteContactParams, authInfo runtime.Cli
Return a list of all available Contacts
*/
func (a *Client) GetContacts(params *GetContactsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetContactsOK, error) {
func (a *Client) GetContacts(params *GetContactsParams, authInfo runtime.ClientAuthInfoWriter) (*GetContactsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetContactsParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getContacts",
Method: "GET",
PathPattern: "/contacts",
@ -110,12 +104,7 @@ func (a *Client) GetContacts(params *GetContactsParams, authInfo runtime.ClientA
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -134,12 +123,13 @@ func (a *Client) GetContacts(params *GetContactsParams, authInfo runtime.ClientA
A list of contacts in a simple JSON array
*/
func (a *Client) GetContactsObservable(params *GetContactsObservableParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetContactsObservableOK, error) {
func (a *Client) GetContactsObservable(params *GetContactsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetContactsObservableOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetContactsObservableParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getContactsObservable",
Method: "GET",
PathPattern: "/contacts/observable",
@ -151,12 +141,7 @@ func (a *Client) GetContactsObservable(params *GetContactsObservableParams, auth
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -175,12 +160,13 @@ func (a *Client) GetContactsObservable(params *GetContactsObservableParams, auth
Contact record to be added
*/
func (a *Client) PostContacts(params *PostContactsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostContactsOK, error) {
func (a *Client) PostContacts(params *PostContactsParams, authInfo runtime.ClientAuthInfoWriter) (*PostContactsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostContactsParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "postContacts",
Method: "POST",
PathPattern: "/contacts",
@ -192,12 +178,7 @@ func (a *Client) PostContacts(params *PostContactsParams, authInfo runtime.Clien
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}
@ -216,12 +197,13 @@ func (a *Client) PostContacts(params *PostContactsParams, authInfo runtime.Clien
Update Contact records
*/
func (a *Client) PutContacts(params *PutContactsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutContactsOK, error) {
func (a *Client) PutContacts(params *PutContactsParams, authInfo runtime.ClientAuthInfoWriter) (*PutContactsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPutContactsParams()
}
op := &runtime.ClientOperation{
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "putContacts",
Method: "PUT",
PathPattern: "/contacts",
@ -233,12 +215,7 @@ func (a *Client) PutContacts(params *PutContactsParams, authInfo runtime.ClientA
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
}
for _, opt := range opts {
opt(op)
}
result, err := a.transport.Submit(op)
})
if err != nil {
return nil, err
}

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -20,52 +20,53 @@ import (
"github.com/go-openapi/strfmt"
)
// NewDeleteContactParams creates a new DeleteContactParams 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.
// NewDeleteContactParams creates a new DeleteContactParams object
// with the default values initialized.
func NewDeleteContactParams() *DeleteContactParams {
var ()
return &DeleteContactParams{
timeout: cr.DefaultTimeout,
}
}
// NewDeleteContactParamsWithTimeout creates a new DeleteContactParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewDeleteContactParamsWithTimeout(timeout time.Duration) *DeleteContactParams {
var ()
return &DeleteContactParams{
timeout: timeout,
}
}
// NewDeleteContactParamsWithContext creates a new DeleteContactParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewDeleteContactParamsWithContext(ctx context.Context) *DeleteContactParams {
var ()
return &DeleteContactParams{
Context: ctx,
}
}
// NewDeleteContactParamsWithHTTPClient creates a new DeleteContactParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewDeleteContactParamsWithHTTPClient(client *http.Client) *DeleteContactParams {
var ()
return &DeleteContactParams{
HTTPClient: client,
}
}
/* DeleteContactParams contains all the parameters to send to the API endpoint
for the delete contact operation.
Typically these are written to a http.Request.
/*DeleteContactParams contains all the parameters to send to the API endpoint
for the delete contact operation typically these are written to a http.Request
*/
type DeleteContactParams struct {
/* ContactID.
/*ContactID
Taxnexus Contact record ID
*/
ContactID *string
@ -74,21 +75,6 @@ type DeleteContactParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the delete contact params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteContactParams) WithDefaults() *DeleteContactParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the delete contact params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *DeleteContactParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the delete contact params
func (o *DeleteContactParams) WithTimeout(timeout time.Duration) *DeleteContactParams {
o.SetTimeout(timeout)
@ -145,17 +131,16 @@ func (o *DeleteContactParams) WriteToRequest(r runtime.ClientRequest, reg strfmt
// query param contactId
var qrContactID string
if o.ContactID != nil {
qrContactID = *o.ContactID
}
qContactID := qrContactID
if qContactID != "" {
if err := r.SetQueryParam("contactId", qContactID); err != nil {
return err
}
}
}
if len(res) > 0 {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *DeleteContactReader) ReadResponse(response runtime.ClientResponse, cons
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,7 +74,7 @@ func NewDeleteContactOK() *DeleteContactOK {
return &DeleteContactOK{}
}
/* DeleteContactOK describes a response with status code 200, with default header values.
/*DeleteContactOK handles this case with default header values.
Taxnexus Response with Message Objects with Delete Status
*/
@ -86,18 +87,15 @@ type DeleteContactOK struct {
func (o *DeleteContactOK) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactOK %+v", 200, o.Payload)
}
func (o *DeleteContactOK) GetPayload() *crm_models.DeleteResponse {
return o.Payload
}
func (o *DeleteContactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.DeleteResponse)
@ -114,7 +112,7 @@ func NewDeleteContactUnauthorized() *DeleteContactUnauthorized {
return &DeleteContactUnauthorized{}
}
/* DeleteContactUnauthorized describes a response with status code 401, with default header values.
/*DeleteContactUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -127,18 +125,15 @@ type DeleteContactUnauthorized struct {
func (o *DeleteContactUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactUnauthorized %+v", 401, o.Payload)
}
func (o *DeleteContactUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteContactUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -155,7 +150,7 @@ func NewDeleteContactForbidden() *DeleteContactForbidden {
return &DeleteContactForbidden{}
}
/* DeleteContactForbidden describes a response with status code 403, with default header values.
/*DeleteContactForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -168,18 +163,15 @@ type DeleteContactForbidden struct {
func (o *DeleteContactForbidden) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactForbidden %+v", 403, o.Payload)
}
func (o *DeleteContactForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteContactForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -196,7 +188,7 @@ func NewDeleteContactNotFound() *DeleteContactNotFound {
return &DeleteContactNotFound{}
}
/* DeleteContactNotFound describes a response with status code 404, with default header values.
/*DeleteContactNotFound handles this case with default header values.
Resource was not found
*/
@ -209,18 +201,15 @@ type DeleteContactNotFound struct {
func (o *DeleteContactNotFound) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactNotFound %+v", 404, o.Payload)
}
func (o *DeleteContactNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteContactNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -237,7 +226,7 @@ func NewDeleteContactUnprocessableEntity() *DeleteContactUnprocessableEntity {
return &DeleteContactUnprocessableEntity{}
}
/* DeleteContactUnprocessableEntity describes a response with status code 422, with default header values.
/*DeleteContactUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -250,18 +239,15 @@ type DeleteContactUnprocessableEntity struct {
func (o *DeleteContactUnprocessableEntity) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactUnprocessableEntity %+v", 422, o.Payload)
}
func (o *DeleteContactUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteContactUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -278,7 +264,7 @@ func NewDeleteContactInternalServerError() *DeleteContactInternalServerError {
return &DeleteContactInternalServerError{}
}
/* DeleteContactInternalServerError describes a response with status code 500, with default header values.
/*DeleteContactInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -291,18 +277,15 @@ type DeleteContactInternalServerError struct {
func (o *DeleteContactInternalServerError) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactInternalServerError %+v", 500, o.Payload)
}
func (o *DeleteContactInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteContactInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -21,70 +21,68 @@ import (
"github.com/go-openapi/swag"
)
// NewGetContactsObservableParams creates a new GetContactsObservableParams 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.
// NewGetContactsObservableParams creates a new GetContactsObservableParams object
// with the default values initialized.
func NewGetContactsObservableParams() *GetContactsObservableParams {
var ()
return &GetContactsObservableParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetContactsObservableParamsWithTimeout creates a new GetContactsObservableParams object
// with the ability to set a timeout on a request.
// with the default values initialized, and the ability to set a timeout on a request
func NewGetContactsObservableParamsWithTimeout(timeout time.Duration) *GetContactsObservableParams {
var ()
return &GetContactsObservableParams{
timeout: timeout,
}
}
// NewGetContactsObservableParamsWithContext creates a new GetContactsObservableParams object
// with the ability to set a context for a request.
// with the default values initialized, and the ability to set a context for a request
func NewGetContactsObservableParamsWithContext(ctx context.Context) *GetContactsObservableParams {
var ()
return &GetContactsObservableParams{
Context: ctx,
}
}
// NewGetContactsObservableParamsWithHTTPClient creates a new GetContactsObservableParams object
// with the ability to set a custom HTTPClient for a request.
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetContactsObservableParamsWithHTTPClient(client *http.Client) *GetContactsObservableParams {
var ()
return &GetContactsObservableParams{
HTTPClient: client,
}
}
/* GetContactsObservableParams contains all the parameters to send to the API endpoint
for the get contacts observable operation.
Typically these are written to a http.Request.
/*GetContactsObservableParams contains all the parameters to send to the API endpoint
for the get contacts observable operation typically these are written to a http.Request
*/
type GetContactsObservableParams struct {
/* Active.
/*Active
Only retrieve active records?
*/
Active *bool
/* ContactID.
/*ContactID
Taxnexus Contact record ID
*/
ContactID *string
/* Email.
/*Email
Email address used for identity lookup
*/
Email *string
/* Name.
/*Name
The Name of this Object
*/
Name *string
@ -93,21 +91,6 @@ type GetContactsObservableParams struct {
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the get contacts observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetContactsObservableParams) WithDefaults() *GetContactsObservableParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the get contacts observable params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *GetContactsObservableParams) SetDefaults() {
// no default values defined for this parameter
}
// WithTimeout adds the timeout to the get contacts observable params
func (o *GetContactsObservableParams) WithTimeout(timeout time.Duration) *GetContactsObservableParams {
o.SetTimeout(timeout)
@ -197,68 +180,64 @@ func (o *GetContactsObservableParams) WriteToRequest(r runtime.ClientRequest, re
// query param active
var qrActive bool
if o.Active != nil {
qrActive = *o.Active
}
qActive := swag.FormatBool(qrActive)
if qActive != "" {
if err := r.SetQueryParam("active", qActive); err != nil {
return err
}
}
}
if o.ContactID != nil {
// query param contactId
var qrContactID string
if o.ContactID != nil {
qrContactID = *o.ContactID
}
qContactID := qrContactID
if qContactID != "" {
if err := r.SetQueryParam("contactId", qContactID); err != nil {
return err
}
}
}
if o.Email != nil {
// query param email
var qrEmail string
if o.Email != nil {
qrEmail = *o.Email
}
qEmail := qrEmail
if qEmail != "" {
if err := r.SetQueryParam("email", qEmail); err != nil {
return err
}
}
}
if o.Name != nil {
// query param name
var qrName string
if o.Name != nil {
qrName = *o.Name
}
qName := qrName
if qName != "" {
if err := r.SetQueryParam("name", qName); err != nil {
return err
}
}
}
if len(res) > 0 {

View File

@ -1,6 +1,6 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
@ -63,8 +63,9 @@ func (o *GetContactsObservableReader) ReadResponse(response runtime.ClientRespon
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
@ -73,12 +74,13 @@ func NewGetContactsObservableOK() *GetContactsObservableOK {
return &GetContactsObservableOK{}
}
/* GetContactsObservableOK describes a response with status code 200, with default header values.
/*GetContactsObservableOK handles this case with default header values.
Taxnexus Response with an array of Contact objects
*/
type GetContactsObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload []*crm_models.Contact
@ -87,25 +89,18 @@ type GetContactsObservableOK struct {
func (o *GetContactsObservableOK) Error() string {
return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableOK %+v", 200, o.Payload)
}
func (o *GetContactsObservableOK) GetPayload() []*crm_models.Contact {
return o.Payload
}
func (o *GetContactsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response.GetHeader("Cache-Control")
if hdrCacheControl != "" {
o.CacheControl = hdrCacheControl
}
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
@ -120,7 +115,7 @@ func NewGetContactsObservableUnauthorized() *GetContactsObservableUnauthorized {
return &GetContactsObservableUnauthorized{}
}
/* GetContactsObservableUnauthorized describes a response with status code 401, with default header values.
/*GetContactsObservableUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
@ -133,18 +128,15 @@ type GetContactsObservableUnauthorized struct {
func (o *GetContactsObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableUnauthorized %+v", 401, o.Payload)
}
func (o *GetContactsObservableUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetContactsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -161,7 +153,7 @@ func NewGetContactsObservableForbidden() *GetContactsObservableForbidden {
return &GetContactsObservableForbidden{}
}
/* GetContactsObservableForbidden describes a response with status code 403, with default header values.
/*GetContactsObservableForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
@ -174,18 +166,15 @@ type GetContactsObservableForbidden struct {
func (o *GetContactsObservableForbidden) Error() string {
return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableForbidden %+v", 403, o.Payload)
}
func (o *GetContactsObservableForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetContactsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -202,7 +191,7 @@ func NewGetContactsObservableNotFound() *GetContactsObservableNotFound {
return &GetContactsObservableNotFound{}
}
/* GetContactsObservableNotFound describes a response with status code 404, with default header values.
/*GetContactsObservableNotFound handles this case with default header values.
Resource was not found
*/
@ -215,18 +204,15 @@ type GetContactsObservableNotFound struct {
func (o *GetContactsObservableNotFound) Error() string {
return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableNotFound %+v", 404, o.Payload)
}
func (o *GetContactsObservableNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetContactsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -243,7 +229,7 @@ func NewGetContactsObservableUnprocessableEntity() *GetContactsObservableUnproce
return &GetContactsObservableUnprocessableEntity{}
}
/* GetContactsObservableUnprocessableEntity describes a response with status code 422, with default header values.
/*GetContactsObservableUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
@ -256,18 +242,15 @@ type GetContactsObservableUnprocessableEntity struct {
func (o *GetContactsObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetContactsObservableUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetContactsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)
@ -284,7 +267,7 @@ func NewGetContactsObservableInternalServerError() *GetContactsObservableInterna
return &GetContactsObservableInternalServerError{}
}
/* GetContactsObservableInternalServerError describes a response with status code 500, with default header values.
/*GetContactsObservableInternalServerError handles this case with default header values.
Server Internal Error
*/
@ -297,18 +280,15 @@ type GetContactsObservableInternalServerError struct {
func (o *GetContactsObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableInternalServerError %+v", 500, o.Payload)
}
func (o *GetContactsObservableInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *GetContactsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
o.Payload = new(crm_models.Error)

Some files were not shown because too many files have changed in this diff Show More