mirror of https://github.com/vernonkeenan/lib
parent
895f3e563d
commit
4eb67e1bf0
|
@ -0,0 +1,129 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new assets API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for assets API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
GetAssets(params *GetAssetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAssetsOK, error)
|
||||
|
||||
PostAssets(params *PostAssetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAssetsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetAssets gets a list of assets
|
||||
|
||||
Return a list of all available Assets
|
||||
*/
|
||||
func (a *Client) GetAssets(params *GetAssetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAssetsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetAssetsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getAssets",
|
||||
Method: "GET",
|
||||
PathPattern: "/assets",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetAssetsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*GetAssetsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getAssets: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostAssets adds a new asset to taxnexus
|
||||
|
||||
Industry record to be added
|
||||
*/
|
||||
func (a *Client) PostAssets(params *PostAssetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAssetsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostAssetsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postAssets",
|
||||
Method: "POST",
|
||||
PathPattern: "/assets",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostAssetsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*PostAssetsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postAssets: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetAssetsParams creates a new GetAssetsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetAssetsParams() *GetAssetsParams {
|
||||
return &GetAssetsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetAssetsParamsWithTimeout creates a new GetAssetsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetAssetsParamsWithTimeout(timeout time.Duration) *GetAssetsParams {
|
||||
return &GetAssetsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetAssetsParamsWithContext creates a new GetAssetsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetAssetsParamsWithContext(ctx context.Context) *GetAssetsParams {
|
||||
return &GetAssetsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetAssetsParamsWithHTTPClient creates a new GetAssetsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetAssetsParamsWithHTTPClient(client *http.Client) *GetAssetsParams {
|
||||
return &GetAssetsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetAssetsParams contains all the parameters to send to the API endpoint
|
||||
for the get assets operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetAssetsParams struct {
|
||||
|
||||
/* Active.
|
||||
|
||||
Only retrieve active records?
|
||||
*/
|
||||
Active *bool
|
||||
|
||||
/* AssetID.
|
||||
|
||||
Taxnexus Record Id of an Asset
|
||||
*/
|
||||
AssetID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get assets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetAssetsParams) WithDefaults() *GetAssetsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get assets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetAssetsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get assets params
|
||||
func (o *GetAssetsParams) WithTimeout(timeout time.Duration) *GetAssetsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get assets params
|
||||
func (o *GetAssetsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get assets params
|
||||
func (o *GetAssetsParams) WithContext(ctx context.Context) *GetAssetsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get assets params
|
||||
func (o *GetAssetsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get assets params
|
||||
func (o *GetAssetsParams) WithHTTPClient(client *http.Client) *GetAssetsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get assets params
|
||||
func (o *GetAssetsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithActive adds the active to the get assets params
|
||||
func (o *GetAssetsParams) WithActive(active *bool) *GetAssetsParams {
|
||||
o.SetActive(active)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetActive adds the active to the get assets params
|
||||
func (o *GetAssetsParams) SetActive(active *bool) {
|
||||
o.Active = active
|
||||
}
|
||||
|
||||
// WithAssetID adds the assetID to the get assets params
|
||||
func (o *GetAssetsParams) WithAssetID(assetID *string) *GetAssetsParams {
|
||||
o.SetAssetID(assetID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetAssetID adds the assetId to the get assets params
|
||||
func (o *GetAssetsParams) SetAssetID(assetID *string) {
|
||||
o.AssetID = assetID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get assets params
|
||||
func (o *GetAssetsParams) WithLimit(limit *int64) *GetAssetsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get assets params
|
||||
func (o *GetAssetsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get assets params
|
||||
func (o *GetAssetsParams) WithOffset(offset *int64) *GetAssetsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get assets params
|
||||
func (o *GetAssetsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetAssetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
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.AssetID != nil {
|
||||
|
||||
// query param assetId
|
||||
var qrAssetID string
|
||||
|
||||
if o.AssetID != nil {
|
||||
qrAssetID = *o.AssetID
|
||||
}
|
||||
qAssetID := qrAssetID
|
||||
if qAssetID != "" {
|
||||
|
||||
if err := r.SetQueryParam("assetId", qAssetID); 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.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 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// GetAssetsReader is a Reader for the GetAssets structure.
|
||||
type GetAssetsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetAssetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetAssetsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetAssetsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetAssetsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetAssetsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetAssetsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetAssetsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetAssetsOK creates a GetAssetsOK with default headers values
|
||||
func NewGetAssetsOK() *GetAssetsOK {
|
||||
return &GetAssetsOK{}
|
||||
}
|
||||
|
||||
/* GetAssetsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Asset objects with Contacts
|
||||
*/
|
||||
type GetAssetsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *research_models.AssetResponse
|
||||
}
|
||||
|
||||
func (o *GetAssetsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsOK) GetPayload() *research_models.AssetResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.AssetResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsUnauthorized creates a GetAssetsUnauthorized with default headers values
|
||||
func NewGetAssetsUnauthorized() *GetAssetsUnauthorized {
|
||||
return &GetAssetsUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetAssetsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetAssetsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsUnauthorized) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsForbidden creates a GetAssetsForbidden with default headers values
|
||||
func NewGetAssetsForbidden() *GetAssetsForbidden {
|
||||
return &GetAssetsForbidden{}
|
||||
}
|
||||
|
||||
/* GetAssetsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetAssetsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsForbidden) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsNotFound creates a GetAssetsNotFound with default headers values
|
||||
func NewGetAssetsNotFound() *GetAssetsNotFound {
|
||||
return &GetAssetsNotFound{}
|
||||
}
|
||||
|
||||
/* GetAssetsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetAssetsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsNotFound) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsUnprocessableEntity creates a GetAssetsUnprocessableEntity with default headers values
|
||||
func NewGetAssetsUnprocessableEntity() *GetAssetsUnprocessableEntity {
|
||||
return &GetAssetsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetAssetsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetAssetsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsUnprocessableEntity) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsInternalServerError creates a GetAssetsInternalServerError with default headers values
|
||||
func NewGetAssetsInternalServerError() *GetAssetsInternalServerError {
|
||||
return &GetAssetsInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetAssetsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetAssetsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsInternalServerError) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// NewPostAssetsParams creates a new PostAssetsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostAssetsParams() *PostAssetsParams {
|
||||
return &PostAssetsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostAssetsParamsWithTimeout creates a new PostAssetsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostAssetsParamsWithTimeout(timeout time.Duration) *PostAssetsParams {
|
||||
return &PostAssetsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostAssetsParamsWithContext creates a new PostAssetsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostAssetsParamsWithContext(ctx context.Context) *PostAssetsParams {
|
||||
return &PostAssetsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostAssetsParamsWithHTTPClient creates a new PostAssetsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostAssetsParamsWithHTTPClient(client *http.Client) *PostAssetsParams {
|
||||
return &PostAssetsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostAssetsParams contains all the parameters to send to the API endpoint
|
||||
for the post assets operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostAssetsParams struct {
|
||||
|
||||
/* AssetRequest.
|
||||
|
||||
An array of new Asset records
|
||||
*/
|
||||
AssetRequest *research_models.AssetRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post assets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostAssetsParams) WithDefaults() *PostAssetsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post assets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostAssetsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post assets params
|
||||
func (o *PostAssetsParams) WithTimeout(timeout time.Duration) *PostAssetsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post assets params
|
||||
func (o *PostAssetsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post assets params
|
||||
func (o *PostAssetsParams) WithContext(ctx context.Context) *PostAssetsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post assets params
|
||||
func (o *PostAssetsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post assets params
|
||||
func (o *PostAssetsParams) WithHTTPClient(client *http.Client) *PostAssetsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post assets params
|
||||
func (o *PostAssetsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithAssetRequest adds the assetRequest to the post assets params
|
||||
func (o *PostAssetsParams) WithAssetRequest(assetRequest *research_models.AssetRequest) *PostAssetsParams {
|
||||
o.SetAssetRequest(assetRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetAssetRequest adds the assetRequest to the post assets params
|
||||
func (o *PostAssetsParams) SetAssetRequest(assetRequest *research_models.AssetRequest) {
|
||||
o.AssetRequest = assetRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostAssetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.AssetRequest != nil {
|
||||
if err := r.SetBodyParam(o.AssetRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// PostAssetsReader is a Reader for the PostAssets structure.
|
||||
type PostAssetsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostAssetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostAssetsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostAssetsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostAssetsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostAssetsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostAssetsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostAssetsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostAssetsOK creates a PostAssetsOK with default headers values
|
||||
func NewPostAssetsOK() *PostAssetsOK {
|
||||
return &PostAssetsOK{}
|
||||
}
|
||||
|
||||
/* PostAssetsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Asset objects with Contacts
|
||||
*/
|
||||
type PostAssetsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *research_models.AssetResponse
|
||||
}
|
||||
|
||||
func (o *PostAssetsOK) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsOK) GetPayload() *research_models.AssetResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.AssetResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsUnauthorized creates a PostAssetsUnauthorized with default headers values
|
||||
func NewPostAssetsUnauthorized() *PostAssetsUnauthorized {
|
||||
return &PostAssetsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostAssetsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostAssetsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsUnauthorized) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsForbidden creates a PostAssetsForbidden with default headers values
|
||||
func NewPostAssetsForbidden() *PostAssetsForbidden {
|
||||
return &PostAssetsForbidden{}
|
||||
}
|
||||
|
||||
/* PostAssetsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostAssetsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsForbidden) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsNotFound creates a PostAssetsNotFound with default headers values
|
||||
func NewPostAssetsNotFound() *PostAssetsNotFound {
|
||||
return &PostAssetsNotFound{}
|
||||
}
|
||||
|
||||
/* PostAssetsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostAssetsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsNotFound) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsUnprocessableEntity creates a PostAssetsUnprocessableEntity with default headers values
|
||||
func NewPostAssetsUnprocessableEntity() *PostAssetsUnprocessableEntity {
|
||||
return &PostAssetsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostAssetsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostAssetsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsUnprocessableEntity) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsInternalServerError creates a PostAssetsInternalServerError with default headers values
|
||||
func NewPostAssetsInternalServerError() *PostAssetsInternalServerError {
|
||||
return &PostAssetsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostAssetsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostAssetsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsInternalServerError) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new company products API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for company products API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
GetCompanyProducts(params *GetCompanyProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyProductsOK, error)
|
||||
|
||||
PostCompanyProducts(params *PostCompanyProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCompanyProductsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyProducts gets a list of companyproducts
|
||||
|
||||
Return a list of all available CompanyProducts
|
||||
*/
|
||||
func (a *Client) GetCompanyProducts(params *GetCompanyProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyProductsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetCompanyProductsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getCompanyProducts",
|
||||
Method: "GET",
|
||||
PathPattern: "/companyproducts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetCompanyProductsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*GetCompanyProductsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getCompanyProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostCompanyProducts adds a new companyproduct to taxnexus
|
||||
|
||||
Industry record to be added
|
||||
*/
|
||||
func (a *Client) PostCompanyProducts(params *PostCompanyProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCompanyProductsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostCompanyProductsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postCompanyProducts",
|
||||
Method: "POST",
|
||||
PathPattern: "/companyproducts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostCompanyProductsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*PostCompanyProductsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postCompanyProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetCompanyProductsParams creates a new GetCompanyProductsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetCompanyProductsParams() *GetCompanyProductsParams {
|
||||
return &GetCompanyProductsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsParamsWithTimeout creates a new GetCompanyProductsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetCompanyProductsParamsWithTimeout(timeout time.Duration) *GetCompanyProductsParams {
|
||||
return &GetCompanyProductsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsParamsWithContext creates a new GetCompanyProductsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetCompanyProductsParamsWithContext(ctx context.Context) *GetCompanyProductsParams {
|
||||
return &GetCompanyProductsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsParamsWithHTTPClient creates a new GetCompanyProductsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetCompanyProductsParamsWithHTTPClient(client *http.Client) *GetCompanyProductsParams {
|
||||
return &GetCompanyProductsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsParams contains all the parameters to send to the API endpoint
|
||||
for the get company products operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetCompanyProductsParams struct {
|
||||
|
||||
/* Active.
|
||||
|
||||
Only retrieve active records?
|
||||
*/
|
||||
Active *bool
|
||||
|
||||
/* CompanyProductID.
|
||||
|
||||
Taxnexus CompanyProduct record ID
|
||||
*/
|
||||
CompanyProductID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get company products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetCompanyProductsParams) WithDefaults() *GetCompanyProductsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get company products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetCompanyProductsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithTimeout(timeout time.Duration) *GetCompanyProductsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithContext(ctx context.Context) *GetCompanyProductsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithHTTPClient(client *http.Client) *GetCompanyProductsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithActive adds the active to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithActive(active *bool) *GetCompanyProductsParams {
|
||||
o.SetActive(active)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetActive adds the active to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetActive(active *bool) {
|
||||
o.Active = active
|
||||
}
|
||||
|
||||
// WithCompanyProductID adds the companyProductID to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithCompanyProductID(companyProductID *string) *GetCompanyProductsParams {
|
||||
o.SetCompanyProductID(companyProductID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetCompanyProductID adds the companyProductId to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetCompanyProductID(companyProductID *string) {
|
||||
o.CompanyProductID = companyProductID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithLimit(limit *int64) *GetCompanyProductsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithOffset(offset *int64) *GetCompanyProductsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetCompanyProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
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.CompanyProductID != nil {
|
||||
|
||||
// query param companyProductId
|
||||
var qrCompanyProductID string
|
||||
|
||||
if o.CompanyProductID != nil {
|
||||
qrCompanyProductID = *o.CompanyProductID
|
||||
}
|
||||
qCompanyProductID := qrCompanyProductID
|
||||
if qCompanyProductID != "" {
|
||||
|
||||
if err := r.SetQueryParam("companyProductId", qCompanyProductID); 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.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 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// GetCompanyProductsReader is a Reader for the GetCompanyProducts structure.
|
||||
type GetCompanyProductsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetCompanyProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetCompanyProductsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetCompanyProductsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetCompanyProductsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetCompanyProductsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetCompanyProductsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetCompanyProductsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsOK creates a GetCompanyProductsOK with default headers values
|
||||
func NewGetCompanyProductsOK() *GetCompanyProductsOK {
|
||||
return &GetCompanyProductsOK{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with an array of CompanyProduct objects
|
||||
*/
|
||||
type GetCompanyProductsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *research_models.CompanyProductResponse
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsOK) GetPayload() *research_models.CompanyProductResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.CompanyProductResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsUnauthorized creates a GetCompanyProductsUnauthorized with default headers values
|
||||
func NewGetCompanyProductsUnauthorized() *GetCompanyProductsUnauthorized {
|
||||
return &GetCompanyProductsUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetCompanyProductsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsUnauthorized) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsForbidden creates a GetCompanyProductsForbidden with default headers values
|
||||
func NewGetCompanyProductsForbidden() *GetCompanyProductsForbidden {
|
||||
return &GetCompanyProductsForbidden{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetCompanyProductsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsForbidden) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsNotFound creates a GetCompanyProductsNotFound with default headers values
|
||||
func NewGetCompanyProductsNotFound() *GetCompanyProductsNotFound {
|
||||
return &GetCompanyProductsNotFound{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetCompanyProductsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsNotFound) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsUnprocessableEntity creates a GetCompanyProductsUnprocessableEntity with default headers values
|
||||
func NewGetCompanyProductsUnprocessableEntity() *GetCompanyProductsUnprocessableEntity {
|
||||
return &GetCompanyProductsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetCompanyProductsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsUnprocessableEntity) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsInternalServerError creates a GetCompanyProductsInternalServerError with default headers values
|
||||
func NewGetCompanyProductsInternalServerError() *GetCompanyProductsInternalServerError {
|
||||
return &GetCompanyProductsInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetCompanyProductsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsInternalServerError) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// NewPostCompanyProductsParams creates a new PostCompanyProductsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostCompanyProductsParams() *PostCompanyProductsParams {
|
||||
return &PostCompanyProductsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsParamsWithTimeout creates a new PostCompanyProductsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostCompanyProductsParamsWithTimeout(timeout time.Duration) *PostCompanyProductsParams {
|
||||
return &PostCompanyProductsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsParamsWithContext creates a new PostCompanyProductsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostCompanyProductsParamsWithContext(ctx context.Context) *PostCompanyProductsParams {
|
||||
return &PostCompanyProductsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsParamsWithHTTPClient creates a new PostCompanyProductsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostCompanyProductsParamsWithHTTPClient(client *http.Client) *PostCompanyProductsParams {
|
||||
return &PostCompanyProductsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsParams contains all the parameters to send to the API endpoint
|
||||
for the post company products operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostCompanyProductsParams struct {
|
||||
|
||||
/* ContactRequest.
|
||||
|
||||
An array of new Contact records
|
||||
*/
|
||||
ContactRequest *research_models.CompanyProductRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post company products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostCompanyProductsParams) WithDefaults() *PostCompanyProductsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post company products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostCompanyProductsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post company products params
|
||||
func (o *PostCompanyProductsParams) WithTimeout(timeout time.Duration) *PostCompanyProductsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post company products params
|
||||
func (o *PostCompanyProductsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post company products params
|
||||
func (o *PostCompanyProductsParams) WithContext(ctx context.Context) *PostCompanyProductsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post company products params
|
||||
func (o *PostCompanyProductsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post company products params
|
||||
func (o *PostCompanyProductsParams) WithHTTPClient(client *http.Client) *PostCompanyProductsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post company products params
|
||||
func (o *PostCompanyProductsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithContactRequest adds the contactRequest to the post company products params
|
||||
func (o *PostCompanyProductsParams) WithContactRequest(contactRequest *research_models.CompanyProductRequest) *PostCompanyProductsParams {
|
||||
o.SetContactRequest(contactRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContactRequest adds the contactRequest to the post company products params
|
||||
func (o *PostCompanyProductsParams) SetContactRequest(contactRequest *research_models.CompanyProductRequest) {
|
||||
o.ContactRequest = contactRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostCompanyProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.ContactRequest != nil {
|
||||
if err := r.SetBodyParam(o.ContactRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// PostCompanyProductsReader is a Reader for the PostCompanyProducts structure.
|
||||
type PostCompanyProductsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostCompanyProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostCompanyProductsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostCompanyProductsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostCompanyProductsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostCompanyProductsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostCompanyProductsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostCompanyProductsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsOK creates a PostCompanyProductsOK with default headers values
|
||||
func NewPostCompanyProductsOK() *PostCompanyProductsOK {
|
||||
return &PostCompanyProductsOK{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with an array of CompanyProduct objects
|
||||
*/
|
||||
type PostCompanyProductsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *research_models.CompanyProductResponse
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsOK) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsOK) GetPayload() *research_models.CompanyProductResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.CompanyProductResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsUnauthorized creates a PostCompanyProductsUnauthorized with default headers values
|
||||
func NewPostCompanyProductsUnauthorized() *PostCompanyProductsUnauthorized {
|
||||
return &PostCompanyProductsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostCompanyProductsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsUnauthorized) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsForbidden creates a PostCompanyProductsForbidden with default headers values
|
||||
func NewPostCompanyProductsForbidden() *PostCompanyProductsForbidden {
|
||||
return &PostCompanyProductsForbidden{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostCompanyProductsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsForbidden) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsNotFound creates a PostCompanyProductsNotFound with default headers values
|
||||
func NewPostCompanyProductsNotFound() *PostCompanyProductsNotFound {
|
||||
return &PostCompanyProductsNotFound{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostCompanyProductsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsNotFound) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsUnprocessableEntity creates a PostCompanyProductsUnprocessableEntity with default headers values
|
||||
func NewPostCompanyProductsUnprocessableEntity() *PostCompanyProductsUnprocessableEntity {
|
||||
return &PostCompanyProductsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostCompanyProductsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsUnprocessableEntity) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsInternalServerError creates a PostCompanyProductsInternalServerError with default headers values
|
||||
func NewPostCompanyProductsInternalServerError() *PostCompanyProductsInternalServerError {
|
||||
return &PostCompanyProductsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostCompanyProductsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsInternalServerError) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetIndustriesParams creates a new GetIndustriesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetIndustriesParams() *GetIndustriesParams {
|
||||
return &GetIndustriesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustriesParamsWithTimeout creates a new GetIndustriesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetIndustriesParamsWithTimeout(timeout time.Duration) *GetIndustriesParams {
|
||||
return &GetIndustriesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustriesParamsWithContext creates a new GetIndustriesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetIndustriesParamsWithContext(ctx context.Context) *GetIndustriesParams {
|
||||
return &GetIndustriesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustriesParamsWithHTTPClient creates a new GetIndustriesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetIndustriesParamsWithHTTPClient(client *http.Client) *GetIndustriesParams {
|
||||
return &GetIndustriesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetIndustriesParams contains all the parameters to send to the API endpoint
|
||||
for the get industries operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetIndustriesParams struct {
|
||||
|
||||
/* Active.
|
||||
|
||||
Only retrieve active records?
|
||||
*/
|
||||
Active *bool
|
||||
|
||||
/* IndustryID.
|
||||
|
||||
Taxnexus Industry record ID
|
||||
*/
|
||||
IndustryID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get industries params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIndustriesParams) WithDefaults() *GetIndustriesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get industries params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIndustriesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get industries params
|
||||
func (o *GetIndustriesParams) WithTimeout(timeout time.Duration) *GetIndustriesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get industries params
|
||||
func (o *GetIndustriesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get industries params
|
||||
func (o *GetIndustriesParams) WithContext(ctx context.Context) *GetIndustriesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get industries params
|
||||
func (o *GetIndustriesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get industries params
|
||||
func (o *GetIndustriesParams) WithHTTPClient(client *http.Client) *GetIndustriesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get industries params
|
||||
func (o *GetIndustriesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithActive adds the active to the get industries params
|
||||
func (o *GetIndustriesParams) WithActive(active *bool) *GetIndustriesParams {
|
||||
o.SetActive(active)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetActive adds the active to the get industries params
|
||||
func (o *GetIndustriesParams) SetActive(active *bool) {
|
||||
o.Active = active
|
||||
}
|
||||
|
||||
// WithIndustryID adds the industryID to the get industries params
|
||||
func (o *GetIndustriesParams) WithIndustryID(industryID *string) *GetIndustriesParams {
|
||||
o.SetIndustryID(industryID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIndustryID adds the industryId to the get industries params
|
||||
func (o *GetIndustriesParams) SetIndustryID(industryID *string) {
|
||||
o.IndustryID = industryID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get industries params
|
||||
func (o *GetIndustriesParams) WithLimit(limit *int64) *GetIndustriesParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get industries params
|
||||
func (o *GetIndustriesParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get industries params
|
||||
func (o *GetIndustriesParams) WithOffset(offset *int64) *GetIndustriesParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get industries params
|
||||
func (o *GetIndustriesParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetIndustriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
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.IndustryID != nil {
|
||||
|
||||
// query param industryId
|
||||
var qrIndustryID string
|
||||
|
||||
if o.IndustryID != nil {
|
||||
qrIndustryID = *o.IndustryID
|
||||
}
|
||||
qIndustryID := qrIndustryID
|
||||
if qIndustryID != "" {
|
||||
|
||||
if err := r.SetQueryParam("industryId", qIndustryID); 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.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 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// GetIndustriesReader is a Reader for the GetIndustries structure.
|
||||
type GetIndustriesReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetIndustriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetIndustriesOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetIndustriesUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetIndustriesForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetIndustriesNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetIndustriesUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetIndustriesInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustriesOK creates a GetIndustriesOK with default headers values
|
||||
func NewGetIndustriesOK() *GetIndustriesOK {
|
||||
return &GetIndustriesOK{}
|
||||
}
|
||||
|
||||
/* GetIndustriesOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Industry objects
|
||||
*/
|
||||
type GetIndustriesOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *research_models.IndustryResponse
|
||||
}
|
||||
|
||||
func (o *GetIndustriesOK) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesOK) GetPayload() *research_models.IndustryResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.IndustryResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesUnauthorized creates a GetIndustriesUnauthorized with default headers values
|
||||
func NewGetIndustriesUnauthorized() *GetIndustriesUnauthorized {
|
||||
return &GetIndustriesUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetIndustriesUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetIndustriesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesUnauthorized) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesForbidden creates a GetIndustriesForbidden with default headers values
|
||||
func NewGetIndustriesForbidden() *GetIndustriesForbidden {
|
||||
return &GetIndustriesForbidden{}
|
||||
}
|
||||
|
||||
/* GetIndustriesForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetIndustriesForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesForbidden) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesNotFound creates a GetIndustriesNotFound with default headers values
|
||||
func NewGetIndustriesNotFound() *GetIndustriesNotFound {
|
||||
return &GetIndustriesNotFound{}
|
||||
}
|
||||
|
||||
/* GetIndustriesNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetIndustriesNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesNotFound) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesUnprocessableEntity creates a GetIndustriesUnprocessableEntity with default headers values
|
||||
func NewGetIndustriesUnprocessableEntity() *GetIndustriesUnprocessableEntity {
|
||||
return &GetIndustriesUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetIndustriesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetIndustriesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesUnprocessableEntity) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesInternalServerError creates a GetIndustriesInternalServerError with default headers values
|
||||
func NewGetIndustriesInternalServerError() *GetIndustriesInternalServerError {
|
||||
return &GetIndustriesInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetIndustriesInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetIndustriesInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesInternalServerError) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new industries API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for industries API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
GetIndustries(params *GetIndustriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustriesOK, error)
|
||||
|
||||
PostIndustries(params *PostIndustriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustriesOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetIndustries gets a list of industries
|
||||
|
||||
Return a list of all available Industries
|
||||
*/
|
||||
func (a *Client) GetIndustries(params *GetIndustriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustriesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetIndustriesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getIndustries",
|
||||
Method: "GET",
|
||||
PathPattern: "/industries",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetIndustriesReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*GetIndustriesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getIndustries: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostIndustries adds a new industry to taxnexus
|
||||
|
||||
Industry record to be added
|
||||
*/
|
||||
func (a *Client) PostIndustries(params *PostIndustriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustriesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostIndustriesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postIndustries",
|
||||
Method: "POST",
|
||||
PathPattern: "/industries",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostIndustriesReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*PostIndustriesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postIndustries: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// NewPostIndustriesParams creates a new PostIndustriesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostIndustriesParams() *PostIndustriesParams {
|
||||
return &PostIndustriesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustriesParamsWithTimeout creates a new PostIndustriesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostIndustriesParamsWithTimeout(timeout time.Duration) *PostIndustriesParams {
|
||||
return &PostIndustriesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustriesParamsWithContext creates a new PostIndustriesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostIndustriesParamsWithContext(ctx context.Context) *PostIndustriesParams {
|
||||
return &PostIndustriesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustriesParamsWithHTTPClient creates a new PostIndustriesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostIndustriesParamsWithHTTPClient(client *http.Client) *PostIndustriesParams {
|
||||
return &PostIndustriesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostIndustriesParams contains all the parameters to send to the API endpoint
|
||||
for the post industries operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostIndustriesParams struct {
|
||||
|
||||
/* IndustryRequest.
|
||||
|
||||
An array of new Industry records
|
||||
*/
|
||||
IndustryRequest *research_models.IndustryRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post industries params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIndustriesParams) WithDefaults() *PostIndustriesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post industries params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIndustriesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post industries params
|
||||
func (o *PostIndustriesParams) WithTimeout(timeout time.Duration) *PostIndustriesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post industries params
|
||||
func (o *PostIndustriesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post industries params
|
||||
func (o *PostIndustriesParams) WithContext(ctx context.Context) *PostIndustriesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post industries params
|
||||
func (o *PostIndustriesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post industries params
|
||||
func (o *PostIndustriesParams) WithHTTPClient(client *http.Client) *PostIndustriesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post industries params
|
||||
func (o *PostIndustriesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithIndustryRequest adds the industryRequest to the post industries params
|
||||
func (o *PostIndustriesParams) WithIndustryRequest(industryRequest *research_models.IndustryRequest) *PostIndustriesParams {
|
||||
o.SetIndustryRequest(industryRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIndustryRequest adds the industryRequest to the post industries params
|
||||
func (o *PostIndustriesParams) SetIndustryRequest(industryRequest *research_models.IndustryRequest) {
|
||||
o.IndustryRequest = industryRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostIndustriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.IndustryRequest != nil {
|
||||
if err := r.SetBodyParam(o.IndustryRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// PostIndustriesReader is a Reader for the PostIndustries structure.
|
||||
type PostIndustriesReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostIndustriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostIndustriesOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostIndustriesUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostIndustriesForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostIndustriesNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostIndustriesUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostIndustriesInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustriesOK creates a PostIndustriesOK with default headers values
|
||||
func NewPostIndustriesOK() *PostIndustriesOK {
|
||||
return &PostIndustriesOK{}
|
||||
}
|
||||
|
||||
/* PostIndustriesOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Industry objects
|
||||
*/
|
||||
type PostIndustriesOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *research_models.IndustryResponse
|
||||
}
|
||||
|
||||
func (o *PostIndustriesOK) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesOK) GetPayload() *research_models.IndustryResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.IndustryResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesUnauthorized creates a PostIndustriesUnauthorized with default headers values
|
||||
func NewPostIndustriesUnauthorized() *PostIndustriesUnauthorized {
|
||||
return &PostIndustriesUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostIndustriesUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostIndustriesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesUnauthorized) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesForbidden creates a PostIndustriesForbidden with default headers values
|
||||
func NewPostIndustriesForbidden() *PostIndustriesForbidden {
|
||||
return &PostIndustriesForbidden{}
|
||||
}
|
||||
|
||||
/* PostIndustriesForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostIndustriesForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesForbidden) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesNotFound creates a PostIndustriesNotFound with default headers values
|
||||
func NewPostIndustriesNotFound() *PostIndustriesNotFound {
|
||||
return &PostIndustriesNotFound{}
|
||||
}
|
||||
|
||||
/* PostIndustriesNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostIndustriesNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesNotFound) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesUnprocessableEntity creates a PostIndustriesUnprocessableEntity with default headers values
|
||||
func NewPostIndustriesUnprocessableEntity() *PostIndustriesUnprocessableEntity {
|
||||
return &PostIndustriesUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostIndustriesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostIndustriesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesUnprocessableEntity) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesInternalServerError creates a PostIndustriesInternalServerError with default headers values
|
||||
func NewPostIndustriesInternalServerError() *PostIndustriesInternalServerError {
|
||||
return &PostIndustriesInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostIndustriesInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostIndustriesInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesInternalServerError) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industry_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new industry products API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for industry products API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
PostIndustryproducts(params *PostIndustryproductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustryproductsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
PostIndustryproducts adds a new industryproduct to taxnexus
|
||||
|
||||
Industry record to be added
|
||||
*/
|
||||
func (a *Client) PostIndustryproducts(params *PostIndustryproductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustryproductsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostIndustryproductsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postIndustryproducts",
|
||||
Method: "POST",
|
||||
PathPattern: "/industryproducts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostIndustryproductsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*PostIndustryproductsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postIndustryproducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industry_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// NewPostIndustryproductsParams creates a new PostIndustryproductsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostIndustryproductsParams() *PostIndustryproductsParams {
|
||||
return &PostIndustryproductsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsParamsWithTimeout creates a new PostIndustryproductsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostIndustryproductsParamsWithTimeout(timeout time.Duration) *PostIndustryproductsParams {
|
||||
return &PostIndustryproductsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsParamsWithContext creates a new PostIndustryproductsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostIndustryproductsParamsWithContext(ctx context.Context) *PostIndustryproductsParams {
|
||||
return &PostIndustryproductsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsParamsWithHTTPClient creates a new PostIndustryproductsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostIndustryproductsParamsWithHTTPClient(client *http.Client) *PostIndustryproductsParams {
|
||||
return &PostIndustryproductsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsParams contains all the parameters to send to the API endpoint
|
||||
for the post industryproducts operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostIndustryproductsParams struct {
|
||||
|
||||
/* IndustryRequest.
|
||||
|
||||
An array of new Industry records
|
||||
*/
|
||||
IndustryRequest *research_models.IndustryProductRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post industryproducts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIndustryproductsParams) WithDefaults() *PostIndustryproductsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post industryproducts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIndustryproductsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) WithTimeout(timeout time.Duration) *PostIndustryproductsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) WithContext(ctx context.Context) *PostIndustryproductsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) WithHTTPClient(client *http.Client) *PostIndustryproductsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithIndustryRequest adds the industryRequest to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) WithIndustryRequest(industryRequest *research_models.IndustryProductRequest) *PostIndustryproductsParams {
|
||||
o.SetIndustryRequest(industryRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIndustryRequest adds the industryRequest to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) SetIndustryRequest(industryRequest *research_models.IndustryProductRequest) {
|
||||
o.IndustryRequest = industryRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostIndustryproductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.IndustryRequest != nil {
|
||||
if err := r.SetBodyParam(o.IndustryRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industry_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// PostIndustryproductsReader is a Reader for the PostIndustryproducts structure.
|
||||
type PostIndustryproductsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostIndustryproductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostIndustryproductsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostIndustryproductsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostIndustryproductsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostIndustryproductsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostIndustryproductsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostIndustryproductsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsOK creates a PostIndustryproductsOK with default headers values
|
||||
func NewPostIndustryproductsOK() *PostIndustryproductsOK {
|
||||
return &PostIndustryproductsOK{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Industry objects
|
||||
*/
|
||||
type PostIndustryproductsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *research_models.IndustryProductResponse
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsOK) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsOK) GetPayload() *research_models.IndustryProductResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.IndustryProductResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsUnauthorized creates a PostIndustryproductsUnauthorized with default headers values
|
||||
func NewPostIndustryproductsUnauthorized() *PostIndustryproductsUnauthorized {
|
||||
return &PostIndustryproductsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostIndustryproductsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsUnauthorized) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsForbidden creates a PostIndustryproductsForbidden with default headers values
|
||||
func NewPostIndustryproductsForbidden() *PostIndustryproductsForbidden {
|
||||
return &PostIndustryproductsForbidden{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostIndustryproductsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsForbidden) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsNotFound creates a PostIndustryproductsNotFound with default headers values
|
||||
func NewPostIndustryproductsNotFound() *PostIndustryproductsNotFound {
|
||||
return &PostIndustryproductsNotFound{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostIndustryproductsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsNotFound) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsUnprocessableEntity creates a PostIndustryproductsUnprocessableEntity with default headers values
|
||||
func NewPostIndustryproductsUnprocessableEntity() *PostIndustryproductsUnprocessableEntity {
|
||||
return &PostIndustryproductsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostIndustryproductsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsUnprocessableEntity) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsInternalServerError creates a PostIndustryproductsInternalServerError with default headers values
|
||||
func NewPostIndustryproductsInternalServerError() *PostIndustryproductsInternalServerError {
|
||||
return &PostIndustryproductsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostIndustryproductsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsInternalServerError) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industryproducts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetIndustryProductsParams creates a new GetIndustryProductsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetIndustryProductsParams() *GetIndustryProductsParams {
|
||||
return &GetIndustryProductsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsParamsWithTimeout creates a new GetIndustryProductsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetIndustryProductsParamsWithTimeout(timeout time.Duration) *GetIndustryProductsParams {
|
||||
return &GetIndustryProductsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsParamsWithContext creates a new GetIndustryProductsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetIndustryProductsParamsWithContext(ctx context.Context) *GetIndustryProductsParams {
|
||||
return &GetIndustryProductsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsParamsWithHTTPClient creates a new GetIndustryProductsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetIndustryProductsParamsWithHTTPClient(client *http.Client) *GetIndustryProductsParams {
|
||||
return &GetIndustryProductsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsParams contains all the parameters to send to the API endpoint
|
||||
for the get industry products operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetIndustryProductsParams struct {
|
||||
|
||||
/* Active.
|
||||
|
||||
Only retrieve active records?
|
||||
*/
|
||||
Active *bool
|
||||
|
||||
/* IndustryProductID.
|
||||
|
||||
Taxnexus IndustryProduct record ID
|
||||
*/
|
||||
IndustryProductID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get industry products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIndustryProductsParams) WithDefaults() *GetIndustryProductsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get industry products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIndustryProductsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithTimeout(timeout time.Duration) *GetIndustryProductsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithContext(ctx context.Context) *GetIndustryProductsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithHTTPClient(client *http.Client) *GetIndustryProductsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithActive adds the active to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithActive(active *bool) *GetIndustryProductsParams {
|
||||
o.SetActive(active)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetActive adds the active to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetActive(active *bool) {
|
||||
o.Active = active
|
||||
}
|
||||
|
||||
// WithIndustryProductID adds the industryProductID to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithIndustryProductID(industryProductID *string) *GetIndustryProductsParams {
|
||||
o.SetIndustryProductID(industryProductID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIndustryProductID adds the industryProductId to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetIndustryProductID(industryProductID *string) {
|
||||
o.IndustryProductID = industryProductID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithLimit(limit *int64) *GetIndustryProductsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithOffset(offset *int64) *GetIndustryProductsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetIndustryProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
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.IndustryProductID != nil {
|
||||
|
||||
// query param industryProductId
|
||||
var qrIndustryProductID string
|
||||
|
||||
if o.IndustryProductID != nil {
|
||||
qrIndustryProductID = *o.IndustryProductID
|
||||
}
|
||||
qIndustryProductID := qrIndustryProductID
|
||||
if qIndustryProductID != "" {
|
||||
|
||||
if err := r.SetQueryParam("industryProductId", qIndustryProductID); 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.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 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industryproducts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// GetIndustryProductsReader is a Reader for the GetIndustryProducts structure.
|
||||
type GetIndustryProductsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetIndustryProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetIndustryProductsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetIndustryProductsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetIndustryProductsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetIndustryProductsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetIndustryProductsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetIndustryProductsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsOK creates a GetIndustryProductsOK with default headers values
|
||||
func NewGetIndustryProductsOK() *GetIndustryProductsOK {
|
||||
return &GetIndustryProductsOK{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Industry objects
|
||||
*/
|
||||
type GetIndustryProductsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *research_models.IndustryProductResponse
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsOK) GetPayload() *research_models.IndustryProductResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.IndustryProductResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsUnauthorized creates a GetIndustryProductsUnauthorized with default headers values
|
||||
func NewGetIndustryProductsUnauthorized() *GetIndustryProductsUnauthorized {
|
||||
return &GetIndustryProductsUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetIndustryProductsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsUnauthorized) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsForbidden creates a GetIndustryProductsForbidden with default headers values
|
||||
func NewGetIndustryProductsForbidden() *GetIndustryProductsForbidden {
|
||||
return &GetIndustryProductsForbidden{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetIndustryProductsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsForbidden) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsNotFound creates a GetIndustryProductsNotFound with default headers values
|
||||
func NewGetIndustryProductsNotFound() *GetIndustryProductsNotFound {
|
||||
return &GetIndustryProductsNotFound{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetIndustryProductsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsNotFound) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsUnprocessableEntity creates a GetIndustryProductsUnprocessableEntity with default headers values
|
||||
func NewGetIndustryProductsUnprocessableEntity() *GetIndustryProductsUnprocessableEntity {
|
||||
return &GetIndustryProductsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetIndustryProductsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsUnprocessableEntity) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsInternalServerError creates a GetIndustryProductsInternalServerError with default headers values
|
||||
func NewGetIndustryProductsInternalServerError() *GetIndustryProductsInternalServerError {
|
||||
return &GetIndustryProductsInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetIndustryProductsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsInternalServerError) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industryproducts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new industryproducts API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for industryproducts API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
GetIndustryProducts(params *GetIndustryProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustryProductsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetIndustryProducts gets a list of industryproducts
|
||||
|
||||
Return a list of all available IndustryProducts
|
||||
*/
|
||||
func (a *Client) GetIndustryProducts(params *GetIndustryProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustryProductsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetIndustryProductsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getIndustryProducts",
|
||||
Method: "GET",
|
||||
PathPattern: "/industryproducts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetIndustryProductsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*GetIndustryProductsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getIndustryProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -15,10 +15,15 @@ import (
|
|||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/accounts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/assets"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/clusters"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/company_products"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/contacts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/contracts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/databases"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industries"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industry_products"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industryproducts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/roles"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/templates"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/tenants"
|
||||
|
@ -68,10 +73,15 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Research {
|
|||
cli := new(Research)
|
||||
cli.Transport = transport
|
||||
cli.Accounts = accounts.New(transport, formats)
|
||||
cli.Assets = assets.New(transport, formats)
|
||||
cli.Clusters = clusters.New(transport, formats)
|
||||
cli.CompanyProducts = company_products.New(transport, formats)
|
||||
cli.Contacts = contacts.New(transport, formats)
|
||||
cli.Contracts = contracts.New(transport, formats)
|
||||
cli.Databases = databases.New(transport, formats)
|
||||
cli.Industries = industries.New(transport, formats)
|
||||
cli.IndustryProducts = industry_products.New(transport, formats)
|
||||
cli.Industryproducts = industryproducts.New(transport, formats)
|
||||
cli.Roles = roles.New(transport, formats)
|
||||
cli.Templates = templates.New(transport, formats)
|
||||
cli.Tenants = tenants.New(transport, formats)
|
||||
|
@ -122,14 +132,24 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
|
|||
type Research struct {
|
||||
Accounts accounts.ClientService
|
||||
|
||||
Assets assets.ClientService
|
||||
|
||||
Clusters clusters.ClientService
|
||||
|
||||
CompanyProducts company_products.ClientService
|
||||
|
||||
Contacts contacts.ClientService
|
||||
|
||||
Contracts contracts.ClientService
|
||||
|
||||
Databases databases.ClientService
|
||||
|
||||
Industries industries.ClientService
|
||||
|
||||
IndustryProducts industry_products.ClientService
|
||||
|
||||
Industryproducts industryproducts.ClientService
|
||||
|
||||
Roles roles.ClientService
|
||||
|
||||
Templates templates.ClientService
|
||||
|
@ -145,10 +165,15 @@ type Research struct {
|
|||
func (c *Research) SetTransport(transport runtime.ClientTransport) {
|
||||
c.Transport = transport
|
||||
c.Accounts.SetTransport(transport)
|
||||
c.Assets.SetTransport(transport)
|
||||
c.Clusters.SetTransport(transport)
|
||||
c.CompanyProducts.SetTransport(transport)
|
||||
c.Contacts.SetTransport(transport)
|
||||
c.Contracts.SetTransport(transport)
|
||||
c.Databases.SetTransport(transport)
|
||||
c.Industries.SetTransport(transport)
|
||||
c.IndustryProducts.SetTransport(transport)
|
||||
c.Industryproducts.SetTransport(transport)
|
||||
c.Roles.SetTransport(transport)
|
||||
c.Templates.SetTransport(transport)
|
||||
c.Tenants.SetTransport(transport)
|
||||
|
|
|
@ -23,287 +23,162 @@ import (
|
|||
type Account struct {
|
||||
|
||||
// Account Number
|
||||
Accountnumber string `json:"accountnumber,omitempty"`
|
||||
AccountNumber string `json:"AccountNumber,omitempty"`
|
||||
|
||||
// The marketing orgin of this account
|
||||
Accountsource string `json:"accountsource,omitempty"`
|
||||
|
||||
// Active
|
||||
Active bool `json:"active,omitempty"`
|
||||
|
||||
// For tax authorities, this account's administrative level, e.g. Local, County, State or Federal
|
||||
Administrativelevel string `json:"administrativelevel,omitempty"`
|
||||
|
||||
// Rollup Tax Amount
|
||||
Amount float64 `json:"amount,omitempty"`
|
||||
|
||||
// Amount Invoiced
|
||||
Amountinvoiced float64 `json:"amountinvoiced,omitempty"`
|
||||
|
||||
// Amount Paid
|
||||
Amountpaid float64 `json:"amountpaid,omitempty"`
|
||||
AccountSource string `json:"AccountSource,omitempty"`
|
||||
|
||||
// Annual Revenue Estimate
|
||||
Annualrevenue float64 `json:"annualrevenue,omitempty"`
|
||||
AnnualRevenue float64 `json:"AnnualRevenue,omitempty"`
|
||||
|
||||
// Account Balance
|
||||
Balance float64 `json:"balance,omitempty"`
|
||||
|
||||
// billingaddress
|
||||
Billingaddress *Address `json:"billingaddress,omitempty"`
|
||||
// billing address
|
||||
BillingAddress *Address `json:"BillingAddress,omitempty"`
|
||||
|
||||
// Contact ID
|
||||
Billingcontactid string `json:"billingcontactid,omitempty"`
|
||||
BillingContactID string `json:"BillingContactID,omitempty"`
|
||||
|
||||
// Billing Preference
|
||||
Billingpreference string `json:"billingpreference,omitempty"`
|
||||
// Date company closed
|
||||
CloseDate string `json:"CloseDate,omitempty"`
|
||||
|
||||
// businessaddress
|
||||
Businessaddress *Address `json:"businessaddress,omitempty"`
|
||||
// cloud revenue total
|
||||
CloudRevenueTotal float64 `json:"CloudRevenueTotal,omitempty"`
|
||||
|
||||
// Is this a cannabis customer?
|
||||
Cannabiscustomer bool `json:"cannabiscustomer,omitempty"`
|
||||
// cloud type
|
||||
CloudType string `json:"CloudType,omitempty"`
|
||||
|
||||
// Channel Program Level Name
|
||||
Channelprogramlevelname string `json:"channelprogramlevelname,omitempty"`
|
||||
|
||||
// Channel Program Name
|
||||
Channelprogramname string `json:"channelprogramname,omitempty"`
|
||||
|
||||
// Client End Date
|
||||
Clientenddate string `json:"clientenddate,omitempty"`
|
||||
|
||||
// Client Start Date
|
||||
Clientstartdate string `json:"clientstartdate,omitempty"`
|
||||
|
||||
// The Company ID of this Account
|
||||
Companyid string `json:"companyid,omitempty"`
|
||||
|
||||
// The Id of the geo coordinates of this account
|
||||
Coordinateid string `json:"coordinateid,omitempty"`
|
||||
// cloud year
|
||||
CloudYear string `json:"CloudYear,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
Createdbyid string `json:"createdbyid,omitempty"`
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
Createddate string `json:"createddate,omitempty"`
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Customer ID from source system
|
||||
Customerid string `json:"customerid,omitempty"`
|
||||
|
||||
// Customer Priority
|
||||
Customerpriority string `json:"customerpriority,omitempty"`
|
||||
|
||||
// D-n-B Company
|
||||
Dandbcompanyid string `json:"dandbcompanyid,omitempty"`
|
||||
|
||||
// This Account's 'Doing Business As' name
|
||||
Dba string `json:"dba,omitempty"`
|
||||
|
||||
// defaultaddress
|
||||
Defaultaddress *Address `json:"defaultaddress,omitempty"`
|
||||
|
||||
// Default Backend ID
|
||||
Defaultbackendid string `json:"defaultbackendid,omitempty"`
|
||||
|
||||
// Default Delivery Address Contact ID
|
||||
Defaultdeliverycontactid string `json:"defaultdeliverycontactid,omitempty"`
|
||||
|
||||
// Default End User Contact ID
|
||||
Defaultenduserid string `json:"defaultenduserid,omitempty"`
|
||||
// crunchbase URL
|
||||
CrunchbaseURL string `json:"CrunchbaseURL,omitempty"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description,omitempty"`
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// D-U-N-S Number
|
||||
Dunsnumber string `json:"dunsnumber,omitempty"`
|
||||
|
||||
// EIN
|
||||
Ein string `json:"ein,omitempty"`
|
||||
// earnings call
|
||||
EarningsCall string `json:"EarningsCall,omitempty"`
|
||||
|
||||
// Main Account Email
|
||||
Email string `json:"email,omitempty"`
|
||||
Email string `json:"Email,omitempty"`
|
||||
|
||||
// Enrollment Status
|
||||
Enrollmentstatus string `json:"enrollmentstatus,omitempty"`
|
||||
// equity funding
|
||||
EquityFunding float64 `json:"EquityFunding,omitempty"`
|
||||
|
||||
// facebook
|
||||
Facebook string `json:"Facebook,omitempty"`
|
||||
|
||||
// Fax
|
||||
Fax string `json:"fax,omitempty"`
|
||||
Fax string `json:"Fax,omitempty"`
|
||||
|
||||
// founded date
|
||||
FoundedDate string `json:"FoundedDate,omitempty"`
|
||||
|
||||
// Taxnexus Account Id
|
||||
ID string `json:"id,omitempty"`
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// IP o date
|
||||
IPODate string `json:"IPODate,omitempty"`
|
||||
|
||||
// industries
|
||||
Industries string `json:"Industries,omitempty"`
|
||||
|
||||
// Industry
|
||||
Industry string `json:"industry,omitempty"`
|
||||
|
||||
// Customer Portal Account
|
||||
Iscustomerportal bool `json:"iscustomerportal,omitempty"`
|
||||
|
||||
// Partner Account
|
||||
Ispartner bool `json:"ispartner,omitempty"`
|
||||
|
||||
// ISP Customer?
|
||||
Ispcustomer bool `json:"ispcustomer,omitempty"`
|
||||
|
||||
// Data.com Key
|
||||
Jigsaw string `json:"jigsaw,omitempty"`
|
||||
Industry string `json:"Industry,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
Lastmodifiedbyid string `json:"lastmodifiedbyid,omitempty"`
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
Lastmodifieddate string `json:"lastmodifieddate,omitempty"`
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// MSP Customer?
|
||||
Mspcustomer bool `json:"mspcustomer,omitempty"`
|
||||
// linked in
|
||||
LinkedIn string `json:"LinkedIn,omitempty"`
|
||||
|
||||
// NAICS Code
|
||||
Naicscode string `json:"naicscode,omitempty"`
|
||||
// location
|
||||
Location string `json:"Location,omitempty"`
|
||||
|
||||
// NAICS Description
|
||||
Naicsdesc string `json:"naicsdesc,omitempty"`
|
||||
// market capitalization
|
||||
MarketCapitalization float64 `json:"MarketCapitalization,omitempty"`
|
||||
|
||||
// Account Name
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// Employee Count Estimate
|
||||
Numberofemployees int64 `json:"numberofemployees,omitempty"`
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// Number of Locations Estimate
|
||||
Numberoflocations int64 `json:"numberoflocations,omitempty"`
|
||||
NumberInvestments int64 `json:"NumberInvestments,omitempty"`
|
||||
|
||||
// Open Charges
|
||||
Opencharges float64 `json:"opencharges,omitempty"`
|
||||
|
||||
// Vendor Order Contact ID
|
||||
Ordercontactid string `json:"ordercontactid,omitempty"`
|
||||
|
||||
// Order Email
|
||||
Orderemail string `json:"orderemail,omitempty"`
|
||||
// Employee Count Estimate
|
||||
NumberOfEmployees int64 `json:"NumberOfEmployees,omitempty"`
|
||||
|
||||
// Account Owner User ID
|
||||
Ownerid string `json:"ownerid,omitempty"`
|
||||
OwnerID string `json:"OwnerID,omitempty"`
|
||||
|
||||
// Ownership
|
||||
Ownership string `json:"ownership,omitempty"`
|
||||
|
||||
// Parent Foreign Key
|
||||
Parentfk string `json:"parentfk,omitempty"`
|
||||
Ownership string `json:"Ownership,omitempty"`
|
||||
|
||||
// Parent Account
|
||||
Parentid string `json:"parentid,omitempty"`
|
||||
ParentID string `json:"ParentID,omitempty"`
|
||||
|
||||
// Phone
|
||||
Phone string `json:"phone,omitempty"`
|
||||
Phone string `json:"Phone,omitempty"`
|
||||
|
||||
// The ID of the Place situs record that applies to this Account
|
||||
Placeid string `json:"placeid,omitempty"`
|
||||
|
||||
// Tax Preparer Contact ID
|
||||
Preparerid string `json:"preparerid,omitempty"`
|
||||
|
||||
// Rating
|
||||
Rating string `json:"rating,omitempty"`
|
||||
|
||||
// Rating Engine identifier
|
||||
Ratingengineid string `json:"ratingengineid,omitempty"`
|
||||
|
||||
// External Reference ID
|
||||
Ref string `json:"ref,omitempty"`
|
||||
|
||||
// Rollup Revenue Base
|
||||
Revenuebase float64 `json:"revenuebase,omitempty"`
|
||||
|
||||
// Rollup Revenue Net
|
||||
Revenuenet float64 `json:"revenuenet,omitempty"`
|
||||
|
||||
// Rollup Revenue Not Taxable
|
||||
Revenuenottaxable float64 `json:"revenuenottaxable,omitempty"`
|
||||
|
||||
// shippingaddress
|
||||
Shippingaddress *Address `json:"shippingaddress,omitempty"`
|
||||
|
||||
// Shipping Census Tract
|
||||
Shippingcensustract string `json:"shippingcensustract,omitempty"`
|
||||
|
||||
// Shipping Contact ID
|
||||
Shippingcontactid string `json:"shippingcontactid,omitempty"`
|
||||
|
||||
// Shipping County
|
||||
Shippingcounty string `json:"shippingcounty,omitempty"`
|
||||
// publish
|
||||
Publish bool `json:"Publish,omitempty"`
|
||||
|
||||
// SIC Code
|
||||
Sic string `json:"sic,omitempty"`
|
||||
SIC string `json:"SIC,omitempty"`
|
||||
|
||||
// SIC Description
|
||||
Sicdesc string `json:"sicdesc,omitempty"`
|
||||
SICDesc string `json:"SICDesc,omitempty"`
|
||||
|
||||
// salesforce first
|
||||
SalesforceFirst bool `json:"SalesforceFirst,omitempty"`
|
||||
|
||||
// shipping address
|
||||
ShippingAddress *Address `json:"ShippingAddress,omitempty"`
|
||||
|
||||
// shipping contact ID
|
||||
ShippingContactID string `json:"ShippingContactID,omitempty"`
|
||||
|
||||
// Account Site
|
||||
Site string `json:"site,omitempty"`
|
||||
Site string `json:"Site,omitempty"`
|
||||
|
||||
// Account Status
|
||||
Status string `json:"status,omitempty"`
|
||||
|
||||
// Tax Exemption
|
||||
Taxexemption string `json:"taxexemption,omitempty"`
|
||||
|
||||
// Rollup Tax On Tax
|
||||
Taxontax float64 `json:"taxontax,omitempty"`
|
||||
|
||||
// Telecom Customer?
|
||||
Telecomcustomer bool `json:"telecomcustomer,omitempty"`
|
||||
// tag line
|
||||
TagLine string `json:"TagLine,omitempty"`
|
||||
|
||||
// tenant identifier
|
||||
Tenantid string `json:"tenantid,omitempty"`
|
||||
TenantID string `json:"TenantID,omitempty"`
|
||||
|
||||
// Ticker Symbol
|
||||
Tickersymbol string `json:"tickersymbol,omitempty"`
|
||||
// ticker symbol
|
||||
TickerSymbol string `json:"TickerSymbol,omitempty"`
|
||||
|
||||
// Tradestyle
|
||||
Tradestyle string `json:"tradestyle,omitempty"`
|
||||
// twitter
|
||||
Twitter string `json:"Twitter,omitempty"`
|
||||
|
||||
// Type
|
||||
Type string `json:"type,omitempty"`
|
||||
|
||||
// Unapplied Payments
|
||||
Unappliedpayments float64 `json:"unappliedpayments,omitempty"`
|
||||
|
||||
// Rollup Unit Base
|
||||
Unitbase float64 `json:"unitbase,omitempty"`
|
||||
|
||||
// Upsell Opportunity
|
||||
Upsellopportunity string `json:"upsellopportunity,omitempty"`
|
||||
Type string `json:"Type,omitempty"`
|
||||
|
||||
// Website
|
||||
Website string `json:"website,omitempty"`
|
||||
|
||||
// WHMCS Client ID
|
||||
Whmcsclientid int64 `json:"whmcsclientid,omitempty"`
|
||||
|
||||
// Xero Contact ID
|
||||
Xerocontactid string `json:"xerocontactid,omitempty"`
|
||||
Website string `json:"Website,omitempty"`
|
||||
|
||||
// Year Started
|
||||
Yearstarted string `json:"yearstarted,omitempty"`
|
||||
YearStarted string `json:"YearStarted,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this account
|
||||
func (m *Account) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateBillingaddress(formats); err != nil {
|
||||
if err := m.validateBillingAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateBusinessaddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateDefaultaddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateShippingaddress(formats); err != nil {
|
||||
if err := m.validateShippingAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -313,17 +188,17 @@ func (m *Account) Validate(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) validateBillingaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Billingaddress) { // not required
|
||||
func (m *Account) validateBillingAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.BillingAddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Billingaddress != nil {
|
||||
if err := m.Billingaddress.Validate(formats); err != nil {
|
||||
if m.BillingAddress != nil {
|
||||
if err := m.BillingAddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("billingaddress")
|
||||
return ve.ValidateName("BillingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("billingaddress")
|
||||
return ce.ValidateName("BillingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -332,55 +207,17 @@ func (m *Account) validateBillingaddress(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) validateBusinessaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Businessaddress) { // not required
|
||||
func (m *Account) validateShippingAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.ShippingAddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Businessaddress != nil {
|
||||
if err := m.Businessaddress.Validate(formats); err != nil {
|
||||
if m.ShippingAddress != nil {
|
||||
if err := m.ShippingAddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("businessaddress")
|
||||
return ve.ValidateName("ShippingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("businessaddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) validateDefaultaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Defaultaddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Defaultaddress != nil {
|
||||
if err := m.Defaultaddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("defaultaddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("defaultaddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) validateShippingaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Shippingaddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Shippingaddress != nil {
|
||||
if err := m.Shippingaddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("shippingaddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("shippingaddress")
|
||||
return ce.ValidateName("ShippingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -393,19 +230,11 @@ func (m *Account) validateShippingaddress(formats strfmt.Registry) error {
|
|||
func (m *Account) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateBillingaddress(ctx, formats); err != nil {
|
||||
if err := m.contextValidateBillingAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateBusinessaddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateDefaultaddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateShippingaddress(ctx, formats); err != nil {
|
||||
if err := m.contextValidateShippingAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -415,14 +244,14 @@ func (m *Account) ContextValidate(ctx context.Context, formats strfmt.Registry)
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) contextValidateBillingaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
func (m *Account) contextValidateBillingAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Billingaddress != nil {
|
||||
if err := m.Billingaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if m.BillingAddress != nil {
|
||||
if err := m.BillingAddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("billingaddress")
|
||||
return ve.ValidateName("BillingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("billingaddress")
|
||||
return ce.ValidateName("BillingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -431,46 +260,14 @@ func (m *Account) contextValidateBillingaddress(ctx context.Context, formats str
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) contextValidateBusinessaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
func (m *Account) contextValidateShippingAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Businessaddress != nil {
|
||||
if err := m.Businessaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if m.ShippingAddress != nil {
|
||||
if err := m.ShippingAddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("businessaddress")
|
||||
return ve.ValidateName("ShippingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("businessaddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) contextValidateDefaultaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Defaultaddress != nil {
|
||||
if err := m.Defaultaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("defaultaddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("defaultaddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) contextValidateShippingaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Shippingaddress != nil {
|
||||
if err := m.Shippingaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("shippingaddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("shippingaddress")
|
||||
return ce.ValidateName("ShippingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -0,0 +1,246 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// Asset asset
|
||||
//
|
||||
// swagger:model Asset
|
||||
type Asset struct {
|
||||
|
||||
// Account
|
||||
AccountID string `json:"AccountID,omitempty"`
|
||||
|
||||
// address
|
||||
Address *Address `json:"Address,omitempty"`
|
||||
|
||||
// Asset Level
|
||||
AssetLevel float64 `json:"AssetLevel,omitempty"`
|
||||
|
||||
// Asset Provided By
|
||||
AssetProvidedByID string `json:"AssetProvidedByID,omitempty"`
|
||||
|
||||
// Asset Serviced By
|
||||
AssetServicedByID string `json:"AssetServicedByID,omitempty"`
|
||||
|
||||
// Company Product
|
||||
CompanyProductID string `json:"CompanyProductID,omitempty"`
|
||||
|
||||
// Consequence Of Failure
|
||||
ConsequenceOfFailure string `json:"ConsequenceOfFailure,omitempty"`
|
||||
|
||||
// Contact
|
||||
ContactID string `json:"ContactID,omitempty"`
|
||||
|
||||
// Created By
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Current Amount
|
||||
CurrentAmount float64 `json:"CurrentAmount,omitempty"`
|
||||
|
||||
// Current Lifecycle End Date
|
||||
CurrentLifecycleEndDate string `json:"CurrentLifecycleEndDate,omitempty"`
|
||||
|
||||
// Current Monthly Recurring Revenue
|
||||
CurrentMrr float64 `json:"CurrentMrr,omitempty"`
|
||||
|
||||
// Current Quantity
|
||||
CurrentQuantity float64 `json:"CurrentQuantity,omitempty"`
|
||||
|
||||
// Description
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// Digital Asset Status
|
||||
DigitalAssetStatus string `json:"DigitalAssetStatus,omitempty"`
|
||||
|
||||
// External Id
|
||||
ExternalIdentifier string `json:"ExternalIdentifier,omitempty"`
|
||||
|
||||
// Has Lifecycle Management
|
||||
HasLifecycleManagement bool `json:"HasLifecycleManagement,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Install Date
|
||||
InstallDate string `json:"InstallDate,omitempty"`
|
||||
|
||||
// Competitor Asset
|
||||
IsCompetitorProduct bool `json:"IsCompetitorProduct,omitempty"`
|
||||
|
||||
// Internal Asset
|
||||
IsInternal bool `json:"IsInternal,omitempty"`
|
||||
|
||||
// Last Modified By
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// Location
|
||||
LocationID string `json:"LocationID,omitempty"`
|
||||
|
||||
// MIME Type
|
||||
MIMEType string `json:"MIMEType,omitempty"`
|
||||
|
||||
// Manufacture Date
|
||||
ManufactureDate string `json:"ManufactureDate,omitempty"`
|
||||
|
||||
// Asset Name
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// Parent Asset
|
||||
ParentID string `json:"ParentID,omitempty"`
|
||||
|
||||
// Price
|
||||
Price float64 `json:"Price,omitempty"`
|
||||
|
||||
// Product
|
||||
Product2ID string `json:"Product2ID,omitempty"`
|
||||
|
||||
// Product Code
|
||||
ProductCode string `json:"ProductCode,omitempty"`
|
||||
|
||||
// Product Description
|
||||
ProductDescription string `json:"ProductDescription,omitempty"`
|
||||
|
||||
// Product Family
|
||||
ProductFamily string `json:"ProductFamily,omitempty"`
|
||||
|
||||
// Purchase Date
|
||||
PurchaseDate string `json:"PurchaseDate,omitempty"`
|
||||
|
||||
// Quantity
|
||||
Quantity float64 `json:"Quantity,omitempty"`
|
||||
|
||||
// Root Asset
|
||||
RootAssetID string `json:"RootAssetID,omitempty"`
|
||||
|
||||
// Serial Number
|
||||
SerialNumber string `json:"SerialNumber,omitempty"`
|
||||
|
||||
// Status
|
||||
Status string `json:"Status,omitempty"`
|
||||
|
||||
// Status Reason
|
||||
StatusReason string `json:"StatusReason,omitempty"`
|
||||
|
||||
// Product SKU
|
||||
StockKeepingUnit string `json:"StockKeepingUnit,omitempty"`
|
||||
|
||||
// Tenant ID
|
||||
TenantID string `json:"TenantID,omitempty"`
|
||||
|
||||
// Total Lifecycle Amount
|
||||
TotalLifecycleAmount float64 `json:"TotalLifecycleAmount,omitempty"`
|
||||
|
||||
// Type
|
||||
Type string `json:"Type,omitempty"`
|
||||
|
||||
// URL
|
||||
URL string `json:"URL,omitempty"`
|
||||
|
||||
// Unique Identifier
|
||||
UUID string `json:"UUID,omitempty"`
|
||||
|
||||
// Usage End Date
|
||||
UsageEndDate string `json:"UsageEndDate,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this asset
|
||||
func (m *Asset) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Asset) validateAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Address) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Address != nil {
|
||||
if err := m.Address.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Address")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Address")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this asset based on the context it is used
|
||||
func (m *Asset) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Asset) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Address")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Asset) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Asset) UnmarshalBinary(b []byte) error {
|
||||
var res Asset
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// AssetRequest An array of Asset objects with Contacts
|
||||
//
|
||||
// swagger:model AssetRequest
|
||||
type AssetRequest struct {
|
||||
|
||||
// data
|
||||
Data []*Asset `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this asset request
|
||||
func (m *AssetRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this asset request based on the context it is used
|
||||
func (m *AssetRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetRequest) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *AssetRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *AssetRequest) UnmarshalBinary(b []byte) error {
|
||||
var res AssetRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// AssetResponse An array of Asset objects with Contacts
|
||||
//
|
||||
// swagger:model AssetResponse
|
||||
type AssetResponse struct {
|
||||
|
||||
// data
|
||||
Data []*Asset `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this asset response
|
||||
func (m *AssetResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this asset response based on the context it is used
|
||||
func (m *AssetResponse) 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 *AssetResponse) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetResponse) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *AssetResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *AssetResponse) UnmarshalBinary(b []byte) error {
|
||||
var res AssetResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// CompanyProduct A software product or service vended by a Company
|
||||
//
|
||||
// swagger:model CompanyProduct
|
||||
type CompanyProduct struct {
|
||||
|
||||
// Taxnexus ID of the Company that owns this Product
|
||||
AccountID string `json:"AccountID,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Description of product
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// Product Name
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// TagLine
|
||||
TagLine string `json:"TagLine,omitempty"`
|
||||
|
||||
// Website
|
||||
URL string `json:"URL,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this company product
|
||||
func (m *CompanyProduct) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this company product based on context it is used
|
||||
func (m *CompanyProduct) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyProduct) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyProduct) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyProduct
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,171 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// CompanyProductRequest company product request
|
||||
//
|
||||
// swagger:model CompanyProductRequest
|
||||
type CompanyProductRequest struct {
|
||||
|
||||
// data
|
||||
// Required: true
|
||||
Data []*CompanyProduct `json:"data"`
|
||||
|
||||
// meta
|
||||
// Required: true
|
||||
Meta *RequestMeta `json:"meta"`
|
||||
}
|
||||
|
||||
// Validate validates this company product request
|
||||
func (m *CompanyProductRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductRequest) validateData(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("data", "body", m.Data); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductRequest) validateMeta(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("meta", "body", m.Meta); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this company product request based on the context it is used
|
||||
func (m *CompanyProductRequest) 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 *CompanyProductRequest) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductRequest) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyProductRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyProductRequest) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyProductRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// CompanyProductResponse company product response
|
||||
//
|
||||
// swagger:model CompanyProductResponse
|
||||
type CompanyProductResponse struct {
|
||||
|
||||
// data
|
||||
Data []*CompanyProduct `json:"data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this company product response
|
||||
func (m *CompanyProductResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this company product response based on the context it is used
|
||||
func (m *CompanyProductResponse) 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 *CompanyProductResponse) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductResponse) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyProductResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyProductResponse) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyProductResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -23,150 +23,126 @@ import (
|
|||
type Contact struct {
|
||||
|
||||
// The primary account ID of this contact
|
||||
Accountid string `json:"accountid,omitempty"`
|
||||
AccountID string `json:"AccountID,omitempty"`
|
||||
|
||||
// Assistant Name
|
||||
Assistantname string `json:"assistantname,omitempty"`
|
||||
AssistantName string `json:"AssistantName,omitempty"`
|
||||
|
||||
// Asst. Phone
|
||||
Assistantphone string `json:"assistantphone,omitempty"`
|
||||
AssistantPhone string `json:"AssistantPhone,omitempty"`
|
||||
|
||||
// Birthdate
|
||||
Birthdate string `json:"birthdate,omitempty"`
|
||||
BirthDate string `json:"BirthDate,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
Createdbyid string `json:"createdbyid,omitempty"`
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
Createddate string `json:"createddate,omitempty"`
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Department
|
||||
Department string `json:"department,omitempty"`
|
||||
Department string `json:"Department,omitempty"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description,omitempty"`
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// Do Not Call?
|
||||
Donotcall bool `json:"donotcall,omitempty"`
|
||||
DoNotCall bool `json:"DoNotCall,omitempty"`
|
||||
|
||||
// Email address
|
||||
Email string `json:"email,omitempty"`
|
||||
Email string `json:"Email,omitempty"`
|
||||
|
||||
// Email Bounce Date
|
||||
Emailbounceddate string `json:"emailbounceddate,omitempty"`
|
||||
EmailBounceDate string `json:"EmailBounceDate,omitempty"`
|
||||
|
||||
// Email Bounce Reason
|
||||
Emailbouncedreason string `json:"emailbouncedreason,omitempty"`
|
||||
|
||||
// Taxnexus Enrollment Status
|
||||
Enrollmentstatus string `json:"enrollmentstatus,omitempty"`
|
||||
EmailBounceReason string `json:"EmailBounceReason,omitempty"`
|
||||
|
||||
// Fax Number
|
||||
Fax string `json:"fax,omitempty"`
|
||||
Facebook string `json:"Facebook,omitempty"`
|
||||
|
||||
// fax
|
||||
Fax string `json:"Fax,omitempty"`
|
||||
|
||||
// First Name
|
||||
Firstname string `json:"firstname,omitempty"`
|
||||
FirstName string `json:"FirstName,omitempty"`
|
||||
|
||||
// Email Opt Out
|
||||
Hasoptedoutofemail bool `json:"hasoptedoutofemail,omitempty"`
|
||||
HasOptedOutOfEmail bool `json:"HasOptedOutOfEmail,omitempty"`
|
||||
|
||||
// Fax Opt Out
|
||||
Hasoptedoutoffax bool `json:"hasoptedoutoffax,omitempty"`
|
||||
HasOptedOutOfFax bool `json:"HasOptedOutOfFax,omitempty"`
|
||||
|
||||
// Home Phone
|
||||
Homephone string `json:"homephone,omitempty"`
|
||||
HomePhone string `json:"HomePhone,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"id,omitempty"`
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Does this contact have bounced emails?
|
||||
Isemailbounced bool `json:"isemailbounced,omitempty"`
|
||||
|
||||
// Is Provisioned?
|
||||
Isprovisioned bool `json:"isprovisioned,omitempty"`
|
||||
IsEmailBounced bool `json:"IsEmailBounced,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
Lastmodifiedbyid string `json:"lastmodifiedbyid,omitempty"`
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
Lastmodifieddate string `json:"lastmodifieddate,omitempty"`
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// Last Name
|
||||
Lastname string `json:"lastname,omitempty"`
|
||||
LastName string `json:"LastName,omitempty"`
|
||||
|
||||
// Lead Source
|
||||
Leadsource string `json:"leadsource,omitempty"`
|
||||
|
||||
// Level
|
||||
Level string `json:"level,omitempty"`
|
||||
LeadSource string `json:"LeadSource,omitempty"`
|
||||
|
||||
// LinkedIn Page
|
||||
Linkedin string `json:"linkedin,omitempty"`
|
||||
LinkedIn string `json:"LinkedIn,omitempty"`
|
||||
|
||||
// mailingaddress
|
||||
Mailingaddress *Address `json:"mailingaddress,omitempty"`
|
||||
|
||||
// Mailing Lists
|
||||
Mailinglists string `json:"mailinglists,omitempty"`
|
||||
// mailing address
|
||||
MailingAddress *Address `json:"MailingAddress,omitempty"`
|
||||
|
||||
// Mobile Phone
|
||||
Mobilephone string `json:"mobilephone,omitempty"`
|
||||
MobilePhone string `json:"MobilePhone,omitempty"`
|
||||
|
||||
// Full Name
|
||||
Name string `json:"name,omitempty"`
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// otheraddress
|
||||
Otheraddress *Address `json:"otheraddress,omitempty"`
|
||||
// other address
|
||||
OtherAddress *Address `json:"OtherAddress,omitempty"`
|
||||
|
||||
// Other Phone
|
||||
Otherphone string `json:"otherphone,omitempty"`
|
||||
OtherPhone string `json:"OtherPhone,omitempty"`
|
||||
|
||||
// The User ID of the user who owns this Contact
|
||||
Ownerid string `json:"ownerid,omitempty"`
|
||||
OwnerID string `json:"OwnerID,omitempty"`
|
||||
|
||||
// Personal Email Address for this Contact
|
||||
Personalemail string `json:"personalemail,omitempty"`
|
||||
PersonalEmail string `json:"PersonalEmail,omitempty"`
|
||||
|
||||
// Phone Number
|
||||
Phone string `json:"phone,omitempty"`
|
||||
Phone string `json:"Phone,omitempty"`
|
||||
|
||||
// URL of a photograph of this User
|
||||
Photourl string `json:"photourl,omitempty"`
|
||||
|
||||
// Recruiting Status
|
||||
Recruitingstatus string `json:"recruitingstatus,omitempty"`
|
||||
|
||||
// External reference to this contact, if any
|
||||
Ref string `json:"ref,omitempty"`
|
||||
|
||||
// Reports To Contact ID
|
||||
Reportstoid string `json:"reportstoid,omitempty"`
|
||||
|
||||
// Contact Salutation
|
||||
Salutation string `json:"salutation,omitempty"`
|
||||
|
||||
// The Contact Status
|
||||
Status string `json:"status,omitempty"`
|
||||
PhotoURL string `json:"PhotoURL,omitempty"`
|
||||
|
||||
// tenant identifier
|
||||
Tenantid string `json:"tenantid,omitempty"`
|
||||
TenantID string `json:"TenantID,omitempty"`
|
||||
|
||||
// Contact Title
|
||||
Title string `json:"title,omitempty"`
|
||||
Title string `json:"Title,omitempty"`
|
||||
|
||||
// Contact Type
|
||||
Type string `json:"type,omitempty"`
|
||||
// twitter
|
||||
Twitter string `json:"Twitter,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this contact
|
||||
func (m *Contact) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateMailingaddress(formats); err != nil {
|
||||
if err := m.validateMailingAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateOtheraddress(formats); err != nil {
|
||||
if err := m.validateOtherAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -176,17 +152,17 @@ func (m *Contact) Validate(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Contact) validateMailingaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Mailingaddress) { // not required
|
||||
func (m *Contact) validateMailingAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.MailingAddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Mailingaddress != nil {
|
||||
if err := m.Mailingaddress.Validate(formats); err != nil {
|
||||
if m.MailingAddress != nil {
|
||||
if err := m.MailingAddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("mailingaddress")
|
||||
return ve.ValidateName("MailingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("mailingaddress")
|
||||
return ce.ValidateName("MailingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -195,17 +171,17 @@ func (m *Contact) validateMailingaddress(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Contact) validateOtheraddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Otheraddress) { // not required
|
||||
func (m *Contact) validateOtherAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.OtherAddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Otheraddress != nil {
|
||||
if err := m.Otheraddress.Validate(formats); err != nil {
|
||||
if m.OtherAddress != nil {
|
||||
if err := m.OtherAddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("otheraddress")
|
||||
return ve.ValidateName("OtherAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("otheraddress")
|
||||
return ce.ValidateName("OtherAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -218,11 +194,11 @@ func (m *Contact) validateOtheraddress(formats strfmt.Registry) error {
|
|||
func (m *Contact) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateMailingaddress(ctx, formats); err != nil {
|
||||
if err := m.contextValidateMailingAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateOtheraddress(ctx, formats); err != nil {
|
||||
if err := m.contextValidateOtherAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -232,14 +208,14 @@ func (m *Contact) ContextValidate(ctx context.Context, formats strfmt.Registry)
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Contact) contextValidateMailingaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
func (m *Contact) contextValidateMailingAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Mailingaddress != nil {
|
||||
if err := m.Mailingaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if m.MailingAddress != nil {
|
||||
if err := m.MailingAddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("mailingaddress")
|
||||
return ve.ValidateName("MailingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("mailingaddress")
|
||||
return ce.ValidateName("MailingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -248,14 +224,14 @@ func (m *Contact) contextValidateMailingaddress(ctx context.Context, formats str
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Contact) contextValidateOtheraddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
func (m *Contact) contextValidateOtherAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Otheraddress != nil {
|
||||
if err := m.Otheraddress.ContextValidate(ctx, formats); err != nil {
|
||||
if m.OtherAddress != nil {
|
||||
if err := m.OtherAddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("otheraddress")
|
||||
return ve.ValidateName("OtherAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("otheraddress")
|
||||
return ce.ValidateName("OtherAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// Industry An industry that is being researched
|
||||
//
|
||||
// swagger:model Industry
|
||||
type Industry struct {
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Industry Description
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The hierarchical level of this Industry
|
||||
Level string `json:"Level,omitempty"`
|
||||
|
||||
// Industry Name
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// The ID of the Parent Industry
|
||||
ParentIndustryID string `json:"ParentIndustryID,omitempty"`
|
||||
|
||||
// The full path of this industry, including Parent
|
||||
Path string `json:"Path,omitempty"`
|
||||
|
||||
// The URL of the corresponding page on the CMS
|
||||
SiteURL string `json:"SiteURL,omitempty"`
|
||||
|
||||
// The CMS Slug for this Industry
|
||||
Slug string `json:"Slug,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry
|
||||
func (m *Industry) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this industry based on context it is used
|
||||
func (m *Industry) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Industry) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Industry) UnmarshalBinary(b []byte) error {
|
||||
var res Industry
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// IndustryProduct Junction object between Industry and CompanyProduct
|
||||
//
|
||||
// swagger:model IndustryProduct
|
||||
type IndustryProduct struct {
|
||||
|
||||
// company product ID
|
||||
CompanyProductID string `json:"CompanyProductID,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// HTML
|
||||
HTML string `json:"HTML,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// industry ID
|
||||
IndustryID string `json:"IndustryID,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry product
|
||||
func (m *IndustryProduct) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this industry product based on context it is used
|
||||
func (m *IndustryProduct) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryProduct) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryProduct) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryProduct
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IndustryProductRequest An array of IndustryProduct objects submitted for processing
|
||||
//
|
||||
// swagger:model IndustryProductRequest
|
||||
type IndustryProductRequest struct {
|
||||
|
||||
// data
|
||||
Data []*IndustryProduct `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this industry product request
|
||||
func (m *IndustryProductRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this industry product request based on the context it is used
|
||||
func (m *IndustryProductRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductRequest) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryProductRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryProductRequest) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryProductRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IndustryProductResponse An array of IndustryProduct objects produced in response to a request
|
||||
//
|
||||
// swagger:model IndustryProductResponse
|
||||
type IndustryProductResponse struct {
|
||||
|
||||
// data
|
||||
Data []*IndustryProduct `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry product response
|
||||
func (m *IndustryProductResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this industry product response based on the context it is used
|
||||
func (m *IndustryProductResponse) 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 *IndustryProductResponse) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductResponse) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryProductResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryProductResponse) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryProductResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IndustryRequest An array of Industry objects submitted for processing
|
||||
//
|
||||
// swagger:model IndustryRequest
|
||||
type IndustryRequest struct {
|
||||
|
||||
// data
|
||||
Data []*Industry `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this industry request
|
||||
func (m *IndustryRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this industry request based on the context it is used
|
||||
func (m *IndustryRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryRequest) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryRequest) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IndustryResponse An array of Industry objects produced in response to a request
|
||||
//
|
||||
// swagger:model IndustryResponse
|
||||
type IndustryResponse struct {
|
||||
|
||||
// data
|
||||
Data []*Industry `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry response
|
||||
func (m *IndustryResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this industry response based on the context it is used
|
||||
func (m *IndustryResponse) 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 *IndustryResponse) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryResponse) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryResponse) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new assets API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for assets API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
GetAssets(params *GetAssetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAssetsOK, error)
|
||||
|
||||
PostAssets(params *PostAssetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAssetsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetAssets gets a list of assets
|
||||
|
||||
Return a list of all available Assets
|
||||
*/
|
||||
func (a *Client) GetAssets(params *GetAssetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAssetsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetAssetsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getAssets",
|
||||
Method: "GET",
|
||||
PathPattern: "/assets",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetAssetsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*GetAssetsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getAssets: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostAssets adds a new asset to taxnexus
|
||||
|
||||
Industry record to be added
|
||||
*/
|
||||
func (a *Client) PostAssets(params *PostAssetsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostAssetsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostAssetsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postAssets",
|
||||
Method: "POST",
|
||||
PathPattern: "/assets",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostAssetsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*PostAssetsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postAssets: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetAssetsParams creates a new GetAssetsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetAssetsParams() *GetAssetsParams {
|
||||
return &GetAssetsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetAssetsParamsWithTimeout creates a new GetAssetsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetAssetsParamsWithTimeout(timeout time.Duration) *GetAssetsParams {
|
||||
return &GetAssetsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetAssetsParamsWithContext creates a new GetAssetsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetAssetsParamsWithContext(ctx context.Context) *GetAssetsParams {
|
||||
return &GetAssetsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetAssetsParamsWithHTTPClient creates a new GetAssetsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetAssetsParamsWithHTTPClient(client *http.Client) *GetAssetsParams {
|
||||
return &GetAssetsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetAssetsParams contains all the parameters to send to the API endpoint
|
||||
for the get assets operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetAssetsParams struct {
|
||||
|
||||
/* Active.
|
||||
|
||||
Only retrieve active records?
|
||||
*/
|
||||
Active *bool
|
||||
|
||||
/* AssetID.
|
||||
|
||||
Taxnexus Record Id of an Asset
|
||||
*/
|
||||
AssetID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get assets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetAssetsParams) WithDefaults() *GetAssetsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get assets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetAssetsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get assets params
|
||||
func (o *GetAssetsParams) WithTimeout(timeout time.Duration) *GetAssetsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get assets params
|
||||
func (o *GetAssetsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get assets params
|
||||
func (o *GetAssetsParams) WithContext(ctx context.Context) *GetAssetsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get assets params
|
||||
func (o *GetAssetsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get assets params
|
||||
func (o *GetAssetsParams) WithHTTPClient(client *http.Client) *GetAssetsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get assets params
|
||||
func (o *GetAssetsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithActive adds the active to the get assets params
|
||||
func (o *GetAssetsParams) WithActive(active *bool) *GetAssetsParams {
|
||||
o.SetActive(active)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetActive adds the active to the get assets params
|
||||
func (o *GetAssetsParams) SetActive(active *bool) {
|
||||
o.Active = active
|
||||
}
|
||||
|
||||
// WithAssetID adds the assetID to the get assets params
|
||||
func (o *GetAssetsParams) WithAssetID(assetID *string) *GetAssetsParams {
|
||||
o.SetAssetID(assetID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetAssetID adds the assetId to the get assets params
|
||||
func (o *GetAssetsParams) SetAssetID(assetID *string) {
|
||||
o.AssetID = assetID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get assets params
|
||||
func (o *GetAssetsParams) WithLimit(limit *int64) *GetAssetsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get assets params
|
||||
func (o *GetAssetsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get assets params
|
||||
func (o *GetAssetsParams) WithOffset(offset *int64) *GetAssetsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get assets params
|
||||
func (o *GetAssetsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetAssetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
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.AssetID != nil {
|
||||
|
||||
// query param assetId
|
||||
var qrAssetID string
|
||||
|
||||
if o.AssetID != nil {
|
||||
qrAssetID = *o.AssetID
|
||||
}
|
||||
qAssetID := qrAssetID
|
||||
if qAssetID != "" {
|
||||
|
||||
if err := r.SetQueryParam("assetId", qAssetID); 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.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 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// GetAssetsReader is a Reader for the GetAssets structure.
|
||||
type GetAssetsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetAssetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetAssetsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetAssetsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetAssetsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetAssetsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetAssetsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetAssetsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetAssetsOK creates a GetAssetsOK with default headers values
|
||||
func NewGetAssetsOK() *GetAssetsOK {
|
||||
return &GetAssetsOK{}
|
||||
}
|
||||
|
||||
/* GetAssetsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Asset objects with Contacts
|
||||
*/
|
||||
type GetAssetsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *sfgate_models.AssetResponse
|
||||
}
|
||||
|
||||
func (o *GetAssetsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsOK) GetPayload() *sfgate_models.AssetResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.AssetResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsUnauthorized creates a GetAssetsUnauthorized with default headers values
|
||||
func NewGetAssetsUnauthorized() *GetAssetsUnauthorized {
|
||||
return &GetAssetsUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetAssetsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetAssetsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsForbidden creates a GetAssetsForbidden with default headers values
|
||||
func NewGetAssetsForbidden() *GetAssetsForbidden {
|
||||
return &GetAssetsForbidden{}
|
||||
}
|
||||
|
||||
/* GetAssetsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetAssetsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsNotFound creates a GetAssetsNotFound with default headers values
|
||||
func NewGetAssetsNotFound() *GetAssetsNotFound {
|
||||
return &GetAssetsNotFound{}
|
||||
}
|
||||
|
||||
/* GetAssetsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetAssetsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsUnprocessableEntity creates a GetAssetsUnprocessableEntity with default headers values
|
||||
func NewGetAssetsUnprocessableEntity() *GetAssetsUnprocessableEntity {
|
||||
return &GetAssetsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetAssetsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetAssetsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetAssetsInternalServerError creates a GetAssetsInternalServerError with default headers values
|
||||
func NewGetAssetsInternalServerError() *GetAssetsInternalServerError {
|
||||
return &GetAssetsInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetAssetsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetAssetsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetAssetsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /assets][%d] getAssetsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetAssetsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetAssetsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPostAssetsParams creates a new PostAssetsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostAssetsParams() *PostAssetsParams {
|
||||
return &PostAssetsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostAssetsParamsWithTimeout creates a new PostAssetsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostAssetsParamsWithTimeout(timeout time.Duration) *PostAssetsParams {
|
||||
return &PostAssetsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostAssetsParamsWithContext creates a new PostAssetsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostAssetsParamsWithContext(ctx context.Context) *PostAssetsParams {
|
||||
return &PostAssetsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostAssetsParamsWithHTTPClient creates a new PostAssetsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostAssetsParamsWithHTTPClient(client *http.Client) *PostAssetsParams {
|
||||
return &PostAssetsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostAssetsParams contains all the parameters to send to the API endpoint
|
||||
for the post assets operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostAssetsParams struct {
|
||||
|
||||
/* AssetRequest.
|
||||
|
||||
An array of new Asset records
|
||||
*/
|
||||
AssetRequest *sfgate_models.AssetRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post assets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostAssetsParams) WithDefaults() *PostAssetsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post assets params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostAssetsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post assets params
|
||||
func (o *PostAssetsParams) WithTimeout(timeout time.Duration) *PostAssetsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post assets params
|
||||
func (o *PostAssetsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post assets params
|
||||
func (o *PostAssetsParams) WithContext(ctx context.Context) *PostAssetsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post assets params
|
||||
func (o *PostAssetsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post assets params
|
||||
func (o *PostAssetsParams) WithHTTPClient(client *http.Client) *PostAssetsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post assets params
|
||||
func (o *PostAssetsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithAssetRequest adds the assetRequest to the post assets params
|
||||
func (o *PostAssetsParams) WithAssetRequest(assetRequest *sfgate_models.AssetRequest) *PostAssetsParams {
|
||||
o.SetAssetRequest(assetRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetAssetRequest adds the assetRequest to the post assets params
|
||||
func (o *PostAssetsParams) SetAssetRequest(assetRequest *sfgate_models.AssetRequest) {
|
||||
o.AssetRequest = assetRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostAssetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.AssetRequest != nil {
|
||||
if err := r.SetBodyParam(o.AssetRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package assets
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// PostAssetsReader is a Reader for the PostAssets structure.
|
||||
type PostAssetsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostAssetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostAssetsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostAssetsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostAssetsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostAssetsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostAssetsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostAssetsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostAssetsOK creates a PostAssetsOK with default headers values
|
||||
func NewPostAssetsOK() *PostAssetsOK {
|
||||
return &PostAssetsOK{}
|
||||
}
|
||||
|
||||
/* PostAssetsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Asset objects with Contacts
|
||||
*/
|
||||
type PostAssetsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *sfgate_models.AssetResponse
|
||||
}
|
||||
|
||||
func (o *PostAssetsOK) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsOK) GetPayload() *sfgate_models.AssetResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.AssetResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsUnauthorized creates a PostAssetsUnauthorized with default headers values
|
||||
func NewPostAssetsUnauthorized() *PostAssetsUnauthorized {
|
||||
return &PostAssetsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostAssetsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostAssetsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsForbidden creates a PostAssetsForbidden with default headers values
|
||||
func NewPostAssetsForbidden() *PostAssetsForbidden {
|
||||
return &PostAssetsForbidden{}
|
||||
}
|
||||
|
||||
/* PostAssetsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostAssetsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsNotFound creates a PostAssetsNotFound with default headers values
|
||||
func NewPostAssetsNotFound() *PostAssetsNotFound {
|
||||
return &PostAssetsNotFound{}
|
||||
}
|
||||
|
||||
/* PostAssetsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostAssetsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsUnprocessableEntity creates a PostAssetsUnprocessableEntity with default headers values
|
||||
func NewPostAssetsUnprocessableEntity() *PostAssetsUnprocessableEntity {
|
||||
return &PostAssetsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostAssetsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostAssetsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostAssetsInternalServerError creates a PostAssetsInternalServerError with default headers values
|
||||
func NewPostAssetsInternalServerError() *PostAssetsInternalServerError {
|
||||
return &PostAssetsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostAssetsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostAssetsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostAssetsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /assets][%d] postAssetsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostAssetsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostAssetsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new company products API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for company products API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
GetCompanyProducts(params *GetCompanyProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyProductsOK, error)
|
||||
|
||||
PostCompanyProducts(params *PostCompanyProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCompanyProductsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyProducts gets a list of companyproducts
|
||||
|
||||
Return a list of all available CompanyProducts
|
||||
*/
|
||||
func (a *Client) GetCompanyProducts(params *GetCompanyProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyProductsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetCompanyProductsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getCompanyProducts",
|
||||
Method: "GET",
|
||||
PathPattern: "/companyproducts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetCompanyProductsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*GetCompanyProductsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getCompanyProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostCompanyProducts adds a new companyproduct to taxnexus
|
||||
|
||||
Industry record to be added
|
||||
*/
|
||||
func (a *Client) PostCompanyProducts(params *PostCompanyProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCompanyProductsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostCompanyProductsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postCompanyProducts",
|
||||
Method: "POST",
|
||||
PathPattern: "/companyproducts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostCompanyProductsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*PostCompanyProductsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postCompanyProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetCompanyProductsParams creates a new GetCompanyProductsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetCompanyProductsParams() *GetCompanyProductsParams {
|
||||
return &GetCompanyProductsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsParamsWithTimeout creates a new GetCompanyProductsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetCompanyProductsParamsWithTimeout(timeout time.Duration) *GetCompanyProductsParams {
|
||||
return &GetCompanyProductsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsParamsWithContext creates a new GetCompanyProductsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetCompanyProductsParamsWithContext(ctx context.Context) *GetCompanyProductsParams {
|
||||
return &GetCompanyProductsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsParamsWithHTTPClient creates a new GetCompanyProductsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetCompanyProductsParamsWithHTTPClient(client *http.Client) *GetCompanyProductsParams {
|
||||
return &GetCompanyProductsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsParams contains all the parameters to send to the API endpoint
|
||||
for the get company products operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetCompanyProductsParams struct {
|
||||
|
||||
/* Active.
|
||||
|
||||
Only retrieve active records?
|
||||
*/
|
||||
Active *bool
|
||||
|
||||
/* CompanyProductID.
|
||||
|
||||
Taxnexus CompanyProduct record ID
|
||||
*/
|
||||
CompanyProductID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get company products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetCompanyProductsParams) WithDefaults() *GetCompanyProductsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get company products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetCompanyProductsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithTimeout(timeout time.Duration) *GetCompanyProductsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithContext(ctx context.Context) *GetCompanyProductsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithHTTPClient(client *http.Client) *GetCompanyProductsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithActive adds the active to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithActive(active *bool) *GetCompanyProductsParams {
|
||||
o.SetActive(active)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetActive adds the active to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetActive(active *bool) {
|
||||
o.Active = active
|
||||
}
|
||||
|
||||
// WithCompanyProductID adds the companyProductID to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithCompanyProductID(companyProductID *string) *GetCompanyProductsParams {
|
||||
o.SetCompanyProductID(companyProductID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetCompanyProductID adds the companyProductId to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetCompanyProductID(companyProductID *string) {
|
||||
o.CompanyProductID = companyProductID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithLimit(limit *int64) *GetCompanyProductsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get company products params
|
||||
func (o *GetCompanyProductsParams) WithOffset(offset *int64) *GetCompanyProductsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get company products params
|
||||
func (o *GetCompanyProductsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetCompanyProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
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.CompanyProductID != nil {
|
||||
|
||||
// query param companyProductId
|
||||
var qrCompanyProductID string
|
||||
|
||||
if o.CompanyProductID != nil {
|
||||
qrCompanyProductID = *o.CompanyProductID
|
||||
}
|
||||
qCompanyProductID := qrCompanyProductID
|
||||
if qCompanyProductID != "" {
|
||||
|
||||
if err := r.SetQueryParam("companyProductId", qCompanyProductID); 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.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 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// GetCompanyProductsReader is a Reader for the GetCompanyProducts structure.
|
||||
type GetCompanyProductsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetCompanyProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetCompanyProductsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetCompanyProductsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetCompanyProductsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetCompanyProductsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetCompanyProductsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetCompanyProductsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsOK creates a GetCompanyProductsOK with default headers values
|
||||
func NewGetCompanyProductsOK() *GetCompanyProductsOK {
|
||||
return &GetCompanyProductsOK{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with an array of CompanyProduct objects
|
||||
*/
|
||||
type GetCompanyProductsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *sfgate_models.CompanyProductResponse
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsOK) GetPayload() *sfgate_models.CompanyProductResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.CompanyProductResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsUnauthorized creates a GetCompanyProductsUnauthorized with default headers values
|
||||
func NewGetCompanyProductsUnauthorized() *GetCompanyProductsUnauthorized {
|
||||
return &GetCompanyProductsUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetCompanyProductsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsForbidden creates a GetCompanyProductsForbidden with default headers values
|
||||
func NewGetCompanyProductsForbidden() *GetCompanyProductsForbidden {
|
||||
return &GetCompanyProductsForbidden{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetCompanyProductsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsNotFound creates a GetCompanyProductsNotFound with default headers values
|
||||
func NewGetCompanyProductsNotFound() *GetCompanyProductsNotFound {
|
||||
return &GetCompanyProductsNotFound{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetCompanyProductsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsUnprocessableEntity creates a GetCompanyProductsUnprocessableEntity with default headers values
|
||||
func NewGetCompanyProductsUnprocessableEntity() *GetCompanyProductsUnprocessableEntity {
|
||||
return &GetCompanyProductsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetCompanyProductsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyProductsInternalServerError creates a GetCompanyProductsInternalServerError with default headers values
|
||||
func NewGetCompanyProductsInternalServerError() *GetCompanyProductsInternalServerError {
|
||||
return &GetCompanyProductsInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetCompanyProductsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetCompanyProductsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /companyproducts][%d] getCompanyProductsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetCompanyProductsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyProductsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPostCompanyProductsParams creates a new PostCompanyProductsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostCompanyProductsParams() *PostCompanyProductsParams {
|
||||
return &PostCompanyProductsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsParamsWithTimeout creates a new PostCompanyProductsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostCompanyProductsParamsWithTimeout(timeout time.Duration) *PostCompanyProductsParams {
|
||||
return &PostCompanyProductsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsParamsWithContext creates a new PostCompanyProductsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostCompanyProductsParamsWithContext(ctx context.Context) *PostCompanyProductsParams {
|
||||
return &PostCompanyProductsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsParamsWithHTTPClient creates a new PostCompanyProductsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostCompanyProductsParamsWithHTTPClient(client *http.Client) *PostCompanyProductsParams {
|
||||
return &PostCompanyProductsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsParams contains all the parameters to send to the API endpoint
|
||||
for the post company products operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostCompanyProductsParams struct {
|
||||
|
||||
/* ContactRequest.
|
||||
|
||||
An array of new Contact records
|
||||
*/
|
||||
ContactRequest *sfgate_models.CompanyProductRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post company products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostCompanyProductsParams) WithDefaults() *PostCompanyProductsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post company products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostCompanyProductsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post company products params
|
||||
func (o *PostCompanyProductsParams) WithTimeout(timeout time.Duration) *PostCompanyProductsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post company products params
|
||||
func (o *PostCompanyProductsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post company products params
|
||||
func (o *PostCompanyProductsParams) WithContext(ctx context.Context) *PostCompanyProductsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post company products params
|
||||
func (o *PostCompanyProductsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post company products params
|
||||
func (o *PostCompanyProductsParams) WithHTTPClient(client *http.Client) *PostCompanyProductsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post company products params
|
||||
func (o *PostCompanyProductsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithContactRequest adds the contactRequest to the post company products params
|
||||
func (o *PostCompanyProductsParams) WithContactRequest(contactRequest *sfgate_models.CompanyProductRequest) *PostCompanyProductsParams {
|
||||
o.SetContactRequest(contactRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContactRequest adds the contactRequest to the post company products params
|
||||
func (o *PostCompanyProductsParams) SetContactRequest(contactRequest *sfgate_models.CompanyProductRequest) {
|
||||
o.ContactRequest = contactRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostCompanyProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.ContactRequest != nil {
|
||||
if err := r.SetBodyParam(o.ContactRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// PostCompanyProductsReader is a Reader for the PostCompanyProducts structure.
|
||||
type PostCompanyProductsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostCompanyProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostCompanyProductsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostCompanyProductsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostCompanyProductsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostCompanyProductsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostCompanyProductsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostCompanyProductsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsOK creates a PostCompanyProductsOK with default headers values
|
||||
func NewPostCompanyProductsOK() *PostCompanyProductsOK {
|
||||
return &PostCompanyProductsOK{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with an array of CompanyProduct objects
|
||||
*/
|
||||
type PostCompanyProductsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *sfgate_models.CompanyProductResponse
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsOK) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsOK) GetPayload() *sfgate_models.CompanyProductResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.CompanyProductResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsUnauthorized creates a PostCompanyProductsUnauthorized with default headers values
|
||||
func NewPostCompanyProductsUnauthorized() *PostCompanyProductsUnauthorized {
|
||||
return &PostCompanyProductsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostCompanyProductsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsForbidden creates a PostCompanyProductsForbidden with default headers values
|
||||
func NewPostCompanyProductsForbidden() *PostCompanyProductsForbidden {
|
||||
return &PostCompanyProductsForbidden{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostCompanyProductsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsNotFound creates a PostCompanyProductsNotFound with default headers values
|
||||
func NewPostCompanyProductsNotFound() *PostCompanyProductsNotFound {
|
||||
return &PostCompanyProductsNotFound{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostCompanyProductsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsUnprocessableEntity creates a PostCompanyProductsUnprocessableEntity with default headers values
|
||||
func NewPostCompanyProductsUnprocessableEntity() *PostCompanyProductsUnprocessableEntity {
|
||||
return &PostCompanyProductsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostCompanyProductsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostCompanyProductsInternalServerError creates a PostCompanyProductsInternalServerError with default headers values
|
||||
func NewPostCompanyProductsInternalServerError() *PostCompanyProductsInternalServerError {
|
||||
return &PostCompanyProductsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostCompanyProductsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostCompanyProductsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /companyproducts][%d] postCompanyProductsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostCompanyProductsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostCompanyProductsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetIndustriesParams creates a new GetIndustriesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetIndustriesParams() *GetIndustriesParams {
|
||||
return &GetIndustriesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustriesParamsWithTimeout creates a new GetIndustriesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetIndustriesParamsWithTimeout(timeout time.Duration) *GetIndustriesParams {
|
||||
return &GetIndustriesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustriesParamsWithContext creates a new GetIndustriesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetIndustriesParamsWithContext(ctx context.Context) *GetIndustriesParams {
|
||||
return &GetIndustriesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustriesParamsWithHTTPClient creates a new GetIndustriesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetIndustriesParamsWithHTTPClient(client *http.Client) *GetIndustriesParams {
|
||||
return &GetIndustriesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetIndustriesParams contains all the parameters to send to the API endpoint
|
||||
for the get industries operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetIndustriesParams struct {
|
||||
|
||||
/* Active.
|
||||
|
||||
Only retrieve active records?
|
||||
*/
|
||||
Active *bool
|
||||
|
||||
/* IndustryID.
|
||||
|
||||
Taxnexus Industry record ID
|
||||
*/
|
||||
IndustryID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get industries params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIndustriesParams) WithDefaults() *GetIndustriesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get industries params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIndustriesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get industries params
|
||||
func (o *GetIndustriesParams) WithTimeout(timeout time.Duration) *GetIndustriesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get industries params
|
||||
func (o *GetIndustriesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get industries params
|
||||
func (o *GetIndustriesParams) WithContext(ctx context.Context) *GetIndustriesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get industries params
|
||||
func (o *GetIndustriesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get industries params
|
||||
func (o *GetIndustriesParams) WithHTTPClient(client *http.Client) *GetIndustriesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get industries params
|
||||
func (o *GetIndustriesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithActive adds the active to the get industries params
|
||||
func (o *GetIndustriesParams) WithActive(active *bool) *GetIndustriesParams {
|
||||
o.SetActive(active)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetActive adds the active to the get industries params
|
||||
func (o *GetIndustriesParams) SetActive(active *bool) {
|
||||
o.Active = active
|
||||
}
|
||||
|
||||
// WithIndustryID adds the industryID to the get industries params
|
||||
func (o *GetIndustriesParams) WithIndustryID(industryID *string) *GetIndustriesParams {
|
||||
o.SetIndustryID(industryID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIndustryID adds the industryId to the get industries params
|
||||
func (o *GetIndustriesParams) SetIndustryID(industryID *string) {
|
||||
o.IndustryID = industryID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get industries params
|
||||
func (o *GetIndustriesParams) WithLimit(limit *int64) *GetIndustriesParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get industries params
|
||||
func (o *GetIndustriesParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get industries params
|
||||
func (o *GetIndustriesParams) WithOffset(offset *int64) *GetIndustriesParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get industries params
|
||||
func (o *GetIndustriesParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetIndustriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
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.IndustryID != nil {
|
||||
|
||||
// query param industryId
|
||||
var qrIndustryID string
|
||||
|
||||
if o.IndustryID != nil {
|
||||
qrIndustryID = *o.IndustryID
|
||||
}
|
||||
qIndustryID := qrIndustryID
|
||||
if qIndustryID != "" {
|
||||
|
||||
if err := r.SetQueryParam("industryId", qIndustryID); 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.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 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// GetIndustriesReader is a Reader for the GetIndustries structure.
|
||||
type GetIndustriesReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetIndustriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetIndustriesOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetIndustriesUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetIndustriesForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetIndustriesNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetIndustriesUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetIndustriesInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustriesOK creates a GetIndustriesOK with default headers values
|
||||
func NewGetIndustriesOK() *GetIndustriesOK {
|
||||
return &GetIndustriesOK{}
|
||||
}
|
||||
|
||||
/* GetIndustriesOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Industry objects
|
||||
*/
|
||||
type GetIndustriesOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *sfgate_models.IndustryResponse
|
||||
}
|
||||
|
||||
func (o *GetIndustriesOK) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesOK) GetPayload() *sfgate_models.IndustryResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.IndustryResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesUnauthorized creates a GetIndustriesUnauthorized with default headers values
|
||||
func NewGetIndustriesUnauthorized() *GetIndustriesUnauthorized {
|
||||
return &GetIndustriesUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetIndustriesUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetIndustriesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesForbidden creates a GetIndustriesForbidden with default headers values
|
||||
func NewGetIndustriesForbidden() *GetIndustriesForbidden {
|
||||
return &GetIndustriesForbidden{}
|
||||
}
|
||||
|
||||
/* GetIndustriesForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetIndustriesForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesNotFound creates a GetIndustriesNotFound with default headers values
|
||||
func NewGetIndustriesNotFound() *GetIndustriesNotFound {
|
||||
return &GetIndustriesNotFound{}
|
||||
}
|
||||
|
||||
/* GetIndustriesNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetIndustriesNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesUnprocessableEntity creates a GetIndustriesUnprocessableEntity with default headers values
|
||||
func NewGetIndustriesUnprocessableEntity() *GetIndustriesUnprocessableEntity {
|
||||
return &GetIndustriesUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetIndustriesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetIndustriesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustriesInternalServerError creates a GetIndustriesInternalServerError with default headers values
|
||||
func NewGetIndustriesInternalServerError() *GetIndustriesInternalServerError {
|
||||
return &GetIndustriesInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetIndustriesInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetIndustriesInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustriesInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /industries][%d] getIndustriesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetIndustriesInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustriesInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new industries API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for industries API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
GetIndustries(params *GetIndustriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustriesOK, error)
|
||||
|
||||
PostIndustries(params *PostIndustriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustriesOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetIndustries gets a list of industries
|
||||
|
||||
Return a list of all available Industries
|
||||
*/
|
||||
func (a *Client) GetIndustries(params *GetIndustriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustriesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetIndustriesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getIndustries",
|
||||
Method: "GET",
|
||||
PathPattern: "/industries",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetIndustriesReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*GetIndustriesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getIndustries: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostIndustries adds a new industry to taxnexus
|
||||
|
||||
Industry record to be added
|
||||
*/
|
||||
func (a *Client) PostIndustries(params *PostIndustriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustriesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostIndustriesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postIndustries",
|
||||
Method: "POST",
|
||||
PathPattern: "/industries",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostIndustriesReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*PostIndustriesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postIndustries: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPostIndustriesParams creates a new PostIndustriesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostIndustriesParams() *PostIndustriesParams {
|
||||
return &PostIndustriesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustriesParamsWithTimeout creates a new PostIndustriesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostIndustriesParamsWithTimeout(timeout time.Duration) *PostIndustriesParams {
|
||||
return &PostIndustriesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustriesParamsWithContext creates a new PostIndustriesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostIndustriesParamsWithContext(ctx context.Context) *PostIndustriesParams {
|
||||
return &PostIndustriesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustriesParamsWithHTTPClient creates a new PostIndustriesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostIndustriesParamsWithHTTPClient(client *http.Client) *PostIndustriesParams {
|
||||
return &PostIndustriesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostIndustriesParams contains all the parameters to send to the API endpoint
|
||||
for the post industries operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostIndustriesParams struct {
|
||||
|
||||
/* IndustryRequest.
|
||||
|
||||
An array of new Industry records
|
||||
*/
|
||||
IndustryRequest *sfgate_models.IndustryRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post industries params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIndustriesParams) WithDefaults() *PostIndustriesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post industries params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIndustriesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post industries params
|
||||
func (o *PostIndustriesParams) WithTimeout(timeout time.Duration) *PostIndustriesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post industries params
|
||||
func (o *PostIndustriesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post industries params
|
||||
func (o *PostIndustriesParams) WithContext(ctx context.Context) *PostIndustriesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post industries params
|
||||
func (o *PostIndustriesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post industries params
|
||||
func (o *PostIndustriesParams) WithHTTPClient(client *http.Client) *PostIndustriesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post industries params
|
||||
func (o *PostIndustriesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithIndustryRequest adds the industryRequest to the post industries params
|
||||
func (o *PostIndustriesParams) WithIndustryRequest(industryRequest *sfgate_models.IndustryRequest) *PostIndustriesParams {
|
||||
o.SetIndustryRequest(industryRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIndustryRequest adds the industryRequest to the post industries params
|
||||
func (o *PostIndustriesParams) SetIndustryRequest(industryRequest *sfgate_models.IndustryRequest) {
|
||||
o.IndustryRequest = industryRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostIndustriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.IndustryRequest != nil {
|
||||
if err := r.SetBodyParam(o.IndustryRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industries
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// PostIndustriesReader is a Reader for the PostIndustries structure.
|
||||
type PostIndustriesReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostIndustriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostIndustriesOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostIndustriesUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostIndustriesForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostIndustriesNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostIndustriesUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostIndustriesInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustriesOK creates a PostIndustriesOK with default headers values
|
||||
func NewPostIndustriesOK() *PostIndustriesOK {
|
||||
return &PostIndustriesOK{}
|
||||
}
|
||||
|
||||
/* PostIndustriesOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Industry objects
|
||||
*/
|
||||
type PostIndustriesOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *sfgate_models.IndustryResponse
|
||||
}
|
||||
|
||||
func (o *PostIndustriesOK) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesOK) GetPayload() *sfgate_models.IndustryResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.IndustryResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesUnauthorized creates a PostIndustriesUnauthorized with default headers values
|
||||
func NewPostIndustriesUnauthorized() *PostIndustriesUnauthorized {
|
||||
return &PostIndustriesUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostIndustriesUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostIndustriesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesForbidden creates a PostIndustriesForbidden with default headers values
|
||||
func NewPostIndustriesForbidden() *PostIndustriesForbidden {
|
||||
return &PostIndustriesForbidden{}
|
||||
}
|
||||
|
||||
/* PostIndustriesForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostIndustriesForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesNotFound creates a PostIndustriesNotFound with default headers values
|
||||
func NewPostIndustriesNotFound() *PostIndustriesNotFound {
|
||||
return &PostIndustriesNotFound{}
|
||||
}
|
||||
|
||||
/* PostIndustriesNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostIndustriesNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesUnprocessableEntity creates a PostIndustriesUnprocessableEntity with default headers values
|
||||
func NewPostIndustriesUnprocessableEntity() *PostIndustriesUnprocessableEntity {
|
||||
return &PostIndustriesUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostIndustriesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostIndustriesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustriesInternalServerError creates a PostIndustriesInternalServerError with default headers values
|
||||
func NewPostIndustriesInternalServerError() *PostIndustriesInternalServerError {
|
||||
return &PostIndustriesInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostIndustriesInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostIndustriesInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustriesInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /industries][%d] postIndustriesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostIndustriesInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustriesInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industry_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new industry products API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for industry products API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
PostIndustryproducts(params *PostIndustryproductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustryproductsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
PostIndustryproducts adds a new industryproduct to taxnexus
|
||||
|
||||
Industry record to be added
|
||||
*/
|
||||
func (a *Client) PostIndustryproducts(params *PostIndustryproductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustryproductsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostIndustryproductsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postIndustryproducts",
|
||||
Method: "POST",
|
||||
PathPattern: "/industryproducts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostIndustryproductsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*PostIndustryproductsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postIndustryproducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industry_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPostIndustryproductsParams creates a new PostIndustryproductsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostIndustryproductsParams() *PostIndustryproductsParams {
|
||||
return &PostIndustryproductsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsParamsWithTimeout creates a new PostIndustryproductsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostIndustryproductsParamsWithTimeout(timeout time.Duration) *PostIndustryproductsParams {
|
||||
return &PostIndustryproductsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsParamsWithContext creates a new PostIndustryproductsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostIndustryproductsParamsWithContext(ctx context.Context) *PostIndustryproductsParams {
|
||||
return &PostIndustryproductsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsParamsWithHTTPClient creates a new PostIndustryproductsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostIndustryproductsParamsWithHTTPClient(client *http.Client) *PostIndustryproductsParams {
|
||||
return &PostIndustryproductsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsParams contains all the parameters to send to the API endpoint
|
||||
for the post industryproducts operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostIndustryproductsParams struct {
|
||||
|
||||
/* IndustryRequest.
|
||||
|
||||
An array of new Industry records
|
||||
*/
|
||||
IndustryRequest *sfgate_models.IndustryProductRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post industryproducts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIndustryproductsParams) WithDefaults() *PostIndustryproductsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post industryproducts params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostIndustryproductsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) WithTimeout(timeout time.Duration) *PostIndustryproductsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) WithContext(ctx context.Context) *PostIndustryproductsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) WithHTTPClient(client *http.Client) *PostIndustryproductsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithIndustryRequest adds the industryRequest to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) WithIndustryRequest(industryRequest *sfgate_models.IndustryProductRequest) *PostIndustryproductsParams {
|
||||
o.SetIndustryRequest(industryRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIndustryRequest adds the industryRequest to the post industryproducts params
|
||||
func (o *PostIndustryproductsParams) SetIndustryRequest(industryRequest *sfgate_models.IndustryProductRequest) {
|
||||
o.IndustryRequest = industryRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostIndustryproductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.IndustryRequest != nil {
|
||||
if err := r.SetBodyParam(o.IndustryRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industry_products
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// PostIndustryproductsReader is a Reader for the PostIndustryproducts structure.
|
||||
type PostIndustryproductsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostIndustryproductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostIndustryproductsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostIndustryproductsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostIndustryproductsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostIndustryproductsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostIndustryproductsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostIndustryproductsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsOK creates a PostIndustryproductsOK with default headers values
|
||||
func NewPostIndustryproductsOK() *PostIndustryproductsOK {
|
||||
return &PostIndustryproductsOK{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Industry objects
|
||||
*/
|
||||
type PostIndustryproductsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *sfgate_models.IndustryProductResponse
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsOK) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsOK) GetPayload() *sfgate_models.IndustryProductResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.IndustryProductResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsUnauthorized creates a PostIndustryproductsUnauthorized with default headers values
|
||||
func NewPostIndustryproductsUnauthorized() *PostIndustryproductsUnauthorized {
|
||||
return &PostIndustryproductsUnauthorized{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostIndustryproductsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsForbidden creates a PostIndustryproductsForbidden with default headers values
|
||||
func NewPostIndustryproductsForbidden() *PostIndustryproductsForbidden {
|
||||
return &PostIndustryproductsForbidden{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostIndustryproductsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsNotFound creates a PostIndustryproductsNotFound with default headers values
|
||||
func NewPostIndustryproductsNotFound() *PostIndustryproductsNotFound {
|
||||
return &PostIndustryproductsNotFound{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostIndustryproductsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsUnprocessableEntity creates a PostIndustryproductsUnprocessableEntity with default headers values
|
||||
func NewPostIndustryproductsUnprocessableEntity() *PostIndustryproductsUnprocessableEntity {
|
||||
return &PostIndustryproductsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostIndustryproductsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostIndustryproductsInternalServerError creates a PostIndustryproductsInternalServerError with default headers values
|
||||
func NewPostIndustryproductsInternalServerError() *PostIndustryproductsInternalServerError {
|
||||
return &PostIndustryproductsInternalServerError{}
|
||||
}
|
||||
|
||||
/* PostIndustryproductsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostIndustryproductsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *PostIndustryproductsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostIndustryproductsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industryproducts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetIndustryProductsParams creates a new GetIndustryProductsParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetIndustryProductsParams() *GetIndustryProductsParams {
|
||||
return &GetIndustryProductsParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsParamsWithTimeout creates a new GetIndustryProductsParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetIndustryProductsParamsWithTimeout(timeout time.Duration) *GetIndustryProductsParams {
|
||||
return &GetIndustryProductsParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsParamsWithContext creates a new GetIndustryProductsParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetIndustryProductsParamsWithContext(ctx context.Context) *GetIndustryProductsParams {
|
||||
return &GetIndustryProductsParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsParamsWithHTTPClient creates a new GetIndustryProductsParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetIndustryProductsParamsWithHTTPClient(client *http.Client) *GetIndustryProductsParams {
|
||||
return &GetIndustryProductsParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsParams contains all the parameters to send to the API endpoint
|
||||
for the get industry products operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetIndustryProductsParams struct {
|
||||
|
||||
/* Active.
|
||||
|
||||
Only retrieve active records?
|
||||
*/
|
||||
Active *bool
|
||||
|
||||
/* IndustryProductID.
|
||||
|
||||
Taxnexus IndustryProduct record ID
|
||||
*/
|
||||
IndustryProductID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
How many objects to return at one time
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Offset.
|
||||
|
||||
How many objects to skip?
|
||||
|
||||
Format: int64
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get industry products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIndustryProductsParams) WithDefaults() *GetIndustryProductsParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get industry products params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetIndustryProductsParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithTimeout(timeout time.Duration) *GetIndustryProductsParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithContext(ctx context.Context) *GetIndustryProductsParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithHTTPClient(client *http.Client) *GetIndustryProductsParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithActive adds the active to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithActive(active *bool) *GetIndustryProductsParams {
|
||||
o.SetActive(active)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetActive adds the active to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetActive(active *bool) {
|
||||
o.Active = active
|
||||
}
|
||||
|
||||
// WithIndustryProductID adds the industryProductID to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithIndustryProductID(industryProductID *string) *GetIndustryProductsParams {
|
||||
o.SetIndustryProductID(industryProductID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetIndustryProductID adds the industryProductId to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetIndustryProductID(industryProductID *string) {
|
||||
o.IndustryProductID = industryProductID
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithLimit(limit *int64) *GetIndustryProductsParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get industry products params
|
||||
func (o *GetIndustryProductsParams) WithOffset(offset *int64) *GetIndustryProductsParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get industry products params
|
||||
func (o *GetIndustryProductsParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetIndustryProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
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.IndustryProductID != nil {
|
||||
|
||||
// query param industryProductId
|
||||
var qrIndustryProductID string
|
||||
|
||||
if o.IndustryProductID != nil {
|
||||
qrIndustryProductID = *o.IndustryProductID
|
||||
}
|
||||
qIndustryProductID := qrIndustryProductID
|
||||
if qIndustryProductID != "" {
|
||||
|
||||
if err := r.SetQueryParam("industryProductId", qIndustryProductID); 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.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 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,323 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industryproducts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// GetIndustryProductsReader is a Reader for the GetIndustryProducts structure.
|
||||
type GetIndustryProductsReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetIndustryProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetIndustryProductsOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetIndustryProductsUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetIndustryProductsForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetIndustryProductsNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetIndustryProductsUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetIndustryProductsInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsOK creates a GetIndustryProductsOK with default headers values
|
||||
func NewGetIndustryProductsOK() *GetIndustryProductsOK {
|
||||
return &GetIndustryProductsOK{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsOK describes a response with status code 200, with default header values.
|
||||
|
||||
Taxnexus Response with Industry objects
|
||||
*/
|
||||
type GetIndustryProductsOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *sfgate_models.IndustryProductResponse
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsOK %+v", 200, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsOK) GetPayload() *sfgate_models.IndustryProductResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsOK) 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
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.IndustryProductResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsUnauthorized creates a GetIndustryProductsUnauthorized with default headers values
|
||||
func NewGetIndustryProductsUnauthorized() *GetIndustryProductsUnauthorized {
|
||||
return &GetIndustryProductsUnauthorized{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetIndustryProductsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsUnauthorized) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsForbidden creates a GetIndustryProductsForbidden with default headers values
|
||||
func NewGetIndustryProductsForbidden() *GetIndustryProductsForbidden {
|
||||
return &GetIndustryProductsForbidden{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetIndustryProductsForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsForbidden) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsNotFound creates a GetIndustryProductsNotFound with default headers values
|
||||
func NewGetIndustryProductsNotFound() *GetIndustryProductsNotFound {
|
||||
return &GetIndustryProductsNotFound{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetIndustryProductsNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsNotFound) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsUnprocessableEntity creates a GetIndustryProductsUnprocessableEntity with default headers values
|
||||
func NewGetIndustryProductsUnprocessableEntity() *GetIndustryProductsUnprocessableEntity {
|
||||
return &GetIndustryProductsUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetIndustryProductsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsUnprocessableEntity) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetIndustryProductsInternalServerError creates a GetIndustryProductsInternalServerError with default headers values
|
||||
func NewGetIndustryProductsInternalServerError() *GetIndustryProductsInternalServerError {
|
||||
return &GetIndustryProductsInternalServerError{}
|
||||
}
|
||||
|
||||
/* GetIndustryProductsInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetIndustryProductsInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
func (o *GetIndustryProductsInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetIndustryProductsInternalServerError) 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
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package industryproducts
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new industryproducts API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for industryproducts API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
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 {
|
||||
GetIndustryProducts(params *GetIndustryProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustryProductsOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetIndustryProducts gets a list of industryproducts
|
||||
|
||||
Return a list of all available IndustryProducts
|
||||
*/
|
||||
func (a *Client) GetIndustryProducts(params *GetIndustryProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustryProductsOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetIndustryProductsParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getIndustryProducts",
|
||||
Method: "GET",
|
||||
PathPattern: "/industryproducts",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetIndustryProductsReader{formats: a.formats},
|
||||
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
|
||||
}
|
||||
success, ok := result.(*GetIndustryProductsOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getIndustryProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -15,10 +15,15 @@ import (
|
|||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/accounts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/assets"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/clusters"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/company_products"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contacts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contracts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/databases"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industries"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industry_products"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industryproducts"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/roles"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/templates"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/tenants"
|
||||
|
@ -68,10 +73,15 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Sfgate {
|
|||
cli := new(Sfgate)
|
||||
cli.Transport = transport
|
||||
cli.Accounts = accounts.New(transport, formats)
|
||||
cli.Assets = assets.New(transport, formats)
|
||||
cli.Clusters = clusters.New(transport, formats)
|
||||
cli.CompanyProducts = company_products.New(transport, formats)
|
||||
cli.Contacts = contacts.New(transport, formats)
|
||||
cli.Contracts = contracts.New(transport, formats)
|
||||
cli.Databases = databases.New(transport, formats)
|
||||
cli.Industries = industries.New(transport, formats)
|
||||
cli.IndustryProducts = industry_products.New(transport, formats)
|
||||
cli.Industryproducts = industryproducts.New(transport, formats)
|
||||
cli.Roles = roles.New(transport, formats)
|
||||
cli.Templates = templates.New(transport, formats)
|
||||
cli.Tenants = tenants.New(transport, formats)
|
||||
|
@ -122,14 +132,24 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
|
|||
type Sfgate struct {
|
||||
Accounts accounts.ClientService
|
||||
|
||||
Assets assets.ClientService
|
||||
|
||||
Clusters clusters.ClientService
|
||||
|
||||
CompanyProducts company_products.ClientService
|
||||
|
||||
Contacts contacts.ClientService
|
||||
|
||||
Contracts contracts.ClientService
|
||||
|
||||
Databases databases.ClientService
|
||||
|
||||
Industries industries.ClientService
|
||||
|
||||
IndustryProducts industry_products.ClientService
|
||||
|
||||
Industryproducts industryproducts.ClientService
|
||||
|
||||
Roles roles.ClientService
|
||||
|
||||
Templates templates.ClientService
|
||||
|
@ -145,10 +165,15 @@ type Sfgate struct {
|
|||
func (c *Sfgate) SetTransport(transport runtime.ClientTransport) {
|
||||
c.Transport = transport
|
||||
c.Accounts.SetTransport(transport)
|
||||
c.Assets.SetTransport(transport)
|
||||
c.Clusters.SetTransport(transport)
|
||||
c.CompanyProducts.SetTransport(transport)
|
||||
c.Contacts.SetTransport(transport)
|
||||
c.Contracts.SetTransport(transport)
|
||||
c.Databases.SetTransport(transport)
|
||||
c.Industries.SetTransport(transport)
|
||||
c.IndustryProducts.SetTransport(transport)
|
||||
c.Industryproducts.SetTransport(transport)
|
||||
c.Roles.SetTransport(transport)
|
||||
c.Templates.SetTransport(transport)
|
||||
c.Tenants.SetTransport(transport)
|
||||
|
|
|
@ -23,287 +23,162 @@ import (
|
|||
type Account struct {
|
||||
|
||||
// Account Number
|
||||
Accountnumber string `json:"accountnumber,omitempty"`
|
||||
AccountNumber string `json:"AccountNumber,omitempty"`
|
||||
|
||||
// The marketing orgin of this account
|
||||
Accountsource string `json:"accountsource,omitempty"`
|
||||
|
||||
// Active
|
||||
Active bool `json:"active,omitempty"`
|
||||
|
||||
// For tax authorities, this account's administrative level, e.g. Local, County, State or Federal
|
||||
Administrativelevel string `json:"administrativelevel,omitempty"`
|
||||
|
||||
// Rollup Tax Amount
|
||||
Amount float64 `json:"amount,omitempty"`
|
||||
|
||||
// Amount Invoiced
|
||||
Amountinvoiced float64 `json:"amountinvoiced,omitempty"`
|
||||
|
||||
// Amount Paid
|
||||
Amountpaid float64 `json:"amountpaid,omitempty"`
|
||||
AccountSource string `json:"AccountSource,omitempty"`
|
||||
|
||||
// Annual Revenue Estimate
|
||||
Annualrevenue float64 `json:"annualrevenue,omitempty"`
|
||||
AnnualRevenue float64 `json:"AnnualRevenue,omitempty"`
|
||||
|
||||
// Account Balance
|
||||
Balance float64 `json:"balance,omitempty"`
|
||||
|
||||
// billingaddress
|
||||
Billingaddress *Address `json:"billingaddress,omitempty"`
|
||||
// billing address
|
||||
BillingAddress *Address `json:"BillingAddress,omitempty"`
|
||||
|
||||
// Contact ID
|
||||
Billingcontactid string `json:"billingcontactid,omitempty"`
|
||||
BillingContactID string `json:"BillingContactID,omitempty"`
|
||||
|
||||
// Billing Preference
|
||||
Billingpreference string `json:"billingpreference,omitempty"`
|
||||
// Date company closed
|
||||
CloseDate string `json:"CloseDate,omitempty"`
|
||||
|
||||
// businessaddress
|
||||
Businessaddress *Address `json:"businessaddress,omitempty"`
|
||||
// cloud revenue total
|
||||
CloudRevenueTotal float64 `json:"CloudRevenueTotal,omitempty"`
|
||||
|
||||
// Is this a cannabis customer?
|
||||
Cannabiscustomer bool `json:"cannabiscustomer,omitempty"`
|
||||
// cloud type
|
||||
CloudType string `json:"CloudType,omitempty"`
|
||||
|
||||
// Channel Program Level Name
|
||||
Channelprogramlevelname string `json:"channelprogramlevelname,omitempty"`
|
||||
|
||||
// Channel Program Name
|
||||
Channelprogramname string `json:"channelprogramname,omitempty"`
|
||||
|
||||
// Client End Date
|
||||
Clientenddate string `json:"clientenddate,omitempty"`
|
||||
|
||||
// Client Start Date
|
||||
Clientstartdate string `json:"clientstartdate,omitempty"`
|
||||
|
||||
// The Company ID of this Account
|
||||
Companyid string `json:"companyid,omitempty"`
|
||||
|
||||
// The Id of the geo coordinates of this account
|
||||
Coordinateid string `json:"coordinateid,omitempty"`
|
||||
// cloud year
|
||||
CloudYear string `json:"CloudYear,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
Createdbyid string `json:"createdbyid,omitempty"`
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
Createddate string `json:"createddate,omitempty"`
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Customer ID from source system
|
||||
Customerid string `json:"customerid,omitempty"`
|
||||
|
||||
// Customer Priority
|
||||
Customerpriority string `json:"customerpriority,omitempty"`
|
||||
|
||||
// D-n-B Company
|
||||
Dandbcompanyid string `json:"dandbcompanyid,omitempty"`
|
||||
|
||||
// This Account's 'Doing Business As' name
|
||||
Dba string `json:"dba,omitempty"`
|
||||
|
||||
// defaultaddress
|
||||
Defaultaddress *Address `json:"defaultaddress,omitempty"`
|
||||
|
||||
// Default Backend ID
|
||||
Defaultbackendid string `json:"defaultbackendid,omitempty"`
|
||||
|
||||
// Default Delivery Address Contact ID
|
||||
Defaultdeliverycontactid string `json:"defaultdeliverycontactid,omitempty"`
|
||||
|
||||
// Default End User Contact ID
|
||||
Defaultenduserid string `json:"defaultenduserid,omitempty"`
|
||||
// crunchbase URL
|
||||
CrunchbaseURL string `json:"CrunchbaseURL,omitempty"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description,omitempty"`
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// D-U-N-S Number
|
||||
Dunsnumber string `json:"dunsnumber,omitempty"`
|
||||
|
||||
// EIN
|
||||
Ein string `json:"ein,omitempty"`
|
||||
// earnings call
|
||||
EarningsCall string `json:"EarningsCall,omitempty"`
|
||||
|
||||
// Main Account Email
|
||||
Email string `json:"email,omitempty"`
|
||||
Email string `json:"Email,omitempty"`
|
||||
|
||||
// Enrollment Status
|
||||
Enrollmentstatus string `json:"enrollmentstatus,omitempty"`
|
||||
// equity funding
|
||||
EquityFunding float64 `json:"EquityFunding,omitempty"`
|
||||
|
||||
// facebook
|
||||
Facebook string `json:"Facebook,omitempty"`
|
||||
|
||||
// Fax
|
||||
Fax string `json:"fax,omitempty"`
|
||||
Fax string `json:"Fax,omitempty"`
|
||||
|
||||
// founded date
|
||||
FoundedDate string `json:"FoundedDate,omitempty"`
|
||||
|
||||
// Taxnexus Account Id
|
||||
ID string `json:"id,omitempty"`
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// IP o date
|
||||
IPODate string `json:"IPODate,omitempty"`
|
||||
|
||||
// industries
|
||||
Industries string `json:"Industries,omitempty"`
|
||||
|
||||
// Industry
|
||||
Industry string `json:"industry,omitempty"`
|
||||
|
||||
// Customer Portal Account
|
||||
Iscustomerportal bool `json:"iscustomerportal,omitempty"`
|
||||
|
||||
// Partner Account
|
||||
Ispartner bool `json:"ispartner,omitempty"`
|
||||
|
||||
// ISP Customer?
|
||||
Ispcustomer bool `json:"ispcustomer,omitempty"`
|
||||
|
||||
// Data.com Key
|
||||
Jigsaw string `json:"jigsaw,omitempty"`
|
||||
Industry string `json:"Industry,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
Lastmodifiedbyid string `json:"lastmodifiedbyid,omitempty"`
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
Lastmodifieddate string `json:"lastmodifieddate,omitempty"`
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// MSP Customer?
|
||||
Mspcustomer bool `json:"mspcustomer,omitempty"`
|
||||
// linked in
|
||||
LinkedIn string `json:"LinkedIn,omitempty"`
|
||||
|
||||
// NAICS Code
|
||||
Naicscode string `json:"naicscode,omitempty"`
|
||||
// location
|
||||
Location string `json:"Location,omitempty"`
|
||||
|
||||
// NAICS Description
|
||||
Naicsdesc string `json:"naicsdesc,omitempty"`
|
||||
// market capitalization
|
||||
MarketCapitalization float64 `json:"MarketCapitalization,omitempty"`
|
||||
|
||||
// Account Name
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// Employee Count Estimate
|
||||
Numberofemployees int64 `json:"numberofemployees,omitempty"`
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// Number of Locations Estimate
|
||||
Numberoflocations int64 `json:"numberoflocations,omitempty"`
|
||||
NumberInvestments int64 `json:"NumberInvestments,omitempty"`
|
||||
|
||||
// Open Charges
|
||||
Opencharges float64 `json:"opencharges,omitempty"`
|
||||
|
||||
// Vendor Order Contact ID
|
||||
Ordercontactid string `json:"ordercontactid,omitempty"`
|
||||
|
||||
// Order Email
|
||||
Orderemail string `json:"orderemail,omitempty"`
|
||||
// Employee Count Estimate
|
||||
NumberOfEmployees int64 `json:"NumberOfEmployees,omitempty"`
|
||||
|
||||
// Account Owner User ID
|
||||
Ownerid string `json:"ownerid,omitempty"`
|
||||
OwnerID string `json:"OwnerID,omitempty"`
|
||||
|
||||
// Ownership
|
||||
Ownership string `json:"ownership,omitempty"`
|
||||
|
||||
// Parent Foreign Key
|
||||
Parentfk string `json:"parentfk,omitempty"`
|
||||
Ownership string `json:"Ownership,omitempty"`
|
||||
|
||||
// Parent Account
|
||||
Parentid string `json:"parentid,omitempty"`
|
||||
ParentID string `json:"ParentID,omitempty"`
|
||||
|
||||
// Phone
|
||||
Phone string `json:"phone,omitempty"`
|
||||
Phone string `json:"Phone,omitempty"`
|
||||
|
||||
// The ID of the Place situs record that applies to this Account
|
||||
Placeid string `json:"placeid,omitempty"`
|
||||
|
||||
// Tax Preparer Contact ID
|
||||
Preparerid string `json:"preparerid,omitempty"`
|
||||
|
||||
// Rating
|
||||
Rating string `json:"rating,omitempty"`
|
||||
|
||||
// Rating Engine identifier
|
||||
Ratingengineid string `json:"ratingengineid,omitempty"`
|
||||
|
||||
// External Reference ID
|
||||
Ref string `json:"ref,omitempty"`
|
||||
|
||||
// Rollup Revenue Base
|
||||
Revenuebase float64 `json:"revenuebase,omitempty"`
|
||||
|
||||
// Rollup Revenue Net
|
||||
Revenuenet float64 `json:"revenuenet,omitempty"`
|
||||
|
||||
// Rollup Revenue Not Taxable
|
||||
Revenuenottaxable float64 `json:"revenuenottaxable,omitempty"`
|
||||
|
||||
// shippingaddress
|
||||
Shippingaddress *Address `json:"shippingaddress,omitempty"`
|
||||
|
||||
// Shipping Census Tract
|
||||
Shippingcensustract string `json:"shippingcensustract,omitempty"`
|
||||
|
||||
// Shipping Contact ID
|
||||
Shippingcontactid string `json:"shippingcontactid,omitempty"`
|
||||
|
||||
// Shipping County
|
||||
Shippingcounty string `json:"shippingcounty,omitempty"`
|
||||
// publish
|
||||
Publish bool `json:"Publish,omitempty"`
|
||||
|
||||
// SIC Code
|
||||
Sic string `json:"sic,omitempty"`
|
||||
SIC string `json:"SIC,omitempty"`
|
||||
|
||||
// SIC Description
|
||||
Sicdesc string `json:"sicdesc,omitempty"`
|
||||
SICDesc string `json:"SICDesc,omitempty"`
|
||||
|
||||
// salesforce first
|
||||
SalesforceFirst bool `json:"SalesforceFirst,omitempty"`
|
||||
|
||||
// shipping address
|
||||
ShippingAddress *Address `json:"ShippingAddress,omitempty"`
|
||||
|
||||
// shipping contact ID
|
||||
ShippingContactID string `json:"ShippingContactID,omitempty"`
|
||||
|
||||
// Account Site
|
||||
Site string `json:"site,omitempty"`
|
||||
Site string `json:"Site,omitempty"`
|
||||
|
||||
// Account Status
|
||||
Status string `json:"status,omitempty"`
|
||||
|
||||
// Tax Exemption
|
||||
Taxexemption string `json:"taxexemption,omitempty"`
|
||||
|
||||
// Rollup Tax On Tax
|
||||
Taxontax float64 `json:"taxontax,omitempty"`
|
||||
|
||||
// Telecom Customer?
|
||||
Telecomcustomer bool `json:"telecomcustomer,omitempty"`
|
||||
// tag line
|
||||
TagLine string `json:"TagLine,omitempty"`
|
||||
|
||||
// tenant identifier
|
||||
Tenantid string `json:"tenantid,omitempty"`
|
||||
TenantID string `json:"TenantID,omitempty"`
|
||||
|
||||
// Ticker Symbol
|
||||
Tickersymbol string `json:"tickersymbol,omitempty"`
|
||||
// ticker symbol
|
||||
TickerSymbol string `json:"TickerSymbol,omitempty"`
|
||||
|
||||
// Tradestyle
|
||||
Tradestyle string `json:"tradestyle,omitempty"`
|
||||
// twitter
|
||||
Twitter string `json:"Twitter,omitempty"`
|
||||
|
||||
// Type
|
||||
Type string `json:"type,omitempty"`
|
||||
|
||||
// Unapplied Payments
|
||||
Unappliedpayments float64 `json:"unappliedpayments,omitempty"`
|
||||
|
||||
// Rollup Unit Base
|
||||
Unitbase float64 `json:"unitbase,omitempty"`
|
||||
|
||||
// Upsell Opportunity
|
||||
Upsellopportunity string `json:"upsellopportunity,omitempty"`
|
||||
Type string `json:"Type,omitempty"`
|
||||
|
||||
// Website
|
||||
Website string `json:"website,omitempty"`
|
||||
|
||||
// WHMCS Client ID
|
||||
Whmcsclientid int64 `json:"whmcsclientid,omitempty"`
|
||||
|
||||
// Xero Contact ID
|
||||
Xerocontactid string `json:"xerocontactid,omitempty"`
|
||||
Website string `json:"Website,omitempty"`
|
||||
|
||||
// Year Started
|
||||
Yearstarted string `json:"yearstarted,omitempty"`
|
||||
YearStarted string `json:"YearStarted,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this account
|
||||
func (m *Account) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateBillingaddress(formats); err != nil {
|
||||
if err := m.validateBillingAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateBusinessaddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateDefaultaddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateShippingaddress(formats); err != nil {
|
||||
if err := m.validateShippingAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -313,17 +188,17 @@ func (m *Account) Validate(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) validateBillingaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Billingaddress) { // not required
|
||||
func (m *Account) validateBillingAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.BillingAddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Billingaddress != nil {
|
||||
if err := m.Billingaddress.Validate(formats); err != nil {
|
||||
if m.BillingAddress != nil {
|
||||
if err := m.BillingAddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("billingaddress")
|
||||
return ve.ValidateName("BillingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("billingaddress")
|
||||
return ce.ValidateName("BillingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -332,55 +207,17 @@ func (m *Account) validateBillingaddress(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) validateBusinessaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Businessaddress) { // not required
|
||||
func (m *Account) validateShippingAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.ShippingAddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Businessaddress != nil {
|
||||
if err := m.Businessaddress.Validate(formats); err != nil {
|
||||
if m.ShippingAddress != nil {
|
||||
if err := m.ShippingAddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("businessaddress")
|
||||
return ve.ValidateName("ShippingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("businessaddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) validateDefaultaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Defaultaddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Defaultaddress != nil {
|
||||
if err := m.Defaultaddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("defaultaddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("defaultaddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) validateShippingaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Shippingaddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Shippingaddress != nil {
|
||||
if err := m.Shippingaddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("shippingaddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("shippingaddress")
|
||||
return ce.ValidateName("ShippingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -393,19 +230,11 @@ func (m *Account) validateShippingaddress(formats strfmt.Registry) error {
|
|||
func (m *Account) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateBillingaddress(ctx, formats); err != nil {
|
||||
if err := m.contextValidateBillingAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateBusinessaddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateDefaultaddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateShippingaddress(ctx, formats); err != nil {
|
||||
if err := m.contextValidateShippingAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -415,14 +244,14 @@ func (m *Account) ContextValidate(ctx context.Context, formats strfmt.Registry)
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) contextValidateBillingaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
func (m *Account) contextValidateBillingAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Billingaddress != nil {
|
||||
if err := m.Billingaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if m.BillingAddress != nil {
|
||||
if err := m.BillingAddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("billingaddress")
|
||||
return ve.ValidateName("BillingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("billingaddress")
|
||||
return ce.ValidateName("BillingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -431,46 +260,14 @@ func (m *Account) contextValidateBillingaddress(ctx context.Context, formats str
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) contextValidateBusinessaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
func (m *Account) contextValidateShippingAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Businessaddress != nil {
|
||||
if err := m.Businessaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if m.ShippingAddress != nil {
|
||||
if err := m.ShippingAddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("businessaddress")
|
||||
return ve.ValidateName("ShippingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("businessaddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) contextValidateDefaultaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Defaultaddress != nil {
|
||||
if err := m.Defaultaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("defaultaddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("defaultaddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Account) contextValidateShippingaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Shippingaddress != nil {
|
||||
if err := m.Shippingaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("shippingaddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("shippingaddress")
|
||||
return ce.ValidateName("ShippingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -0,0 +1,246 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// Asset asset
|
||||
//
|
||||
// swagger:model Asset
|
||||
type Asset struct {
|
||||
|
||||
// Account
|
||||
AccountID string `json:"AccountID,omitempty"`
|
||||
|
||||
// address
|
||||
Address *Address `json:"Address,omitempty"`
|
||||
|
||||
// Asset Level
|
||||
AssetLevel float64 `json:"AssetLevel,omitempty"`
|
||||
|
||||
// Asset Provided By
|
||||
AssetProvidedByID string `json:"AssetProvidedByID,omitempty"`
|
||||
|
||||
// Asset Serviced By
|
||||
AssetServicedByID string `json:"AssetServicedByID,omitempty"`
|
||||
|
||||
// Company Product
|
||||
CompanyProductID string `json:"CompanyProductID,omitempty"`
|
||||
|
||||
// Consequence Of Failure
|
||||
ConsequenceOfFailure string `json:"ConsequenceOfFailure,omitempty"`
|
||||
|
||||
// Contact
|
||||
ContactID string `json:"ContactID,omitempty"`
|
||||
|
||||
// Created By
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Current Amount
|
||||
CurrentAmount float64 `json:"CurrentAmount,omitempty"`
|
||||
|
||||
// Current Lifecycle End Date
|
||||
CurrentLifecycleEndDate string `json:"CurrentLifecycleEndDate,omitempty"`
|
||||
|
||||
// Current Monthly Recurring Revenue
|
||||
CurrentMrr float64 `json:"CurrentMrr,omitempty"`
|
||||
|
||||
// Current Quantity
|
||||
CurrentQuantity float64 `json:"CurrentQuantity,omitempty"`
|
||||
|
||||
// Description
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// Digital Asset Status
|
||||
DigitalAssetStatus string `json:"DigitalAssetStatus,omitempty"`
|
||||
|
||||
// External Id
|
||||
ExternalIdentifier string `json:"ExternalIdentifier,omitempty"`
|
||||
|
||||
// Has Lifecycle Management
|
||||
HasLifecycleManagement bool `json:"HasLifecycleManagement,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Install Date
|
||||
InstallDate string `json:"InstallDate,omitempty"`
|
||||
|
||||
// Competitor Asset
|
||||
IsCompetitorProduct bool `json:"IsCompetitorProduct,omitempty"`
|
||||
|
||||
// Internal Asset
|
||||
IsInternal bool `json:"IsInternal,omitempty"`
|
||||
|
||||
// Last Modified By
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// Location
|
||||
LocationID string `json:"LocationID,omitempty"`
|
||||
|
||||
// MIME Type
|
||||
MIMEType string `json:"MIMEType,omitempty"`
|
||||
|
||||
// Manufacture Date
|
||||
ManufactureDate string `json:"ManufactureDate,omitempty"`
|
||||
|
||||
// Asset Name
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// Parent Asset
|
||||
ParentID string `json:"ParentID,omitempty"`
|
||||
|
||||
// Price
|
||||
Price float64 `json:"Price,omitempty"`
|
||||
|
||||
// Product
|
||||
Product2ID string `json:"Product2ID,omitempty"`
|
||||
|
||||
// Product Code
|
||||
ProductCode string `json:"ProductCode,omitempty"`
|
||||
|
||||
// Product Description
|
||||
ProductDescription string `json:"ProductDescription,omitempty"`
|
||||
|
||||
// Product Family
|
||||
ProductFamily string `json:"ProductFamily,omitempty"`
|
||||
|
||||
// Purchase Date
|
||||
PurchaseDate string `json:"PurchaseDate,omitempty"`
|
||||
|
||||
// Quantity
|
||||
Quantity float64 `json:"Quantity,omitempty"`
|
||||
|
||||
// Root Asset
|
||||
RootAssetID string `json:"RootAssetID,omitempty"`
|
||||
|
||||
// Serial Number
|
||||
SerialNumber string `json:"SerialNumber,omitempty"`
|
||||
|
||||
// Status
|
||||
Status string `json:"Status,omitempty"`
|
||||
|
||||
// Status Reason
|
||||
StatusReason string `json:"StatusReason,omitempty"`
|
||||
|
||||
// Product SKU
|
||||
StockKeepingUnit string `json:"StockKeepingUnit,omitempty"`
|
||||
|
||||
// Tenant ID
|
||||
TenantID string `json:"TenantID,omitempty"`
|
||||
|
||||
// Total Lifecycle Amount
|
||||
TotalLifecycleAmount float64 `json:"TotalLifecycleAmount,omitempty"`
|
||||
|
||||
// Type
|
||||
Type string `json:"Type,omitempty"`
|
||||
|
||||
// URL
|
||||
URL string `json:"URL,omitempty"`
|
||||
|
||||
// Unique Identifier
|
||||
UUID string `json:"UUID,omitempty"`
|
||||
|
||||
// Usage End Date
|
||||
UsageEndDate string `json:"UsageEndDate,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this asset
|
||||
func (m *Asset) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Asset) validateAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Address) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Address != nil {
|
||||
if err := m.Address.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Address")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Address")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this asset based on the context it is used
|
||||
func (m *Asset) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Asset) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Address")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Asset) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Asset) UnmarshalBinary(b []byte) error {
|
||||
var res Asset
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// AssetRequest An array of Asset objects with Contacts
|
||||
//
|
||||
// swagger:model AssetRequest
|
||||
type AssetRequest struct {
|
||||
|
||||
// data
|
||||
Data []*Asset `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this asset request
|
||||
func (m *AssetRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this asset request based on the context it is used
|
||||
func (m *AssetRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetRequest) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *AssetRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *AssetRequest) UnmarshalBinary(b []byte) error {
|
||||
var res AssetRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// AssetResponse An array of Asset objects with Contacts
|
||||
//
|
||||
// swagger:model AssetResponse
|
||||
type AssetResponse struct {
|
||||
|
||||
// data
|
||||
Data []*Asset `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this asset response
|
||||
func (m *AssetResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this asset response based on the context it is used
|
||||
func (m *AssetResponse) 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 *AssetResponse) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AssetResponse) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *AssetResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *AssetResponse) UnmarshalBinary(b []byte) error {
|
||||
var res AssetResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// CompanyProduct A software product or service vended by a Company
|
||||
//
|
||||
// swagger:model CompanyProduct
|
||||
type CompanyProduct struct {
|
||||
|
||||
// Taxnexus ID of the Company that owns this Product
|
||||
AccountID string `json:"AccountID,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Description of product
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// Product Name
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// TagLine
|
||||
TagLine string `json:"TagLine,omitempty"`
|
||||
|
||||
// Website
|
||||
URL string `json:"URL,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this company product
|
||||
func (m *CompanyProduct) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this company product based on context it is used
|
||||
func (m *CompanyProduct) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyProduct) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyProduct) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyProduct
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,171 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// CompanyProductRequest company product request
|
||||
//
|
||||
// swagger:model CompanyProductRequest
|
||||
type CompanyProductRequest struct {
|
||||
|
||||
// data
|
||||
// Required: true
|
||||
Data []*CompanyProduct `json:"data"`
|
||||
|
||||
// meta
|
||||
// Required: true
|
||||
Meta *RequestMeta `json:"meta"`
|
||||
}
|
||||
|
||||
// Validate validates this company product request
|
||||
func (m *CompanyProductRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductRequest) validateData(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("data", "body", m.Data); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductRequest) validateMeta(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("meta", "body", m.Meta); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this company product request based on the context it is used
|
||||
func (m *CompanyProductRequest) 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 *CompanyProductRequest) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductRequest) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyProductRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyProductRequest) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyProductRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// CompanyProductResponse company product response
|
||||
//
|
||||
// swagger:model CompanyProductResponse
|
||||
type CompanyProductResponse struct {
|
||||
|
||||
// data
|
||||
Data []*CompanyProduct `json:"data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this company product response
|
||||
func (m *CompanyProductResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this company product response based on the context it is used
|
||||
func (m *CompanyProductResponse) 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 *CompanyProductResponse) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyProductResponse) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyProductResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyProductResponse) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyProductResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -23,150 +23,126 @@ import (
|
|||
type Contact struct {
|
||||
|
||||
// The primary account ID of this contact
|
||||
Accountid string `json:"accountid,omitempty"`
|
||||
AccountID string `json:"AccountID,omitempty"`
|
||||
|
||||
// Assistant Name
|
||||
Assistantname string `json:"assistantname,omitempty"`
|
||||
AssistantName string `json:"AssistantName,omitempty"`
|
||||
|
||||
// Asst. Phone
|
||||
Assistantphone string `json:"assistantphone,omitempty"`
|
||||
AssistantPhone string `json:"AssistantPhone,omitempty"`
|
||||
|
||||
// Birthdate
|
||||
Birthdate string `json:"birthdate,omitempty"`
|
||||
BirthDate string `json:"BirthDate,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
Createdbyid string `json:"createdbyid,omitempty"`
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
Createddate string `json:"createddate,omitempty"`
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Department
|
||||
Department string `json:"department,omitempty"`
|
||||
Department string `json:"Department,omitempty"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description,omitempty"`
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// Do Not Call?
|
||||
Donotcall bool `json:"donotcall,omitempty"`
|
||||
DoNotCall bool `json:"DoNotCall,omitempty"`
|
||||
|
||||
// Email address
|
||||
Email string `json:"email,omitempty"`
|
||||
Email string `json:"Email,omitempty"`
|
||||
|
||||
// Email Bounce Date
|
||||
Emailbounceddate string `json:"emailbounceddate,omitempty"`
|
||||
EmailBounceDate string `json:"EmailBounceDate,omitempty"`
|
||||
|
||||
// Email Bounce Reason
|
||||
Emailbouncedreason string `json:"emailbouncedreason,omitempty"`
|
||||
|
||||
// Taxnexus Enrollment Status
|
||||
Enrollmentstatus string `json:"enrollmentstatus,omitempty"`
|
||||
EmailBounceReason string `json:"EmailBounceReason,omitempty"`
|
||||
|
||||
// Fax Number
|
||||
Fax string `json:"fax,omitempty"`
|
||||
Facebook string `json:"Facebook,omitempty"`
|
||||
|
||||
// fax
|
||||
Fax string `json:"Fax,omitempty"`
|
||||
|
||||
// First Name
|
||||
Firstname string `json:"firstname,omitempty"`
|
||||
FirstName string `json:"FirstName,omitempty"`
|
||||
|
||||
// Email Opt Out
|
||||
Hasoptedoutofemail bool `json:"hasoptedoutofemail,omitempty"`
|
||||
HasOptedOutOfEmail bool `json:"HasOptedOutOfEmail,omitempty"`
|
||||
|
||||
// Fax Opt Out
|
||||
Hasoptedoutoffax bool `json:"hasoptedoutoffax,omitempty"`
|
||||
HasOptedOutOfFax bool `json:"HasOptedOutOfFax,omitempty"`
|
||||
|
||||
// Home Phone
|
||||
Homephone string `json:"homephone,omitempty"`
|
||||
HomePhone string `json:"HomePhone,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"id,omitempty"`
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Does this contact have bounced emails?
|
||||
Isemailbounced bool `json:"isemailbounced,omitempty"`
|
||||
|
||||
// Is Provisioned?
|
||||
Isprovisioned bool `json:"isprovisioned,omitempty"`
|
||||
IsEmailBounced bool `json:"IsEmailBounced,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
Lastmodifiedbyid string `json:"lastmodifiedbyid,omitempty"`
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
Lastmodifieddate string `json:"lastmodifieddate,omitempty"`
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// Last Name
|
||||
Lastname string `json:"lastname,omitempty"`
|
||||
LastName string `json:"LastName,omitempty"`
|
||||
|
||||
// Lead Source
|
||||
Leadsource string `json:"leadsource,omitempty"`
|
||||
|
||||
// Level
|
||||
Level string `json:"level,omitempty"`
|
||||
LeadSource string `json:"LeadSource,omitempty"`
|
||||
|
||||
// LinkedIn Page
|
||||
Linkedin string `json:"linkedin,omitempty"`
|
||||
LinkedIn string `json:"LinkedIn,omitempty"`
|
||||
|
||||
// mailingaddress
|
||||
Mailingaddress *Address `json:"mailingaddress,omitempty"`
|
||||
|
||||
// Mailing Lists
|
||||
Mailinglists string `json:"mailinglists,omitempty"`
|
||||
// mailing address
|
||||
MailingAddress *Address `json:"MailingAddress,omitempty"`
|
||||
|
||||
// Mobile Phone
|
||||
Mobilephone string `json:"mobilephone,omitempty"`
|
||||
MobilePhone string `json:"MobilePhone,omitempty"`
|
||||
|
||||
// Full Name
|
||||
Name string `json:"name,omitempty"`
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// otheraddress
|
||||
Otheraddress *Address `json:"otheraddress,omitempty"`
|
||||
// other address
|
||||
OtherAddress *Address `json:"OtherAddress,omitempty"`
|
||||
|
||||
// Other Phone
|
||||
Otherphone string `json:"otherphone,omitempty"`
|
||||
OtherPhone string `json:"OtherPhone,omitempty"`
|
||||
|
||||
// The User ID of the user who owns this Contact
|
||||
Ownerid string `json:"ownerid,omitempty"`
|
||||
OwnerID string `json:"OwnerID,omitempty"`
|
||||
|
||||
// Personal Email Address for this Contact
|
||||
Personalemail string `json:"personalemail,omitempty"`
|
||||
PersonalEmail string `json:"PersonalEmail,omitempty"`
|
||||
|
||||
// Phone Number
|
||||
Phone string `json:"phone,omitempty"`
|
||||
Phone string `json:"Phone,omitempty"`
|
||||
|
||||
// URL of a photograph of this User
|
||||
Photourl string `json:"photourl,omitempty"`
|
||||
|
||||
// Recruiting Status
|
||||
Recruitingstatus string `json:"recruitingstatus,omitempty"`
|
||||
|
||||
// External reference to this contact, if any
|
||||
Ref string `json:"ref,omitempty"`
|
||||
|
||||
// Reports To Contact ID
|
||||
Reportstoid string `json:"reportstoid,omitempty"`
|
||||
|
||||
// Contact Salutation
|
||||
Salutation string `json:"salutation,omitempty"`
|
||||
|
||||
// The Contact Status
|
||||
Status string `json:"status,omitempty"`
|
||||
PhotoURL string `json:"PhotoURL,omitempty"`
|
||||
|
||||
// tenant identifier
|
||||
Tenantid string `json:"tenantid,omitempty"`
|
||||
TenantID string `json:"TenantID,omitempty"`
|
||||
|
||||
// Contact Title
|
||||
Title string `json:"title,omitempty"`
|
||||
Title string `json:"Title,omitempty"`
|
||||
|
||||
// Contact Type
|
||||
Type string `json:"type,omitempty"`
|
||||
// twitter
|
||||
Twitter string `json:"Twitter,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this contact
|
||||
func (m *Contact) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateMailingaddress(formats); err != nil {
|
||||
if err := m.validateMailingAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateOtheraddress(formats); err != nil {
|
||||
if err := m.validateOtherAddress(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -176,17 +152,17 @@ func (m *Contact) Validate(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Contact) validateMailingaddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Mailingaddress) { // not required
|
||||
func (m *Contact) validateMailingAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.MailingAddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Mailingaddress != nil {
|
||||
if err := m.Mailingaddress.Validate(formats); err != nil {
|
||||
if m.MailingAddress != nil {
|
||||
if err := m.MailingAddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("mailingaddress")
|
||||
return ve.ValidateName("MailingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("mailingaddress")
|
||||
return ce.ValidateName("MailingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -195,17 +171,17 @@ func (m *Contact) validateMailingaddress(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Contact) validateOtheraddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Otheraddress) { // not required
|
||||
func (m *Contact) validateOtherAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.OtherAddress) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Otheraddress != nil {
|
||||
if err := m.Otheraddress.Validate(formats); err != nil {
|
||||
if m.OtherAddress != nil {
|
||||
if err := m.OtherAddress.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("otheraddress")
|
||||
return ve.ValidateName("OtherAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("otheraddress")
|
||||
return ce.ValidateName("OtherAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -218,11 +194,11 @@ func (m *Contact) validateOtheraddress(formats strfmt.Registry) error {
|
|||
func (m *Contact) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateMailingaddress(ctx, formats); err != nil {
|
||||
if err := m.contextValidateMailingAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateOtheraddress(ctx, formats); err != nil {
|
||||
if err := m.contextValidateOtherAddress(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -232,14 +208,14 @@ func (m *Contact) ContextValidate(ctx context.Context, formats strfmt.Registry)
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Contact) contextValidateMailingaddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
func (m *Contact) contextValidateMailingAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Mailingaddress != nil {
|
||||
if err := m.Mailingaddress.ContextValidate(ctx, formats); err != nil {
|
||||
if m.MailingAddress != nil {
|
||||
if err := m.MailingAddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("mailingaddress")
|
||||
return ve.ValidateName("MailingAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("mailingaddress")
|
||||
return ce.ValidateName("MailingAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
@ -248,14 +224,14 @@ func (m *Contact) contextValidateMailingaddress(ctx context.Context, formats str
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Contact) contextValidateOtheraddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
func (m *Contact) contextValidateOtherAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Otheraddress != nil {
|
||||
if err := m.Otheraddress.ContextValidate(ctx, formats); err != nil {
|
||||
if m.OtherAddress != nil {
|
||||
if err := m.OtherAddress.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("otheraddress")
|
||||
return ve.ValidateName("OtherAddress")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("otheraddress")
|
||||
return ce.ValidateName("OtherAddress")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// Industry An industry that is being researched
|
||||
//
|
||||
// swagger:model Industry
|
||||
type Industry struct {
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// Industry Description
|
||||
Description string `json:"Description,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
|
||||
// The hierarchical level of this Industry
|
||||
Level string `json:"Level,omitempty"`
|
||||
|
||||
// Industry Name
|
||||
Name string `json:"Name,omitempty"`
|
||||
|
||||
// The ID of the Parent Industry
|
||||
ParentIndustryID string `json:"ParentIndustryID,omitempty"`
|
||||
|
||||
// The full path of this industry, including Parent
|
||||
Path string `json:"Path,omitempty"`
|
||||
|
||||
// The URL of the corresponding page on the CMS
|
||||
SiteURL string `json:"SiteURL,omitempty"`
|
||||
|
||||
// The CMS Slug for this Industry
|
||||
Slug string `json:"Slug,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry
|
||||
func (m *Industry) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this industry based on context it is used
|
||||
func (m *Industry) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *Industry) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *Industry) UnmarshalBinary(b []byte) error {
|
||||
var res Industry
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// IndustryProduct Junction object between Industry and CompanyProduct
|
||||
//
|
||||
// swagger:model IndustryProduct
|
||||
type IndustryProduct struct {
|
||||
|
||||
// company product ID
|
||||
CompanyProductID string `json:"CompanyProductID,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID string `json:"CreatedByID,omitempty"`
|
||||
|
||||
// Created Date
|
||||
CreatedDate string `json:"CreatedDate,omitempty"`
|
||||
|
||||
// HTML
|
||||
HTML string `json:"HTML,omitempty"`
|
||||
|
||||
// Taxnexus Record Id
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// industry ID
|
||||
IndustryID string `json:"IndustryID,omitempty"`
|
||||
|
||||
// Last Modified By User ID
|
||||
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
||||
|
||||
// Last Modified Date
|
||||
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry product
|
||||
func (m *IndustryProduct) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this industry product based on context it is used
|
||||
func (m *IndustryProduct) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryProduct) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryProduct) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryProduct
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IndustryProductRequest An array of IndustryProduct objects submitted for processing
|
||||
//
|
||||
// swagger:model IndustryProductRequest
|
||||
type IndustryProductRequest struct {
|
||||
|
||||
// data
|
||||
Data []*IndustryProduct `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this industry product request
|
||||
func (m *IndustryProductRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this industry product request based on the context it is used
|
||||
func (m *IndustryProductRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductRequest) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryProductRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryProductRequest) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryProductRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IndustryProductResponse An array of IndustryProduct objects produced in response to a request
|
||||
//
|
||||
// swagger:model IndustryProductResponse
|
||||
type IndustryProductResponse struct {
|
||||
|
||||
// data
|
||||
Data []*IndustryProduct `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry product response
|
||||
func (m *IndustryProductResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this industry product response based on the context it is used
|
||||
func (m *IndustryProductResponse) 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 *IndustryProductResponse) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryProductResponse) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryProductResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryProductResponse) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryProductResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IndustryRequest An array of Industry objects submitted for processing
|
||||
//
|
||||
// swagger:model IndustryRequest
|
||||
type IndustryRequest struct {
|
||||
|
||||
// data
|
||||
Data []*Industry `json:"Data"`
|
||||
}
|
||||
|
||||
// Validate validates this industry request
|
||||
func (m *IndustryRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this industry request based on the context it is used
|
||||
func (m *IndustryRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryRequest) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryRequest) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package sfgate_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// IndustryResponse An array of Industry objects produced in response to a request
|
||||
//
|
||||
// swagger:model IndustryResponse
|
||||
type IndustryResponse struct {
|
||||
|
||||
// data
|
||||
Data []*Industry `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this industry response
|
||||
func (m *IndustryResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this industry response based on the context it is used
|
||||
func (m *IndustryResponse) 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 *IndustryResponse) 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))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IndustryResponse) 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")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *IndustryResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *IndustryResponse) UnmarshalBinary(b []byte) error {
|
||||
var res IndustryResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -8,10 +8,18 @@ docs/AccountRequest.md
|
|||
docs/AccountResponse.md
|
||||
docs/AccountsApi.md
|
||||
docs/Address.md
|
||||
docs/Asset.md
|
||||
docs/AssetRequest.md
|
||||
docs/AssetResponse.md
|
||||
docs/AssetsApi.md
|
||||
docs/Cluster.md
|
||||
docs/ClusterRequest.md
|
||||
docs/ClusterResponse.md
|
||||
docs/ClustersApi.md
|
||||
docs/CompanyProduct.md
|
||||
docs/CompanyProductRequest.md
|
||||
docs/CompanyProductResponse.md
|
||||
docs/CompanyProductsApi.md
|
||||
docs/Contact.md
|
||||
docs/ContactRequest.md
|
||||
docs/ContactResponse.md
|
||||
|
@ -26,6 +34,15 @@ docs/DatabaseResponse.md
|
|||
docs/DatabasesApi.md
|
||||
docs/DeleteResponse.md
|
||||
docs/Error.md
|
||||
docs/IndustriesApi.md
|
||||
docs/Industry.md
|
||||
docs/IndustryProduct.md
|
||||
docs/IndustryProductRequest.md
|
||||
docs/IndustryProductResponse.md
|
||||
docs/IndustryProductsApi.md
|
||||
docs/IndustryRequest.md
|
||||
docs/IndustryResponse.md
|
||||
docs/IndustryproductsApi.md
|
||||
docs/InvalidError.md
|
||||
docs/InvalidErrorAllOf.md
|
||||
docs/Message.md
|
||||
|
@ -53,10 +70,15 @@ mocha.opts
|
|||
package.json
|
||||
src/ApiClient.js
|
||||
src/api/AccountsApi.js
|
||||
src/api/AssetsApi.js
|
||||
src/api/ClustersApi.js
|
||||
src/api/CompanyProductsApi.js
|
||||
src/api/ContactsApi.js
|
||||
src/api/ContractsApi.js
|
||||
src/api/DatabasesApi.js
|
||||
src/api/IndustriesApi.js
|
||||
src/api/IndustryProductsApi.js
|
||||
src/api/IndustryproductsApi.js
|
||||
src/api/RolesApi.js
|
||||
src/api/TemplatesApi.js
|
||||
src/api/TenantsApi.js
|
||||
|
@ -66,9 +88,15 @@ src/model/Account.js
|
|||
src/model/AccountRequest.js
|
||||
src/model/AccountResponse.js
|
||||
src/model/Address.js
|
||||
src/model/Asset.js
|
||||
src/model/AssetRequest.js
|
||||
src/model/AssetResponse.js
|
||||
src/model/Cluster.js
|
||||
src/model/ClusterRequest.js
|
||||
src/model/ClusterResponse.js
|
||||
src/model/CompanyProduct.js
|
||||
src/model/CompanyProductRequest.js
|
||||
src/model/CompanyProductResponse.js
|
||||
src/model/Contact.js
|
||||
src/model/ContactRequest.js
|
||||
src/model/ContactResponse.js
|
||||
|
@ -80,6 +108,12 @@ src/model/DatabaseRequest.js
|
|||
src/model/DatabaseResponse.js
|
||||
src/model/DeleteResponse.js
|
||||
src/model/Error.js
|
||||
src/model/Industry.js
|
||||
src/model/IndustryProduct.js
|
||||
src/model/IndustryProductRequest.js
|
||||
src/model/IndustryProductResponse.js
|
||||
src/model/IndustryRequest.js
|
||||
src/model/IndustryResponse.js
|
||||
src/model/InvalidError.js
|
||||
src/model/InvalidErrorAllOf.js
|
||||
src/model/Message.js
|
||||
|
@ -99,10 +133,15 @@ src/model/User.js
|
|||
src/model/UserResponse.js
|
||||
src/model/UserRole.js
|
||||
test/api/AccountsApi.spec.js
|
||||
test/api/AssetsApi.spec.js
|
||||
test/api/ClustersApi.spec.js
|
||||
test/api/CompanyProductsApi.spec.js
|
||||
test/api/ContactsApi.spec.js
|
||||
test/api/ContractsApi.spec.js
|
||||
test/api/DatabasesApi.spec.js
|
||||
test/api/IndustriesApi.spec.js
|
||||
test/api/IndustryProductsApi.spec.js
|
||||
test/api/IndustryproductsApi.spec.js
|
||||
test/api/RolesApi.spec.js
|
||||
test/api/TemplatesApi.spec.js
|
||||
test/api/TenantsApi.spec.js
|
||||
|
@ -111,9 +150,15 @@ test/model/Account.spec.js
|
|||
test/model/AccountRequest.spec.js
|
||||
test/model/AccountResponse.spec.js
|
||||
test/model/Address.spec.js
|
||||
test/model/Asset.spec.js
|
||||
test/model/AssetRequest.spec.js
|
||||
test/model/AssetResponse.spec.js
|
||||
test/model/Cluster.spec.js
|
||||
test/model/ClusterRequest.spec.js
|
||||
test/model/ClusterResponse.spec.js
|
||||
test/model/CompanyProduct.spec.js
|
||||
test/model/CompanyProductRequest.spec.js
|
||||
test/model/CompanyProductResponse.spec.js
|
||||
test/model/Contact.spec.js
|
||||
test/model/ContactRequest.spec.js
|
||||
test/model/ContactResponse.spec.js
|
||||
|
@ -125,6 +170,12 @@ test/model/DatabaseRequest.spec.js
|
|||
test/model/DatabaseResponse.spec.js
|
||||
test/model/DeleteResponse.spec.js
|
||||
test/model/Error.spec.js
|
||||
test/model/Industry.spec.js
|
||||
test/model/IndustryProduct.spec.js
|
||||
test/model/IndustryProductRequest.spec.js
|
||||
test/model/IndustryProductResponse.spec.js
|
||||
test/model/IndustryRequest.spec.js
|
||||
test/model/IndustryResponse.spec.js
|
||||
test/model/InvalidError.spec.js
|
||||
test/model/InvalidErrorAllOf.spec.js
|
||||
test/model/Message.spec.js
|
||||
|
|
|
@ -132,9 +132,13 @@ Class | Method | HTTP request | Description
|
|||
*SfGate.AccountsApi* | [**getAccounts**](docs/AccountsApi.md#getAccounts) | **GET** /accounts | Get a list of accounts
|
||||
*SfGate.AccountsApi* | [**postAccounts**](docs/AccountsApi.md#postAccounts) | **POST** /accounts | Add a new account to Taxnexus
|
||||
*SfGate.AccountsApi* | [**putAccount**](docs/AccountsApi.md#putAccount) | **PUT** /accounts | Update a single account
|
||||
*SfGate.AssetsApi* | [**getAssets**](docs/AssetsApi.md#getAssets) | **GET** /assets | Get a list of assets
|
||||
*SfGate.AssetsApi* | [**postAssets**](docs/AssetsApi.md#postAssets) | **POST** /assets | Add a new asset to Taxnexus
|
||||
*SfGate.ClustersApi* | [**getClusters**](docs/ClustersApi.md#getClusters) | **GET** /clusters | Get a list Clusters
|
||||
*SfGate.ClustersApi* | [**postClusters**](docs/ClustersApi.md#postClusters) | **POST** /clusters | Create new Clusters
|
||||
*SfGate.ClustersApi* | [**putClusters**](docs/ClustersApi.md#putClusters) | **PUT** /clusters | Update Clusters
|
||||
*SfGate.CompanyProductsApi* | [**getCompanyProducts**](docs/CompanyProductsApi.md#getCompanyProducts) | **GET** /companyproducts | Get a list of companyproducts
|
||||
*SfGate.CompanyProductsApi* | [**postCompanyProducts**](docs/CompanyProductsApi.md#postCompanyProducts) | **POST** /companyproducts | Add a new companyproduct to Taxnexus
|
||||
*SfGate.ContactsApi* | [**getContacts**](docs/ContactsApi.md#getContacts) | **GET** /contacts | Get a Contact record
|
||||
*SfGate.ContactsApi* | [**postContacts**](docs/ContactsApi.md#postContacts) | **POST** /contacts | Add a new Contacts to Taxnexus
|
||||
*SfGate.ContractsApi* | [**getContracts**](docs/ContractsApi.md#getContracts) | **GET** /contracts | Get a list of contracts
|
||||
|
@ -142,6 +146,10 @@ Class | Method | HTTP request | Description
|
|||
*SfGate.DatabasesApi* | [**getDatabases**](docs/DatabasesApi.md#getDatabases) | **GET** /databases | Get a list Databases
|
||||
*SfGate.DatabasesApi* | [**postDatabases**](docs/DatabasesApi.md#postDatabases) | **POST** /databases | Create new Databases
|
||||
*SfGate.DatabasesApi* | [**putDatabases**](docs/DatabasesApi.md#putDatabases) | **PUT** /databases | Update Databases
|
||||
*SfGate.IndustriesApi* | [**getIndustries**](docs/IndustriesApi.md#getIndustries) | **GET** /industries | Get a list of industries
|
||||
*SfGate.IndustriesApi* | [**postIndustries**](docs/IndustriesApi.md#postIndustries) | **POST** /industries | Add a new industry to Taxnexus
|
||||
*SfGate.IndustryProductsApi* | [**postIndustryproducts**](docs/IndustryProductsApi.md#postIndustryproducts) | **POST** /industryproducts | Add a new industryproduct to Taxnexus
|
||||
*SfGate.IndustryproductsApi* | [**getIndustryProducts**](docs/IndustryproductsApi.md#getIndustryProducts) | **GET** /industryproducts | Get a list of industryproducts
|
||||
*SfGate.RolesApi* | [**getRoles**](docs/RolesApi.md#getRoles) | **GET** /roles | Get a list of Roles
|
||||
*SfGate.TemplatesApi* | [**getTemplates**](docs/TemplatesApi.md#getTemplates) | **GET** /templates | Get PDF Rendering Templates
|
||||
*SfGate.TenantsApi* | [**getTenants**](docs/TenantsApi.md#getTenants) | **GET** /tenants | Get a list Tenants
|
||||
|
@ -156,9 +164,15 @@ Class | Method | HTTP request | Description
|
|||
- [SfGate.AccountRequest](docs/AccountRequest.md)
|
||||
- [SfGate.AccountResponse](docs/AccountResponse.md)
|
||||
- [SfGate.Address](docs/Address.md)
|
||||
- [SfGate.Asset](docs/Asset.md)
|
||||
- [SfGate.AssetRequest](docs/AssetRequest.md)
|
||||
- [SfGate.AssetResponse](docs/AssetResponse.md)
|
||||
- [SfGate.Cluster](docs/Cluster.md)
|
||||
- [SfGate.ClusterRequest](docs/ClusterRequest.md)
|
||||
- [SfGate.ClusterResponse](docs/ClusterResponse.md)
|
||||
- [SfGate.CompanyProduct](docs/CompanyProduct.md)
|
||||
- [SfGate.CompanyProductRequest](docs/CompanyProductRequest.md)
|
||||
- [SfGate.CompanyProductResponse](docs/CompanyProductResponse.md)
|
||||
- [SfGate.Contact](docs/Contact.md)
|
||||
- [SfGate.ContactRequest](docs/ContactRequest.md)
|
||||
- [SfGate.ContactResponse](docs/ContactResponse.md)
|
||||
|
@ -170,6 +184,12 @@ Class | Method | HTTP request | Description
|
|||
- [SfGate.DatabaseResponse](docs/DatabaseResponse.md)
|
||||
- [SfGate.DeleteResponse](docs/DeleteResponse.md)
|
||||
- [SfGate.Error](docs/Error.md)
|
||||
- [SfGate.Industry](docs/Industry.md)
|
||||
- [SfGate.IndustryProduct](docs/IndustryProduct.md)
|
||||
- [SfGate.IndustryProductRequest](docs/IndustryProductRequest.md)
|
||||
- [SfGate.IndustryProductResponse](docs/IndustryProductResponse.md)
|
||||
- [SfGate.IndustryRequest](docs/IndustryRequest.md)
|
||||
- [SfGate.IndustryResponse](docs/IndustryResponse.md)
|
||||
- [SfGate.InvalidError](docs/InvalidError.md)
|
||||
- [SfGate.InvalidErrorAllOf](docs/InvalidErrorAllOf.md)
|
||||
- [SfGate.Message](docs/Message.md)
|
||||
|
|
|
@ -4,93 +4,54 @@
|
|||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**tenantid** | **String** | tenant identifier | [optional]
|
||||
**accountnumber** | **String** | Account Number | [optional]
|
||||
**accountsource** | **String** | The marketing orgin of this account | [optional]
|
||||
**active** | **Boolean** | Active | [optional]
|
||||
**administrativelevel** | **String** | For tax authorities, this account's administrative level, e.g. Local, County, State or Federal | [optional]
|
||||
**amount** | **Number** | Rollup Tax Amount | [optional]
|
||||
**amountinvoiced** | **Number** | Amount Invoiced | [optional]
|
||||
**amountpaid** | **Number** | Amount Paid | [optional]
|
||||
**annualrevenue** | **Number** | Annual Revenue Estimate | [optional]
|
||||
**balance** | **Number** | Account Balance | [optional]
|
||||
**billingaddress** | [**Address**](Address.md) | | [optional]
|
||||
**billingcontactid** | **String** | Contact ID | [optional]
|
||||
**billingpreference** | **String** | Billing Preference | [optional]
|
||||
**businessaddress** | [**Address**](Address.md) | | [optional]
|
||||
**cannabiscustomer** | **Boolean** | Is this a cannabis customer? | [optional]
|
||||
**channelprogramlevelname** | **String** | Channel Program Level Name | [optional]
|
||||
**channelprogramname** | **String** | Channel Program Name | [optional]
|
||||
**clientenddate** | **String** | Client End Date | [optional]
|
||||
**clientstartdate** | **String** | Client Start Date | [optional]
|
||||
**companyid** | **String** | The Company ID of this Account | [optional]
|
||||
**coordinateid** | **String** | The Id of the geo coordinates of this account | [optional]
|
||||
**createdbyid** | **String** | Created By User ID | [optional]
|
||||
**createddate** | **String** | Created Date | [optional]
|
||||
**customerid** | **String** | Customer ID from source system | [optional]
|
||||
**customerpriority** | **String** | Customer Priority | [optional]
|
||||
**dandbcompanyid** | **String** | D-n-B Company | [optional]
|
||||
**dba** | **String** | This Account's 'Doing Business As' name | [optional]
|
||||
**defaultaddress** | [**Address**](Address.md) | | [optional]
|
||||
**defaultbackendid** | **String** | Default Backend ID | [optional]
|
||||
**defaultdeliverycontactid** | **String** | Default Delivery Address Contact ID | [optional]
|
||||
**defaultenduserid** | **String** | Default End User Contact ID | [optional]
|
||||
**tenantID** | **String** | tenant identifier | [optional]
|
||||
**ID** | **String** | Taxnexus Account Id | [optional]
|
||||
**accountNumber** | **String** | Account Number | [optional]
|
||||
**accountSource** | **String** | The marketing orgin of this account | [optional]
|
||||
**annualRevenue** | **Number** | Annual Revenue Estimate | [optional]
|
||||
**billingAddress** | [**Address**](Address.md) | | [optional]
|
||||
**billingContactID** | **String** | Contact ID | [optional]
|
||||
**createdByID** | **String** | Created By User ID | [optional]
|
||||
**createdDate** | **String** | Created Date | [optional]
|
||||
**closeDate** | **String** | Date company closed | [optional]
|
||||
**cloudRevenueTotal** | **Number** | | [optional]
|
||||
**cloudType** | **String** | | [optional]
|
||||
**cloudYear** | **String** | | [optional]
|
||||
**crunchbaseURL** | **String** | | [optional]
|
||||
**description** | **String** | Description | [optional]
|
||||
**dunsnumber** | **String** | D-U-N-S Number | [optional]
|
||||
**ein** | **String** | EIN | [optional]
|
||||
**earningsCall** | **String** | | [optional]
|
||||
**email** | **String** | Main Account Email | [optional]
|
||||
**enrollmentstatus** | **String** | Enrollment Status | [optional]
|
||||
**equityFunding** | **Number** | | [optional]
|
||||
**fax** | **String** | Fax | [optional]
|
||||
**id** | **String** | Taxnexus Account Id | [optional]
|
||||
**foundedDate** | **String** | | [optional]
|
||||
**industry** | **String** | Industry | [optional]
|
||||
**iscustomerportal** | **Boolean** | Customer Portal Account | [optional]
|
||||
**ispartner** | **Boolean** | Partner Account | [optional]
|
||||
**ispcustomer** | **Boolean** | ISP Customer? | [optional]
|
||||
**jigsaw** | **String** | Data.com Key | [optional]
|
||||
**lastmodifiedbyid** | **String** | Last Modified By User ID | [optional]
|
||||
**lastmodifieddate** | **String** | Last Modified Date | [optional]
|
||||
**mspcustomer** | **Boolean** | MSP Customer? | [optional]
|
||||
**naicscode** | **String** | NAICS Code | [optional]
|
||||
**naicsdesc** | **String** | NAICS Description | [optional]
|
||||
**facebook** | **String** | | [optional]
|
||||
**industries** | **String** | | [optional]
|
||||
**iPODate** | **String** | | [optional]
|
||||
**lastModifiedByID** | **String** | Last Modified By User ID | [optional]
|
||||
**lastModifiedDate** | **String** | Last Modified Date | [optional]
|
||||
**linkedIn** | **String** | | [optional]
|
||||
**location** | **String** | | [optional]
|
||||
**marketCapitalization** | **Number** | | [optional]
|
||||
**name** | **String** | Account Name | [optional]
|
||||
**numberofemployees** | **Number** | Employee Count Estimate | [optional]
|
||||
**numberoflocations** | **Number** | Number of Locations Estimate | [optional]
|
||||
**opencharges** | **Number** | Open Charges | [optional]
|
||||
**ordercontactid** | **String** | Vendor Order Contact ID | [optional]
|
||||
**orderemail** | **String** | Order Email | [optional]
|
||||
**ownerid** | **String** | Account Owner User ID | [optional]
|
||||
**numberOfEmployees** | **Number** | Employee Count Estimate | [optional]
|
||||
**numberInvestments** | **Number** | Number of Locations Estimate | [optional]
|
||||
**ownerID** | **String** | Account Owner User ID | [optional]
|
||||
**ownership** | **String** | Ownership | [optional]
|
||||
**parentfk** | **String** | Parent Foreign Key | [optional]
|
||||
**parentid** | **String** | Parent Account | [optional]
|
||||
**parentID** | **String** | Parent Account | [optional]
|
||||
**phone** | **String** | Phone | [optional]
|
||||
**placeid** | **String** | The ID of the Place situs record that applies to this Account | [optional]
|
||||
**preparerid** | **String** | Tax Preparer Contact ID | [optional]
|
||||
**rating** | **String** | Rating | [optional]
|
||||
**ratingengineid** | **String** | Rating Engine identifier | [optional]
|
||||
**ref** | **String** | External Reference ID | [optional]
|
||||
**revenuebase** | **Number** | Rollup Revenue Base | [optional]
|
||||
**revenuenet** | **Number** | Rollup Revenue Net | [optional]
|
||||
**revenuenottaxable** | **Number** | Rollup Revenue Not Taxable | [optional]
|
||||
**shippingaddress** | [**Address**](Address.md) | | [optional]
|
||||
**shippingcensustract** | **String** | Shipping Census Tract | [optional]
|
||||
**shippingcounty** | **String** | Shipping County | [optional]
|
||||
**shippingcontactid** | **String** | Shipping Contact ID | [optional]
|
||||
**sic** | **String** | SIC Code | [optional]
|
||||
**sicdesc** | **String** | SIC Description | [optional]
|
||||
**publish** | **Boolean** | | [optional]
|
||||
**salesforceFirst** | **Boolean** | | [optional]
|
||||
**shippingAddress** | [**Address**](Address.md) | | [optional]
|
||||
**shippingContactID** | **String** | | [optional]
|
||||
**SIC** | **String** | SIC Code | [optional]
|
||||
**sICDesc** | **String** | SIC Description | [optional]
|
||||
**site** | **String** | Account Site | [optional]
|
||||
**status** | **String** | Account Status | [optional]
|
||||
**taxexemption** | **String** | Tax Exemption | [optional]
|
||||
**taxontax** | **Number** | Rollup Tax On Tax | [optional]
|
||||
**telecomcustomer** | **Boolean** | Telecom Customer? | [optional]
|
||||
**tickersymbol** | **String** | Ticker Symbol | [optional]
|
||||
**tradestyle** | **String** | Tradestyle | [optional]
|
||||
**tagLine** | **String** | | [optional]
|
||||
**tickerSymbol** | **String** | | [optional]
|
||||
**type** | **String** | Type | [optional]
|
||||
**unappliedpayments** | **Number** | Unapplied Payments | [optional]
|
||||
**unitbase** | **Number** | Rollup Unit Base | [optional]
|
||||
**upsellopportunity** | **String** | Upsell Opportunity | [optional]
|
||||
**twitter** | **String** | | [optional]
|
||||
**website** | **String** | Website | [optional]
|
||||
**whmcsclientid** | **Number** | WHMCS Client ID | [optional]
|
||||
**xerocontactid** | **String** | Xero Contact ID | [optional]
|
||||
**yearstarted** | **String** | Year Started | [optional]
|
||||
**yearStarted** | **String** | Year Started | [optional]
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
# SfGate.Asset
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ID** | **String** | Taxnexus Record Id | [optional]
|
||||
**accountID** | **String** | Account | [optional]
|
||||
**address** | [**Address**](Address.md) | | [optional]
|
||||
**assetLevel** | **Number** | Asset Level | [optional]
|
||||
**name** | **String** | Asset Name | [optional]
|
||||
**assetProvidedByID** | **String** | Asset Provided By | [optional]
|
||||
**assetServicedByID** | **String** | Asset Serviced By | [optional]
|
||||
**companyProductID** | **String** | Company Product | [optional]
|
||||
**isCompetitorProduct** | **Boolean** | Competitor Asset | [optional]
|
||||
**consequenceOfFailure** | **String** | Consequence Of Failure | [optional]
|
||||
**contactID** | **String** | Contact | [optional]
|
||||
**createdByID** | **String** | Created By | [optional]
|
||||
**createdDate** | **String** | Created Date | [optional]
|
||||
**currentAmount** | **Number** | Current Amount | [optional]
|
||||
**currentLifecycleEndDate** | **String** | Current Lifecycle End Date | [optional]
|
||||
**currentMrr** | **Number** | Current Monthly Recurring Revenue | [optional]
|
||||
**currentQuantity** | **Number** | Current Quantity | [optional]
|
||||
**description** | **String** | Description | [optional]
|
||||
**digitalAssetStatus** | **String** | Digital Asset Status | [optional]
|
||||
**externalIdentifier** | **String** | External Id | [optional]
|
||||
**hasLifecycleManagement** | **Boolean** | Has Lifecycle Management | [optional]
|
||||
**installDate** | **String** | Install Date | [optional]
|
||||
**isInternal** | **Boolean** | Internal Asset | [optional]
|
||||
**lastModifiedByID** | **String** | Last Modified By | [optional]
|
||||
**lastModifiedDate** | **String** | Last Modified Date | [optional]
|
||||
**locationID** | **String** | Location | [optional]
|
||||
**manufactureDate** | **String** | Manufacture Date | [optional]
|
||||
**mIMEType** | **String** | MIME Type | [optional]
|
||||
**parentID** | **String** | Parent Asset | [optional]
|
||||
**price** | **Number** | Price | [optional]
|
||||
**product2ID** | **String** | Product | [optional]
|
||||
**productCode** | **String** | Product Code | [optional]
|
||||
**productDescription** | **String** | Product Description | [optional]
|
||||
**productFamily** | **String** | Product Family | [optional]
|
||||
**stockKeepingUnit** | **String** | Product SKU | [optional]
|
||||
**purchaseDate** | **String** | Purchase Date | [optional]
|
||||
**quantity** | **Number** | Quantity | [optional]
|
||||
**rootAssetID** | **String** | Root Asset | [optional]
|
||||
**serialNumber** | **String** | Serial Number | [optional]
|
||||
**status** | **String** | Status | [optional]
|
||||
**statusReason** | **String** | Status Reason | [optional]
|
||||
**tenantID** | **String** | Tenant ID | [optional]
|
||||
**totalLifecycleAmount** | **Number** | Total Lifecycle Amount | [optional]
|
||||
**type** | **String** | Type | [optional]
|
||||
**UUID** | **String** | Unique Identifier | [optional]
|
||||
**URL** | **String** | URL | [optional]
|
||||
**usageEndDate** | **String** | Usage End Date | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# SfGate.AssetRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**data** | [**[Asset]**](Asset.md) | | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# SfGate.AssetResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**data** | [**[Asset]**](Asset.md) | | [optional]
|
||||
**meta** | [**ResponseMeta**](ResponseMeta.md) | | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
# SfGate.AssetsApi
|
||||
|
||||
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**getAssets**](AssetsApi.md#getAssets) | **GET** /assets | Get a list of assets
|
||||
[**postAssets**](AssetsApi.md#postAssets) | **POST** /assets | Add a new asset to Taxnexus
|
||||
|
||||
|
||||
|
||||
## getAssets
|
||||
|
||||
> AssetResponse getAssets(opts)
|
||||
|
||||
Get a list of assets
|
||||
|
||||
Return a list of all available Assets
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import SfGate from 'sf_gate';
|
||||
let defaultClient = SfGate.ApiClient.instance;
|
||||
// Configure API key authorization: ApiKeyAuth
|
||||
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
||||
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new SfGate.AssetsApi();
|
||||
let opts = {
|
||||
'limit': 789, // Number | How many objects to return at one time
|
||||
'offset': 789, // Number | How many objects to skip?
|
||||
'active': true, // Boolean | Only retrieve active records?
|
||||
'assetId': "assetId_example" // String | Taxnexus Record Id of an Asset
|
||||
};
|
||||
apiInstance.getAssets(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**limit** | **Number**| How many objects to return at one time | [optional]
|
||||
**offset** | **Number**| How many objects to skip? | [optional]
|
||||
**active** | **Boolean**| Only retrieve active records? | [optional]
|
||||
**assetId** | **String**| Taxnexus Record Id of an Asset | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**AssetResponse**](AssetResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## postAssets
|
||||
|
||||
> AssetResponse postAssets(assetRequest)
|
||||
|
||||
Add a new asset to Taxnexus
|
||||
|
||||
Industry record to be added
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import SfGate from 'sf_gate';
|
||||
let defaultClient = SfGate.ApiClient.instance;
|
||||
// Configure API key authorization: ApiKeyAuth
|
||||
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
||||
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new SfGate.AssetsApi();
|
||||
let assetRequest = new SfGate.AssetRequest(); // AssetRequest | An array of new Asset records
|
||||
apiInstance.postAssets(assetRequest, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**assetRequest** | [**AssetRequest**](AssetRequest.md)| An array of new Asset records |
|
||||
|
||||
### Return type
|
||||
|
||||
[**AssetResponse**](AssetResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# SfGate.CompanyProduct
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ID** | **String** | Taxnexus Record Id | [optional]
|
||||
**createdByID** | **String** | Created By User ID | [optional]
|
||||
**createdDate** | **String** | Created Date | [optional]
|
||||
**lastModifiedByID** | **String** | Last Modified By User ID | [optional]
|
||||
**lastModifiedDate** | **String** | Last Modified Date | [optional]
|
||||
**accountID** | **String** | Taxnexus ID of the Company that owns this Product | [optional]
|
||||
**description** | **String** | Description of product | [optional]
|
||||
**name** | **String** | Product Name | [optional]
|
||||
**tagLine** | **String** | TagLine | [optional]
|
||||
**URL** | **String** | Website | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# SfGate.CompanyProductRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**data** | [**[CompanyProduct]**](CompanyProduct.md) | |
|
||||
**meta** | [**RequestMeta**](RequestMeta.md) | |
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# SfGate.CompanyProductResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**data** | [**[CompanyProduct]**](CompanyProduct.md) | | [optional]
|
||||
**meta** | [**ResponseMeta**](ResponseMeta.md) | | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
# SfGate.CompanyProductsApi
|
||||
|
||||
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**getCompanyProducts**](CompanyProductsApi.md#getCompanyProducts) | **GET** /companyproducts | Get a list of companyproducts
|
||||
[**postCompanyProducts**](CompanyProductsApi.md#postCompanyProducts) | **POST** /companyproducts | Add a new companyproduct to Taxnexus
|
||||
|
||||
|
||||
|
||||
## getCompanyProducts
|
||||
|
||||
> CompanyProductResponse getCompanyProducts(opts)
|
||||
|
||||
Get a list of companyproducts
|
||||
|
||||
Return a list of all available CompanyProducts
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import SfGate from 'sf_gate';
|
||||
let defaultClient = SfGate.ApiClient.instance;
|
||||
// Configure API key authorization: ApiKeyAuth
|
||||
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
||||
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new SfGate.CompanyProductsApi();
|
||||
let opts = {
|
||||
'limit': 789, // Number | How many objects to return at one time
|
||||
'offset': 789, // Number | How many objects to skip?
|
||||
'active': true, // Boolean | Only retrieve active records?
|
||||
'companyProductId': "companyProductId_example" // String | Taxnexus CompanyProduct record ID
|
||||
};
|
||||
apiInstance.getCompanyProducts(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**limit** | **Number**| How many objects to return at one time | [optional]
|
||||
**offset** | **Number**| How many objects to skip? | [optional]
|
||||
**active** | **Boolean**| Only retrieve active records? | [optional]
|
||||
**companyProductId** | **String**| Taxnexus CompanyProduct record ID | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**CompanyProductResponse**](CompanyProductResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## postCompanyProducts
|
||||
|
||||
> CompanyProductResponse postCompanyProducts(contactRequest)
|
||||
|
||||
Add a new companyproduct to Taxnexus
|
||||
|
||||
Industry record to be added
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import SfGate from 'sf_gate';
|
||||
let defaultClient = SfGate.ApiClient.instance;
|
||||
// Configure API key authorization: ApiKeyAuth
|
||||
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
||||
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new SfGate.CompanyProductsApi();
|
||||
let contactRequest = new SfGate.CompanyProductRequest(); // CompanyProductRequest | An array of new Contact records
|
||||
apiInstance.postCompanyProducts(contactRequest, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**contactRequest** | [**CompanyProductRequest**](CompanyProductRequest.md)| An array of new Contact records |
|
||||
|
||||
### Return type
|
||||
|
||||
[**CompanyProductResponse**](CompanyProductResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
|
@ -4,50 +4,42 @@
|
|||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**tenantid** | **String** | tenant identifier | [optional]
|
||||
**accountid** | **String** | The primary account ID of this contact | [optional]
|
||||
**assistantname** | **String** | Assistant Name | [optional]
|
||||
**assistantphone** | **String** | Asst. Phone | [optional]
|
||||
**birthdate** | **String** | Birthdate | [optional]
|
||||
**createdbyid** | **String** | Created By User ID | [optional]
|
||||
**createddate** | **String** | Created Date | [optional]
|
||||
**tenantID** | **String** | tenant identifier | [optional]
|
||||
**ID** | **String** | Taxnexus Record Id | [optional]
|
||||
**accountID** | **String** | The primary account ID of this contact | [optional]
|
||||
**assistantName** | **String** | Assistant Name | [optional]
|
||||
**assistantPhone** | **String** | Asst. Phone | [optional]
|
||||
**birthDate** | **String** | Birthdate | [optional]
|
||||
**createdByID** | **String** | Created By User ID | [optional]
|
||||
**createdDate** | **String** | Created Date | [optional]
|
||||
**department** | **String** | Department | [optional]
|
||||
**description** | **String** | Description | [optional]
|
||||
**donotcall** | **Boolean** | Do Not Call? | [optional]
|
||||
**doNotCall** | **Boolean** | Do Not Call? | [optional]
|
||||
**email** | **String** | Email address | [optional]
|
||||
**emailbounceddate** | **String** | Email Bounce Date | [optional]
|
||||
**emailbouncedreason** | **String** | Email Bounce Reason | [optional]
|
||||
**enrollmentstatus** | **String** | Taxnexus Enrollment Status | [optional]
|
||||
**fax** | **String** | Fax Number | [optional]
|
||||
**firstname** | **String** | First Name | [optional]
|
||||
**hasoptedoutofemail** | **Boolean** | Email Opt Out | [optional]
|
||||
**hasoptedoutoffax** | **Boolean** | Fax Opt Out | [optional]
|
||||
**homephone** | **String** | Home Phone | [optional]
|
||||
**id** | **String** | Taxnexus Record Id | [optional]
|
||||
**isemailbounced** | **Boolean** | Does this contact have bounced emails? | [optional]
|
||||
**isprovisioned** | **Boolean** | Is Provisioned? | [optional]
|
||||
**lastmodifiedbyid** | **String** | Last Modified By User ID | [optional]
|
||||
**lastmodifieddate** | **String** | Last Modified Date | [optional]
|
||||
**lastname** | **String** | Last Name | [optional]
|
||||
**leadsource** | **String** | Lead Source | [optional]
|
||||
**level** | **String** | Level | [optional]
|
||||
**linkedin** | **String** | LinkedIn Page | [optional]
|
||||
**mailingaddress** | [**Address**](Address.md) | | [optional]
|
||||
**mailinglists** | **String** | Mailing Lists | [optional]
|
||||
**mobilephone** | **String** | Mobile Phone | [optional]
|
||||
**emailBounceDate** | **String** | Email Bounce Date | [optional]
|
||||
**emailBounceReason** | **String** | Email Bounce Reason | [optional]
|
||||
**fax** | **String** | | [optional]
|
||||
**facebook** | **String** | Fax Number | [optional]
|
||||
**firstName** | **String** | First Name | [optional]
|
||||
**hasOptedOutOfEmail** | **Boolean** | Email Opt Out | [optional]
|
||||
**hasOptedOutOfFax** | **Boolean** | Fax Opt Out | [optional]
|
||||
**homePhone** | **String** | Home Phone | [optional]
|
||||
**isEmailBounced** | **Boolean** | Does this contact have bounced emails? | [optional]
|
||||
**lastModifiedByID** | **String** | Last Modified By User ID | [optional]
|
||||
**lastModifiedDate** | **String** | Last Modified Date | [optional]
|
||||
**lastName** | **String** | Last Name | [optional]
|
||||
**leadSource** | **String** | Lead Source | [optional]
|
||||
**linkedIn** | **String** | LinkedIn Page | [optional]
|
||||
**mailingAddress** | [**Address**](Address.md) | | [optional]
|
||||
**mobilePhone** | **String** | Mobile Phone | [optional]
|
||||
**name** | **String** | Full Name | [optional]
|
||||
**otheraddress** | [**Address**](Address.md) | | [optional]
|
||||
**otherphone** | **String** | Other Phone | [optional]
|
||||
**ownerid** | **String** | The User ID of the user who owns this Contact | [optional]
|
||||
**personalemail** | **String** | Personal Email Address for this Contact | [optional]
|
||||
**otherAddress** | [**Address**](Address.md) | | [optional]
|
||||
**otherPhone** | **String** | Other Phone | [optional]
|
||||
**ownerID** | **String** | The User ID of the user who owns this Contact | [optional]
|
||||
**personalEmail** | **String** | Personal Email Address for this Contact | [optional]
|
||||
**phone** | **String** | Phone Number | [optional]
|
||||
**photourl** | **String** | URL of a photograph of this User | [optional]
|
||||
**recruitingstatus** | **String** | Recruiting Status | [optional]
|
||||
**ref** | **String** | External reference to this contact, if any | [optional]
|
||||
**reportstoid** | **String** | Reports To Contact ID | [optional]
|
||||
**salutation** | **String** | Contact Salutation | [optional]
|
||||
**status** | **String** | The Contact Status | [optional]
|
||||
**photoURL** | **String** | URL of a photograph of this User | [optional]
|
||||
**title** | **String** | Contact Title | [optional]
|
||||
**type** | **String** | Contact Type | [optional]
|
||||
**twitter** | **String** | | [optional]
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,120 @@
|
|||
# SfGate.IndustriesApi
|
||||
|
||||
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**getIndustries**](IndustriesApi.md#getIndustries) | **GET** /industries | Get a list of industries
|
||||
[**postIndustries**](IndustriesApi.md#postIndustries) | **POST** /industries | Add a new industry to Taxnexus
|
||||
|
||||
|
||||
|
||||
## getIndustries
|
||||
|
||||
> IndustryResponse getIndustries(opts)
|
||||
|
||||
Get a list of industries
|
||||
|
||||
Return a list of all available Industries
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import SfGate from 'sf_gate';
|
||||
let defaultClient = SfGate.ApiClient.instance;
|
||||
// Configure API key authorization: ApiKeyAuth
|
||||
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
||||
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new SfGate.IndustriesApi();
|
||||
let opts = {
|
||||
'limit': 789, // Number | How many objects to return at one time
|
||||
'offset': 789, // Number | How many objects to skip?
|
||||
'active': true, // Boolean | Only retrieve active records?
|
||||
'industryId': "industryId_example" // String | Taxnexus Industry record ID
|
||||
};
|
||||
apiInstance.getIndustries(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**limit** | **Number**| How many objects to return at one time | [optional]
|
||||
**offset** | **Number**| How many objects to skip? | [optional]
|
||||
**active** | **Boolean**| Only retrieve active records? | [optional]
|
||||
**industryId** | **String**| Taxnexus Industry record ID | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**IndustryResponse**](IndustryResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## postIndustries
|
||||
|
||||
> IndustryResponse postIndustries(industryRequest)
|
||||
|
||||
Add a new industry to Taxnexus
|
||||
|
||||
Industry record to be added
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import SfGate from 'sf_gate';
|
||||
let defaultClient = SfGate.ApiClient.instance;
|
||||
// Configure API key authorization: ApiKeyAuth
|
||||
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
||||
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new SfGate.IndustriesApi();
|
||||
let industryRequest = new SfGate.IndustryRequest(); // IndustryRequest | An array of new Industry records
|
||||
apiInstance.postIndustries(industryRequest, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**industryRequest** | [**IndustryRequest**](IndustryRequest.md)| An array of new Industry records |
|
||||
|
||||
### Return type
|
||||
|
||||
[**IndustryResponse**](IndustryResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# SfGate.Industry
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ID** | **String** | Taxnexus Record Id | [optional]
|
||||
**createdByID** | **String** | Created By User ID | [optional]
|
||||
**createdDate** | **String** | Created Date | [optional]
|
||||
**lastModifiedByID** | **String** | Last Modified By User ID | [optional]
|
||||
**lastModifiedDate** | **String** | Last Modified Date | [optional]
|
||||
**name** | **String** | Industry Name | [optional]
|
||||
**description** | **String** | Industry Description | [optional]
|
||||
**parentIndustryID** | **String** | The ID of the Parent Industry | [optional]
|
||||
**level** | **String** | The hierarchical level of this Industry | [optional]
|
||||
**path** | **String** | The full path of this industry, including Parent | [optional]
|
||||
**slug** | **String** | The CMS Slug for this Industry | [optional]
|
||||
**siteURL** | **String** | The URL of the corresponding page on the CMS | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# SfGate.IndustryProduct
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ID** | **String** | Taxnexus Record Id | [optional]
|
||||
**createdByID** | **String** | Created By User ID | [optional]
|
||||
**createdDate** | **String** | Created Date | [optional]
|
||||
**lastModifiedByID** | **String** | Last Modified By User ID | [optional]
|
||||
**lastModifiedDate** | **String** | Last Modified Date | [optional]
|
||||
**industryID** | **String** | | [optional]
|
||||
**HTML** | **String** | | [optional]
|
||||
**companyProductID** | **String** | | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# SfGate.IndustryProductRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**data** | [**[IndustryProduct]**](IndustryProduct.md) | | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# SfGate.IndustryProductResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**data** | [**[IndustryProduct]**](IndustryProduct.md) | | [optional]
|
||||
**meta** | [**ResponseMeta**](ResponseMeta.md) | | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
# SfGate.IndustryProductsApi
|
||||
|
||||
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**postIndustryproducts**](IndustryProductsApi.md#postIndustryproducts) | **POST** /industryproducts | Add a new industryproduct to Taxnexus
|
||||
|
||||
|
||||
|
||||
## postIndustryproducts
|
||||
|
||||
> IndustryProductResponse postIndustryproducts(industryRequest)
|
||||
|
||||
Add a new industryproduct to Taxnexus
|
||||
|
||||
Industry record to be added
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import SfGate from 'sf_gate';
|
||||
let defaultClient = SfGate.ApiClient.instance;
|
||||
// Configure API key authorization: ApiKeyAuth
|
||||
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
||||
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new SfGate.IndustryProductsApi();
|
||||
let industryRequest = new SfGate.IndustryProductRequest(); // IndustryProductRequest | An array of new Industry records
|
||||
apiInstance.postIndustryproducts(industryRequest, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**industryRequest** | [**IndustryProductRequest**](IndustryProductRequest.md)| An array of new Industry records |
|
||||
|
||||
### Return type
|
||||
|
||||
[**IndustryProductResponse**](IndustryProductResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# SfGate.IndustryRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**data** | [**[Industry]**](Industry.md) | | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# SfGate.IndustryResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**data** | [**[Industry]**](Industry.md) | | [optional]
|
||||
**meta** | [**ResponseMeta**](ResponseMeta.md) | | [optional]
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
# SfGate.IndustryproductsApi
|
||||
|
||||
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**getIndustryProducts**](IndustryproductsApi.md#getIndustryProducts) | **GET** /industryproducts | Get a list of industryproducts
|
||||
|
||||
|
||||
|
||||
## getIndustryProducts
|
||||
|
||||
> IndustryProductResponse getIndustryProducts(opts)
|
||||
|
||||
Get a list of industryproducts
|
||||
|
||||
Return a list of all available IndustryProducts
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import SfGate from 'sf_gate';
|
||||
let defaultClient = SfGate.ApiClient.instance;
|
||||
// Configure API key authorization: ApiKeyAuth
|
||||
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
||||
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
||||
|
||||
let apiInstance = new SfGate.IndustryproductsApi();
|
||||
let opts = {
|
||||
'limit': 789, // Number | How many objects to return at one time
|
||||
'offset': 789, // Number | How many objects to skip?
|
||||
'active': true, // Boolean | Only retrieve active records?
|
||||
'industryProductId': "industryProductId_example" // String | Taxnexus IndustryProduct record ID
|
||||
};
|
||||
apiInstance.getIndustryProducts(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**limit** | **Number**| How many objects to return at one time | [optional]
|
||||
**offset** | **Number**| How many objects to skip? | [optional]
|
||||
**active** | **Boolean**| Only retrieve active records? | [optional]
|
||||
**industryProductId** | **String**| Taxnexus IndustryProduct record ID | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**IndustryProductResponse**](IndustryProductResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
* sf-gate
|
||||
* Customer Information Microservice
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.2
|
||||
* Contact: noc@taxnexus.net
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import AssetRequest from '../model/AssetRequest';
|
||||
import AssetResponse from '../model/AssetResponse';
|
||||
import Error from '../model/Error';
|
||||
|
||||
/**
|
||||
* Assets service.
|
||||
* @module api/AssetsApi
|
||||
* @version 0.0.2
|
||||
*/
|
||||
export default class AssetsApi {
|
||||
|
||||
/**
|
||||
* Constructs a new AssetsApi.
|
||||
* @alias module:api/AssetsApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the getAssets operation.
|
||||
* @callback module:api/AssetsApi~getAssetsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/AssetResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get a list of assets
|
||||
* Return a list of all available Assets
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Number} opts.limit How many objects to return at one time
|
||||
* @param {Number} opts.offset How many objects to skip?
|
||||
* @param {Boolean} opts.active Only retrieve active records?
|
||||
* @param {String} opts.assetId Taxnexus Record Id of an Asset
|
||||
* @param {module:api/AssetsApi~getAssetsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/AssetResponse}
|
||||
*/
|
||||
getAssets(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'limit': opts['limit'],
|
||||
'offset': opts['offset'],
|
||||
'active': opts['active'],
|
||||
'assetId': opts['assetId']
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['ApiKeyAuth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = AssetResponse;
|
||||
return this.apiClient.callApi(
|
||||
'/assets', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the postAssets operation.
|
||||
* @callback module:api/AssetsApi~postAssetsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/AssetResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add a new asset to Taxnexus
|
||||
* Industry record to be added
|
||||
* @param {module:model/AssetRequest} assetRequest An array of new Asset records
|
||||
* @param {module:api/AssetsApi~postAssetsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/AssetResponse}
|
||||
*/
|
||||
postAssets(assetRequest, callback) {
|
||||
let postBody = assetRequest;
|
||||
// verify the required parameter 'assetRequest' is set
|
||||
if (assetRequest === undefined || assetRequest === null) {
|
||||
throw new Error("Missing the required parameter 'assetRequest' when calling postAssets");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['ApiKeyAuth'];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = AssetResponse;
|
||||
return this.apiClient.callApi(
|
||||
'/assets', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
* sf-gate
|
||||
* Customer Information Microservice
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.2
|
||||
* Contact: noc@taxnexus.net
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import CompanyProductRequest from '../model/CompanyProductRequest';
|
||||
import CompanyProductResponse from '../model/CompanyProductResponse';
|
||||
import Error from '../model/Error';
|
||||
|
||||
/**
|
||||
* CompanyProducts service.
|
||||
* @module api/CompanyProductsApi
|
||||
* @version 0.0.2
|
||||
*/
|
||||
export default class CompanyProductsApi {
|
||||
|
||||
/**
|
||||
* Constructs a new CompanyProductsApi.
|
||||
* @alias module:api/CompanyProductsApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the getCompanyProducts operation.
|
||||
* @callback module:api/CompanyProductsApi~getCompanyProductsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/CompanyProductResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get a list of companyproducts
|
||||
* Return a list of all available CompanyProducts
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Number} opts.limit How many objects to return at one time
|
||||
* @param {Number} opts.offset How many objects to skip?
|
||||
* @param {Boolean} opts.active Only retrieve active records?
|
||||
* @param {String} opts.companyProductId Taxnexus CompanyProduct record ID
|
||||
* @param {module:api/CompanyProductsApi~getCompanyProductsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/CompanyProductResponse}
|
||||
*/
|
||||
getCompanyProducts(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'limit': opts['limit'],
|
||||
'offset': opts['offset'],
|
||||
'active': opts['active'],
|
||||
'companyProductId': opts['companyProductId']
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['ApiKeyAuth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = CompanyProductResponse;
|
||||
return this.apiClient.callApi(
|
||||
'/companyproducts', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the postCompanyProducts operation.
|
||||
* @callback module:api/CompanyProductsApi~postCompanyProductsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/CompanyProductResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add a new companyproduct to Taxnexus
|
||||
* Industry record to be added
|
||||
* @param {module:model/CompanyProductRequest} contactRequest An array of new Contact records
|
||||
* @param {module:api/CompanyProductsApi~postCompanyProductsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/CompanyProductResponse}
|
||||
*/
|
||||
postCompanyProducts(contactRequest, callback) {
|
||||
let postBody = contactRequest;
|
||||
// verify the required parameter 'contactRequest' is set
|
||||
if (contactRequest === undefined || contactRequest === null) {
|
||||
throw new Error("Missing the required parameter 'contactRequest' when calling postCompanyProducts");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['ApiKeyAuth'];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = CompanyProductResponse;
|
||||
return this.apiClient.callApi(
|
||||
'/companyproducts', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
* sf-gate
|
||||
* Customer Information Microservice
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.2
|
||||
* Contact: noc@taxnexus.net
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Error from '../model/Error';
|
||||
import IndustryRequest from '../model/IndustryRequest';
|
||||
import IndustryResponse from '../model/IndustryResponse';
|
||||
|
||||
/**
|
||||
* Industries service.
|
||||
* @module api/IndustriesApi
|
||||
* @version 0.0.2
|
||||
*/
|
||||
export default class IndustriesApi {
|
||||
|
||||
/**
|
||||
* Constructs a new IndustriesApi.
|
||||
* @alias module:api/IndustriesApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the getIndustries operation.
|
||||
* @callback module:api/IndustriesApi~getIndustriesCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/IndustryResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get a list of industries
|
||||
* Return a list of all available Industries
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Number} opts.limit How many objects to return at one time
|
||||
* @param {Number} opts.offset How many objects to skip?
|
||||
* @param {Boolean} opts.active Only retrieve active records?
|
||||
* @param {String} opts.industryId Taxnexus Industry record ID
|
||||
* @param {module:api/IndustriesApi~getIndustriesCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/IndustryResponse}
|
||||
*/
|
||||
getIndustries(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'limit': opts['limit'],
|
||||
'offset': opts['offset'],
|
||||
'active': opts['active'],
|
||||
'industryId': opts['industryId']
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['ApiKeyAuth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = IndustryResponse;
|
||||
return this.apiClient.callApi(
|
||||
'/industries', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the postIndustries operation.
|
||||
* @callback module:api/IndustriesApi~postIndustriesCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/IndustryResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add a new industry to Taxnexus
|
||||
* Industry record to be added
|
||||
* @param {module:model/IndustryRequest} industryRequest An array of new Industry records
|
||||
* @param {module:api/IndustriesApi~postIndustriesCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/IndustryResponse}
|
||||
*/
|
||||
postIndustries(industryRequest, callback) {
|
||||
let postBody = industryRequest;
|
||||
// verify the required parameter 'industryRequest' is set
|
||||
if (industryRequest === undefined || industryRequest === null) {
|
||||
throw new Error("Missing the required parameter 'industryRequest' when calling postIndustries");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['ApiKeyAuth'];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = IndustryResponse;
|
||||
return this.apiClient.callApi(
|
||||
'/industries', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
/**
|
||||
* sf-gate
|
||||
* Customer Information Microservice
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.2
|
||||
* Contact: noc@taxnexus.net
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Error from '../model/Error';
|
||||
import IndustryProductRequest from '../model/IndustryProductRequest';
|
||||
import IndustryProductResponse from '../model/IndustryProductResponse';
|
||||
|
||||
/**
|
||||
* IndustryProducts service.
|
||||
* @module api/IndustryProductsApi
|
||||
* @version 0.0.2
|
||||
*/
|
||||
export default class IndustryProductsApi {
|
||||
|
||||
/**
|
||||
* Constructs a new IndustryProductsApi.
|
||||
* @alias module:api/IndustryProductsApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the postIndustryproducts operation.
|
||||
* @callback module:api/IndustryProductsApi~postIndustryproductsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/IndustryProductResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add a new industryproduct to Taxnexus
|
||||
* Industry record to be added
|
||||
* @param {module:model/IndustryProductRequest} industryRequest An array of new Industry records
|
||||
* @param {module:api/IndustryProductsApi~postIndustryproductsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/IndustryProductResponse}
|
||||
*/
|
||||
postIndustryproducts(industryRequest, callback) {
|
||||
let postBody = industryRequest;
|
||||
// verify the required parameter 'industryRequest' is set
|
||||
if (industryRequest === undefined || industryRequest === null) {
|
||||
throw new Error("Missing the required parameter 'industryRequest' when calling postIndustryproducts");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['ApiKeyAuth'];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = IndustryProductResponse;
|
||||
return this.apiClient.callApi(
|
||||
'/industryproducts', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
/**
|
||||
* sf-gate
|
||||
* Customer Information Microservice
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.2
|
||||
* Contact: noc@taxnexus.net
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Error from '../model/Error';
|
||||
import IndustryProductResponse from '../model/IndustryProductResponse';
|
||||
|
||||
/**
|
||||
* Industryproducts service.
|
||||
* @module api/IndustryproductsApi
|
||||
* @version 0.0.2
|
||||
*/
|
||||
export default class IndustryproductsApi {
|
||||
|
||||
/**
|
||||
* Constructs a new IndustryproductsApi.
|
||||
* @alias module:api/IndustryproductsApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the getIndustryProducts operation.
|
||||
* @callback module:api/IndustryproductsApi~getIndustryProductsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/IndustryProductResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get a list of industryproducts
|
||||
* Return a list of all available IndustryProducts
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Number} opts.limit How many objects to return at one time
|
||||
* @param {Number} opts.offset How many objects to skip?
|
||||
* @param {Boolean} opts.active Only retrieve active records?
|
||||
* @param {String} opts.industryProductId Taxnexus IndustryProduct record ID
|
||||
* @param {module:api/IndustryproductsApi~getIndustryProductsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/IndustryProductResponse}
|
||||
*/
|
||||
getIndustryProducts(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'limit': opts['limit'],
|
||||
'offset': opts['offset'],
|
||||
'active': opts['active'],
|
||||
'industryProductId': opts['industryProductId']
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['ApiKeyAuth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = IndustryProductResponse;
|
||||
return this.apiClient.callApi(
|
||||
'/industryproducts', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -17,9 +17,15 @@ import Account from './model/Account';
|
|||
import AccountRequest from './model/AccountRequest';
|
||||
import AccountResponse from './model/AccountResponse';
|
||||
import Address from './model/Address';
|
||||
import Asset from './model/Asset';
|
||||
import AssetRequest from './model/AssetRequest';
|
||||
import AssetResponse from './model/AssetResponse';
|
||||
import Cluster from './model/Cluster';
|
||||
import ClusterRequest from './model/ClusterRequest';
|
||||
import ClusterResponse from './model/ClusterResponse';
|
||||
import CompanyProduct from './model/CompanyProduct';
|
||||
import CompanyProductRequest from './model/CompanyProductRequest';
|
||||
import CompanyProductResponse from './model/CompanyProductResponse';
|
||||
import Contact from './model/Contact';
|
||||
import ContactRequest from './model/ContactRequest';
|
||||
import ContactResponse from './model/ContactResponse';
|
||||
|
@ -31,6 +37,12 @@ import DatabaseRequest from './model/DatabaseRequest';
|
|||
import DatabaseResponse from './model/DatabaseResponse';
|
||||
import DeleteResponse from './model/DeleteResponse';
|
||||
import Error from './model/Error';
|
||||
import Industry from './model/Industry';
|
||||
import IndustryProduct from './model/IndustryProduct';
|
||||
import IndustryProductRequest from './model/IndustryProductRequest';
|
||||
import IndustryProductResponse from './model/IndustryProductResponse';
|
||||
import IndustryRequest from './model/IndustryRequest';
|
||||
import IndustryResponse from './model/IndustryResponse';
|
||||
import InvalidError from './model/InvalidError';
|
||||
import InvalidErrorAllOf from './model/InvalidErrorAllOf';
|
||||
import Message from './model/Message';
|
||||
|
@ -50,10 +62,15 @@ import User from './model/User';
|
|||
import UserResponse from './model/UserResponse';
|
||||
import UserRole from './model/UserRole';
|
||||
import AccountsApi from './api/AccountsApi';
|
||||
import AssetsApi from './api/AssetsApi';
|
||||
import ClustersApi from './api/ClustersApi';
|
||||
import CompanyProductsApi from './api/CompanyProductsApi';
|
||||
import ContactsApi from './api/ContactsApi';
|
||||
import ContractsApi from './api/ContractsApi';
|
||||
import DatabasesApi from './api/DatabasesApi';
|
||||
import IndustriesApi from './api/IndustriesApi';
|
||||
import IndustryProductsApi from './api/IndustryProductsApi';
|
||||
import IndustryproductsApi from './api/IndustryproductsApi';
|
||||
import RolesApi from './api/RolesApi';
|
||||
import TemplatesApi from './api/TemplatesApi';
|
||||
import TenantsApi from './api/TenantsApi';
|
||||
|
@ -122,6 +139,24 @@ export {
|
|||
*/
|
||||
Address,
|
||||
|
||||
/**
|
||||
* The Asset model constructor.
|
||||
* @property {module:model/Asset}
|
||||
*/
|
||||
Asset,
|
||||
|
||||
/**
|
||||
* The AssetRequest model constructor.
|
||||
* @property {module:model/AssetRequest}
|
||||
*/
|
||||
AssetRequest,
|
||||
|
||||
/**
|
||||
* The AssetResponse model constructor.
|
||||
* @property {module:model/AssetResponse}
|
||||
*/
|
||||
AssetResponse,
|
||||
|
||||
/**
|
||||
* The Cluster model constructor.
|
||||
* @property {module:model/Cluster}
|
||||
|
@ -140,6 +175,24 @@ export {
|
|||
*/
|
||||
ClusterResponse,
|
||||
|
||||
/**
|
||||
* The CompanyProduct model constructor.
|
||||
* @property {module:model/CompanyProduct}
|
||||
*/
|
||||
CompanyProduct,
|
||||
|
||||
/**
|
||||
* The CompanyProductRequest model constructor.
|
||||
* @property {module:model/CompanyProductRequest}
|
||||
*/
|
||||
CompanyProductRequest,
|
||||
|
||||
/**
|
||||
* The CompanyProductResponse model constructor.
|
||||
* @property {module:model/CompanyProductResponse}
|
||||
*/
|
||||
CompanyProductResponse,
|
||||
|
||||
/**
|
||||
* The Contact model constructor.
|
||||
* @property {module:model/Contact}
|
||||
|
@ -206,6 +259,42 @@ export {
|
|||
*/
|
||||
Error,
|
||||
|
||||
/**
|
||||
* The Industry model constructor.
|
||||
* @property {module:model/Industry}
|
||||
*/
|
||||
Industry,
|
||||
|
||||
/**
|
||||
* The IndustryProduct model constructor.
|
||||
* @property {module:model/IndustryProduct}
|
||||
*/
|
||||
IndustryProduct,
|
||||
|
||||
/**
|
||||
* The IndustryProductRequest model constructor.
|
||||
* @property {module:model/IndustryProductRequest}
|
||||
*/
|
||||
IndustryProductRequest,
|
||||
|
||||
/**
|
||||
* The IndustryProductResponse model constructor.
|
||||
* @property {module:model/IndustryProductResponse}
|
||||
*/
|
||||
IndustryProductResponse,
|
||||
|
||||
/**
|
||||
* The IndustryRequest model constructor.
|
||||
* @property {module:model/IndustryRequest}
|
||||
*/
|
||||
IndustryRequest,
|
||||
|
||||
/**
|
||||
* The IndustryResponse model constructor.
|
||||
* @property {module:model/IndustryResponse}
|
||||
*/
|
||||
IndustryResponse,
|
||||
|
||||
/**
|
||||
* The InvalidError model constructor.
|
||||
* @property {module:model/InvalidError}
|
||||
|
@ -320,12 +409,24 @@ export {
|
|||
*/
|
||||
AccountsApi,
|
||||
|
||||
/**
|
||||
* The AssetsApi service constructor.
|
||||
* @property {module:api/AssetsApi}
|
||||
*/
|
||||
AssetsApi,
|
||||
|
||||
/**
|
||||
* The ClustersApi service constructor.
|
||||
* @property {module:api/ClustersApi}
|
||||
*/
|
||||
ClustersApi,
|
||||
|
||||
/**
|
||||
* The CompanyProductsApi service constructor.
|
||||
* @property {module:api/CompanyProductsApi}
|
||||
*/
|
||||
CompanyProductsApi,
|
||||
|
||||
/**
|
||||
* The ContactsApi service constructor.
|
||||
* @property {module:api/ContactsApi}
|
||||
|
@ -344,6 +445,24 @@ export {
|
|||
*/
|
||||
DatabasesApi,
|
||||
|
||||
/**
|
||||
* The IndustriesApi service constructor.
|
||||
* @property {module:api/IndustriesApi}
|
||||
*/
|
||||
IndustriesApi,
|
||||
|
||||
/**
|
||||
* The IndustryProductsApi service constructor.
|
||||
* @property {module:api/IndustryProductsApi}
|
||||
*/
|
||||
IndustryProductsApi,
|
||||
|
||||
/**
|
||||
* The IndustryproductsApi service constructor.
|
||||
* @property {module:api/IndustryproductsApi}
|
||||
*/
|
||||
IndustryproductsApi,
|
||||
|
||||
/**
|
||||
* The RolesApi service constructor.
|
||||
* @property {module:api/RolesApi}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue