eva

package
v0.0.0-...-99a2ca9 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	HouseNumber string `json:"HouseNumber,omitempty"`
	Address1    string `json:"Address1,omitempty"`
	Address2    string `json:"Address2,omitempty"`
	ZipCode     string `json:"ZipCode,omitempty"`
	City        string `json:"City,omitempty"`
	CountryID   string `json:"CountryID,omitempty"`
}

type AttachFunctionalitiesToRoleRequest

type AttachFunctionalitiesToRoleRequest struct {
	RoleID                int64               `json:"RoleID"`
	ScopedFunctionalities []RoleFunctionality `json:"ScopedFunctionalities,omitempty"`
}

type Client

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

func NewClient

func NewClient(apiURL string) *Client

func (*Client) AttachFunctionalitiesToRole

func (c *Client) AttachFunctionalitiesToRole(ctx context.Context, req AttachFunctionalitiesToRoleRequest) (*EmptyResponse, error)

func (*Client) CreateEmployee

func (*Client) CreateMessageTemplate

func (*Client) CreateOpenIDProvider

func (*Client) CreateOrderLedgerType

func (*Client) CreateRole

func (c *Client) CreateRole(ctx context.Context, req CreateRoleRequest) (*CreateRoleResponse, error)

func (*Client) DeleteAccountingRecipe

func (c *Client) DeleteAccountingRecipe(ctx context.Context, req DeleteAccountingRecipeRequest) (*EmptyResponse, error)

func (*Client) DeleteCustomOrderStatus

func (c *Client) DeleteCustomOrderStatus(ctx context.Context, req DeleteCustomOrderStatusRequest) (*EmptyResponse, error)

func (*Client) DeleteMessageTemplate

func (c *Client) DeleteMessageTemplate(ctx context.Context, req DeleteMessageTemplateRequesst) (*EmptyResponse, error)

func (*Client) DeleteOpenIDProvider

func (*Client) DeleteOrderLedgerType

func (*Client) DeleteOrganizationUnit

func (c *Client) DeleteOrganizationUnit(ctx context.Context, req DeleteOrganizationUnitRequest) (*EmptyResponse, error)

func (*Client) DeleteRole

func (c *Client) DeleteRole(ctx context.Context, req DeleteRoleRequest) (*EmptyResponse, error)

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, req DeleteUserRequest) (*EmptyResponse, error)

func (*Client) DetachFunctionalitiesFromRole

func (c *Client) DetachFunctionalitiesFromRole(ctx context.Context, req DetachFunctionalitiesFromRoleRequest) (*EmptyResponse, error)

func (*Client) GetAccountingRecipe

func (*Client) GetOpenIDProvider

func (*Client) GetRole

func (c *Client) GetRole(ctx context.Context, req GetRoleRequest) (*GetRoleResponse, error)

func (*Client) GetSetting

func (c *Client) GetSetting(ctx context.Context, req GetSettingRequest) (*GetSettingResponse, error)

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, req GetUserRequest) (*GetEmployeeResponse, error)

func (*Client) GetUserRole

func (c *Client) GetUserRole(ctx context.Context, req GetUserRoleRequest) (*GetUserRoleResponse, error)

func (*Client) ListCustomOrderStatus

func (c *Client) ListCustomOrderStatus(ctx context.Context) (*ListCustomOrderStatusResponse, error)

func (*Client) ListOrderLedgerTypes

func (c *Client) ListOrderLedgerTypes(ctx context.Context) (*ListOrderLedgerTypeResponse, error)

func (*Client) Login

func (c *Client) Login(ctx context.Context, req LoginCredentials) error

func (*Client) SetAuthorizationHeader

func (c *Client) SetAuthorizationHeader(token string)

func (*Client) SetSettings

func (c *Client) SetSettings(ctx context.Context, req SetSettingsRequest) (*EmptyResponse, error)

func (*Client) SetUserRole

func (c *Client) SetUserRole(ctx context.Context, req SetUserRoleRequest) (*EmptyResponse, error)

func (*Client) UnsetSettings

func (c *Client) UnsetSettings(ctx context.Context, req UnsetSettingsRequest) (*EmptyResponse, error)

func (*Client) UpdateCustomOrderStatus

func (c *Client) UpdateCustomOrderStatus(ctx context.Context, req UpdateCustomOrderStatusRequest) (*EmptyResponse, error)

func (*Client) UpdateMessageTemplate

func (c *Client) UpdateMessageTemplate(ctx context.Context, req UpdateMessageTemplateRequest) (*EmptyResponse, error)

func (*Client) UpdateOpenIDProvider

