utils

package
v0.0.0-...-a0b5d22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnknownReturnType is given when has unknown return type
	ErrUnknownReturnType = errors.New("has unknown return type")
	// ErrUnknownReturnType is given when failed to create tax return
	ErrFailedCreateTaxReturn = errors.New("failed to create tax return")
	// ErrEmptyXML is given when hasn't xml document
	ErrEmptyXML = errors.New("hasn't xml document")
)
View Source
var (
	IRS990          = "990"
	IRS990ScheduleA = "990ScheduleA"
	IRS990ScheduleB = "990ScheduleB"
	IRS990ScheduleC = "990ScheduleC"
	IRS990ScheduleD = "990ScheduleD"
	IRS990ScheduleE = "990ScheduleE"
	IRS990ScheduleF = "990ScheduleF"
	IRS990ScheduleG = "990ScheduleG"
	IRS990ScheduleH = "990ScheduleH"
	IRS990ScheduleI = "990ScheduleI"
	IRS990ScheduleJ = "990ScheduleJ"
	IRS990ScheduleK = "990ScheduleK"
	IRS990ScheduleL = "990ScheduleL"
	IRS990ScheduleM = "990ScheduleM"
	IRS990ScheduleN = "990ScheduleN"
	IRS990ScheduleO = "990ScheduleO"
	IRS990ScheduleR = "990ScheduleR"
)
View Source
var (
	IRS990ReturnTypeCode    = "990"
	DefaultValidateFunction = "Validate"
	IsValidateFunction      = "IsValid"
)

Functions

func FormatXML

func FormatXML(data []byte) ([]byte, error)

func Validate

func Validate(r interface{}) error

to validate interface

Types

type IrsReturnFile

type IrsReturnFile interface {
	Validate() error
	ZipData() ([]byte, error)
	Version() string
}

interface for return

type IrsTransmissionFile

type IrsTransmissionFile interface {
	Validate() error
	SOAPEnvelope() ([]byte, error)
	SOAPAttachment() ([]byte, error)
	Version() string
}

interface for irs e-file

type ManifestXml

type ManifestXml interface {
	Validate() error
	XmlData() ([]byte, error)
	SubmissionIdentifier() SubmissionIdType
	SetSubmissionIdentifier(id SubmissionIdType)
}

interface for manifest

type Return

type Return interface {
	Parse([]byte) error
	InspectData() *ReturnInspectInfo
	ReturnVersion() string
	ReturnYear() int
	ReturnType() string
}

General return data interface

type ReturnInspectData

type ReturnInspectData struct {
	Data     interface{}
	DataType string
}

type ReturnInspectInfo

type ReturnInspectInfo struct {
	Header interface{}
	Data   []ReturnInspectData
}

type SubmissionIdType

type SubmissionIdType string

Must match the pattern [0-9]{13}[a-z0-9]{7}

func (SubmissionIdType) Validate

func (r SubmissionIdType) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL