soapreverse

package
v0.0.0-...-6e0beb4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcompanharPedidoPorData

type AcompanharPedidoPorData struct {
	XMLName xml.Name `xml:"ns1:acompanharPedidoPorData"`

	CodAdministrativo string `xml:"codAdministrativo,omitempty"`
	TipoSolicitacao   string `xml:"tipoSolicitacao,omitempty"`
	Data              string `xml:"data,omitempty"`
}

AcompanharPedidoPorData struct

type AcompanharPedidoPorDataResponse

type AcompanharPedidoPorDataResponse struct {
	XMLName xml.Name `xml:"acompanharPedidoPorDataResponse"`

	AcompanharPedidoPorData *RetornoAcompanhamento `xml:"acompanharPedidoPorData,omitempty"`
}

AcompanharPedidoPorDataResponse struct

type BasicAuth

type BasicAuth struct {
	Login    string
	Password string
}

BasicAuth struct

type CancelarPedido

type CancelarPedido struct {
	XMLName xml.Name `xml:"ns1:cancelarPedido"`

	CodAdministrativo string `xml:"codAdministrativo,omitempty"`
	NumeroPedido      string `xml:"numeroPedido,omitempty"`
	Tipo              string `xml:"tipo,omitempty"`
}

CancelarPedido struct

type CancelarPedidoResponse

type CancelarPedidoResponse struct {
	XMLName        xml.Name             `xml:"cancelarPedidoResponse"`
	CancelarPedido *RetornoCancelamento `xml:"cancelarPedido,omitempty"`
}

CancelarPedidoResponse struct

type Coleta

type Coleta struct {
	Tipo           string     `xml:"tipo,omitempty"`
	Idcliente      string     `xml:"id_cliente,omitempty"`
	Valordeclarado string     `xml:"valor_declarado,omitempty"`
	Descricao      string     `xml:"descricao,omitempty"`
	Cklist         string     `xml:"cklist,omitempty"`
	Documento      []string   `xml:"documento,omitempty"`
	Remetente      *Remetente `xml:"remetente,omitempty"`
	Produto        []*Produto `xml:"produto,omitempty"`
}

Coleta struct

type ColetaReversa

type ColetaReversa struct {
	*Coleta

	Numero           int       `xml:"numero,omitempty"`
	Ag               string    `xml:"ag,omitempty"`
	Cartao           string    `xml:"cartao,omitempty"`
	Servicoadicional string    `xml:"servico_adicional,omitempty"`
	Ar               int       `xml:"ar,omitempty"`
	Objcol           []*Objeto `xml:"obj_col,omitempty"`
}

ColetaReversa struct

type ColetasSolicitadas

type ColetasSolicitadas struct {
	Numeropedido    int                `xml:"numero_pedido,omitempty"`
	Controlecliente string             `xml:"controle_cliente,omitempty"`
	Historico       []*HistoricoColeta `xml:"historico,omitempty"`
	Objeto          []*ObjetoPostal    `xml:"objeto,omitempty"`
}

ColetasSolicitadas struct

type HistoricoColeta

type HistoricoColeta struct {
	Status          int    `xml:"status,omitempty"`
	Descricaostatus string `xml:"descricao_status,omitempty"`
	Dataatualizacao string `xml:"data_atualizacao,omitempty"`
	Horaatualizacao string `xml:"hora_atualizacao,omitempty"`
	Observacao      string `xml:"observacao,omitempty"`
}

HistoricoColeta struct

type LogisticaReversaWS

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

LogisticaReversaWS struct

func NewLogisticaReversaWS

func NewLogisticaReversaWS(url string, tls bool, auth *BasicAuth) *LogisticaReversaWS

NewLogisticaReversaWS creates a new struct with the given information

func (*LogisticaReversaWS) AcompanharPedidoPorData

func (service *LogisticaReversaWS) AcompanharPedidoPorData(request *AcompanharPedidoPorData) (*AcompanharPedidoPorDataResponse, error)

AcompanharPedidoPorData checks the status of the reverese postage requests in Correios Error can be either of the following types:

  • ComponenteException

func (*LogisticaReversaWS) CancelarPedido

func (service *LogisticaReversaWS) CancelarPedido(request *CancelarPedido) (*CancelarPedidoResponse, error)

CancelarPedido cancels a request in Correios Error can be either of the following types:

  • ComponenteException

func (*LogisticaReversaWS) SolicitarPostagemReversa

func (service *LogisticaReversaWS) SolicitarPostagemReversa(request *SolicitarPostagemReversa) (*SolicitarPostagemReversaResponse, error)