func (*Client) UpdateOrderLedgerType

func (*Client) UpdateOrganizationUnit

func (c *Client) UpdateOrganizationUnit(ctx context.Context, req UpdateOrganizationUnitRequest) (*EmptyResponse, error)

func (*Client) UpdateRole

func (c *Client) UpdateRole(ctx context.Context, req UpdateRoleRequest) (*EmptyResponse, error)

func (*Client) UpdateUser

func (c *Client) UpdateUser(ctx context.Context, req UpdateUserRequest) (*EmptyResponse, error)

type CreateAccountingRecipeRequest

type CreateAccountingRecipeRequest struct {
	Name     string `json:"Name"`
	Recipe   string `json:"Recipe"`
	IsActive bool   `json:"IsActive,omitempty"`
}

type CreateAccountingRecipeResponse

type CreateAccountingRecipeResponse struct {
	ID        int64 `json:"ID"`
	HasErrors bool  `json:"HasErrors"`
}

type CreateCustomOrderStatusRequest

type CreateCustomOrderStatusRequest struct {
	Name        string `json:"Name"`
	Description string `json:"Description,omitempty"`
}

type CreateCustomOrderStatusResponse

type CreateCustomOrderStatusResponse struct {
	ID int64
}

type CreateEmployeeResult

type CreateEmployeeResult int
const (
	CreatedNewUser CreateEmployeeResult = iota
	UpgradedExistingUser
	UpdatedExistingUser
)

type CreateEmployeeUserRequest

type CreateEmployeeUserRequest struct {
	FirstName    string `json:"FirstName"`
	LastName     string `json:"LastName"`
	EmailAddress string `json:"EmailAddress"`
	Password     string `json:"Password"`
}

type CreateEmployeeUserResponse

type CreateEmployeeUserResponse struct {
	ID     int64                `json:"UserID"`
	Result CreateEmployeeResult `json:"Result"`
}

type CreateMessageTemplateRequest

type CreateMessageTemplateRequest struct {
	Name               string           `json:"Name"`
	OrganizationUnitID int64            `json:"OrganizationUnitID,omitempty"`
	LanguageID         string           `json:"LanguageID,omitempty"`
	CountryID          string           `json:"CountryID,omitempty"`
	Header             string           `json:"Header,omitempty"`
	Template           string           `json:"Template"`
	Footer             string           `json:"Footer,omitempty"`
	Helpers            string           `json:"Helpers,omitempty"`
	Type               int64            `json:"Type"`
	Layout             string           `json:"Layout,omitempty"`
	Destination        int64            `json:"Destination"`
	PaperProperties    *PaperProperties `json:"PaperProperties,omitempty"` //omitempty doesn't work for struct unless it is a pointer
	IsDisabled         bool             `json:"IsDisable,omitempty"`
}

type CreateMessageTemplateResponse

type CreateMessageTemplateResponse struct {
	ID int64
}

type CreateOpenIDProviderRequest

type CreateOpenIDProviderRequest struct {
	BaseUrl           string `json:"BaseUrl"`
	ClientID          string `json:"ClientID"`
	CreateUsers       bool   `json:"CreateUsers"`
	EmailAddressClaim string `json:"EmailAddressClaim,omitempty"`
	Enabled           bool   `json:"Enabled"`
	FirstNameClaim    string `json:"FirstNameClaim,omitempty"`
	LastNameClaim     string `json:"LastNameClaim,omitempty"`
	Name              string `json:"Name,omitempty"`
	NicknameClaim     string `json:"NicknameClaim,omitempty"`
	UserType          int64  `json:"UserType"`
}

type CreateOpenIDProviderResponse

type CreateOpenIDProviderResponse struct {
	ID int64 `json:"ID"`
}

type CreateOrderLedgerTypeRequest

type CreateOrderLedgerTypeRequest struct {
	Name        string `json:"Name"`
	Description string `json:"Description,omitempty"`
}

type CreateOrderLedgerTypeResponse

type CreateOrderLedgerTypeResponse struct {
	ID int64
}

type CreateOrganizationUnitRequest

type CreateOrganizationUnitRequest struct {
	Name                string   `json:"Name,omitempty"`
	PhoneNumber         string   `json:"PhoneNumber,omitempty"`
	EmailAddress        string   `json:"EmailAddress,omitempty"`
	ParentID            int64    `json:"ParentID,omitempty"`
	CurrencyID          string   `json:"CurrencyID,omitempty"`
	BackendID           string   `json:"BackendID,omitempty"`
	CostPriceCurrencyID string   `json:"CostPriceCurrencyID,omitempty"`
	Type                int64    `json:"Type,omitempty"`
	Latitude            float64  `json:"Latitude,omitempty"`
	Longitude           float64  `json:"Longitude,omitempty"`
	Address             *Address `json:"Address,omitempty"`
}

