Back to

Package resources

Latest Go to latest

The latest major version is .

Published: Apr 28, 2020 | License: MIT | Module:


type CreateSignedInvoiceRequestBody

type CreateSignedInvoiceRequestBody struct {
	AuthCode string      `json:"auth_code"`
	Key      string      `json:"key"`
	Nit      int         `json:"nit"`
	Number   int         `json:"number"`
	Date     time.Time   `json:"date"`
	Amount   json.Number `json:"amount"`
	Code     string      `json:"code"`

CreateSignedInvoiceRequestBody represents the body for the POST /signed_resoures request.

func (CreateSignedInvoiceRequestBody) Validate

func (r CreateSignedInvoiceRequestBody) Validate() ValidationErrors

Validate checks the request body for errors.

type SignedInvoicesResource

type SignedInvoicesResource struct{}

SignedInvoicesResource handles the request for the signed_invoices resource.

func (*SignedInvoicesResource) Create

func (h *SignedInvoicesResource) Create(c echo.Context) error

Create is the handler function for the POST signed_invoices route.

type ValidationError

type ValidationError struct {
	Field string `json:"field"`
	Msg   string `json:"message"`

ValidationError represents a validation error

type ValidationErrors

type ValidationErrors struct {
	Errors []ValidationError `json:"errors"`

ValidationErrors represents a collection of ValidationError

func (*ValidationErrors) Add

func (e *ValidationErrors) Add(field string, msg string)

Add adds an error with the given field and msg to the collection

func (*ValidationErrors) Any

func (e *ValidationErrors) Any() bool

Any checks if the collection contains any errors

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier