lib/api/crm/crm_models/account.go

314 lines
7.3 KiB
Go
Raw Normal View History

2021-07-31 03:05:02 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-08-05 19:37:53 +00:00
// (c) 2012-2020 by Taxnexus, Inc.
2021-07-31 03:05:02 +00:00
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package crm_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// Account account
//
// swagger:model Account
type Account struct {
// Account Number
AccountNumber string `json:"AccountNumber,omitempty"`
2022-06-20 15:35:49 +00:00
// The marketing origin of this account
2021-07-31 03:05:02 +00:00
AccountSource string `json:"AccountSource,omitempty"`
2023-03-28 17:47:34 +00:00
// active
Active int64 `json:"Active,omitempty"`
2021-07-31 03:05:02 +00:00
// Annual Revenue Estimate
AnnualRevenue float64 `json:"AnnualRevenue,omitempty"`
// billing address
BillingAddress *Address `json:"BillingAddress,omitempty"`
// Contact ID
BillingContactID string `json:"BillingContactID,omitempty"`
2022-09-04 04:57:09 +00:00
// Close Date
CloseDate string `json:"CloseDate,omitempty"`
2021-07-31 03:05:02 +00:00
2023-03-28 17:47:34 +00:00
// cloud revenue total
CloudRevenueTotal float64 `json:"CloudRevenueTotal,omitempty"`
2022-09-04 04:57:09 +00:00
// The type of cloud company
CloudType string `json:"CloudType,omitempty"`
2021-07-31 03:05:02 +00:00
2022-09-04 04:57:09 +00:00
// The year company started cloud revenue
CloudYear string `json:"CloudYear,omitempty"`
2021-07-31 03:05:02 +00:00
// Created By User ID
CreatedByID string `json:"CreatedByID,omitempty"`
// Created Date
CreatedDate string `json:"CreatedDate,omitempty"`
2022-09-04 04:57:09 +00:00
// Crunchbase URL
CrunchbaseURL string `json:"CrunchbaseURL,omitempty"`
2021-07-31 03:05:02 +00:00
2022-09-04 04:57:09 +00:00
// Description of the account
2021-07-31 03:05:02 +00:00
Description string `json:"Description,omitempty"`
2023-03-28 17:47:34 +00:00
// e i n
EIN string `json:"EIN,omitempty"`
2022-09-04 04:57:09 +00:00
// Earnings Call Date
EarningsCall string `json:"EarningsCall,omitempty"`
2021-07-31 03:05:02 +00:00
// Main Account Email
Email string `json:"Email,omitempty"`
2022-09-04 04:57:09 +00:00
// The amount of equity EquityFunding
EquityFunding float64 `json:"EquityFunding,omitempty"`
// Company Facebook URL
Facebook string `json:"Facebook,omitempty"`
2021-07-31 03:05:02 +00:00
2022-09-04 04:57:09 +00:00
// Fax number
2021-07-31 03:05:02 +00:00
Fax string `json:"Fax,omitempty"`
2022-09-04 04:57:09 +00:00
// Date company founded
FoundedDate string `json:"FoundedDate,omitempty"`
2023-03-28 17:47:34 +00:00
// Account Id
2021-07-31 03:05:02 +00:00
ID string `json:"ID,omitempty"`
2022-09-04 04:57:09 +00:00
// IPO Date
IPODate string `json:"IPODate,omitempty"`
2023-03-28 17:47:34 +00:00
// image URL
ImageURL string `json:"ImageURL,omitempty"`
// imagealttext
Imagealttext string `json:"Imagealttext,omitempty"`
2022-09-04 04:57:09 +00:00
// Industries
Industries string `json:"Industries,omitempty"`
2021-07-31 03:05:02 +00:00
// Industry
Industry string `json:"Industry,omitempty"`
// Last Modified By User ID
LastModifiedByID string `json:"LastModifiedByID,omitempty"`
// Last Modified Date
LastModifiedDate string `json:"LastModifiedDate,omitempty"`
2022-09-04 04:57:09 +00:00
// Company LinkedIn URL
LinkedIn string `json:"LinkedIn,omitempty"`
// Headquarters Location Description
Location string `json:"Location,omitempty"`
2021-07-31 03:05:02 +00:00
2022-09-04 04:57:09 +00:00
// Company Logo URL
Logo string `json:"Logo,omitempty"`
2021-07-31 03:05:02 +00:00
2022-09-04 04:57:09 +00:00
// Market Capitalization
MarketCapitalization float64 `json:"MarketCapitalization,omitempty"`
2021-07-31 03:05:02 +00:00
// Account Name
Name string `json:"Name,omitempty"`
2022-09-04 04:57:09 +00:00
// Number of Investments
NumberInvestments float64 `json:"NumberInvestments,omitempty"`
2021-07-31 03:05:02 +00:00
// Employee Count Estimate
NumberOfEmployees int64 `json:"NumberOfEmployees,omitempty"`
// Account Owner User ID
OwnerID string `json:"OwnerID,omitempty"`
// Ownership
Ownership string `json:"Ownership,omitempty"`
// Parent Account
ParentID string `json:"ParentID,omitempty"`
// Phone
Phone string `json:"Phone,omitempty"`
2022-09-04 04:57:09 +00:00
// Publish this record?
Publish bool `json:"Publish,omitempty"`
2021-07-31 03:05:02 +00:00
// SIC Code
SIC string `json:"SIC,omitempty"`
// SIC Description
SICDesc string `json:"SICDesc,omitempty"`
2022-09-04 04:57:09 +00:00
// A Salesforce-First company?
SalesforceFirst bool `json:"SalesforceFirst,omitempty"`
2021-07-31 03:05:02 +00:00
// shipping address
ShippingAddress *Address `json:"ShippingAddress,omitempty"`
// Shipping Contact ID
2022-06-20 15:35:49 +00:00
ShippingContactID string `json:"ShippingContactID,omitempty"`
2021-07-31 03:05:02 +00:00
// Account Site
Site string `json:"Site,omitempty"`
2023-03-28 17:47:34 +00:00
// Slug
Slug string `json:"Slug,omitempty"`
2022-09-04 04:57:09 +00:00
// Company tagline
TagLine string `json:"TagLine,omitempty"`
2021-07-31 03:05:02 +00:00
// Tenant Identifier
TenantID string `json:"TenantID,omitempty"`
// Ticker Symbol
TickerSymbol string `json:"TickerSymbol,omitempty"`
2022-09-04 04:57:09 +00:00
// Twitter URL
Twitter string `json:"Twitter,omitempty"`
2021-07-31 03:05:02 +00:00
// Type
Type string `json:"Type,omitempty"`
// Website
Website string `json:"Website,omitempty"`
// Year Started
YearStarted string `json:"YearStarted,omitempty"`
}
// Validate validates this account
func (m *Account) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateBillingAddress(formats); err != nil {
res = append(res, err)
}
if err := m.validateShippingAddress(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Account) validateBillingAddress(formats strfmt.Registry) error {
if swag.IsZero(m.BillingAddress) { // not required
return nil
}
if m.BillingAddress != nil {
if err := m.BillingAddress.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("BillingAddress")
2022-05-28 19:45:41 +00:00
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("BillingAddress")
2021-07-31 03:05:02 +00:00
}
return err
}
}
return nil
}
func (m *Account) validateShippingAddress(formats strfmt.Registry) error {
if swag.IsZero(m.ShippingAddress) { // not required
return nil
}
if m.ShippingAddress != nil {
if err := m.ShippingAddress.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ShippingAddress")
2022-05-28 19:45:41 +00:00
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ShippingAddress")
2021-07-31 03:05:02 +00:00
}
return err
}
}
return nil
}
// ContextValidate validate this account based on the context it is used
func (m *Account) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateBillingAddress(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateShippingAddress(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *Account) contextValidateBillingAddress(ctx context.Context, formats strfmt.Registry) error {
if m.BillingAddress != nil {
if err := m.BillingAddress.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("BillingAddress")
2022-05-28 19:45:41 +00:00
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("BillingAddress")
2021-07-31 03:05:02 +00:00
}
return err
}
}
return nil
}
func (m *Account) contextValidateShippingAddress(ctx context.Context, formats strfmt.Registry) error {
if m.ShippingAddress != nil {
if err := m.ShippingAddress.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ShippingAddress")
2022-05-28 19:45:41 +00:00
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ShippingAddress")
2021-07-31 03:05:02 +00:00
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *Account) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Account) UnmarshalBinary(b []byte) error {
var res Account
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}