SolicitarPostagemReversa Request a reverse postage to correios Error can be either of the following types:

  • ComponenteException

type Objeto

type Objeto struct {
	Item    string `xml:"item,omitempty"`
	Desc    string `xml:"desc,omitempty"`
	Entrega string `xml:"entrega,omitempty"`
	Num     string `xml:"num,omitempty"`
	ID      string `xml:"id,omitempty"`
}

Objeto struct

type ObjetoPostal

type ObjetoPostal struct {
	Numeroetiqueta        string `xml:"numero_etiqueta,omitempty"`
	Controleobjetocliente string `xml:"controle_objeto_cliente,omitempty"`
	Ultimostatus          string `xml:"ultimo_status,omitempty"`
	Descricaostatus       string `xml:"descricao_status,omitempty"`
	Dataultimaatualizacao string `xml:"data_ultima_atualizacao,omitempty"`
	Horaultimaatualizacao string `xml:"hora_ultima_atualizacao,omitempty"`
	Pesocubico            string `xml:"peso_cubico,omitempty"`
	Pesoreal              string `xml:"peso_real,omitempty"`
	Valorpostagem         string `xml:"valor_postagem,omitempty"`
}

ObjetoPostal struct

type ObjetoSimplificado

type ObjetoSimplificado struct {
	Numeropedido         int    `xml:"numero_pedido,omitempty"`
	Statuspedido         string `xml:"status_pedido,omitempty"`
	Datahoracancelamento string `xml:"datahora_cancelamento,omitempty"`
}

ObjetoSimplificado struct

type Pessoa

type Pessoa struct {
	Nome        string `xml:"nome,omitempty"`
	Logradouro  string `xml:"logradouro,omitempty"`
	Numero      string `xml:"numero,omitempty"`
	Complemento string `xml:"complemento,omitempty"`
	Bairro      string `xml:"bairro,omitempty"`
	Referencia  string `xml:"referencia,omitempty"`
	Cidade      string `xml:"cidade,omitempty"`
	Uf          string `xml:"uf,omitempty"`
	Cep         string `xml:"cep,omitempty"`
	Ddd         string `xml:"ddd,omitempty"`
	Telefone    string `xml:"telefone,omitempty"`
	Email       string `xml:"email,omitempty"`
}

Pessoa struct

type Produto

type Produto struct {
	Codigo string `xml:"codigo,omitempty"`
	Tipo   string `xml:"tipo,omitempty"`
	Qtd    string `xml:"qtd,omitempty"`
}

Produto struct

type Remetente

type Remetente struct {
	*Pessoa
	Identificacao string `xml:"identificacao,omitempty"`
	Dddcelular    string `xml:"ddd_celular,omitempty"`
	Celular       string `xml:"celular,omitempty"`
	Sms           string `xml:"sms,omitempty"`
}

Remetente struct

type ResultadoSolicitacao

type ResultadoSolicitacao struct {
	Tipo            string `xml:"tipo,omitempty"`
	Idcliente       string `xml:"id_cliente,omitempty"`
	Numerocoleta    string `xml:"numero_coleta,omitempty"`
	Numeroetiqueta  string `xml:"numero_etiqueta,omitempty"`
	Idobj           string `xml:"id_obj,omitempty"`
	Statusobjeto    string `xml:"status_objeto,omitempty"`
	Prazo           string `xml:"prazo,omitempty"`
	Datasolicitacao string `xml:"data_solicitacao,omitempty"`
	Horasolicitacao string `xml:"hora_solicitacao,omitempty"`
	Codigoerro      int    `xml:"codigo_erro,omitempty"`
	Descricaoerro   string `xml:"descricao_erro,omitempty"`
}

ResultadoSolicitacao struct

type RetornoAcompanhamento

type RetornoAcompanhamento struct {
	Codigoadministrativo string                `xml:"codigo_administrativo,omitempty"`
	Tiposolicitacao      string                `xml:"tipo_solicitacao,omitempty"`
	Coleta               []*ColetasSolicitadas `xml:"coleta,omitempty"`
	Data                 string                `xml:"data,omitempty"`
	Hora                 string                `xml:"hora,omitempty"`
	Coderro              string                `xml:"cod_erro,omitempty"`
	Msgerro              string                `xml:"msg_erro,omitempty"`
}

RetornoAcompanhamento struct

type RetornoCancelamento

