lib/api/sf-gate/sf_gate_models/place.go

255 lines
5.6 KiB
Go
Raw 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 sf_gate_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"`
// Taxnexus ID of the Country this places is in
Countryid string `json:"countryid,omitempty"`
// County
Countyid string `json:"countyid,omitempty"`
2021-02-23 20:03:04 +00:00
// Created By User ID
Createdbyid string `json:"createdbyid,omitempty"`
// Created Date
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"`
// Geocode
Geocode string `json:"geocode,omitempty"`
// GNIS
Gnis int64 `json:"gnis,omitempty"`
// True if this Place has District Sales taxes
Hasdistricttaxes bool `json:"hasdistricttaxes,omitempty"`
// Salesforce Record Id
ID string `json:"id,omitempty"`
// Interest
Interest float64 `json:"interest,omitempty"`
// Land Area
Landarea int64 `json:"landarea,omitempty"`
2021-02-23 20:03:04 +00:00
// Last Modified By User ID
Lastmodifiedbyid string `json:"lastmodifiedbyid,omitempty"`
// Last Modified Date
Lastmodifieddate string `json:"lastmodifieddate,omitempty"`
2021-01-08 17:40:28 +00:00
// latitude
Latitude float64 `json:"latitude,omitempty"`
// Legal Name
Legalname string `json:"legalname,omitempty"`
// longitude
Longitude float64 `json:"longitude,omitempty"`
// Place Name
Name string `json:"name,omitempty"`
// Penalty
Penalty float64 `json:"penalty,omitempty"`
// Polygon Centroid
Polygoncentroid interface{} `json:"polygoncentroid,omitempty"`
// External reference 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"`
2021-02-23 20:03:04 +00:00
// Split?
Split bool `json:"split,omitempty"`
// State Code
Statecode string `json:"statecode,omitempty"`
// State ID
2021-01-08 17:40:28 +00:00
Stateid string `json:"stateid,omitempty"`
// Document Status
Status string `json:"status,omitempty"`
// Reported Tax
Subtotal float64 `json:"subtotal,omitempty"`
// taxinstances
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.validateTaxinstances(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
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.contextValidateTaxinstances(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
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
}