afip

package
v0.0.0-...-7430e72 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const URLWSAAProduction string = "https://wsaa.afip.gov.ar/ws/services/LoginCms?WSDL"

URLWSAAProduction ... wsdl de wsaa en ambiente de producción de afip

View Source
const URLWSAATesting string = "https://wsaahomo.afip.gov.ar/ws/services/LoginCms?WSDL"

URLWSAATesting ... wsdl de wsaa en ambiente de homolagación de afip

Variables

This section is empty.

Functions

This section is empty.

Types

type Afip

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

Afip es la estructura global del paquete

func Create

func Create(ambiente Ambiente) *Afip

Create crea un objeto cliente para acceder a los servicios web de afip

func (*Afip) GetLoginTicket

func (c *Afip) GetLoginTicket(serviceName string) (token string, sign string, expiration string, err error)

GetLoginTicket devuelve el ticket de acceso afip correspondiente al servicio pasado por parámetro.

func (*Afip) SetFileP12

func (c *Afip) SetFileP12(p12, password string) error

SetFileP12 especifica el archivo .p12 que se utilizará para extraer el certificado y clave privada

type Ambiente

type Ambiente int

Ambiente es un tipo de dato

const (
	TESTING Ambiente = iota
	PRODUCTION
)

Constantes de ambiente

type AnyType

type AnyType struct {
	InnerXML string `xml:",innerxml"`
}

AnyType es una estructura común a todos los paquetes generados por gowsdl

type AnyURI

type AnyURI string

AnyURI es una variable común a todos los paquetes generados por gowsdl

type Credentials

type Credentials struct {
	Token string `xml:"token,omitempty"`
	Sign  string `xml:"sign,omitempty"`
}

Credentials es la estructura que devuelve el response con la info principal

type Fault

type Fault LoginFault

type HeaderLoginTicket

type HeaderLoginTicket struct {
	Source         string `xml:"source,omitempty"`
	Destination    string `xml:"destination,omitempty"`
	UniqueID       uint32 `xml:"uniqueId,omitempty"`
	GenerationTime string `xml:"generationTime,omitempty"`
	ExpirationTime string `xml:"expirationTime,omitempty"`
}

HeaderLoginTicket es la cabecera de la estructura de request y response

type LoginCMS

type LoginCMS interface {
	LoginCms(request *LoginCms) (*LoginCmsResponse, error)

	LoginCmsContext(ctx context.Context, request *LoginCms) (*LoginCmsResponse, error)
}

func NewLoginCMS

func NewLoginCMS(client *soap.Client) LoginCMS

type LoginCms

type LoginCms struct {
	XMLName xml.Name `xml:"http://wsaa.view.sua.dvadac.desein.afip.gov loginCms"`

	In0 string `xml:"in0,omitempty" json:"in0,omitempty"`
}

type LoginCmsResponse

type LoginCmsResponse struct {
	XMLName xml.Name `xml:"http://wsaa.view.sua.dvadac.desein.afip.gov loginCmsResponse"`

	LoginCmsReturn string `xml:"loginCmsReturn,omitempty" json:"loginCmsReturn,omitempty"`
}

type LoginFault

type LoginFault struct {
	XMLName xml.Name `xml:"https://wsaahomo.afip.gov.ar/ws/services/LoginCms fault"`
}

type LoginTicket

type LoginTicket struct {
	ServiceName    string
	Token          string
	Sign           string
	ExpirationTime time.Time
}

LoginTicket es una estructura que representa un ticket de un servicio de afip

type LoginTicketRequest

type LoginTicketRequest struct {
	XMLName xml.Name           `xml:"loginTicketRequest"`
	Version string             `xml:"version,attr"`
	Header  *HeaderLoginTicket `xml:"header,omitempty"`
	Service string             `xml:"service,omitempty"`
}

LoginTicketRequest es la estructura general del request

type LoginTicketResponse

type LoginTicketResponse struct {
	XMLName     xml.Name           `xml:"loginTicketResponse"`
	Header      *HeaderLoginTicket `xml:"header,omitempty"`
	Credentials *Credentials       `xml:"credentials,omitempty"`
}

LoginTicketResponse ...

type NCName

type NCName string

NCName es una variable común a todos los paquetes generados por gowsdl

Jump to

Keyboard shortcuts

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