internal

package
v0.0.0-...-a815835 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TZ_AR, _ = time.LoadLocation("America/Argentina/Buenos_Aires")

	WSDLS = map[string]map[string]string{
		"production": {
			"wsaa":                         "https://wsaa.afip.gov.ar/ws/services/LoginCms?wsdl",
			"wsfe":                         "https://servicios1.afip.gov.ar/wsfev1/service.asmx?WSDL",
			"ws_sr_constancia_inscripcion": "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA5?WSDL",
			"ws_sr_padron_a13":             "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA13?WSDL",
		},
		"sandbox": {
			"wsaa":                         "https://wsaahomo.afip.gov.ar/ws/services/LoginCms?wsdl",
			"wsfe":                         "https://wswhomo.afip.gov.ar/wsfev1/service.asmx?WSDL",
			"ws_sr_constancia_inscripcion": "https://awshomo.afip.gov.ar/sr-padron/webservices/personaServiceA5?WSDL",
			"ws_sr_padron_a13":             "https://awshomo.afip.gov.ar/sr-padron/webservices/personaServiceA13?WSDL",
		},
	}
)
View Source
var ClientVATConditions = []string{
	"IVA Responsable Inscripto",
	"IVA Responsable No Inscripto",
	"IVA Sujeto Exento",
	"Consumidor Final",
	"Responsable Monotributo",
	"Proveedor del Exterior",
	"Cliente del Exterior",
	"IVA Liberado - Ley Nº 19.640",
	"IVA Responsable Inscripto - Agente de Percepción",
	"Monotributista Social",
	"IVA no alcanzado",
}
View Source
var VATConditions = []string{
	"IVA Responsable Inscripto",
	"IVA Responsable No Inscripto",
	"IVA Exento",
	"No Responsable IVA",
	"Responsable Monotributo",
}

Functions

func CheckResponse

func CheckResponse(response map[string]interface{}) error

func CreateCSR

func CreateCSR(
	keyFile *os.File,
	organizationName, commonName, serialNumber string,
	outFile *os.File,
) error

func CreateEmbeddedPKCS7Signature

func CreateEmbeddedPKCS7Signature(data []byte, certPEM []byte, keyPEM []byte) ([]byte, error)

func CreateKey

func CreateKey(file *os.File) error

func GenerateKey

func GenerateKey()

func GetClient

func GetClient(serviceName string, sandbox bool) (*http.Client, error)

func InitDb

func InitDb()

func LoadMetadata

func LoadMetadata(db *gorm.DB)

Types

type AFIPAdapter

type AFIPAdapter struct {
	// contains filtered or unexported fields
}

func NewAFIPAdapter

func NewAFIPAdapter() *AFIPAdapter

type GenericAfipType

type GenericAfipType struct {
	ID          uint      `gorm:"primaryKey"`
	Code        string    `gorm:"size:3;not null;unique"`
	Description string    `gorm:"size:250;not null"`
	ValidFrom   time.Time `gorm:"type:date"`
	ValidTo     time.Time `gorm:"type:date"`
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func (GenericAfipType) NaturalKey

func (t GenericAfipType) NaturalKey() string

func (GenericAfipType) String

func (t GenericAfipType) String() string

func (GenericAfipType) TableName

func (GenericAfipType) TableName() string

type Transport

type Transport struct {
	// contains filtered or unexported fields
}

func GetOrCreateTransport

func GetOrCreateTransport() *Transport

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