160 lines
3.4 KiB
Go
160 lines
3.4 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 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 (
|
||
|
"strconv"
|
||
|
|
||
|
"github.com/go-openapi/errors"
|
||
|
"github.com/go-openapi/strfmt"
|
||
|
"github.com/go-openapi/swag"
|
||
|
)
|
||
|
|
||
|
// Country country
|
||
|
//
|
||
|
// swagger:model Country
|
||
|
type Country struct {
|
||
|
|
||
|
// Account
|
||
|
Accountid string `json:"accountid,omitempty"`
|
||
|
|
||
|
// Rollup Amount
|
||
|
Amount float64 `json:"amount,omitempty"`
|
||
|
|
||
|
// Code
|
||
|
Code string `json:"code,omitempty"`
|
||
|
|
||
|
// Contact
|
||
|
Contactid string `json:"contactid,omitempty"`
|
||
|
|
||
|
// Enrollment Status
|
||
|
Enrollmentstatus string `json:"enrollmentstatus,omitempty"`
|
||
|
|
||
|
// Taxnexus Record Id
|
||
|
ID string `json:"id,omitempty"`
|
||
|
|
||
|
// Interest
|
||
|
Interest float64 `json:"interest,omitempty"`
|
||
|
|
||
|
// latitude
|
||
|
Latitude float64 `json:"latitude,omitempty"`
|
||
|
|
||
|
// longitude
|
||
|
Longitude float64 `json:"longitude,omitempty"`
|
||
|
|
||
|
// Country Name
|
||
|
Name string `json:"name,omitempty"`
|
||
|
|
||
|
// 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"`
|
||
|
|
||
|
// 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"`
|
||
|
|
||
|
// Unit Base
|
||
|
Unitbase float64 `json:"unitbase,omitempty"`
|
||
|
}
|
||
|
|
||
|
// Validate validates this country
|
||
|
func (m *Country) 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 *Country) 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
|
||
|
}
|
||
|
|
||
|
// MarshalBinary interface implementation
|
||
|
func (m *Country) MarshalBinary() ([]byte, error) {
|
||
|
if m == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
return swag.WriteJSON(m)
|
||
|
}
|
||
|
|
||
|
// UnmarshalBinary interface implementation
|
||
|
func (m *Country) UnmarshalBinary(b []byte) error {
|
||
|
var res Country
|
||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
*m = res
|
||
|
return nil
|
||
|
}
|