type CreateOrganizationUnitResponse

type CreateOrganizationUnitResponse struct {
	ID int64 `json:"ID"`
}

type CreateRoleRequest

type CreateRoleRequest struct {
	Name     string `json:"Name"`
	UserType int64  `json:"UserType,omitempty"`
	Code     string `json:"Code,omitempty"`
}

type CreateRoleResponse

type CreateRoleResponse struct {
	ID int64 `json:"ID"`
}

type CustomOrderStatus

type CustomOrderStatus struct {
	ID          int64  `json:"ID"`
	Name        string `json:"Name"`
	Description string `json:"Description,omitempty"`
}

type DeleteAccountingRecipeRequest

type DeleteAccountingRecipeRequest struct {
	ID int64 `json:"ID"`
}

type DeleteCustomOrderStatusRequest

type DeleteCustomOrderStatusRequest struct {
	ID int64 `json:"ID"`
}

type DeleteMessageTemplateRequesst

type DeleteMessageTemplateRequesst struct {
	ID int64
}

type DeleteOpenIDProviderRequest

type DeleteOpenIDProviderRequest struct {
	ID int64 `json:"ID"`
}

type DeleteOpenIDProviderResponse

type DeleteOpenIDProviderResponse struct{}

type DeleteOrderLedgerTypeRequest

type DeleteOrderLedgerTypeRequest struct {
	ID int64 `json:"ID"`
}

type DeleteOrderLedgerTypeResponse

type DeleteOrderLedgerTypeResponse struct {
}

type DeleteOrganizationUnitRequest

type DeleteOrganizationUnitRequest struct {
	ID int64 `json:"OrganizationUnitID"`
}

type DeleteRoleRequest

type DeleteRoleRequest struct {
	ID int64 `json:"ID"`
}

type DeleteUserRequest

type DeleteUserRequest struct {
	ID int64 `json:"ID"`
}

type DetachFunctionalitiesFromRoleRequest

type DetachFunctionalitiesFromRoleRequest struct {
	RoleID                int64               `json:"RoleID"`
	ScopedFunctionalities []RoleFunctionality `json:"ScopedFunctionalities,omitempty"`
}

type EmptyResponse

type EmptyResponse struct{}

type GetAccountingRecipeRequest

type GetAccountingRecipeRequest struct {
	ID int64 `json:"ID"`
}

type GetAccountingRecipeResponse

type GetAccountingRecipeResponse struct {
	Recipe recipe `json:"Recipe"`
}

type GetEmployeeResponse

type GetEmployeeResponse struct {
	ID           int64  `json:"ID"`
	FirstName    string `json:"FirstName"`
	LastName     string `json:"LastName"`
	EmailAddress string `json:"EmailAddress"`
}

type GetMessageTemplateByIDRequest

type GetMessageTemplateByIDRequest struct {
	ID int64
}

type GetMessageTemplateByIDResponse

type GetMessageTemplateByIDResponse struct {
	ID                 int64            `json:"ID"`
	Name               string           `json:"Name"`
	OrganizationUnitID int64            `json:"OrganizationUnitID,omitempty"`
	LanguageID         string           `json:"LanguageID"`
	CountryID          string           `json:"CountryID"`
	Header             string           `json:"Header"`
	Template           string           `json:"Template"`
	Footer             string           `json:"Footer"`
	Helpers            string           `json:"Helpers"`
	Type               int64            `json:"Type"`
	Layout             string           `json:"Layout"`
	Destination        int64            `json:"Destination"`
	PaperProperties    *PaperProperties `json:"PaperProperties"`
	IsDisabled         bool             `json:"IsDisable,omitempty"`
}

type GetOpenIDProviderRequest

type GetOpenIDProviderRequest struct {
	ID int64 `json:"ID"`
}

type GetOpenIDProviderResponse

type GetOpenIDProviderResponse struct {
	ID                int64  `json:"ID"`
	BaseUrl           string `json:"BaseUrl"`
	ClientID          string `json:"ClientID"`
	CreateUsers       bool   `json:"CreateUsers"`
	EmailAddressClaim string `json:"EmailAddressClaim,omitempty"`
	Enabled           bool   `json:"Enabled"`
	FirstNameClaim    string `json:"FirstNameClaim,omitempty"`
	LastNameClaim     string `json:"LastNameClaim,omitempty"`
	Name              string `json:"Name,omitempty"`
	NicknameClaim     string `json:"NicknameClaim,omitempty"`
	UserType          int64  `json:"UserType"`
	Primary           bool   `json:"Primary"`
}

