sii

package
v0.0.0-...-7ff1774 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRoutes

func ApplyRoutes(app *fiber.App, logger *zap.Logger)

Types

type CaptchaResponse

type CaptchaResponse struct {
	TxtCaptcha string `json:"txtCaptcha"`
}

type Cases

type Cases interface {
	GetContributorInfo(user *User) (ContributorInfo, error)
}

func NewCases

func NewCases(repository Repository) Cases

type CommercialActivity

type CommercialActivity struct {
	Name          string `json:"name"`
	Code          int    `json:"code"`
	Category      int    `json:"category"`
	IsVATAffected bool   `json:"is_vat_affected"`
}

type ContributorInfo

type ContributorInfo struct {
	IdentifierType                       string               `json:"identifier_type"`
	IdentifierNumber                     string               `json:"identifier_number"`
	VerificationCode                     string               `json:"verification_code"`
	CommerceName                         string               `json:"commerce_name"`
	IsInitiatedActivities                bool                 `json:"is_initiated_activities"`
	IsAvailableToPayTaxInForeignCurrency bool                 `json:"is_available_to_pay_tax_in_foreign_currency"`
	IsSmallerCompany                     bool                 `json:"is_smaller_company"`
	CommercialActivities                 []CommercialActivity `json:"commercial_activities"`
	StampedDocuments                     []StampedDocument    `json:"stamped_documents"`
}

type ContributorInfoResponse

type ContributorInfoResponse struct {
	IdentifierType                       string               `json:"identifier_type"`
	IdentifierNumber                     string               `json:"identifier_number"`
	VerificationCode                     string               `json:"verification_code"`
	CommerceName                         string               `json:"commerce_name"`
	IsInitiatedActivities                bool                 `json:"is_initiated_activities"`
	IsAvailableToPayTaxInForeignCurrency bool                 `json:"is_available_to_pay_tax_in_foreign_currency"`
	IsSmallerCompany                     bool                 `json:"is_smaller_company"`
	CommercialActivities                 []CommercialActivity `json:"commercial_activities"`
	StampedDocuments                     []StampedDocument    `json:"stamped_documents"`
}

Response

type Controller

type Controller interface {
	GetContributorInfo(ctx *fiber.Ctx) error
}

func NewController

func NewController(cases Cases) Controller

type Repository

type Repository interface {
	GetContributorInfo(user *User) (ContributorInfo, error)
}

func NewRepository

func NewRepository(logger *zap.Logger) Repository

type StampedDocument

type StampedDocument struct {
	Name          string `json:"name"`
	LastYearStamp int    `json:"last_year_stamp"`
}

type User

type User struct {
	IdentifierType   string `json:"identifier_type"`
	IdentifierNumber string `json:"identifier_number"`
	VerificationCode string `json:"verification_code"`
}

type UserRequest

type UserRequest struct {
	IdentifierType   string `json:"identifier_type" validate:"required,oneof=RUT RUN"`
	IdentifierNumber string `json:"identifier_number" validate:"required"`
}

Request

Jump to

Keyboard shortcuts

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