diff --git a/api/ops/ops_models/cash_receipt.go b/api/ops/ops_models/cash_receipt.go index a241c93..346a597 100644 --- a/api/ops/ops_models/cash_receipt.go +++ b/api/ops/ops_models/cash_receipt.go @@ -46,6 +46,9 @@ type CashReceipt struct { // Created Date CreatedDate string `json:"CreatedDate,omitempty"` + // Account CustomerID, if any + CustomerID string `json:"CustomerID,omitempty"` + // Memo Description string `json:"Description,omitempty"` diff --git a/api/ops/ops_models/contract.go b/api/ops/ops_models/contract.go index 12f3cd4..dc1eede 100644 --- a/api/ops/ops_models/contract.go +++ b/api/ops/ops_models/contract.go @@ -49,7 +49,7 @@ type Contract struct { // Contract Name Name string `json:"Name,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Payment Terms diff --git a/api/ops/ops_models/eft.go b/api/ops/ops_models/eft.go index 554ed55..f1e969a 100644 --- a/api/ops/ops_models/eft.go +++ b/api/ops/ops_models/eft.go @@ -93,9 +93,6 @@ type Eft struct { // Transaction ID TransactionID string `json:"TransactionID,omitempty"` - - // UUID - UUID string `json:"UUID,omitempty"` } // Validate validates this eft diff --git a/api/ops/ops_models/invoice.go b/api/ops/ops_models/invoice.go index 0a94dd3..1f8cdd3 100644 --- a/api/ops/ops_models/invoice.go +++ b/api/ops/ops_models/invoice.go @@ -181,7 +181,7 @@ type Invoice struct { // Overdue 90 Days Amount OverDue90 float64 `json:"OverDue90,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Partner Account diff --git a/api/ops/ops_models/invoice_basic.go b/api/ops/ops_models/invoice_basic.go index d99ab78..d606768 100644 --- a/api/ops/ops_models/invoice_basic.go +++ b/api/ops/ops_models/invoice_basic.go @@ -76,7 +76,7 @@ type InvoiceBasic struct { // ID of the Job which created this Invoice JobID string `json:"JobID,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Taxnexus Period ID diff --git a/api/ops/ops_models/invoice_item.go b/api/ops/ops_models/invoice_item.go index 175d499..92520c0 100644 --- a/api/ops/ops_models/invoice_item.go +++ b/api/ops/ops_models/invoice_item.go @@ -55,7 +55,7 @@ type InvoiceItem struct { // Order Item OrderItemID string `json:"OrderItemID,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Product Code diff --git a/api/ops/ops_models/item_basic.go b/api/ops/ops_models/item_basic.go index c280393..5e914d0 100644 --- a/api/ops/ops_models/item_basic.go +++ b/api/ops/ops_models/item_basic.go @@ -31,7 +31,7 @@ type ItemBasic struct { // Monthly Recurring Charge Indicator MRCInterval int64 `json:"MRCInterval,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Product Code diff --git a/api/ops/ops_models/order.go b/api/ops/ops_models/order.go index 12818ad..b03c832 100644 --- a/api/ops/ops_models/order.go +++ b/api/ops/ops_models/order.go @@ -175,7 +175,7 @@ type Order struct { // PO Date PODate string `json:"PODate,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Payment Method ID diff --git a/api/ops/ops_models/order_item.go b/api/ops/ops_models/order_item.go index 6a9b2f0..03bf9de 100644 --- a/api/ops/ops_models/order_item.go +++ b/api/ops/ops_models/order_item.go @@ -85,7 +85,7 @@ type OrderItem struct { // Original Order Product OriginalOrderItemID string `json:"OriginalOrderItemID,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Posted to external system? diff --git a/api/ops/ops_models/quote.go b/api/ops/ops_models/quote.go index edfa9d8..3f700f8 100644 --- a/api/ops/ops_models/quote.go +++ b/api/ops/ops_models/quote.go @@ -151,7 +151,7 @@ type Quote struct { // Owner Name OwnerID string `json:"OwnerID,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Payment Terms diff --git a/api/ops/ops_models/quote_basic.go b/api/ops/ops_models/quote_basic.go index 6ce54ac..0ea39a3 100644 --- a/api/ops/ops_models/quote_basic.go +++ b/api/ops/ops_models/quote_basic.go @@ -10,13 +10,11 @@ package ops_models // Editing this file might prove futile when you re-run the swagger generate command import ( - "encoding/json" "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // QuoteBasic quote basic @@ -69,7 +67,7 @@ type QuoteBasic struct { // ID of the Job which created this Invoice JobID string `json:"JobID,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Taxnexus Period ID @@ -85,14 +83,12 @@ type QuoteBasic struct { Ref string `json:"Ref,omitempty"` // Sales Regulation Type - // Enum: [AdultUse Caregiver Consumer Medicinal MedicinalState MedicinalThirdParty Merchandise Patient Telecom] SalesRegulation string `json:"SalesRegulation,omitempty"` // Shipping and Handling fees for this document ShippingHandling float64 `json:"ShippingHandling,omitempty"` // Status used by for Billing Balances; ignored in tax calculation - // Enum: [closed delivered hold issued new posted rated rating_failed rating_ready reissued rendered uncollectable voided] Status string `json:"Status,omitempty"` // Subtotal of items @@ -123,14 +119,6 @@ func (m *QuoteBasic) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateSalesRegulation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - if err := m.validateTaxTransactions(formats); err != nil { res = append(res, err) } @@ -188,146 +176,6 @@ func (m *QuoteBasic) validateItems(formats strfmt.Registry) error { return nil } -var quoteBasicTypeSalesRegulationPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AdultUse","Caregiver","Consumer","Medicinal","MedicinalState","MedicinalThirdParty","Merchandise","Patient","Telecom"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - quoteBasicTypeSalesRegulationPropEnum = append(quoteBasicTypeSalesRegulationPropEnum, v) - } -} - -const ( - - // QuoteBasicSalesRegulationAdultUse captures enum value "AdultUse" - QuoteBasicSalesRegulationAdultUse string = "AdultUse" - - // QuoteBasicSalesRegulationCaregiver captures enum value "Caregiver" - QuoteBasicSalesRegulationCaregiver string = "Caregiver" - - // QuoteBasicSalesRegulationConsumer captures enum value "Consumer" - QuoteBasicSalesRegulationConsumer string = "Consumer" - - // QuoteBasicSalesRegulationMedicinal captures enum value "Medicinal" - QuoteBasicSalesRegulationMedicinal string = "Medicinal" - - // QuoteBasicSalesRegulationMedicinalState captures enum value "MedicinalState" - QuoteBasicSalesRegulationMedicinalState string = "MedicinalState" - - // QuoteBasicSalesRegulationMedicinalThirdParty captures enum value "MedicinalThirdParty" - QuoteBasicSalesRegulationMedicinalThirdParty string = "MedicinalThirdParty" - - // QuoteBasicSalesRegulationMerchandise captures enum value "Merchandise" - QuoteBasicSalesRegulationMerchandise string = "Merchandise" - - // QuoteBasicSalesRegulationPatient captures enum value "Patient" - QuoteBasicSalesRegulationPatient string = "Patient" - - // QuoteBasicSalesRegulationTelecom captures enum value "Telecom" - QuoteBasicSalesRegulationTelecom string = "Telecom" -) - -// prop value enum -func (m *QuoteBasic) validateSalesRegulationEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, quoteBasicTypeSalesRegulationPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *QuoteBasic) validateSalesRegulation(formats strfmt.Registry) error { - - if swag.IsZero(m.SalesRegulation) { // not required - return nil - } - - // value enum - if err := m.validateSalesRegulationEnum("SalesRegulation", "body", m.SalesRegulation); err != nil { - return err - } - - return nil -} - -var quoteBasicTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["closed","delivered","hold","issued","new","posted","rated","rating_failed","rating_ready","reissued","rendered","uncollectable","voided"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - quoteBasicTypeStatusPropEnum = append(quoteBasicTypeStatusPropEnum, v) - } -} - -const ( - - // QuoteBasicStatusClosed captures enum value "closed" - QuoteBasicStatusClosed string = "closed" - - // QuoteBasicStatusDelivered captures enum value "delivered" - QuoteBasicStatusDelivered string = "delivered" - - // QuoteBasicStatusHold captures enum value "hold" - QuoteBasicStatusHold string = "hold" - - // QuoteBasicStatusIssued captures enum value "issued" - QuoteBasicStatusIssued string = "issued" - - // QuoteBasicStatusNew captures enum value "new" - QuoteBasicStatusNew string = "new" - - // QuoteBasicStatusPosted captures enum value "posted" - QuoteBasicStatusPosted string = "posted" - - // QuoteBasicStatusRated captures enum value "rated" - QuoteBasicStatusRated string = "rated" - - // QuoteBasicStatusRatingFailed captures enum value "rating_failed" - QuoteBasicStatusRatingFailed string = "rating_failed" - - // QuoteBasicStatusRatingReady captures enum value "rating_ready" - QuoteBasicStatusRatingReady string = "rating_ready" - - // QuoteBasicStatusReissued captures enum value "reissued" - QuoteBasicStatusReissued string = "reissued" - - // QuoteBasicStatusRendered captures enum value "rendered" - QuoteBasicStatusRendered string = "rendered" - - // QuoteBasicStatusUncollectable captures enum value "uncollectable" - QuoteBasicStatusUncollectable string = "uncollectable" - - // QuoteBasicStatusVoided captures enum value "voided" - QuoteBasicStatusVoided string = "voided" -) - -// prop value enum -func (m *QuoteBasic) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, quoteBasicTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *QuoteBasic) validateStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.Status) { // not required - return nil - } - - // value enum - if err := m.validateStatusEnum("Status", "body", m.Status); err != nil { - return err - } - - return nil -} - func (m *QuoteBasic) validateTaxTransactions(formats strfmt.Registry) error { if swag.IsZero(m.TaxTransactions) { // not required diff --git a/api/ops/ops_models/quote_item.go b/api/ops/ops_models/quote_item.go index 0a6f6cc..3c2ff54 100644 --- a/api/ops/ops_models/quote_item.go +++ b/api/ops/ops_models/quote_item.go @@ -55,7 +55,7 @@ type QuoteItem struct { // Quantity MRCInterval int64 `json:"MRCInterval,omitempty"` - // UUID Reference the master record that owns this item + // Reference the master record that owns this item ParentFK string `json:"ParentFK,omitempty"` // Product Code diff --git a/app/accountingrule-helpers.go b/app/accountingrule-helpers.go index 2886c69..8c7e469 100644 --- a/app/accountingrule-helpers.go +++ b/app/accountingrule-helpers.go @@ -43,7 +43,7 @@ func UnMarshalAccountingRule(s *ledger_models.AccountingRule) *AccountingRule { }, } } -func (obj *AccountingRule) marshalToSwagger() *ledger_models.AccountingRule { +func (obj *AccountingRule) MarshalToSwagger() *ledger_models.AccountingRule { return &ledger_models.AccountingRule{ ID: obj.ID, AcountID: obj.AccountID, diff --git a/app/accountingruleset-helpers.go b/app/accountingruleset-helpers.go index 971343d..1b39160 100644 --- a/app/accountingruleset-helpers.go +++ b/app/accountingruleset-helpers.go @@ -37,7 +37,7 @@ func UnMarshalAccountingRuleset(s *ledger_models.AccountingRuleset) *AccountingR }, } } -func (obj *AccountingRuleset) marshalToSwagger() *ledger_models.AccountingRuleset { +func (obj *AccountingRuleset) MarshalToSwagger() *ledger_models.AccountingRuleset { theItems := []*ledger_models.AccountingRulesetItem{} for _, itm := range obj.Items { theItems = append(theItems, diff --git a/app/applog-helpers.go b/app/applog-helpers.go index 228a9b6..57639aa 100644 --- a/app/applog-helpers.go +++ b/app/applog-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalAppLog(s *workflow_models.AppLog) *AppLog { +func UnMarshalAppLog(s *workflow_models.AppLog) *AppLog { if s.ID == "" { s.ID = uuid.New().String() } @@ -35,7 +35,7 @@ func unMarshalAppLog(s *workflow_models.AppLog) *AppLog { } } -func (obj *AppLog) marshalToSwagger() *workflow_models.AppLog { +func (obj *AppLog) MarshalToSwagger() *workflow_models.AppLog { return &workflow_models.AppLog{ ID: obj.ID, AccountID: obj.AccountID, diff --git a/app/cashreceipt-helpers.go b/app/cashreceipt-helpers.go index a1d9c46..cc3eca2 100644 --- a/app/cashreceipt-helpers.go +++ b/app/cashreceipt-helpers.go @@ -24,6 +24,7 @@ func UnMarshalCashReceipt(s *ops_models.CashReceipt) *CashReceipt { BillingContactID: s.BillingContactID, CashReceiptNumber: s.CashReceiptNumber, CreatedByID: s.CreatedByID, + CustomerID: s.CustomerID, Description: s.Description, Gateway: s.Gateway, GatewayKey: s.GatewayKey, @@ -76,6 +77,7 @@ func (obj *CashReceipt) MarshalToSwagger() *ops_models.CashReceipt { CashReceiptNumber: obj.CashReceiptNumber, CreatedByID: obj.CreatedByID, CreatedDate: obj.CreatedDate.Time.Format(dateTimeFormat), + CustomerID: obj.CustomerID, Description: obj.Description, Gateway: obj.Gateway, GatewayKey: obj.GatewayKey, diff --git a/app/cashreceipt.go b/app/cashreceipt.go index 4389aa5..62cfb20 100644 --- a/app/cashreceipt.go +++ b/app/cashreceipt.go @@ -26,6 +26,7 @@ type CashReceipt struct { CashReceiptNumber string CreatedByID string CreatedDate sql.NullTime + CustomerID string Description string Gateway string GatewayKey string diff --git a/app/country-helpers.go b/app/country-helpers.go index e3bb0df..d137f00 100644 --- a/app/country-helpers.go +++ b/app/country-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalCountry(s *geo_models.Country) *Country { +func UnMarshalCountry(s *geo_models.Country) *Country { if s.ID == "" { s.ID = uuid.New().String() } @@ -16,7 +16,7 @@ func unMarshalCountry(s *geo_models.Country) *Country { lastModfiedDate, e1 := time.Parse(dateTimeFormat, s.LastModifiedDate) theInstances := []*TaxInstance{} for _, itm := range s.TaxInstances { - theInstances = append(theInstances, unMarshalTaxInstance(itm)) + theInstances = append(theInstances, UnMarshalTaxInstance(itm)) } return &Country{ ID: s.ID, @@ -58,10 +58,10 @@ func unMarshalCountry(s *geo_models.Country) *Country { }, } } -func (obj *Country) marshalToSwagger() *geo_models.Country { +func (obj *Country) MarshalToSwagger() *geo_models.Country { taxInstances := []*geo_models.TaxInstance{} for _, itm := range obj.TaxInstances { - taxInstances = append(taxInstances, itm.marshalToSwagger()) + taxInstances = append(taxInstances, itm.MarshalToSwagger()) } return &geo_models.Country{ ID: obj.ID, diff --git a/app/county-helpers.go b/app/county-helpers.go index fc1d93d..e0d303d 100644 --- a/app/county-helpers.go +++ b/app/county-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalCounty(s *geo_models.County) *County { +func UnMarshalCounty(s *geo_models.County) *County { if s.ID == "" { s.ID = uuid.New().String() } @@ -16,7 +16,7 @@ func unMarshalCounty(s *geo_models.County) *County { lastModfiedDate, e1 := time.Parse(dateTimeFormat, s.LastModifiedDate) theInstances := []*TaxInstance{} for _, itm := range s.TaxInstances { - theInstances = append(theInstances, unMarshalTaxInstance(itm)) + theInstances = append(theInstances, UnMarshalTaxInstance(itm)) } return &County{ ID: s.ID, @@ -69,10 +69,10 @@ func unMarshalCounty(s *geo_models.County) *County { }, } } -func (obj *County) marshalToSwagger() *geo_models.County { +func (obj *County) MarshalToSwagger() *geo_models.County { theInstances := []*geo_models.TaxInstance{} for _, itm := range obj.TaxInstances { - theInstances = append(theInstances, itm.marshalToSwagger()) + theInstances = append(theInstances, itm.MarshalToSwagger()) } var salesTaxRate *geo_models.TaxRate if obj.SalesTaxRate != nil { diff --git a/app/domain-helpers.go b/app/domain-helpers.go index 912d294..4f8004f 100644 --- a/app/domain-helpers.go +++ b/app/domain-helpers.go @@ -2,7 +2,7 @@ package app import "code.tnxs.net/taxnexus/lib/api/geo/geo_models" -func unMarshalDomain(swag *geo_models.Domain) *Domain { +func UnMarshalDomain(swag *geo_models.Domain) *Domain { return &Domain{ Description: swag.Description, Active: swag.Active, @@ -10,7 +10,7 @@ func unMarshalDomain(swag *geo_models.Domain) *Domain { Name: swag.Name, } } -func (obj *Domain) marshalToSwagger() *geo_models.Domain { +func (obj *Domain) MarshalToSwagger() *geo_models.Domain { return &geo_models.Domain{ ID: obj.ID, Active: obj.Active, diff --git a/app/eft-helpers.go b/app/eft-helpers.go index e2f47ac..9429a3a 100644 --- a/app/eft-helpers.go +++ b/app/eft-helpers.go @@ -37,6 +37,7 @@ func UnMarshalEft(s *ops_models.Eft) *Eft { Items: items, LastModifiedByID: s.LastModifiedByID, PaymentMethodID: s.PaymentMethodID, + ParentFK: s.ParentFK, Ref: s.Ref, Status: s.Status, TenantID: s.TenantID, @@ -86,6 +87,7 @@ func (obj *Eft) MarshalToSwagger() *ops_models.Eft { LastModifiedByID: obj.LastModifiedByID, LastModifiedDate: obj.LastModifiedDate.Time.Format(dateTimeFormat), PaymentMethodID: obj.PaymentMethodID, + ParentFK: obj.ParentFK, Ref: obj.Ref, Status: obj.Status, TenantID: obj.TenantID, diff --git a/app/eft.go b/app/eft.go index 93a6eee..c660f77 100644 --- a/app/eft.go +++ b/app/eft.go @@ -33,6 +33,7 @@ type Eft struct { JournalDate sql.NullTime LastModifiedByID string LastModifiedDate sql.NullTime + ParentFK string PaymentMethodID string Ref string Status string diff --git a/app/filing-helpers.go b/app/filing-helpers.go index 61fabac..a1d0bf4 100644 --- a/app/filing-helpers.go +++ b/app/filing-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalSwaggerFiling(s *regs_models.Filing) *Filing { +func UnMarshalSwaggerFiling(s *regs_models.Filing) *Filing { if s.ID == "" { s.ID = uuid.New().String() } @@ -80,7 +80,7 @@ func unMarshalSwaggerFiling(s *regs_models.Filing) *Filing { } } -func (obj *Filing) marshalToSwagger() *regs_models.Filing { +func (obj *Filing) MarshalToSwagger() *regs_models.Filing { return ®s_models.Filing{ ID: obj.ID, AccountName: obj.AccountName, diff --git a/app/filingtype-helpers.go b/app/filingtype-helpers.go index e320cde..0a31d3f 100644 --- a/app/filingtype-helpers.go +++ b/app/filingtype-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalFilingType(s *regs_models.FilingType) *FilingType { +func UnMarshalFilingType(s *regs_models.FilingType) *FilingType { if s.ID == "" { s.ID = uuid.New().String() } @@ -78,7 +78,7 @@ func unMarshalFilingType(s *regs_models.FilingType) *FilingType { } } -func (obj *FilingType) marshal() *regs_models.FilingType { +func (obj *FilingType) MarshalToSwagger() *regs_models.FilingType { var instances []*regs_models.FilingTypeInstance if obj.Instances != nil { instances = []*regs_models.FilingTypeInstance{} diff --git a/app/glaccount-helpers.go b/app/glaccount-helpers.go index 81db6d9..c6f9651 100644 --- a/app/glaccount-helpers.go +++ b/app/glaccount-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalGlAccount(s *ledger_models.GlAccount) *GlAccount { +func UnMarshalGlAccount(s *ledger_models.GlAccount) *GlAccount { if s.ID == "" { s.ID = uuid.New().String() } diff --git a/app/glbalance-helpers.go b/app/glbalance-helpers.go index 954d8e7..825422c 100644 --- a/app/glbalance-helpers.go +++ b/app/glbalance-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalGlBalance(s *ledger_models.GlBalance) *GlBalance { +func UnMarshalGlBalance(s *ledger_models.GlBalance) *GlBalance { if s.ID == "" { s.ID = uuid.New().String() } @@ -46,7 +46,7 @@ func unMarshalGlBalance(s *ledger_models.GlBalance) *GlBalance { }, } } -func (obj *GlBalance) marshalToSwagger() *ledger_models.GlBalance { +func (obj *GlBalance) MarshalToSwagger() *ledger_models.GlBalance { return &ledger_models.GlBalance{ ID: obj.ID, AccountName: obj.AccountName, diff --git a/app/ingest-helpers.go b/app/ingest-helpers.go index d2a4a61..0eca634 100644 --- a/app/ingest-helpers.go +++ b/app/ingest-helpers.go @@ -89,7 +89,7 @@ func UnmarshalIngest(s *devops_models.Ingest) *Ingest { } // MarshalToSwagger encodes a first class object to swagger -func (obj *Ingest) marshalToSwagger() *devops_models.Ingest { +func (obj *Ingest) MarshalToSwagger() *devops_models.Ingest { return &devops_models.Ingest{ ID: obj.ID, AccountID: &obj.AccountID, diff --git a/app/invoice-helpers.go b/app/invoice-helpers.go index 6a6766e..a83b084 100644 --- a/app/invoice-helpers.go +++ b/app/invoice-helpers.go @@ -4,7 +4,7 @@ import "code.tnxs.net/taxnexus/lib/api/ops/ops_models" // Invoice unMarshal does validation in the Ops microservice only -func (obj *Invoice) marshalToSwagger() *ops_models.Invoice { //nolint:funlen // big object +func (obj *Invoice) MarshalToSwagger() *ops_models.Invoice { //nolint:funlen // big object var items []*ops_models.InvoiceItem if obj.Items != nil { items = []*ops_models.InvoiceItem{} diff --git a/app/lead-helpers.go b/app/lead-helpers.go index c01ce48..ccc0303 100644 --- a/app/lead-helpers.go +++ b/app/lead-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalLead(s *crm_models.Lead) *Lead { +func UnMarshalLead(s *crm_models.Lead) *Lead { if s.ID == "" { s.ID = uuid.New().String() } diff --git a/app/order-helpers.go b/app/order-helpers.go index cc744b9..2fd2981 100644 --- a/app/order-helpers.go +++ b/app/order-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalOrder(s *ops_models.Order) *Order { //nolint:funlen // big object +func UnMarshalOrder(s *ops_models.Order) *Order { //nolint:funlen // big object if s.ID == "" { s.ID = uuid.New().String() } @@ -16,7 +16,7 @@ func unMarshalOrder(s *ops_models.Order) *Order { //nolint:funlen // big object if s.Items != nil { items = make([]*OrderItem, 5) for _, itm := range s.Items { - items = append(items, unMarshalOrderItem(itm)) + items = append(items, UnMarshalOrderItem(itm)) } } createdDate, e0 := time.Parse(dateTimeFormat, s.CreatedDate) diff --git a/app/orderitem-helpers.go b/app/orderitem-helpers.go index 61b1fdd..ddf070a 100644 --- a/app/orderitem-helpers.go +++ b/app/orderitem-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalOrderItem(s *ops_models.OrderItem) *OrderItem { +func UnMarshalOrderItem(s *ops_models.OrderItem) *OrderItem { if s.ID == "" { s.ID = uuid.New().String() } diff --git a/app/outgoingemail-helpers.go b/app/outgoingemail-helpers.go index b24eaef..8880f35 100644 --- a/app/outgoingemail-helpers.go +++ b/app/outgoingemail-helpers.go @@ -2,7 +2,7 @@ package app import "code.tnxs.net/taxnexus/lib/api/workflow/workflow_models" -func unMarshalSwaggerOutgoingEmailMessage(s *workflow_models.OutgoingEmailMessage) *OutgoingEmailMessage { +func UnMarshalSwaggerOutgoingEmailMessage(s *workflow_models.OutgoingEmailMessage) *OutgoingEmailMessage { return &OutgoingEmailMessage{ ID: s.ID, BCCAddress: s.BCCAddress, diff --git a/app/outgoingemailreceipt-helpers.go b/app/outgoingemailreceipt-helpers.go index 4b43c3a..7ea1e36 100644 --- a/app/outgoingemailreceipt-helpers.go +++ b/app/outgoingemailreceipt-helpers.go @@ -2,7 +2,7 @@ package app import "code.tnxs.net/taxnexus/lib/api/workflow/workflow_models" -func (obj *OutgoingEmailMessageReceipt) marshalToSwagger() *workflow_models.EmailMessage { +func (obj *OutgoingEmailMessageReceipt) MarshalToSwagger() *workflow_models.EmailMessage { return &workflow_models.EmailMessage{ ID: obj.ID, EmailMessageID: obj.EmailMessageID, diff --git a/app/paymentmethod-helpers.go b/app/paymentmethod-helpers.go index 45ea687..5dc007d 100644 --- a/app/paymentmethod-helpers.go +++ b/app/paymentmethod-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalPaymentMethod(s *ops_models.PaymentMethod) *PaymentMethod { +func UnMarshalPaymentMethod(s *ops_models.PaymentMethod) *PaymentMethod { if s.ID == "" { s.ID = uuid.New().String() } diff --git a/app/pdf-helpers.go b/app/pdf-helpers.go index d533652..f778e81 100644 --- a/app/pdf-helpers.go +++ b/app/pdf-helpers.go @@ -13,7 +13,7 @@ func (obj *PDF) MarshalToDocument() *stash_models.Document { } } -func unMarshalNewPDF(swag *stash_models.NewPDF) *PDF { +func UnMarshalNewPDF(swag *stash_models.NewPDF) *PDF { return &PDF{ Description: swag.Description, Filename: swag.Filename, diff --git a/app/period-helpers.go b/app/period-helpers.go index cda632d..5f759af 100644 --- a/app/period-helpers.go +++ b/app/period-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalPeriod(s *ledger_models.Period) *Period { +func UnMarshalPeriod(s *ledger_models.Period) *Period { if s.ID == "" { s.ID = uuid.New().String() } @@ -51,7 +51,7 @@ func unMarshalPeriod(s *ledger_models.Period) *Period { }, } } -func (obj *Period) marshalToSwagger() *ledger_models.Period { +func (obj *Period) MarshalToSwagger() *ledger_models.Period { return &ledger_models.Period{ ID: obj.ID, AccountID: obj.AccountID, diff --git a/app/place-helpers.go b/app/place-helpers.go index 49262d8..c8974fb 100644 --- a/app/place-helpers.go +++ b/app/place-helpers.go @@ -16,7 +16,7 @@ func UnMarshalPlace(s *geo_models.Place) *Place { lastModfiedDate, e1 := time.Parse(dateTimeFormat, s.LastModifiedDate) theInstances := []*TaxInstance{} for _, itm := range s.TaxInstances { - theInstances = append(theInstances, unMarshalTaxInstance(itm)) + theInstances = append(theInstances, UnMarshalTaxInstance(itm)) } return &Place{ ID: s.ID, @@ -79,7 +79,7 @@ func (obj *Place) MarshalToSwagger() *geo_models.Place { } taxInstances := []*geo_models.TaxInstance{} for _, itm := range obj.TaxInstances { - taxInstances = append(taxInstances, itm.marshalToSwagger()) + taxInstances = append(taxInstances, itm.MarshalToSwagger()) } var salesTaxRate *geo_models.TaxRate if obj.SalesTaxRate != nil { diff --git a/app/po-helpers.go b/app/po-helpers.go index cd61c94..7789a92 100644 --- a/app/po-helpers.go +++ b/app/po-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalPurchaseOrder(s *ops_models.PurchaseOrder) (*PurchaseOrder, error) { //nolint:funlen // big object +func UnMarshalPurchaseOrder(s *ops_models.PurchaseOrder) (*PurchaseOrder, error) { //nolint:funlen // big object if s.ID == "" { s.ID = uuid.New().String() } @@ -120,7 +120,7 @@ func unMarshalPurchaseOrder(s *ops_models.PurchaseOrder) (*PurchaseOrder, error) }, }, nil } -func (obj *PurchaseOrder) marshalToSwagger() *ops_models.PurchaseOrder { +func (obj *PurchaseOrder) MarshalToSwagger() *ops_models.PurchaseOrder { var items []*ops_models.PurchaseOrderItem if obj.Items != nil { items = []*ops_models.PurchaseOrderItem{} diff --git a/app/quote-helpers.go b/app/quote-helpers.go index cf6e59b..70465c4 100644 --- a/app/quote-helpers.go +++ b/app/quote-helpers.go @@ -1,10 +1,8 @@ package app -import ( - "code.tnxs.net/taxnexus/lib/api/ops/ops_models" -) +import "code.tnxs.net/taxnexus/lib/api/ops/ops_models" -func (obj *Quote) marshalToSwagger() *ops_models.Quote { +func (obj *Quote) MarshalToSwagger() *ops_models.Quote { var items []*ops_models.QuoteItem if obj.Items != nil { items = []*ops_models.QuoteItem{} diff --git a/app/state-helpers.go b/app/state-helpers.go index 3e4700f..44ea4e0 100644 --- a/app/state-helpers.go +++ b/app/state-helpers.go @@ -12,7 +12,7 @@ func UnMarshalSwaggerState(s *geo_models.State) *State { lastModfiedDate, e1 := time.Parse(dateTimeFormat, s.LastModifiedDate) theInstances := []*TaxInstance{} for _, itm := range s.TaxInstances { - theInstances = append(theInstances, unMarshalTaxInstance(itm)) + theInstances = append(theInstances, UnMarshalTaxInstance(itm)) } return &State{ ID: s.ID, @@ -68,7 +68,7 @@ func UnMarshalSwaggerState(s *geo_models.State) *State { func (obj *State) MarshalToSwagger() *geo_models.State { taxInstances := []*geo_models.TaxInstance{} for _, itm := range obj.TaxInstances { - taxInstances = append(taxInstances, itm.marshalToSwagger()) + taxInstances = append(taxInstances, itm.MarshalToSwagger()) } return &geo_models.State{ ID: obj.ID, diff --git a/app/submission-helpers.go b/app/submission-helpers.go index e7ada90..064ce47 100644 --- a/app/submission-helpers.go +++ b/app/submission-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalSubmission(s *regs_models.Submission) *Submission { +func UnMarshalSubmission(s *regs_models.Submission) *Submission { if s.ID == "" { s.ID = uuid.New().String() } @@ -57,7 +57,7 @@ func unMarshalSubmission(s *regs_models.Submission) *Submission { } } -func (obj *Submission) marshalToSwagger() *regs_models.Submission { +func (obj *Submission) MarshalToSwagger() *regs_models.Submission { return ®s_models.Submission{ ID: obj.ID, CompanyID: obj.CompanyID, diff --git a/app/taxinstance-helpers.go b/app/taxinstance-helpers.go index 6916727..13260c0 100644 --- a/app/taxinstance-helpers.go +++ b/app/taxinstance-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalTaxInstance(s *geo_models.TaxInstance) *TaxInstance { +func UnMarshalTaxInstance(s *geo_models.TaxInstance) *TaxInstance { if s.ID == "" { s.ID = uuid.New().String() } @@ -34,7 +34,7 @@ func unMarshalTaxInstance(s *geo_models.TaxInstance) *TaxInstance { }, } } -func (obj *TaxInstance) marshalToSwagger() *geo_models.TaxInstance { +func (obj *TaxInstance) MarshalToSwagger() *geo_models.TaxInstance { return &geo_models.TaxInstance{ ID: obj.ID, CountryID: obj.CountryID, diff --git a/app/taxnexuscode-helpers.go b/app/taxnexuscode-helpers.go index 1447a8d..c3b7d47 100644 --- a/app/taxnexuscode-helpers.go +++ b/app/taxnexuscode-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalTaxnexusCode(s *geo_models.TaxnexusCode) *TaxnexusCode { +func UnMarshalTaxnexusCode(s *geo_models.TaxnexusCode) *TaxnexusCode { if s.ID == "" { s.ID = uuid.New().String() } @@ -45,7 +45,7 @@ func unMarshalTaxnexusCode(s *geo_models.TaxnexusCode) *TaxnexusCode { }, } } -func (obj *TaxnexusCode) marshalToSwagger() *geo_models.TaxnexusCode { +func (obj *TaxnexusCode) MarshalToSwagger() *geo_models.TaxnexusCode { swag := geo_models.TaxnexusCode{ ID: obj.ID, Active: obj.Active, diff --git a/app/taxtypeaccount-helpers.go b/app/taxtypeaccount-helpers.go index a010ba5..20d3a50 100644 --- a/app/taxtypeaccount-helpers.go +++ b/app/taxtypeaccount-helpers.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" ) -func unMarshalTaxTypeAccount(s *regs_models.TaxTypeAccount) *TaxTypeAccount { +func UnMarshalTaxTypeAccount(s *regs_models.TaxTypeAccount) *TaxTypeAccount { if s.ID == "" { s.ID = uuid.New().String() } @@ -64,7 +64,7 @@ func unMarshalTaxTypeAccount(s *regs_models.TaxTypeAccount) *TaxTypeAccount { }, } } -func (obj *TaxTypeAccount) marshalToSwagger() *regs_models.TaxTypeAccount { +func (obj *TaxTypeAccount) MarshalToSwagger() *regs_models.TaxTypeAccount { return ®s_models.TaxTypeAccount{ ID: obj.ID, AccountID: obj.AccountID, diff --git a/swagger/ops-taxnexus.yaml b/swagger/ops-taxnexus.yaml index 3ab6ffb..4910bbd 100644 --- a/swagger/ops-taxnexus.yaml +++ b/swagger/ops-taxnexus.yaml @@ -1592,6 +1592,9 @@ definitions: CashReceiptNumber: description: Journal Date type: string + CustomerID: + description: Account CustomerID, if any + type: string CreatedByID: description: Created By User ID type: string @@ -1826,8 +1829,7 @@ definitions: description: Contract Name type: string ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string PaymentTerms: description: Payment Terms @@ -1984,9 +1986,6 @@ definitions: TransactionID: description: Transaction ID type: string - UUID: - description: UUID - type: string type: object EftItem: description: An invoice reference that is batched in a single Eft @@ -2243,8 +2242,7 @@ definitions: format: double type: number ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string PartnerAccountID: description: Partner Account @@ -2440,8 +2438,7 @@ definitions: description: ID of the Job which created this Invoice type: string ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string PeriodID: description: Taxnexus Period ID @@ -2523,8 +2520,7 @@ definitions: description: Order Item type: string ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string ProductCode: description: Product Code @@ -2613,8 +2609,7 @@ definitions: format: int64 type: number ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string ProductCode: description: Product Code @@ -2824,8 +2819,7 @@ definitions: description: PO Date type: string ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string PaymentMethodID: description: Payment Method ID @@ -2984,8 +2978,7 @@ definitions: description: Original Order Product type: string ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string Posted: description: Posted to external system? @@ -3898,8 +3891,7 @@ definitions: description: Period ID type: string ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string PaymentTerms: description: Payment Terms @@ -4040,8 +4032,7 @@ definitions: description: ID of the Job which created this Invoice type: string ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string PeriodID: description: Taxnexus Period ID @@ -4061,16 +4052,6 @@ definitions: type: string SalesRegulation: description: Sales Regulation Type - enum: - - AdultUse - - Caregiver - - Consumer - - Medicinal - - MedicinalState - - MedicinalThirdParty - - Merchandise - - Patient - - Telecom type: string ShippingHandling: description: Shipping and Handling fees for this document @@ -4079,20 +4060,6 @@ definitions: description: Status used by for Billing Balances; ignored in tax calculation - enum: - - closed - - delivered - - hold - - issued - - new - - posted - - rated - - rating_failed - - rating_ready - - reissued - - rendered - - uncollectable - - voided type: string Subtotal: description: Subtotal of items @@ -4156,8 +4123,7 @@ definitions: format: int64 type: number ParentFK: - description: - UUID Reference the master record that owns this item + description: Reference the master record that owns this item type: string ProductCode: description: Product Code