type GetOrganizationUnitDetailedRequest

type GetOrganizationUnitDetailedRequest struct {
	ID int64 `json:"ID"`
}

type GetOrganizationUnitDetailedResponse

type GetOrganizationUnitDetailedResponse struct {
	ID                  int64    `json:"ID"`
	Name                string   `json:"Name"`
	PhoneNumber         string   `json:"PhoneNumber"`
	EmailAddress        string   `json:"EmailAddress"`
	ParentID            int64    `json:"ParentID"`
	CurrencyID          string   `json:"CurrencyID"`
	BackendID           string   `json:"BackendID"`
	CostPriceCurrencyID string   `json:"CostPriceCurrencyID"`
	Type                int64    `json:"Type"`
	Latitude            float64  `json:"Latitude"`
	Longitude           float64  `json:"Longitude"`
	Address             *Address `json:"Address,omitempty"`
}

type GetRoleRequest

type GetRoleRequest struct {
	ID int64 `json:"ID"`
}

type GetRoleResponse

type GetRoleResponse struct {
	Result Role `json:"Result"`
}

type GetSettingRequest

type GetSettingRequest struct {
	Key                string `json:"Key"`
	OrganizationUnitID int64  `json:"OrganizationUnitID,omitempty"`
}

type GetSettingResponse

type GetSettingResponse struct {
	Value string `json:"Value"`
}

type GetUserRequest

type GetUserRequest struct {
	ID int64 `json:"ID"`
}

type GetUserRoleRequest

type GetUserRoleRequest struct {
	UserId int64 `json:"UserID"`
}

type GetUserRoleResponse

type GetUserRoleResponse struct {
	Roles []UserRole `json:"Roles"`
}

type ListCustomOrderStatusResponse

type ListCustomOrderStatusResponse struct {
	Result []CustomOrderStatus `json:"Result"`
}

type ListOrderLedgerTypeResponse

type ListOrderLedgerTypeResponse struct {
	Result []OrderLedgerType `json:"OrderLedgerTypes"`
}

type LoginCredentials

type LoginCredentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	AuthenticationToken string `json:"AuthenticationToken"`
}

type OrderLedgerType

type OrderLedgerType struct {
	ID          int64  `json:"ID"`
	Name        string `json:"Name"`
	Description string `json:"Description,omitempty"`
}

type PaperMargin

type PaperMargin struct {
	Top    int64 `json:"Top"`
	Left   int64 `json:"Left"`
	Bottom int64 `json:"Bottom"`
	Right  int64 `json:"Right"`
}

type PaperProperties

type PaperProperties struct {
	WaitForNetworkIdle         bool        `json:"WaitForNetworkIdle"`
	WaitForJS                  bool        `json:"WaitForJS"`
	Size                       PaperSize   `json:"Size"`
	Format                     int64       `json:"Format"`
	Orientation                int64       `json:"Orientation"`
	Margin                     PaperMargin `json:"PaperMargin"`
	ThermalPrinterTemplateType int64       `json:"ThermalPrinterTemplateType"`
}

type PaperSize

type PaperSize struct {
	Width             string  `json:"Width"`
	Height            string  `json:"Height"`
	DeviceScaleFactor float64 `json:"DeviceScaleFactor"`
}

type Role

type Role struct {
	Name                  string              `json:"Name"`
	UserType              int64               `json:"UserType,omitempty"`
	Code                  string              `json:"Code,omitempty"`
	ScopedFunctionalities []RoleFunctionality `json:"ScopedFunctionalities"`
}

type RoleFunctionality

type RoleFunctionality struct {
	Functionality     string
	Scope             int64
	RequiresElevation bool
}

type RoleOrganizationUnitSet

type RoleOrganizationUnitSet struct {
	RoleID             int64 `json:"RoleID"`
	OrganizationUnitID int64 `json:"OrganizationUnitID"`
	UserType           int64 `json:"UserType"`
}

type SetPrimaryOpenIDProviderRequest

type SetPrimaryOpenIDProviderRequest struct {
	ID int64 `json:"ID"`
}

type SetPrimaryOpenIDProviderResponse

type SetPrimaryOpenIDProviderResponse struct{}

type SetSettingsRequest

type SetSettingsRequest struct {
	Key                string `json:"Key"`
	Value              string `json:"Value"`
	OrganizationUnitID int64  `json:"OrganizationUnitID,omitempty"`
}

