Documentation
¶
Index ¶
- func AssertError(t *testing.T, err error, errType interface{})
- func AssertProcessBoletoFailed(t *testing.T, response models.BoletoResponse)
- func AssertProcessBoletoWithSuccess(t *testing.T, response models.BoletoResponse)
- func CreateClientIP(c *gin.Context)
- func ExpectError(e error, t *testing.T)
- func ExpectFalse(condition bool, t *testing.T)
- func ExpectNil(obj interface{}, t *testing.T)
- func ExpectNoError(e error, t *testing.T)
- func ExpectTrue(condition bool, t *testing.T)
- func GetNode(bodyXml string, tagName string) string
- func WalkThroughXml(nodes []XmlNode, f func(XmlNode) bool)
- type BuilderBoletoRequest
- func (b *BuilderBoletoRequest) BoletoRequest() *models.BoletoRequest
- func (b *BuilderBoletoRequest) SetAgreement(agreement models.Agreement)
- func (b *BuilderBoletoRequest) SetAuthentication(authentication models.Authentication)
- func (b *BuilderBoletoRequest) SetBank(bank models.BankNumber)
- func (b *BuilderBoletoRequest) SetBuyer(buyer models.Buyer)
- func (b *BuilderBoletoRequest) SetPayeeGuarantor(PayeeGuarantor *models.PayeeGuarantor)
- func (b *BuilderBoletoRequest) SetRecipient(recipient models.Recipient)
- func (b *BuilderBoletoRequest) SetTitle(title models.Title)
- type Parameter
- type StubBoletoRequest
- func (s *StubBoletoRequest) Build() *models.BoletoRequest
- func (s *StubBoletoRequest) WithAcceptDivergentAmount(accepted bool) *StubBoletoRequest
- func (s *StubBoletoRequest) WithAgreementAccount(account string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithAgreementAgency(agency string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithAgreementNumber(number uint) *StubBoletoRequest
- func (s *StubBoletoRequest) WithAmountInCents(amount uint64) *StubBoletoRequest
- func (s *StubBoletoRequest) WithAuthentication(authentication models.Authentication) *StubBoletoRequest
- func (s *StubBoletoRequest) WithBoletoType(title models.Title) *StubBoletoRequest
- func (s *StubBoletoRequest) WithBuyerName(buyerName string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithBuyerZipCode(zipcode string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithDocumentNumber(documentNumber string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithExpirationDate(expiredAt time.Time) *StubBoletoRequest
- func (s *StubBoletoRequest) WithFine(daysAfterExpirationDate uint, amountInCents uint64, percentageOnTotal float64) *StubBoletoRequest
- func (s *StubBoletoRequest) WithInstructions(instructions string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithInterest(daysAfterExpirationDate uint, amountPerDayInCents uint64, ...) *StubBoletoRequest
- func (s *StubBoletoRequest) WithMaxDaysToPayPastDue(days uint) *StubBoletoRequest
- func (s *StubBoletoRequest) WithOurNumber(ourNumber uint) *StubBoletoRequest
- func (s *StubBoletoRequest) WithPayeeGuarantorDocumentNumber(docNumber string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithPayeeGuarantorDocumentType(documentType string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithPayeeGuarantorName(PayeeGuarantorName string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithRecipientDocumentNumber(docNumber string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithRecipientDocumentType(documentType string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithRecipientName(recipientName string) *StubBoletoRequest
- func (s *StubBoletoRequest) WithWallet(wallet uint16) *StubBoletoRequest
- type UInt64TestParameter
- type XmlNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertError ¶
AssertError Valida a existência de erros internos
func AssertProcessBoletoFailed ¶
func AssertProcessBoletoFailed(t *testing.T, response models.BoletoResponse)
AssertProcessBoletoFailed Valida se o houve um erro no processamento do boleto
func AssertProcessBoletoWithSuccess ¶
func AssertProcessBoletoWithSuccess(t *testing.T, response models.BoletoResponse)
AssertProcessBoletoWithSuccess Valida se o boleto foi gerado com sucesso
func ExpectFalse ¶
ExpectFalse falha o teste caso a condição não seja falsa
func ExpectNoError ¶
ExpectNoError falha o teste se e != nil
func ExpectTrue ¶
ExpectTrue falha o teste caso a condição não seja verdadeira
func WalkThroughXml ¶
Types ¶
type BuilderBoletoRequest ¶
type BuilderBoletoRequest struct { PayeeGuarantor *models.PayeeGuarantor // contains filtered or unexported fields }
func NewBuilderBoletoRequest ¶
func NewBuilderBoletoRequest() BuilderBoletoRequest
func (*BuilderBoletoRequest) BoletoRequest ¶
func (b *BuilderBoletoRequest) BoletoRequest() *models.BoletoRequest
func (*BuilderBoletoRequest) SetAgreement ¶
func (b *BuilderBoletoRequest) SetAgreement(agreement models.Agreement)
func (*BuilderBoletoRequest) SetAuthentication ¶
func (b *BuilderBoletoRequest) SetAuthentication(authentication models.Authentication)
func (*BuilderBoletoRequest) SetBank ¶
func (b *BuilderBoletoRequest) SetBank(bank models.BankNumber)
func (*BuilderBoletoRequest) SetBuyer ¶
func (b *BuilderBoletoRequest) SetBuyer(buyer models.Buyer)
func (*BuilderBoletoRequest) SetPayeeGuarantor ¶
func (b *BuilderBoletoRequest) SetPayeeGuarantor(PayeeGuarantor *models.PayeeGuarantor)
func (*BuilderBoletoRequest) SetRecipient ¶
func (b *BuilderBoletoRequest) SetRecipient(recipient models.Recipient)
func (*BuilderBoletoRequest) SetTitle ¶
func (b *BuilderBoletoRequest) SetTitle(title models.Title)
type StubBoletoRequest ¶
type StubBoletoRequest struct { BuilderBoletoRequest Authentication models.Authentication Agreement models.Agreement Title models.Title Recipient models.Recipient PayeeGuarantor *models.PayeeGuarantor Buyer models.Buyer // contains filtered or unexported fields }
StubBoletoRequest Stub base para criação de BoletoRequest
func NewStubBoletoRequest ¶
func NewStubBoletoRequest(bank models.BankNumber) *StubBoletoRequest
func (*StubBoletoRequest) Build ¶
func (s *StubBoletoRequest) Build() *models.BoletoRequest
func (*StubBoletoRequest) WithAcceptDivergentAmount ¶
func (s *StubBoletoRequest) WithAcceptDivergentAmount(accepted bool) *StubBoletoRequest
func (*StubBoletoRequest) WithAgreementAccount ¶
func (s *StubBoletoRequest) WithAgreementAccount(account string) *StubBoletoRequest
func (*StubBoletoRequest) WithAgreementAgency ¶
func (s *StubBoletoRequest) WithAgreementAgency(agency string) *StubBoletoRequest
func (*StubBoletoRequest) WithAgreementNumber ¶
func (s *StubBoletoRequest) WithAgreementNumber(number uint) *StubBoletoRequest
func (*StubBoletoRequest) WithAmountInCents ¶
func (s *StubBoletoRequest) WithAmountInCents(amount uint64) *StubBoletoRequest
func (*StubBoletoRequest) WithAuthentication ¶
func (s *StubBoletoRequest) WithAuthentication(authentication models.Authentication) *StubBoletoRequest
func (*StubBoletoRequest) WithBoletoType ¶
func (s *StubBoletoRequest) WithBoletoType(title models.Title) *StubBoletoRequest
func (*StubBoletoRequest) WithBuyerName ¶
func (s *StubBoletoRequest) WithBuyerName(buyerName string) *StubBoletoRequest
func (*StubBoletoRequest) WithBuyerZipCode ¶
func (s *StubBoletoRequest) WithBuyerZipCode(zipcode string) *StubBoletoRequest
func (*StubBoletoRequest) WithDocumentNumber ¶
func (s *StubBoletoRequest) WithDocumentNumber(documentNumber string) *StubBoletoRequest
func (*StubBoletoRequest) WithExpirationDate ¶
func (s *StubBoletoRequest) WithExpirationDate(expiredAt time.Time) *StubBoletoRequest
func (*StubBoletoRequest) WithFine ¶
func (s *StubBoletoRequest) WithFine(daysAfterExpirationDate uint, amountInCents uint64, percentageOnTotal float64) *StubBoletoRequest
func (*StubBoletoRequest) WithInstructions ¶
func (s *StubBoletoRequest) WithInstructions(instructions string) *StubBoletoRequest
func (*StubBoletoRequest) WithInterest ¶
func (s *StubBoletoRequest) WithInterest(daysAfterExpirationDate uint, amountPerDayInCents uint64, percentagePerMonth float64) *StubBoletoRequest
func (*StubBoletoRequest) WithMaxDaysToPayPastDue ¶
func (s *StubBoletoRequest) WithMaxDaysToPayPastDue(days uint) *StubBoletoRequest
func (*StubBoletoRequest) WithOurNumber ¶
func (s *StubBoletoRequest) WithOurNumber(ourNumber uint) *StubBoletoRequest
func (*StubBoletoRequest) WithPayeeGuarantorDocumentNumber ¶
func (s *StubBoletoRequest) WithPayeeGuarantorDocumentNumber(docNumber string) *StubBoletoRequest
func (*StubBoletoRequest) WithPayeeGuarantorDocumentType ¶
func (s *StubBoletoRequest) WithPayeeGuarantorDocumentType(documentType string) *StubBoletoRequest
func (*StubBoletoRequest) WithPayeeGuarantorName ¶
func (s *StubBoletoRequest) WithPayeeGuarantorName(PayeeGuarantorName string) *StubBoletoRequest
func (*StubBoletoRequest) WithRecipientDocumentNumber ¶
func (s *StubBoletoRequest) WithRecipientDocumentNumber(docNumber string) *StubBoletoRequest
func (*StubBoletoRequest) WithRecipientDocumentType ¶
func (s *StubBoletoRequest) WithRecipientDocumentType(documentType string) *StubBoletoRequest
func (*StubBoletoRequest) WithRecipientName ¶
func (s *StubBoletoRequest) WithRecipientName(recipientName string) *StubBoletoRequest
func (*StubBoletoRequest) WithWallet ¶
func (s *StubBoletoRequest) WithWallet(wallet uint16) *StubBoletoRequest
type UInt64TestParameter ¶
UInt64TestParameter Parâmetro de teste com input do tipo uint64
Click to show internal directories.
Click to hide internal directories.