lib/api/blaze/blaze_models/product_response.go

1836 lines
39 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package blaze_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// ProductResponse product response
//
// swagger:model ProductResponse
type ProductResponse struct {
// active
Active bool `json:"active,omitempty"`
// assets
Assets []*ProductResponseAssetsItems0 `json:"assets"`
// automatic re order
AutomaticReOrder bool `json:"automaticReOrder,omitempty"`
// brand
Brand string `json:"brand,omitempty"`
// brand Id
BrandID string `json:"brandId,omitempty"`
// brand name
BrandName string `json:"brandName,omitempty"`
// bundle item results
BundleItemResults []string `json:"bundleItemResults"`
// bundle items
BundleItems []*ProductResponseBundleItemsItems0 `json:"bundleItems"`
// by gram
ByGram bool `json:"byGram,omitempty"`
// by prepackage
ByPrepackage bool `json:"byPrepackage,omitempty"`
// cannabis type
CannabisType string `json:"cannabisType,omitempty"`
// category
Category *ProductResponseCategory `json:"category,omitempty"`
// category Id
CategoryID string `json:"categoryId,omitempty"`
// cbd
Cbd float64 `json:"cbd,omitempty"`
// cbda
Cbda float64 `json:"cbda,omitempty"`
// cbn
Cbn float64 `json:"cbn,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// company link Id
CompanyLinkID string `json:"companyLinkId,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// custom gram type
CustomGramType string `json:"customGramType,omitempty"`
// custom tax info
CustomTaxInfo string `json:"customTaxInfo,omitempty"`
// custom weight
CustomWeight float64 `json:"customWeight,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// description
Description string `json:"description,omitempty"`
// dirty
Dirty bool `json:"dirty,omitempty"`
// discountable
Discountable bool `json:"discountable,omitempty"`
// enable excise tax
EnableExciseTax bool `json:"enableExciseTax,omitempty"`
// enable mix match
EnableMixMatch bool `json:"enableMixMatch,omitempty"`
// enable weedmap
EnableWeedmap bool `json:"enableWeedmap,omitempty"`
// flower type
FlowerType string `json:"flowerType,omitempty"`
// genetics
Genetics string `json:"genetics,omitempty"`
// id
ID string `json:"id,omitempty"`
// import Id
ImportID string `json:"importId,omitempty"`
// import src
ImportSrc string `json:"importSrc,omitempty"`
// low inventory notification
LowInventoryNotification bool `json:"lowInventoryNotification,omitempty"`
// low threshold
LowThreshold float64 `json:"lowThreshold,omitempty"`
// medical conditions
MedicalConditions []string `json:"medicalConditions"`
// medicinal
Medicinal bool `json:"medicinal,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// name
Name string `json:"name,omitempty"`
// notes
Notes []string `json:"notes"`
// potency
Potency bool `json:"potency,omitempty"`
// potency amount
PotencyAmount *ProductResponsePotencyAmount `json:"potencyAmount,omitempty"`
// price breaks
PriceBreaks []*ProductResponsePriceBreaksItems0 `json:"priceBreaks"`
// price includes a l excise
PriceIncludesALExcise bool `json:"priceIncludesALExcise,omitempty"`
// price includes excise
PriceIncludesExcise bool `json:"priceIncludesExcise,omitempty"`
// price ranges
PriceRanges []string `json:"priceRanges"`
// pricing template Id
PricingTemplateID string `json:"pricingTemplateId,omitempty"`
// product sale type
ProductSaleType string `json:"productSaleType,omitempty"`
// product type
ProductType string `json:"productType,omitempty"`
// qb desktop item ref
QbDesktopItemRef string `json:"qbDesktopItemRef,omitempty"`
// qb item ref
QbItemRef string `json:"qbItemRef,omitempty"`
// quantities
Quantities []*ProductResponseQuantitiesItems0 `json:"quantities"`
// quantity available
QuantityAvailable float64 `json:"quantityAvailable,omitempty"`
// re order level
ReOrderLevel float64 `json:"reOrderLevel,omitempty"`
// shop Id
ShopID string `json:"shopId,omitempty"`
// show in widget
ShowInWidget bool `json:"showInWidget,omitempty"`
// sku
Sku string `json:"sku,omitempty"`
// tags
Tags []string `json:"tags"`
// tax order
TaxOrder string `json:"taxOrder,omitempty"`
// tax tables
TaxTables []*ProductResponseTaxTablesItems0 `json:"taxTables"`
// tax type
TaxType string `json:"taxType,omitempty"`
// thc
Thc float64 `json:"thc,omitempty"`
// thca
Thca float64 `json:"thca,omitempty"`
// unit price
UnitPrice float64 `json:"unitPrice,omitempty"`
// unit value
UnitValue float64 `json:"unitValue,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
// vendor
Vendor *ProductResponseVendor `json:"vendor,omitempty"`
// vendor Id
VendorID string `json:"vendorId,omitempty"`
// weight per unit
WeightPerUnit string `json:"weightPerUnit,omitempty"`
}
// Validate validates this product response
func (m *ProductResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAssets(formats); err != nil {
res = append(res, err)
}
if err := m.validateBundleItems(formats); err != nil {
res = append(res, err)
}
if err := m.validateCategory(formats); err != nil {
res = append(res, err)
}
if err := m.validatePotencyAmount(formats); err != nil {
res = append(res, err)
}
if err := m.validatePriceBreaks(formats); err != nil {
res = append(res, err)
}
if err := m.validateQuantities(formats); err != nil {
res = append(res, err)
}
if err := m.validateTaxTables(formats); err != nil {
res = append(res, err)
}
if err := m.validateVendor(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductResponse) validateAssets(formats strfmt.Registry) error {
if swag.IsZero(m.Assets) { // not required
return nil
}
for i := 0; i < len(m.Assets); i++ {
if swag.IsZero(m.Assets[i]) { // not required
continue
}
if m.Assets[i] != nil {
if err := m.Assets[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) validateBundleItems(formats strfmt.Registry) error {
if swag.IsZero(m.BundleItems) { // not required
return nil
}
for i := 0; i < len(m.BundleItems); i++ {
if swag.IsZero(m.BundleItems[i]) { // not required
continue
}
if m.BundleItems[i] != nil {
if err := m.BundleItems[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("bundleItems" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) validateCategory(formats strfmt.Registry) error {
if swag.IsZero(m.Category) { // not required
return nil
}
if m.Category != nil {
if err := m.Category.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("category")
}
return err
}
}
return nil
}
func (m *ProductResponse) validatePotencyAmount(formats strfmt.Registry) error {
if swag.IsZero(m.PotencyAmount) { // not required
return nil
}
if m.PotencyAmount != nil {
if err := m.PotencyAmount.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("potencyAmount")
}
return err
}
}
return nil
}
func (m *ProductResponse) validatePriceBreaks(formats strfmt.Registry) error {
if swag.IsZero(m.PriceBreaks) { // not required
return nil
}
for i := 0; i < len(m.PriceBreaks); i++ {
if swag.IsZero(m.PriceBreaks[i]) { // not required
continue
}
if m.PriceBreaks[i] != nil {
if err := m.PriceBreaks[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("priceBreaks" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) validateQuantities(formats strfmt.Registry) error {
if swag.IsZero(m.Quantities) { // not required
return nil
}
for i := 0; i < len(m.Quantities); i++ {
if swag.IsZero(m.Quantities[i]) { // not required
continue
}
if m.Quantities[i] != nil {
if err := m.Quantities[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("quantities" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) validateTaxTables(formats strfmt.Registry) error {
if swag.IsZero(m.TaxTables) { // not required
return nil
}
for i := 0; i < len(m.TaxTables); i++ {
if swag.IsZero(m.TaxTables[i]) { // not required
continue
}
if m.TaxTables[i] != nil {
if err := m.TaxTables[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("taxTables" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) validateVendor(formats strfmt.Registry) error {
if swag.IsZero(m.Vendor) { // not required
return nil
}
if m.Vendor != nil {
if err := m.Vendor.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("vendor")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponse) UnmarshalBinary(b []byte) error {
var res ProductResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseAssetsItems0 product response assets items0
//
// swagger:model ProductResponseAssetsItems0
type ProductResponseAssetsItems0 struct {
// active
Active bool `json:"active,omitempty"`
// asset type
AssetType string `json:"assetType,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// id
ID string `json:"id,omitempty"`
// key
Key string `json:"key,omitempty"`
// large URL
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
MediumURL string `json:"mediumURL,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// name
Name string `json:"name,omitempty"`
// orig URL
OrigURL string `json:"origURL,omitempty"`
// priority
Priority float64 `json:"priority,omitempty"`
// public URL
PublicURL string `json:"publicURL,omitempty"`
// secured
Secured bool `json:"secured,omitempty"`
// thumb URL
ThumbURL string `json:"thumbURL,omitempty"`
// type
Type string `json:"type,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response assets items0
func (m *ProductResponseAssetsItems0) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseAssetsItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseAssetsItems0) UnmarshalBinary(b []byte) error {
var res ProductResponseAssetsItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseBundleItemsItems0 product response bundle items items0
//
// swagger:model ProductResponseBundleItemsItems0
type ProductResponseBundleItemsItems0 struct {
// product Id
ProductID string `json:"productId,omitempty"`
// quantity
Quantity float64 `json:"quantity,omitempty"`
}
// Validate validates this product response bundle items items0
func (m *ProductResponseBundleItemsItems0) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseBundleItemsItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseBundleItemsItems0) UnmarshalBinary(b []byte) error {
var res ProductResponseBundleItemsItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseCategory product response category
//
// swagger:model ProductResponseCategory
type ProductResponseCategory struct {
// active
Active bool `json:"active,omitempty"`
// cannabis
Cannabis bool `json:"cannabis,omitempty"`
// cannabis type
CannabisType string `json:"cannabisType,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// dirty
Dirty bool `json:"dirty,omitempty"`
// id
ID string `json:"id,omitempty"`
// low threshold
LowThreshold float64 `json:"lowThreshold,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// name
Name string `json:"name,omitempty"`
// photo
Photo *ProductResponseCategoryPhoto `json:"photo,omitempty"`
// priority
Priority float64 `json:"priority,omitempty"`
// shop Id
ShopID string `json:"shopId,omitempty"`
// unit type
UnitType string `json:"unitType,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response category
func (m *ProductResponseCategory) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validatePhoto(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductResponseCategory) validatePhoto(formats strfmt.Registry) error {
if swag.IsZero(m.Photo) { // not required
return nil
}
if m.Photo != nil {
if err := m.Photo.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("category" + "." + "photo")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseCategory) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseCategory) UnmarshalBinary(b []byte) error {
var res ProductResponseCategory
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseCategoryPhoto product response category photo
//
// swagger:model ProductResponseCategoryPhoto
type ProductResponseCategoryPhoto struct {
// active
Active bool `json:"active,omitempty"`
// asset type
AssetType string `json:"assetType,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// id
ID string `json:"id,omitempty"`
// key
Key string `json:"key,omitempty"`
// large URL
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
MediumURL string `json:"mediumURL,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// name
Name string `json:"name,omitempty"`
// orig URL
OrigURL string `json:"origURL,omitempty"`
// priority
Priority float64 `json:"priority,omitempty"`
// public URL
PublicURL string `json:"publicURL,omitempty"`
// secured
Secured bool `json:"secured,omitempty"`
// thumb URL
ThumbURL string `json:"thumbURL,omitempty"`
// type
Type string `json:"type,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response category photo
func (m *ProductResponseCategoryPhoto) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseCategoryPhoto) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseCategoryPhoto) UnmarshalBinary(b []byte) error {
var res ProductResponseCategoryPhoto
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponsePotencyAmount product response potency amount
//
// swagger:model ProductResponsePotencyAmount
type ProductResponsePotencyAmount struct {
// cbd
Cbd float64 `json:"cbd,omitempty"`
// cbda
Cbda float64 `json:"cbda,omitempty"`
// cbn
Cbn float64 `json:"cbn,omitempty"`
// thc
Thc float64 `json:"thc,omitempty"`
// thca
Thca float64 `json:"thca,omitempty"`
}
// Validate validates this product response potency amount
func (m *ProductResponsePotencyAmount) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponsePotencyAmount) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponsePotencyAmount) UnmarshalBinary(b []byte) error {
var res ProductResponsePotencyAmount
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponsePriceBreaksItems0 product response price breaks items0
//
// swagger:model ProductResponsePriceBreaksItems0
type ProductResponsePriceBreaksItems0 struct {
// active
Active bool `json:"active,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// display name
DisplayName string `json:"displayName,omitempty"`
// id
ID string `json:"id,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// name
Name string `json:"name,omitempty"`
// price
Price float64 `json:"price,omitempty"`
// price break type
PriceBreakType string `json:"priceBreakType,omitempty"`
// priority
Priority float64 `json:"priority,omitempty"`
// quantity
Quantity float64 `json:"quantity,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response price breaks items0
func (m *ProductResponsePriceBreaksItems0) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponsePriceBreaksItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponsePriceBreaksItems0) UnmarshalBinary(b []byte) error {
var res ProductResponsePriceBreaksItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseQuantitiesItems0 product response quantities items0
//
// swagger:model ProductResponseQuantitiesItems0
type ProductResponseQuantitiesItems0 struct {
// company Id
CompanyID string `json:"companyId,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// dirty
Dirty bool `json:"dirty,omitempty"`
// id
ID string `json:"id,omitempty"`
// inventory Id
InventoryID string `json:"inventoryId,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// quantity
Quantity float64 `json:"quantity,omitempty"`
// shop Id
ShopID string `json:"shopId,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response quantities items0
func (m *ProductResponseQuantitiesItems0) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseQuantitiesItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseQuantitiesItems0) UnmarshalBinary(b []byte) error {
var res ProductResponseQuantitiesItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseTaxTablesItems0 product response tax tables items0
//
// swagger:model ProductResponseTaxTablesItems0
type ProductResponseTaxTablesItems0 struct {
// active
Active bool `json:"active,omitempty"`
// city tax
CityTax *ProductResponseTaxTablesItems0CityTax `json:"cityTax,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// consumer type
ConsumerType string `json:"consumerType,omitempty"`
// county tax
CountyTax *ProductResponseTaxTablesItems0CountyTax `json:"countyTax,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// dirty
Dirty bool `json:"dirty,omitempty"`
// federal tax
FederalTax *ProductResponseTaxTablesItems0FederalTax `json:"federalTax,omitempty"`
// id
ID string `json:"id,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// name
Name string `json:"name,omitempty"`
// shop Id
ShopID string `json:"shopId,omitempty"`
// state tax
StateTax *ProductResponseTaxTablesItems0StateTax `json:"stateTax,omitempty"`
// tax order
TaxOrder string `json:"taxOrder,omitempty"`
// tax type
TaxType string `json:"taxType,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response tax tables items0
func (m *ProductResponseTaxTablesItems0) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCityTax(formats); err != nil {
res = append(res, err)
}
if err := m.validateCountyTax(formats); err != nil {
res = append(res, err)
}
if err := m.validateFederalTax(formats); err != nil {
res = append(res, err)
}
if err := m.validateStateTax(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductResponseTaxTablesItems0) validateCityTax(formats strfmt.Registry) error {
if swag.IsZero(m.CityTax) { // not required
return nil
}
if m.CityTax != nil {
if err := m.CityTax.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("cityTax")
}
return err
}
}
return nil
}
func (m *ProductResponseTaxTablesItems0) validateCountyTax(formats strfmt.Registry) error {
if swag.IsZero(m.CountyTax) { // not required
return nil
}
if m.CountyTax != nil {
if err := m.CountyTax.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("countyTax")
}
return err
}
}
return nil
}
func (m *ProductResponseTaxTablesItems0) validateFederalTax(formats strfmt.Registry) error {
if swag.IsZero(m.FederalTax) { // not required
return nil
}
if m.FederalTax != nil {
if err := m.FederalTax.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("federalTax")
}
return err
}
}
return nil
}
func (m *ProductResponseTaxTablesItems0) validateStateTax(formats strfmt.Registry) error {
if swag.IsZero(m.StateTax) { // not required
return nil
}
if m.StateTax != nil {
if err := m.StateTax.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("stateTax")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0) UnmarshalBinary(b []byte) error {
var res ProductResponseTaxTablesItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseTaxTablesItems0CityTax product response tax tables items0 city tax
//
// swagger:model ProductResponseTaxTablesItems0CityTax
type ProductResponseTaxTablesItems0CityTax struct {
// active
Active bool `json:"active,omitempty"`
// active excise tax
ActiveExciseTax bool `json:"activeExciseTax,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// compound
Compound bool `json:"compound,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// dirty
Dirty bool `json:"dirty,omitempty"`
// id
ID string `json:"id,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// shop Id
ShopID string `json:"shopId,omitempty"`
// tax order
TaxOrder string `json:"taxOrder,omitempty"`
// tax rate
TaxRate float64 `json:"taxRate,omitempty"`
// territory
Territory string `json:"territory,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response tax tables items0 city tax
func (m *ProductResponseTaxTablesItems0CityTax) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0CityTax) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0CityTax) UnmarshalBinary(b []byte) error {
var res ProductResponseTaxTablesItems0CityTax
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseTaxTablesItems0CountyTax product response tax tables items0 county tax
//
// swagger:model ProductResponseTaxTablesItems0CountyTax
type ProductResponseTaxTablesItems0CountyTax struct {
// active
Active bool `json:"active,omitempty"`
// active excise tax
ActiveExciseTax bool `json:"activeExciseTax,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// compound
Compound bool `json:"compound,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// dirty
Dirty bool `json:"dirty,omitempty"`
// id
ID string `json:"id,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// shop Id
ShopID string `json:"shopId,omitempty"`
// tax order
TaxOrder string `json:"taxOrder,omitempty"`
// tax rate
TaxRate float64 `json:"taxRate,omitempty"`
// territory
Territory string `json:"territory,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response tax tables items0 county tax
func (m *ProductResponseTaxTablesItems0CountyTax) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0CountyTax) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0CountyTax) UnmarshalBinary(b []byte) error {
var res ProductResponseTaxTablesItems0CountyTax
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseTaxTablesItems0FederalTax product response tax tables items0 federal tax
//
// swagger:model ProductResponseTaxTablesItems0FederalTax
type ProductResponseTaxTablesItems0FederalTax struct {
// active
Active bool `json:"active,omitempty"`
// active excise tax
ActiveExciseTax bool `json:"activeExciseTax,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// compound
Compound bool `json:"compound,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// dirty
Dirty bool `json:"dirty,omitempty"`
// id
ID string `json:"id,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// shop Id
ShopID string `json:"shopId,omitempty"`
// tax order
TaxOrder string `json:"taxOrder,omitempty"`
// tax rate
TaxRate float64 `json:"taxRate,omitempty"`
// territory
Territory string `json:"territory,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response tax tables items0 federal tax
func (m *ProductResponseTaxTablesItems0FederalTax) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0FederalTax) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0FederalTax) UnmarshalBinary(b []byte) error {
var res ProductResponseTaxTablesItems0FederalTax
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseTaxTablesItems0StateTax product response tax tables items0 state tax
//
// swagger:model ProductResponseTaxTablesItems0StateTax
type ProductResponseTaxTablesItems0StateTax struct {
// active
Active bool `json:"active,omitempty"`
// active excise tax
ActiveExciseTax bool `json:"activeExciseTax,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// compound
Compound bool `json:"compound,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// dirty
Dirty bool `json:"dirty,omitempty"`
// id
ID string `json:"id,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// shop Id
ShopID string `json:"shopId,omitempty"`
// tax order
TaxOrder string `json:"taxOrder,omitempty"`
// tax rate
TaxRate float64 `json:"taxRate,omitempty"`
// territory
Territory string `json:"territory,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response tax tables items0 state tax
func (m *ProductResponseTaxTablesItems0StateTax) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0StateTax) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseTaxTablesItems0StateTax) UnmarshalBinary(b []byte) error {
var res ProductResponseTaxTablesItems0StateTax
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseVendor product response vendor
//
// swagger:model ProductResponseVendor
type ProductResponseVendor struct {
// active
Active bool `json:"active,omitempty"`
// additional address list
AdditionalAddressList []string `json:"additionalAddressList"`
// address
Address *ProductResponseVendorAddress `json:"address,omitempty"`
// arms length type
ArmsLengthType string `json:"armsLengthType,omitempty"`
// assets
Assets []*ProductResponseVendorAssetsItems0 `json:"assets"`
// back order enabled
BackOrderEnabled bool `json:"backOrderEnabled,omitempty"`
// brands
Brands []string `json:"brands"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// company licenses
CompanyLicenses []*ProductResponseVendorCompanyLicensesItems0 `json:"companyLicenses"`
// company type
CompanyType string `json:"companyType,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// credits
Credits float64 `json:"credits,omitempty"`
// dba name
DbaName string `json:"dbaName,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// description
Description string `json:"description,omitempty"`
// email
Email string `json:"email,omitempty"`
// fax
Fax string `json:"fax,omitempty"`
// first name
FirstName string `json:"firstName,omitempty"`
// id
ID string `json:"id,omitempty"`
// import Id
ImportID string `json:"importId,omitempty"`
// last name
LastName string `json:"lastName,omitempty"`
// licence type
LicenceType string `json:"licenceType,omitempty"`
// license expiration date
LicenseExpirationDate float64 `json:"licenseExpirationDate,omitempty"`
// license number
LicenseNumber string `json:"licenseNumber,omitempty"`
// mobile number
MobileNumber string `json:"mobileNumber,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// name
Name string `json:"name,omitempty"`
// notes
Notes []string `json:"notes"`
// phone
Phone string `json:"phone,omitempty"`
// qb desktop ref
QbDesktopRef string `json:"qbDesktopRef,omitempty"`
// qb vendor ref
QbVendorRef []string `json:"qbVendorRef"`
// related entity
RelatedEntity bool `json:"relatedEntity,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
// vendor key
VendorKey string `json:"vendorKey,omitempty"`
// vendor type
VendorType string `json:"vendorType,omitempty"`
// website
Website string `json:"website,omitempty"`
}
// Validate validates this product response vendor
func (m *ProductResponseVendor) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAddress(formats); err != nil {
res = append(res, err)
}
if err := m.validateAssets(formats); err != nil {
res = append(res, err)
}
if err := m.validateCompanyLicenses(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductResponseVendor) 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("vendor" + "." + "address")
}
return err
}
}
return nil
}
func (m *ProductResponseVendor) validateAssets(formats strfmt.Registry) error {
if swag.IsZero(m.Assets) { // not required
return nil
}
for i := 0; i < len(m.Assets); i++ {
if swag.IsZero(m.Assets[i]) { // not required
continue
}
if m.Assets[i] != nil {
if err := m.Assets[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("vendor" + "." + "assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponseVendor) validateCompanyLicenses(formats strfmt.Registry) error {
if swag.IsZero(m.CompanyLicenses) { // not required
return nil
}
for i := 0; i < len(m.CompanyLicenses); i++ {
if swag.IsZero(m.CompanyLicenses[i]) { // not required
continue
}
if m.CompanyLicenses[i] != nil {
if err := m.CompanyLicenses[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("vendor" + "." + "companyLicenses" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseVendor) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseVendor) UnmarshalBinary(b []byte) error {
var res ProductResponseVendor
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseVendorAddress product response vendor address
//
// swagger:model ProductResponseVendorAddress
type ProductResponseVendorAddress struct {
// address
Address string `json:"address,omitempty"`
// city
City string `json:"city,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// country
Country string `json:"country,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// id
ID string `json:"id,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// state
State string `json:"state,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
// zip code
ZipCode string `json:"zipCode,omitempty"`
}
// Validate validates this product response vendor address
func (m *ProductResponseVendorAddress) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseVendorAddress) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseVendorAddress) UnmarshalBinary(b []byte) error {
var res ProductResponseVendorAddress
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseVendorAssetsItems0 product response vendor assets items0
//
// swagger:model ProductResponseVendorAssetsItems0
type ProductResponseVendorAssetsItems0 struct {
// active
Active bool `json:"active,omitempty"`
// asset type
AssetType string `json:"assetType,omitempty"`
// company Id
CompanyID string `json:"companyId,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// id
ID string `json:"id,omitempty"`
// key
Key string `json:"key,omitempty"`
// large URL
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
MediumURL string `json:"mediumURL,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// name
Name string `json:"name,omitempty"`
// priority
Priority float64 `json:"priority,omitempty"`
// secured
Secured bool `json:"secured,omitempty"`
// thumb URL
ThumbURL string `json:"thumbURL,omitempty"`
// type
Type string `json:"type,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response vendor assets items0
func (m *ProductResponseVendorAssetsItems0) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseVendorAssetsItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseVendorAssetsItems0) UnmarshalBinary(b []byte) error {
var res ProductResponseVendorAssetsItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// ProductResponseVendorCompanyLicensesItems0 product response vendor company licenses items0
//
// swagger:model ProductResponseVendorCompanyLicensesItems0
type ProductResponseVendorCompanyLicensesItems0 struct {
// company type
CompanyType string `json:"companyType,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// deleted
Deleted bool `json:"deleted,omitempty"`
// id
ID string `json:"id,omitempty"`
// license expiration date
LicenseExpirationDate float64 `json:"licenseExpirationDate,omitempty"`
// license number
LicenseNumber string `json:"licenseNumber,omitempty"`
// license type
LicenseType string `json:"licenseType,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// to default
ToDefault bool `json:"toDefault,omitempty"`
// updated
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response vendor company licenses items0
func (m *ProductResponseVendorCompanyLicensesItems0) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *ProductResponseVendorCompanyLicensesItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ProductResponseVendorCompanyLicensesItems0) UnmarshalBinary(b []byte) error {
var res ProductResponseVendorCompanyLicensesItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}