type RetornoCancelamento struct {
	Codigoadministrativo string              `xml:"codigo_administrativo,omitempty"`
	Objetopostal         *ObjetoSimplificado `xml:"objeto_postal,omitempty"`
	Data                 string              `xml:"data,omitempty"`
	Hora                 string              `xml:"hora,omitempty"`
	Coderro              string              `xml:"cod_erro,omitempty"`
	Msgerro              string              `xml:"msg_erro,omitempty"`
}

RetornoCancelamento struct

type RetornoPostagem

type RetornoPostagem struct {
	Statusprocessamento  string                  `xml:"status_processamento,omitempty"`
	Dataprocessamento    string                  `xml:"data_processamento,omitempty"`
	Horaprocessamento    string                  `xml:"hora_processamento,omitempty"`
	Coderro              string                  `xml:"cod_erro,omitempty"`
	Msgerro              string                  `xml:"msg_erro,omitempty"`
	Resultadosolicitacao []*ResultadoSolicitacao `xml:"resultado_solicitacao,omitempty"`
}

RetornoPostagem struct

type SOAPBody

type SOAPBody struct {
	XMLName xml.Name    `xml:"soap:Body"`
	Fault   *SOAPFault  `xml:",omitempty"`
	Content interface{} `xml:",omitempty"`
}

SOAPBody struct

type SOAPBodyResponse

type SOAPBodyResponse struct {
	XMLName xml.Name           `xml:"Body"`
	Fault   *SOAPFaultResponse `xml:",omitempty"`
	Content interface{}        `xml:",omitempty"`
}

SOAPBodyResponse struct

func (*SOAPBodyResponse) UnmarshalXML

func (b *SOAPBodyResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML unmarshal the XML struct

type SOAPClient

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

SOAPClient struct

func NewSOAPClient

func NewSOAPClient(url string, tls bool, auth *BasicAuth) *SOAPClient

NewSOAPClient creates a new SOAP client

func (*SOAPClient) Call

func (s *SOAPClient) Call(soapAction string, request, response interface{}) error

Call call SOAP method

type SOAPEnvelope

type SOAPEnvelope struct {
	XMLName xml.Name `xml:"soap:Envelope"`
	Tag1    string   `xml:"xmlns:soap,attr"`
	Tag2    string   `xml:"xmlns:ns1,attr,omitempty"`
	Body    SOAPBody
}

SOAPEnvelope struct

type SOAPEnvelopeResponse

type SOAPEnvelopeResponse struct {
	XMLName xml.Name `xml:"Envelope"`
	Body    SOAPBodyResponse
}

SOAPEnvelopeResponse struct

type SOAPFault

type SOAPFault struct {
	XMLName xml.Name `xml:"soap:Fault"`
	Code    string   `xml:"faultcode,omitempty"`
	String  string   `xml:"faultstring,omitempty"`
	Actor   string   `xml:"faultactor,omitempty"`
	Detail  string   `xml:"detail,omitempty"`
}

SOAPFault struct

func (*SOAPFault) Error

func (f *SOAPFault) Error() string

Error returns the SOAPFault error

type SOAPFaultResponse

type SOAPFaultResponse struct {
	XMLName xml.Name `xml:"Fault"`
	Code    string   `xml:"faultcode,omitempty"`
	String  string   `xml:"faultstring,omitempty"`
	Actor   string   `xml:"faultactor,omitempty"`
	Detail  string   `xml:"detail,omitempty"`
}

SOAPFaultResponse struct

func (*SOAPFaultResponse) Error

func (f *SOAPFaultResponse) Error() string

Error returns the SOAPFaultResponse error

type SOAPHeader

type SOAPHeader struct {
	XMLName xml.Name `xml:"soap:Header"`
	Header  interface{}
}

SOAPHeader struct

type SolicitarPostagemReversa

type SolicitarPostagemReversa struct {
	XMLName xml.Name `xml:"ns1:solicitarPostagemReversa"`

	CodAdministrativo  string           `xml:"codAdministrativo,omitempty"`
	Codigoservico      string           `xml:"codigo_servico,omitempty"`
	Cartao             string           `xml:"cartao,omitempty"`
	Destinatario       *Pessoa          `xml:"destinatario,omitempty"`
	Coletassolicitadas []*ColetaReversa `xml:"coletas_solicitadas,omitempty"`
}

SolicitarPostagemReversa struct

type SolicitarPostagemReversaResponse

type SolicitarPostagemReversaResponse struct {
	XMLName                  xml.Name         `xml:"solicitarPostagemReversaResponse"`
	SolicitarPostagemReversa *RetornoPostagem `xml:"solicitarPostagemReversa,omitempty"`
}

SolicitarPostagemReversaResponse struct

Jump to

Keyboard shortcuts

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