lib/app/taxtransaction-helpers.go

59 lines
2.1 KiB
Go
Raw Normal View History

2021-01-14 06:36:35 +00:00
package app
import (
"code.tnxs.net/taxnexus/lib/api/ops/ops_models"
)
// TaxTransaction is not ingested, hence no UnMarshalTaxTransaction
func (obj *TaxTransaction) MarshalToSwagger() *ops_models.TaxTransaction {
return &ops_models.TaxTransaction{
ID: obj.ID,
AccountID: obj.AccountID,
AccountingRuleCode: obj.AccountingRuleCode,
Amount: obj.Amount,
CoordinateID: obj.CoordinateID,
CreatedByID: obj.CreatedByID,
CreatedDate: obj.CreatedDate.Time.Format(dateTimeFormat),
CustomerID: obj.CustomerID,
DisplayName: obj.DisplayName,
EffectiveRate: obj.EffectiveRate,
FilingID: obj.FilingID,
IngestID: obj.IngestID,
InvoiceID: obj.InvoiceID,
InvoiceItemID: obj.InvoiceItemID,
IsSummary: obj.IsSummary,
JobID: obj.JobID,
JournalItemID: obj.JournalItemID,
LastModifiedByID: obj.LastModifiedByID,
LastModifiedDate: obj.LastModifiedDate.Time.Format(dateTimeFormat),
OrderID: obj.OrderID,
OrderItemID: obj.OrderItemID,
ParentRef: obj.ParentRef,
PercentTaxable: obj.PercentTaxable,
PeriodID: obj.PeriodID,
PlaceGeocode: obj.PlaceGeoCode,
PlaceID: obj.PlaceID,
POID: obj.PoID,
POItemID: obj.PoItemID,
Posted: obj.Posted,
QuoteID: obj.QuoteID,
QuoteItemID: obj.QuoteItemID,
RatingType: obj.RatingType,
Ref: obj.Ref,
RevenueBase: obj.RevenueBase,
RevenueNet: obj.RevenueNet,
RevenueNotTaxable: obj.RevenueNotTaxable,
TaxExemptRevenue: obj.TaxexemptRevenue,
TaxnexusCodeDisplay: obj.TaxnexusCodeDisplay,
TaxnexusCodeID: obj.TaxnexusCodeID,
TaxOnTax: obj.TaxOnTax,
TaxRate: obj.TaxRate,
TaxTypeAccountID: obj.TaxTypeAccountID,
TaxTypeID: obj.TaxTypeID,
TenantID: obj.TenantID,
UnitBase: obj.UnitBase,
UnitFeeRate: obj.UnitFeeRate,
}
}