announcement

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnouncementError

type AnnouncementError struct {
	Message        string
	AnnouncementID string
	IsAbleToRetry  bool
	Sku            string
}

func (*AnnouncementError) Error

func (a *AnnouncementError) Error() string

type AnnouncementService

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

func NewAnnouncementService

func NewAnnouncementService(mercadolivre common.MercadoLivre, storeUseCase store.UseCase, logger metrics.Logger) *AnnouncementService

func (*AnnouncementService) CloneAnnouncement

func (a *AnnouncementService) CloneAnnouncement(input CloneAnnouncementDtoInput) error

CloneAnnouncement implements UseCase

func (*AnnouncementService) RetrieveAnnouncements

func (a *AnnouncementService) RetrieveAnnouncements(sku string, credentials store.Credentials) (*[]common.MeliAnnouncement, error)

func (*AnnouncementService) UpdateQuantity

func (a *AnnouncementService) UpdateQuantity(id string, newQuantity int, credentials store.Credentials) error

type CloneAnnouncementDtoInput

type CloneAnnouncementDtoInput struct {
	RootID string    `json:"root_id"`
	Titles []string  `json:"titles"`
	Store  entity.ID `json:"store_id"`
}

type GetAnnouncementsDtoInput

type GetAnnouncementsDtoInput struct {
	Sku string `json:"sku"`
}

type UseCase

type UseCase interface {
	RetrieveAnnouncements(sku string, credentials store.Credentials) (*[]common.MeliAnnouncement, error)
	UpdateQuantity(id string, quantity int, credentials store.Credentials) error
	CloneAnnouncement(input CloneAnnouncementDtoInput) error
}

Jump to

Keyboard shortcuts

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