type SetUserRoleRequest

type SetUserRoleRequest struct {
	UserId int64                     `json:"UserID"`
	Roles  []RoleOrganizationUnitSet `json:"Roles"`
}

type UnsetSettingsRequest

type UnsetSettingsRequest struct {
	Key                string `json:"Key,omitempty"`
	OrganizationUnitID int64  `json:"OrganizationUnitID,omitempty"`
}

type UpdateAccountingRecipeRequest

type UpdateAccountingRecipeRequest struct {
	ID       int64  `json:"ID"`
	Name     string `json:"Name,omitempty"`
	Recipe   string `json:"Recipe,omitempty"`
	IsActive bool   `json:"IsActive,omitempty"`
}

type UpdateAccountingRecipeResponse

type UpdateAccountingRecipeResponse struct {
	HasErrors bool `json:"HasErrors"`
}

type UpdateCustomOrderStatusRequest

type UpdateCustomOrderStatusRequest struct {
	ID          int64  `json:"ID"`
	Name        string `json:"Name"`
	Description string `json:"Description,omitempty"`
}

type UpdateMessageTemplateRequest

type UpdateMessageTemplateRequest struct {
	ID                 int64            `json:"ID"`
	Name               string           `json:"Name"`
	OrganizationUnitID int64            `json:"OrganizationUnitID,omitempty"`
	LanguageID         string           `json:"LanguageID,omitempty"`
	CountryID          string           `json:"CountryID,omitempty"`
	Header             string           `json:"Header,omitempty"`
	Template           string           `json:"Template"`
	Footer             string           `json:"Footer,omitempty"`
	Helpers            string           `json:"Helpers,omitempty"`
	Layout             string           `json:"Layout,omitempty"`
	Destination        int64            `json:"Destination"`
	PaperProperties    *PaperProperties `json:"PaperProperties,omitempty"` //omitempty doesn't work for struct unless it is a pointer
	IsDisabled         bool             `json:"IsDisable,omitempty"`
}

type UpdateOpenIDProviderRequest

type UpdateOpenIDProviderRequest struct {
	ID                int64  `json:"ID"`
	BaseUrl           string `json:"BaseUrl,omitempty"`
	ClientID          string `json:"ClientID,omitempty"`
	CreateUsers       bool   `json:"CreateUsers,omitempty"`
	EmailAddressClaim string `json:"EmailAddressClaim,omitempty"`
	Enabled           bool   `json:"Enabled,omitempty"`
	FirstNameClaim    string `json:"FirstNameClaim,omitempty"`
	LastNameClaim     string `json:"LastNameClaim,omitempty"`
	Name              string `json:"Name,omitempty"`
	NicknameClaim     string `json:"NicknameClaim,omitempty"`
	UserType          int64  `json:"UserType"`
}

type UpdateOpenIDProviderResponse

type UpdateOpenIDProviderResponse struct{}

type UpdateOrderLedgerTypeRequest

type UpdateOrderLedgerTypeRequest struct {
	ID          int64  `json:"ID"`
	Name        string `json:"Name"`
	Description string `json:"Description"`
}

type UpdateOrderLedgerTypeResponse

type UpdateOrderLedgerTypeResponse struct {
}

type UpdateOrganizationUnitRequest

type UpdateOrganizationUnitRequest struct {
	ID                  int64    `json:"ID,omitempty"`
	Name                string   `json:"Name,omitempty"`
	PhoneNumber         string   `json:"PhoneNumber,omitempty"`
	EmailAddress        string   `json:"EmailAddress,omitempty"`
	CostPriceCurrencyID string   `json:"CostPriceCurrencyID,omitempty"`
	Type                int64    `json:"Type,omitempty"`
	Latitude            float64  `json:"Latitude,omitempty"`
	Longitude           float64  `json:"Longitude,omitempty"`
	Address             *Address `json:"Address,omitempty"`
}

type UpdateRoleRequest

type UpdateRoleRequest struct {
	ID       int64  `json:"ID"`
	Name     string `json:"Name,omitempty"`
	UserType int64  `json:"UserType,omitempty"`
	Code     string `json:"Code,omitempty"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	ID           int64  `json:"ID"`
	FirstName    string `json:"FirstName,omitempty"`
	LastName     string `json:"LastName,omitempty"`
	EmailAddress string `json:"EmailAddress,omitempty"`
}

type UserRole

type UserRole struct {
	RoleID             int64 `json:"RoleID"`
	OrganizationUnitID int64 `json:"OrganizationUnitID"`
	UserType           int64 `json:"UserType"`
}

Jump to

Keyboard shortcuts

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