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 geo_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"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Place place
|
|
|
|
//
|
|
|
|
// swagger:model Place
|
|
|
|
type Place struct {
|
|
|
|
|
|
|
|
// Account
|
|
|
|
AccountID string `json:"AccountID,omitempty"`
|
|
|
|
|
|
|
|
// Account Validation
|
|
|
|
AccountValidation string `json:"AccountValidation,omitempty"`
|
|
|
|
|
|
|
|
// Rollup Amount
|
|
|
|
Amount float64 `json:"Amount,omitempty"`
|
|
|
|
|
|
|
|
// AreaDescription
|
|
|
|
AreaDescription string `json:"AreaDescription,omitempty"`
|
|
|
|
|
|
|
|
// Contact
|
|
|
|
ContactID string `json:"ContactID,omitempty"`
|
|
|
|
|
|
|
|
// country ID
|
|
|
|
CountryID string `json:"CountryID,omitempty"`
|
|
|
|
|
|
|
|
// County
|
|
|
|
CountyID string `json:"CountyID,omitempty"`
|
|
|
|
|
2021-01-14 06:36:35 +00:00
|
|
|
// The Taxnexus ID of the user who created this record
|
|
|
|
CreatedByID string `json:"CreatedByID,omitempty"`
|
|
|
|
|
|
|
|
// The creation date of this database record
|
|
|
|
CreatedDate string `json:"CreatedDate,omitempty"`
|
|
|
|
|
2021-01-08 17:40:28 +00:00
|
|
|
// Enrollment Status
|
|
|
|
EnrollmentStatus string `json:"EnrollmentStatus,omitempty"`
|
|
|
|
|
|
|
|
// FIPS
|
|
|
|
FIPS string `json:"FIPS,omitempty"`
|
|
|
|
|
|
|
|
// FIPS Class
|
|
|
|
FIPSclass string `json:"FIPSclass,omitempty"`
|
|
|
|
|
|
|
|
// Functional Status
|
|
|
|
FunctionalStatus string `json:"FunctionalStatus,omitempty"`
|
|
|
|
|
|
|
|
// GNIS
|
|
|
|
GNIS int64 `json:"GNIS,omitempty"`
|
|
|
|
|
|
|
|
// Geocode
|
|
|
|
Geocode string `json:"Geocode,omitempty"`
|
|
|
|
|
|
|
|
// True if this Place has it's own District Sales HasDistrictTaxes
|
|
|
|
HasDistrictTaxes bool `json:"HasDistrictTaxes,omitempty"`
|
|
|
|
|
|
|
|
// Taxnexus Record Id
|
|
|
|
ID string `json:"ID,omitempty"`
|
|
|
|
|
|
|
|
// Interest
|
|
|
|
Interest float64 `json:"Interest,omitempty"`
|
|
|
|
|
|
|
|
// Land Area
|
|
|
|
LandArea int64 `json:"LandArea,omitempty"`
|
|
|
|
|
2021-01-14 06:36:35 +00:00
|
|
|
// The Taxnexus ID of the user last modified this record
|
|
|
|
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
|
|
|
|
|
|
|
|
// The last modification date of this database record
|
|
|
|
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
|
|
|
|
|
2021-01-08 17:40:28 +00:00
|
|
|
// Latitude of the center of this geographic entity
|
|
|
|
Latitude float64 `json:"Latitude,omitempty"`
|
|
|
|
|
|
|
|
// Legal Name
|
|
|
|
LegalName string `json:"LegalName,omitempty"`
|
|
|
|
|
|
|
|
// Longitude of the center of this geographic entity
|
|
|
|
Longitude float64 `json:"Longitude,omitempty"`
|
|
|
|
|
|
|
|
// Place Name
|
|
|
|
Name string `json:"Name,omitempty"`
|
|
|
|
|
2021-01-14 06:36:35 +00:00
|
|
|
// The Taxnexus ID of the user who owns this record
|
|
|
|
OwnerID string `json:"OwnerID,omitempty"`
|
|
|
|
|
2021-01-08 17:40:28 +00:00
|
|
|
// Penalty
|
|
|
|
Penalty float64 `json:"Penalty,omitempty"`
|
|
|
|
|
|
|
|
// Source System identifier for this record, if any
|
|
|
|
Ref string `json:"Ref,omitempty"`
|
|
|
|
|
|
|
|
// Reported Adjustments
|
|
|
|
ReportedAdjustments float64 `json:"ReportedAdjustments,omitempty"`
|
|
|
|
|
|
|
|
// Reported Deductions
|
|
|
|
ReportedDeductions float64 `json:"ReportedDeductions,omitempty"`
|
|
|
|
|
|
|
|
// Reported Net Revenue
|
|
|
|
ReportedNetRevenue float64 `json:"ReportedNetRevenue,omitempty"`
|
|
|
|
|
|
|
|
// Reported Rate
|
|
|
|
ReportedRate float64 `json:"ReportedRate,omitempty"`
|
|
|
|
|
|
|
|
// Reported Revenue
|
|
|
|
ReportedRevenue float64 `json:"ReportedRevenue,omitempty"`
|
|
|
|
|
|
|
|
// Rollup Revenue Base
|
|
|
|
RevenueBase float64 `json:"RevenueBase,omitempty"`
|
|
|
|
|
|
|
|
// Rollup Revenue Net
|
|
|
|
RevenueNet float64 `json:"RevenueNet,omitempty"`
|
|
|
|
|
|
|
|
// Rollup Revenue Not Taxable
|
|
|
|
RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"`
|
|
|
|
|
|
|
|
// sales tax rate
|
|
|
|
SalesTaxRate *TaxRate `json:"SalesTaxRate,omitempty"`
|
|
|
|
|
2021-02-19 17:47:02 +00:00
|
|
|
// Is this place that is split by county boundaries?
|
|
|
|
Split bool `json:"Split,omitempty"`
|
|
|
|
|
2021-01-14 06:36:35 +00:00
|
|
|
// State Code
|
|
|
|
StateCode string `json:"StateCode,omitempty"`
|
|
|
|
|
2021-01-08 17:40:28 +00:00
|
|
|
// State
|
|
|
|
StateID string `json:"StateID,omitempty"`
|
|
|
|
|
|
|
|
// Document Status
|
|
|
|
Status string `json:"Status,omitempty"`
|
|
|
|
|
|
|
|
// Reported Tax
|
|
|
|
Subtotal float64 `json:"Subtotal,omitempty"`
|
|
|
|
|
|
|
|
// tax instances
|
|
|
|
TaxInstances []*TaxInstance `json:"TaxInstances"`
|
|
|
|
|
|
|
|
// Template
|
|
|
|
TemplateID string `json:"TemplateID,omitempty"`
|
|
|
|
|
|
|
|
// Total Amount
|
|
|
|
TotalAmount float64 `json:"TotalAmount,omitempty"`
|
|
|
|
|
|
|
|
// Total Area
|
|
|
|
TotalArea int64 `json:"TotalArea,omitempty"`
|
|
|
|
|
|
|
|
// Unit Base
|
|
|
|
UnitBase float64 `json:"UnitBase,omitempty"`
|
|
|
|
|
|
|
|
// Water Area
|
|
|
|
WaterArea int64 `json:"WaterArea,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validate validates this place
|
|
|
|
func (m *Place) Validate(formats strfmt.Registry) error {
|
|
|
|
var res []error
|
|
|
|
|
|
|
|
if err := m.validateSalesTaxRate(formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := m.validateTaxInstances(formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(res) > 0 {
|
|
|
|
return errors.CompositeValidationError(res...)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Place) validateSalesTaxRate(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(m.SalesTaxRate) { // not required
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
if m.SalesTaxRate != nil {
|
|
|
|
if err := m.SalesTaxRate.Validate(formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("SalesTaxRate")
|
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Place) validateTaxInstances(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(m.TaxInstances) { // not required
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
for i := 0; i < len(m.TaxInstances); i++ {
|
|
|
|
if swag.IsZero(m.TaxInstances[i]) { // not required
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
if m.TaxInstances[i] != nil {
|
|
|
|
if err := m.TaxInstances[i].Validate(formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("TaxInstances" + "." + strconv.Itoa(i))
|
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-02-09 16:56:57 +00:00
|
|
|
// ContextValidate validate this place based on the context it is used
|
|
|
|
func (m *Place) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
|
|
var res []error
|
|
|
|
|
|
|
|
if err := m.contextValidateSalesTaxRate(ctx, formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := m.contextValidateTaxInstances(ctx, formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(res) > 0 {
|
|
|
|
return errors.CompositeValidationError(res...)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Place) contextValidateSalesTaxRate(ctx context.Context, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
if m.SalesTaxRate != nil {
|
|
|
|
if err := m.SalesTaxRate.ContextValidate(ctx, formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("SalesTaxRate")
|
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Place) contextValidateTaxInstances(ctx context.Context, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
for i := 0; i < len(m.TaxInstances); i++ {
|
|
|
|
|
|
|
|
if m.TaxInstances[i] != nil {
|
|
|
|
if err := m.TaxInstances[i].ContextValidate(ctx, formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("TaxInstances" + "." + strconv.Itoa(i))
|
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-01-08 17:40:28 +00:00
|
|
|
// MarshalBinary interface implementation
|
|
|
|
func (m *Place) MarshalBinary() ([]byte, error) {
|
|
|
|
if m == nil {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
return swag.WriteJSON(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalBinary interface implementation
|
|
|
|
func (m *Place) UnmarshalBinary(b []byte) error {
|
|
|
|
var res Place
|
|
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
*m = res
|
|
|
|
return nil
|
|
|
|
}
|