lib/api/blaze/blaze_models/product_response.go

2504 lines
58 KiB
Go
Raw Permalink Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-01-19 16:58:40 +00:00
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
2021-01-08 17:40:28 +00:00
// 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 (
2021-02-09 16:56:57 +00:00
"context"
2021-01-08 17:40:28 +00:00
"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
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// assets
Assets []*ProductResponseAssetsItems0 `json:"assets"`
// automatic re order
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
AutomaticReOrder bool `json:"automaticReOrder,omitempty"`
// brand
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
Brand string `json:"brand,omitempty"`
// brand Id
2021-02-09 16:56:57 +00:00
// Example: 5cba942502aeca080e3b11e3
2021-01-08 17:40:28 +00:00
BrandID string `json:"brandId,omitempty"`
// brand name
2021-02-09 16:56:57 +00:00
// Example: Lowell Herb Co
2021-01-08 17:40:28 +00:00
BrandName string `json:"brandName,omitempty"`
// bundle item results
BundleItemResults []string `json:"bundleItemResults"`
// bundle items
BundleItems []*ProductResponseBundleItemsItems0 `json:"bundleItems"`
// by gram
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
ByGram bool `json:"byGram,omitempty"`
// by prepackage
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
ByPrepackage bool `json:"byPrepackage,omitempty"`
// cannabis type
2021-02-09 16:56:57 +00:00
// Example: DEFAULT
2021-01-08 17:40:28 +00:00
CannabisType string `json:"cannabisType,omitempty"`
// category
Category *ProductResponseCategory `json:"category,omitempty"`
// category Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b986
2021-01-08 17:40:28 +00:00
CategoryID string `json:"categoryId,omitempty"`
// cbd
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Cbd float64 `json:"cbd,omitempty"`
// cbda
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Cbda float64 `json:"cbda,omitempty"`
// cbn
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Cbn float64 `json:"cbn,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// company link Id
2021-02-09 16:56:57 +00:00
// Example: MTkwNjFTMDE=
2021-01-08 17:40:28 +00:00
CompanyLinkID string `json:"companyLinkId,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1555533419406
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// custom gram type
2021-02-09 16:56:57 +00:00
// Example: GRAM
2021-01-08 17:40:28 +00:00
CustomGramType string `json:"customGramType,omitempty"`
// custom tax info
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
CustomTaxInfo string `json:"customTaxInfo,omitempty"`
// custom weight
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
CustomWeight float64 `json:"customWeight,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// description
2021-02-09 16:56:57 +00:00
// Example: In this pack: A curated, effect based blend of sativa strains, pre-rolled into seven premium all flower smokes (3.5 grams per pack). All of our products are lab tested, we grow our flowers with only organic fertilizer, and we never use synthetic pesticides. Matches included for your convenience.
2021-01-08 17:40:28 +00:00
Description string `json:"description,omitempty"`
// dirty
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Dirty bool `json:"dirty,omitempty"`
// discountable
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Discountable bool `json:"discountable,omitempty"`
// enable excise tax
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
EnableExciseTax bool `json:"enableExciseTax,omitempty"`
// enable mix match
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
EnableMixMatch bool `json:"enableMixMatch,omitempty"`
// enable weedmap
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
EnableWeedmap bool `json:"enableWeedmap,omitempty"`
// flower type
2021-02-09 16:56:57 +00:00
// Example: Sativa
2021-01-08 17:40:28 +00:00
FlowerType string `json:"flowerType,omitempty"`
// genetics
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
Genetics string `json:"genetics,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cb78e6b829a5f0834444825
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// import Id
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
ImportID string `json:"importId,omitempty"`
// import src
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
ImportSrc string `json:"importSrc,omitempty"`
// low inventory notification
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
LowInventoryNotification bool `json:"lowInventoryNotification,omitempty"`
// low threshold
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
LowThreshold float64 `json:"lowThreshold,omitempty"`
// medical conditions
MedicalConditions []string `json:"medicalConditions"`
// medicinal
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Medicinal bool `json:"medicinal,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1556695451723
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// name
2021-02-09 16:56:57 +00:00
// Example: Lowell - 3.5g Preroll Pack - Uplifting (S)
2021-01-08 17:40:28 +00:00
Name string `json:"name,omitempty"`
// notes
Notes []string `json:"notes"`
// potency
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Potency bool `json:"potency,omitempty"`
// potency amount
PotencyAmount *ProductResponsePotencyAmount `json:"potencyAmount,omitempty"`
// price breaks
PriceBreaks []*ProductResponsePriceBreaksItems0 `json:"priceBreaks"`
// price includes a l excise
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
PriceIncludesALExcise bool `json:"priceIncludesALExcise,omitempty"`
// price includes excise
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
PriceIncludesExcise bool `json:"priceIncludesExcise,omitempty"`
// price ranges
PriceRanges []string `json:"priceRanges"`
// pricing template Id
PricingTemplateID string `json:"pricingTemplateId,omitempty"`
// product sale type
2021-02-09 16:56:57 +00:00
// Example: Both
2021-01-08 17:40:28 +00:00
ProductSaleType string `json:"productSaleType,omitempty"`
// product type
2021-02-09 16:56:57 +00:00
// Example: REGULAR
2021-01-08 17:40:28 +00:00
ProductType string `json:"productType,omitempty"`
// qb desktop item ref
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
QbDesktopItemRef string `json:"qbDesktopItemRef,omitempty"`
// qb item ref
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
QbItemRef string `json:"qbItemRef,omitempty"`
// quantities
Quantities []*ProductResponseQuantitiesItems0 `json:"quantities"`
// quantity available
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
QuantityAvailable float64 `json:"quantityAvailable,omitempty"`
// re order level
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
ReOrderLevel float64 `json:"reOrderLevel,omitempty"`
// shop Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b970
2021-01-08 17:40:28 +00:00
ShopID string `json:"shopId,omitempty"`
// show in widget
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
ShowInWidget bool `json:"showInWidget,omitempty"`
// sku
2021-02-09 16:56:57 +00:00
// Example: 19061S01
2021-01-08 17:40:28 +00:00
Sku string `json:"sku,omitempty"`
// tags
Tags []string `json:"tags"`
// tax order
2021-02-09 16:56:57 +00:00
// Example: PostTaxed
2021-01-08 17:40:28 +00:00
TaxOrder string `json:"taxOrder,omitempty"`
// tax tables
TaxTables []*ProductResponseTaxTablesItems0 `json:"taxTables"`
// tax type
2021-02-09 16:56:57 +00:00
// Example: Inherit
2021-01-08 17:40:28 +00:00
TaxType string `json:"taxType,omitempty"`
// thc
2021-02-09 16:56:57 +00:00
// Example: 15
2021-01-08 17:40:28 +00:00
Thc float64 `json:"thc,omitempty"`
// thca
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Thca float64 `json:"thca,omitempty"`
// unit price
2021-02-09 16:56:57 +00:00
// Example: 40
2021-01-08 17:40:28 +00:00
UnitPrice float64 `json:"unitPrice,omitempty"`
// unit value
2021-02-09 16:56:57 +00:00
// Example: 1
2021-01-08 17:40:28 +00:00
UnitValue float64 `json:"unitValue,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Updated bool `json:"updated,omitempty"`
// vendor
Vendor *ProductResponseVendor `json:"vendor,omitempty"`
// vendor Id
2021-02-09 16:56:57 +00:00
// Example: 5c82bafa4442190831bcd513
2021-01-08 17:40:28 +00:00
VendorID string `json:"vendorId,omitempty"`
// weight per unit
2021-02-09 16:56:57 +00:00
// Example: EIGHTH
2021-01-08 17:40:28 +00:00
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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validate this product response based on the context it is used
func (m *ProductResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAssets(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateBundleItems(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateCategory(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidatePotencyAmount(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidatePriceBreaks(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateQuantities(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateTaxTables(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateVendor(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductResponse) contextValidateAssets(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Assets); i++ {
if m.Assets[i] != nil {
if err := m.Assets[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) contextValidateBundleItems(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.BundleItems); i++ {
if m.BundleItems[i] != nil {
if err := m.BundleItems[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("bundleItems" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) contextValidateCategory(ctx context.Context, formats strfmt.Registry) error {
if m.Category != nil {
if err := m.Category.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("category")
}
return err
}
}
return nil
}
func (m *ProductResponse) contextValidatePotencyAmount(ctx context.Context, formats strfmt.Registry) error {
if m.PotencyAmount != nil {
if err := m.PotencyAmount.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("potencyAmount")
}
return err
}
}
return nil
}
func (m *ProductResponse) contextValidatePriceBreaks(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.PriceBreaks); i++ {
if m.PriceBreaks[i] != nil {
if err := m.PriceBreaks[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("priceBreaks" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) contextValidateQuantities(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Quantities); i++ {
if m.Quantities[i] != nil {
if err := m.Quantities[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("quantities" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) contextValidateTaxTables(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.TaxTables); i++ {
if m.TaxTables[i] != nil {
if err := m.TaxTables[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("taxTables" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponse) contextValidateVendor(ctx context.Context, formats strfmt.Registry) error {
if m.Vendor != nil {
if err := m.Vendor.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("vendor")
}
return err
}
}
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// asset type
2021-02-09 16:56:57 +00:00
// Example: Photo
2021-01-08 17:40:28 +00:00
AssetType string `json:"assetType,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1555828648113
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cbc0fa83f8de507ff768bfd
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// key
2021-02-09 16:56:57 +00:00
// Example: 99556cc6-6820-425c-8620-f4ba5a8d601f.jpg
2021-01-08 17:40:28 +00:00
Key string `json:"key,omitempty"`
// large URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-public.s3.amazonaws.com/99556cc6-6820-425c-8620-f4ba5a8d601f-800x800.jpg
2021-01-08 17:40:28 +00:00
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-p1.s3.amazonaws.com/99556cc6-6820-425c-8620-f4ba5a8d601f-1600x1600.jpg
2021-01-08 17:40:28 +00:00
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-public.s3.amazonaws.com/99556cc6-6820-425c-8620-f4ba5a8d601f-500x500.jpg
2021-01-08 17:40:28 +00:00
MediumURL string `json:"mediumURL,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1555828648113
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// name
2021-02-09 16:56:57 +00:00
// Example: Lowell 3 5g.jpg
2021-01-08 17:40:28 +00:00
Name string `json:"name,omitempty"`
// orig URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-public.s3.amazonaws.com/99556cc6-6820-425c-8620-f4ba5a8d601f.jpg
2021-01-08 17:40:28 +00:00
OrigURL string `json:"origURL,omitempty"`
// priority
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Priority float64 `json:"priority,omitempty"`
// public URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-public.s3.amazonaws.com/99556cc6-6820-425c-8620-f4ba5a8d601f.jpg
2021-01-08 17:40:28 +00:00
PublicURL string `json:"publicURL,omitempty"`
// secured
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Secured bool `json:"secured,omitempty"`
// thumb URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-public.s3.amazonaws.com/99556cc6-6820-425c-8620-f4ba5a8d601f-200x200.jpg
2021-01-08 17:40:28 +00:00
ThumbURL string `json:"thumbURL,omitempty"`
// type
2021-02-09 16:56:57 +00:00
// Example: Photo
2021-01-08 17:40:28 +00:00
Type string `json:"type,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response assets items0
func (m *ProductResponseAssetsItems0) Validate(formats strfmt.Registry) error {
return nil
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response assets items0 based on context it is used
func (m *ProductResponseAssetsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response bundle items items0 based on context it is used
func (m *ProductResponseBundleItemsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// cannabis
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Cannabis bool `json:"cannabis,omitempty"`
// cannabis type
2021-02-09 16:56:57 +00:00
// Example: DEFAULT
2021-01-08 17:40:28 +00:00
CannabisType string `json:"cannabisType,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1553982501834
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// dirty
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Dirty bool `json:"dirty,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b986
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// low threshold
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
LowThreshold float64 `json:"lowThreshold,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1553982501834
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// name
2021-02-09 16:56:57 +00:00
// Example: Preroll
2021-01-08 17:40:28 +00:00
Name string `json:"name,omitempty"`
// photo
Photo *ProductResponseCategoryPhoto `json:"photo,omitempty"`
// priority
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Priority float64 `json:"priority,omitempty"`
// shop Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b970
2021-01-08 17:40:28 +00:00
ShopID string `json:"shopId,omitempty"`
// unit type
2021-02-09 16:56:57 +00:00
// Example: units
2021-01-08 17:40:28 +00:00
UnitType string `json:"unitType,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validate this product response category based on the context it is used
func (m *ProductResponseCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidatePhoto(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductResponseCategory) contextValidatePhoto(ctx context.Context, formats strfmt.Registry) error {
if m.Photo != nil {
if err := m.Photo.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("category" + "." + "photo")
}
return err
}
}
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// asset type
2021-02-09 16:56:57 +00:00
// Example: Photo
2021-01-08 17:40:28 +00:00
AssetType string `json:"assetType,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1553982501834
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b97a
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// key
2021-02-09 16:56:57 +00:00
// Example: 420default-Preroll.jpg
2021-01-08 17:40:28 +00:00
Key string `json:"key,omitempty"`
// large URL
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
MediumURL string `json:"mediumURL,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1553982501834
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// name
2021-02-09 16:56:57 +00:00
// Example: Preroll.jpg
2021-01-08 17:40:28 +00:00
Name string `json:"name,omitempty"`
// orig URL
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
OrigURL string `json:"origURL,omitempty"`
// priority
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Priority float64 `json:"priority,omitempty"`
// public URL
2021-02-09 16:56:57 +00:00
// Example: https://s3.amazonaws.com/connect-files-public/420default-Preroll.jpg
2021-01-08 17:40:28 +00:00
PublicURL string `json:"publicURL,omitempty"`
// secured
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Secured bool `json:"secured,omitempty"`
// thumb URL
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
ThumbURL string `json:"thumbURL,omitempty"`
// type
2021-02-09 16:56:57 +00:00
// Example: Photo
2021-01-08 17:40:28 +00:00
Type string `json:"type,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response category photo
func (m *ProductResponseCategoryPhoto) Validate(formats strfmt.Registry) error {
return nil
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response category photo based on context it is used
func (m *ProductResponseCategoryPhoto) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Cbd float64 `json:"cbd,omitempty"`
// cbda
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Cbda float64 `json:"cbda,omitempty"`
// cbn
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Cbn float64 `json:"cbn,omitempty"`
// thc
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Thc float64 `json:"thc,omitempty"`
// thca
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Thca float64 `json:"thca,omitempty"`
}
// Validate validates this product response potency amount
func (m *ProductResponsePotencyAmount) Validate(formats strfmt.Registry) error {
return nil
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response potency amount based on context it is used
func (m *ProductResponsePotencyAmount) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1555533419417
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// display name
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
DisplayName string `json:"displayName,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cb78e6b829a5f0834444827
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1555533419417
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// name
2021-02-09 16:56:57 +00:00
// Example: 1 each
2021-01-08 17:40:28 +00:00
Name string `json:"name,omitempty"`
// price
2021-02-09 16:56:57 +00:00
// Example: 40
2021-01-08 17:40:28 +00:00
Price float64 `json:"price,omitempty"`
// price break type
2021-02-09 16:56:57 +00:00
// Example: OneGramUnit
2021-01-08 17:40:28 +00:00
PriceBreakType string `json:"priceBreakType,omitempty"`
// priority
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Priority float64 `json:"priority,omitempty"`
// quantity
2021-02-09 16:56:57 +00:00
// Example: 1
2021-01-08 17:40:28 +00:00
Quantity float64 `json:"quantity,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response price breaks items0
func (m *ProductResponsePriceBreaksItems0) Validate(formats strfmt.Registry) error {
return nil
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response price breaks items0 based on context it is used
func (m *ProductResponsePriceBreaksItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1555633414363
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// dirty
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Dirty bool `json:"dirty,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cb91506819d9e04973cc7c2
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// inventory Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b992
2021-01-08 17:40:28 +00:00
InventoryID string `json:"inventoryId,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1555633414363
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// quantity
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Quantity float64 `json:"quantity,omitempty"`
// shop Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b970
2021-01-08 17:40:28 +00:00
ShopID string `json:"shopId,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response quantities items0
func (m *ProductResponseQuantitiesItems0) Validate(formats strfmt.Registry) error {
return nil
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response quantities items0 based on context it is used
func (m *ProductResponseQuantitiesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// city tax
CityTax *ProductResponseTaxTablesItems0CityTax `json:"cityTax,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// consumer type
2021-02-09 16:56:57 +00:00
// Example: AdultUse
2021-01-08 17:40:28 +00:00
ConsumerType string `json:"consumerType,omitempty"`
// county tax
CountyTax *ProductResponseTaxTablesItems0CountyTax `json:"countyTax,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// dirty
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Dirty bool `json:"dirty,omitempty"`
// federal tax
FederalTax *ProductResponseTaxTablesItems0FederalTax `json:"federalTax,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cb8b5c99c57ec083d307a93
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// name
2021-02-09 16:56:57 +00:00
// Example: Adult Use
2021-01-08 17:40:28 +00:00
Name string `json:"name,omitempty"`
// shop Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b970
2021-01-08 17:40:28 +00:00
ShopID string `json:"shopId,omitempty"`
// state tax
StateTax *ProductResponseTaxTablesItems0StateTax `json:"stateTax,omitempty"`
// tax order
2021-02-09 16:56:57 +00:00
// Example: PostTaxed
2021-01-08 17:40:28 +00:00
TaxOrder string `json:"taxOrder,omitempty"`
// tax type
2021-02-09 16:56:57 +00:00
// Example: Custom
2021-01-08 17:40:28 +00:00
TaxType string `json:"taxType,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validate this product response tax tables items0 based on the context it is used
func (m *ProductResponseTaxTablesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCityTax(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateCountyTax(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateFederalTax(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateStateTax(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductResponseTaxTablesItems0) contextValidateCityTax(ctx context.Context, formats strfmt.Registry) error {
if m.CityTax != nil {
if err := m.CityTax.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("cityTax")
}
return err
}
}
return nil
}
func (m *ProductResponseTaxTablesItems0) contextValidateCountyTax(ctx context.Context, formats strfmt.Registry) error {
if m.CountyTax != nil {
if err := m.CountyTax.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("countyTax")
}
return err
}
}
return nil
}
func (m *ProductResponseTaxTablesItems0) contextValidateFederalTax(ctx context.Context, formats strfmt.Registry) error {
if m.FederalTax != nil {
if err := m.FederalTax.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("federalTax")
}
return err
}
}
return nil
}
func (m *ProductResponseTaxTablesItems0) contextValidateStateTax(ctx context.Context, formats strfmt.Registry) error {
if m.StateTax != nil {
if err := m.StateTax.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("stateTax")
}
return err
}
}
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// active excise tax
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
ActiveExciseTax bool `json:"activeExciseTax,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// compound
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Compound bool `json:"compound,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// dirty
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Dirty bool `json:"dirty,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cb8b5c99c57ec083d307a94
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// shop Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b970
2021-01-08 17:40:28 +00:00
ShopID string `json:"shopId,omitempty"`
// tax order
2021-02-09 16:56:57 +00:00
// Example: PostTaxed
2021-01-08 17:40:28 +00:00
TaxOrder string `json:"taxOrder,omitempty"`
// tax rate
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
TaxRate float64 `json:"taxRate,omitempty"`
// territory
2021-02-09 16:56:57 +00:00
// Example: City
2021-01-08 17:40:28 +00:00
Territory string `json:"territory,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response tax tables items0 city tax based on context it is used
func (m *ProductResponseTaxTablesItems0CityTax) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// active excise tax
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
ActiveExciseTax bool `json:"activeExciseTax,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// compound
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Compound bool `json:"compound,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// dirty
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Dirty bool `json:"dirty,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cb8b5c99c57ec083d307a95
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// shop Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b970
2021-01-08 17:40:28 +00:00
ShopID string `json:"shopId,omitempty"`
// tax order
2021-02-09 16:56:57 +00:00
// Example: PostTaxed
2021-01-08 17:40:28 +00:00
TaxOrder string `json:"taxOrder,omitempty"`
// tax rate
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
TaxRate float64 `json:"taxRate,omitempty"`
// territory
2021-02-09 16:56:57 +00:00
// Example: County
2021-01-08 17:40:28 +00:00
Territory string `json:"territory,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response tax tables items0 county tax based on context it is used
func (m *ProductResponseTaxTablesItems0CountyTax) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// active excise tax
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
ActiveExciseTax bool `json:"activeExciseTax,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// compound
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Compound bool `json:"compound,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// dirty
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Dirty bool `json:"dirty,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cb8b5c99c57ec083d307a97
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// shop Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b970
2021-01-08 17:40:28 +00:00
ShopID string `json:"shopId,omitempty"`
// tax order
2021-02-09 16:56:57 +00:00
// Example: PostTaxed
2021-01-08 17:40:28 +00:00
TaxOrder string `json:"taxOrder,omitempty"`
// tax rate
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
TaxRate float64 `json:"taxRate,omitempty"`
// territory
2021-02-09 16:56:57 +00:00
// Example: Federal
2021-01-08 17:40:28 +00:00
Territory string `json:"territory,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response tax tables items0 federal tax based on context it is used
func (m *ProductResponseTaxTablesItems0FederalTax) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// active excise tax
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
ActiveExciseTax bool `json:"activeExciseTax,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// compound
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Compound bool `json:"compound,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// dirty
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Dirty bool `json:"dirty,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cb8b5c99c57ec083d307a96
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1555609033636
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// shop Id
2021-02-09 16:56:57 +00:00
// Example: 5c9fe425e0faca07db94b970
2021-01-08 17:40:28 +00:00
ShopID string `json:"shopId,omitempty"`
// tax order
2021-02-09 16:56:57 +00:00
// Example: PostTaxed
2021-01-08 17:40:28 +00:00
TaxOrder string `json:"taxOrder,omitempty"`
// tax rate
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
TaxRate float64 `json:"taxRate,omitempty"`
// territory
2021-02-09 16:56:57 +00:00
// Example: State
2021-01-08 17:40:28 +00:00
Territory string `json:"territory,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response tax tables items0 state tax based on context it is used
func (m *ProductResponseTaxTablesItems0StateTax) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// additional address list
AdditionalAddressList []string `json:"additionalAddressList"`
// address
Address *ProductResponseVendorAddress `json:"address,omitempty"`
// arms length type
2021-02-09 16:56:57 +00:00
// Example: ARMS_LENGTH
2021-01-08 17:40:28 +00:00
ArmsLengthType string `json:"armsLengthType,omitempty"`
// assets
Assets []*ProductResponseVendorAssetsItems0 `json:"assets"`
// back order enabled
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
BackOrderEnabled bool `json:"backOrderEnabled,omitempty"`
// brands
2021-02-09 16:56:57 +00:00
// Example: ["5cba942502aeca080e3b11e3"]
2021-01-08 17:40:28 +00:00
Brands []string `json:"brands"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// company licenses
CompanyLicenses []*ProductResponseVendorCompanyLicensesItems0 `json:"companyLicenses"`
// company type
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
CompanyType string `json:"companyType,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1552071418457
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// credits
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Credits float64 `json:"credits,omitempty"`
// dba name
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
DbaName string `json:"dbaName,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
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
2021-02-09 16:56:57 +00:00
// Example: Dom
2021-01-08 17:40:28 +00:00
FirstName string `json:"firstName,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5c82bafa4442190831bcd513
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// import Id
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
ImportID string `json:"importId,omitempty"`
// last name
LastName string `json:"lastName,omitempty"`
// licence type
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
LicenceType string `json:"licenceType,omitempty"`
// license expiration date
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
LicenseExpirationDate float64 `json:"licenseExpirationDate,omitempty"`
// license number
LicenseNumber string `json:"licenseNumber,omitempty"`
// mobile number
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
MobileNumber string `json:"mobileNumber,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1556175123774
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// name
2021-02-09 16:56:57 +00:00
// Example: Lowell Herb Co / The Hacienda Co LLC
2021-01-08 17:40:28 +00:00
Name string `json:"name,omitempty"`
// notes
Notes []string `json:"notes"`
// phone
Phone string `json:"phone,omitempty"`
// qb desktop ref
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
QbDesktopRef string `json:"qbDesktopRef,omitempty"`
// qb vendor ref
QbVendorRef []string `json:"qbVendorRef"`
// related entity
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
RelatedEntity bool `json:"relatedEntity,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Updated bool `json:"updated,omitempty"`
// vendor key
2021-02-09 16:56:57 +00:00
// Example: NWM3ZThjN2I3MjJlZDYwN2U2MWVkYjA2X2xvd2VsbCBoZXJiIGNvIC8gdGhlIGhhY2llbmRhIGNvIGxsYw==
2021-01-08 17:40:28 +00:00
VendorKey string `json:"vendorKey,omitempty"`
// vendor type
2021-02-09 16:56:57 +00:00
// Example: VENDOR
2021-01-08 17:40:28 +00:00
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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validate this product response vendor based on the context it is used
func (m *ProductResponseVendor) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateAddress(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateAssets(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateCompanyLicenses(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ProductResponseVendor) 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("vendor" + "." + "address")
}
return err
}
}
return nil
}
func (m *ProductResponseVendor) contextValidateAssets(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Assets); i++ {
if m.Assets[i] != nil {
if err := m.Assets[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("vendor" + "." + "assets" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *ProductResponseVendor) contextValidateCompanyLicenses(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.CompanyLicenses); i++ {
if m.CompanyLicenses[i] != nil {
if err := m.CompanyLicenses[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("vendor" + "." + "companyLicenses" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// country
2021-02-09 16:56:57 +00:00
// Example: US
2021-01-08 17:40:28 +00:00
Country string `json:"country,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1552071418457
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5c82bafa4442190831bcd512
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1552071418457
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// state
State string `json:"state,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
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
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response vendor address based on context it is used
func (m *ProductResponseVendorAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Active bool `json:"active,omitempty"`
// asset type
2021-02-09 16:56:57 +00:00
// Example: Photo
2021-01-08 17:40:28 +00:00
AssetType string `json:"assetType,omitempty"`
// company Id
2021-02-09 16:56:57 +00:00
// Example: 5c7e8c7b722ed607e61edb06
2021-01-08 17:40:28 +00:00
CompanyID string `json:"companyId,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1556052368662
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cbf79908a29f808183540e7
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// key
2021-02-09 16:56:57 +00:00
// Example: c71adc95-bb07-47f2-b9f6-cc4db7936686.png
2021-01-08 17:40:28 +00:00
Key string `json:"key,omitempty"`
// large URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-800x800.png
2021-01-08 17:40:28 +00:00
LargeURL string `json:"largeURL,omitempty"`
// large x2 URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-1600x1600.png
2021-01-08 17:40:28 +00:00
LargeX2URL string `json:"largeX2URL,omitempty"`
// medium URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-500x500.png
2021-01-08 17:40:28 +00:00
MediumURL string `json:"mediumURL,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1556052368662
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// name
2021-02-09 16:56:57 +00:00
// Example: Brian Main DL.png
2021-01-08 17:40:28 +00:00
Name string `json:"name,omitempty"`
// priority
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
Priority float64 `json:"priority,omitempty"`
// secured
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
Secured bool `json:"secured,omitempty"`
// thumb URL
2021-02-09 16:56:57 +00:00
// Example: https://connect-files-p1.s3.amazonaws.com/c71adc95-bb07-47f2-b9f6-cc4db7936686-200x200.png
2021-01-08 17:40:28 +00:00
ThumbURL string `json:"thumbURL,omitempty"`
// type
2021-02-09 16:56:57 +00:00
// Example: Photo
2021-01-08 17:40:28 +00:00
Type string `json:"type,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response vendor assets items0
func (m *ProductResponseVendorAssetsItems0) Validate(formats strfmt.Registry) error {
return nil
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response vendor assets items0 based on context it is used
func (m *ProductResponseVendorAssetsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
2021-02-09 16:56:57 +00:00
// Example: RETAILER
2021-01-08 17:40:28 +00:00
CompanyType string `json:"companyType,omitempty"`
// created
2021-02-09 16:56:57 +00:00
// Example: 1556175123774
2021-01-08 17:40:28 +00:00
Created int64 `json:"created,omitempty"`
// deleted
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Deleted bool `json:"deleted,omitempty"`
// id
2021-02-09 16:56:57 +00:00
// Example: 5cc159132a77f44828c02d8b
2021-01-08 17:40:28 +00:00
ID string `json:"id,omitempty"`
// license expiration date
2021-02-09 16:56:57 +00:00
// Example: 0
2021-01-08 17:40:28 +00:00
LicenseExpirationDate float64 `json:"licenseExpirationDate,omitempty"`
// license number
LicenseNumber string `json:"licenseNumber,omitempty"`
// license type
2021-02-09 16:56:57 +00:00
// Example: string
2021-01-08 17:40:28 +00:00
LicenseType string `json:"licenseType,omitempty"`
// modified
2021-02-09 16:56:57 +00:00
// Example: 1556175123774
2021-01-08 17:40:28 +00:00
Modified int64 `json:"modified,omitempty"`
// to default
2021-02-09 16:56:57 +00:00
// Example: true
2021-01-08 17:40:28 +00:00
ToDefault bool `json:"toDefault,omitempty"`
// updated
2021-02-09 16:56:57 +00:00
// Example: false
2021-01-08 17:40:28 +00:00
Updated bool `json:"updated,omitempty"`
}
// Validate validates this product response vendor company licenses items0
func (m *ProductResponseVendorCompanyLicensesItems0) Validate(formats strfmt.Registry) error {
return nil
}
2021-02-09 16:56:57 +00:00
// ContextValidate validates this product response vendor company licenses items0 based on context it is used
func (m *ProductResponseVendorCompanyLicensesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
2021-01-08 17:40:28 +00:00
// 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
}