Documentation ¶
Index ¶
- type IShopemaaService
- type IStateService
- type ITwilioService
- type ShopemaaService
- func (ss *ShopemaaService) AddToCart(productIDs []string) (string, error)
- func (ss *ShopemaaService) CheckDiscount(cartID, couponCode string, shippingMethodID *string) (int64, error)
- func (ss *ShopemaaService) CreateCart(productID string, quantity int) (*models.Cart, error)
- func (ss *ShopemaaService) GeneratePaymentNonce(orderId, orderHash string, email string, appUrl string) (*models.PaymentNonce, error)
- func (ss *ShopemaaService) GetCart(cartID string) (*models.Cart, error)
- func (ss *ShopemaaService) GetCurrency() string
- func (ss *ShopemaaService) GetName() string
- func (ss *ShopemaaService) GetShop() *models.Shop
- func (ss *ShopemaaService) ListCategories(currentPage, limit int) ([]models.Category, error)
- func (ss *ShopemaaService) ListLocations() ([]models.Location, error)
- func (ss *ShopemaaService) ListPaymentMethods() ([]models.PaymentMethod, error)
- func (ss *ShopemaaService) ListProducts(currentPage, perPage int) ([]models.Product, error)
- func (ss *ShopemaaService) ListProductsByCategory(categoryID string, currentPage, perPage int) ([]models.Product, error)
- func (ss *ShopemaaService) ListShippingMethods() ([]models.ShippingMethod, error)
- func (ss *ShopemaaService) OrderDetails(orderID string) (*models.OrderDetail, error)
- func (ss *ShopemaaService) OrderDetailsForGuest(orderHash, email string) (*models.OrderDetail, error)
- func (ss *ShopemaaService) PlaceOrder(params *models.GuestCheckoutPlaceOrderParams) (string, error)
- func (ss *ShopemaaService) SearchProducts(query string, currentPage, perPage int) ([]models.Product, error)
- func (ss *ShopemaaService) UpdateCart(cartID, productID string, quantity int) (*models.Cart, error)
- type StateService
- func (s *StateService) GetData(customerID, key string) (interface{}, error)
- func (s *StateService) GetIdentityByCartID(key, cartID string) (string, error)
- func (s *StateService) GetState(customerID string) (models.CustomerState, error)
- func (s *StateService) SetData(customerID, key string, data interface{}) error
- func (s *StateService) SetIdentityByCartID(key, cartID, identity string) error
- func (s *StateService) SetState(customerID string, state models.CustomerState) error
- type TwilioService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IShopemaaService ¶
type IShopemaaService interface { GetName() string GetCurrency() string GetShop() *models.Shop ListProducts(currentPage, perPage int) ([]models.Product, error) ListProductsByCategory(categoryID string, currentPage, perPage int) ([]models.Product, error) SearchProducts(query string, currentPage, perPage int) ([]models.Product, error) AddToCart(productIDs []string) (string, error) CreateCart(productID string, quantity int) (*models.Cart, error) UpdateCart(cartID, productID string, quantity int) (*models.Cart, error) GetCart(cartID string) (*models.Cart, error) PlaceOrder(params *models.GuestCheckoutPlaceOrderParams) (string, error) OrderDetails(orderID string) (*models.OrderDetail, error) OrderDetailsForGuest(orderHash, email string) (*models.OrderDetail, error) ListShippingMethods() ([]models.ShippingMethod, error) ListPaymentMethods() ([]models.PaymentMethod, error) ListLocations() ([]models.Location, error) CheckDiscount(cartID, couponCode string, shippingMethodID *string) (int64, error) GeneratePaymentNonce(orderId, orderHash string, email string, appUrl string) (*models.PaymentNonce, error) ListCategories(currentPage, limit int) ([]models.Category, error) }
func NewShopemaaService ¶
func NewShopemaaService(cfg *cfg.Application) (IShopemaaService, error)
type IStateService ¶
type IStateService interface { SetState(customerID string, state models.CustomerState) error GetState(customerID string) (models.CustomerState, error) SetData(customerID, key string, data interface{}) error GetData(customer, key string) (interface{}, error) SetIdentityByCartID(key, cartID, identity string) error GetIdentityByCartID(key, cartID string) (string, error) }
func NewStateService ¶
func NewStateService() IStateService
type ITwilioService ¶
type ITwilioService interface { Send(to, from, payload string) error Api() *twilio2.RestClient }
func NewTwilioService ¶
func NewTwilioService(cfg *config.Application) ITwilioService
type ShopemaaService ¶
type ShopemaaService struct {
// contains filtered or unexported fields
}
func (*ShopemaaService) AddToCart ¶
func (ss *ShopemaaService) AddToCart(productIDs []string) (string, error)
func (*ShopemaaService) CheckDiscount ¶
func (ss *ShopemaaService) CheckDiscount(cartID, couponCode string, shippingMethodID *string) (int64, error)
func (*ShopemaaService) CreateCart ¶
func (*ShopemaaService) GeneratePaymentNonce ¶
func (ss *ShopemaaService) GeneratePaymentNonce(orderId, orderHash string, email string, appUrl string) (*models.PaymentNonce, error)
func (*ShopemaaService) GetCart ¶
func (ss *ShopemaaService) GetCart(cartID string) (*models.Cart, error)
func (*ShopemaaService) GetCurrency ¶
func (ss *ShopemaaService) GetCurrency() string
func (*ShopemaaService) GetName ¶
func (ss *ShopemaaService) GetName() string
func (*ShopemaaService) GetShop ¶
func (ss *ShopemaaService) GetShop() *models.Shop
func (*ShopemaaService) ListCategories ¶
func (ss *ShopemaaService) ListCategories(currentPage, limit int) ([]models.Category, error)
func (*ShopemaaService) ListLocations ¶
func (ss *ShopemaaService) ListLocations() ([]models.Location, error)
func (*ShopemaaService) ListPaymentMethods ¶
func (ss *ShopemaaService) ListPaymentMethods() ([]models.PaymentMethod, error)
func (*ShopemaaService) ListProducts ¶
func (ss *ShopemaaService) ListProducts(currentPage, perPage int) ([]models.Product, error)
func (*ShopemaaService) ListProductsByCategory ¶
func (*ShopemaaService) ListShippingMethods ¶
func (ss *ShopemaaService) ListShippingMethods() ([]models.ShippingMethod, error)
func (*ShopemaaService) OrderDetails ¶
func (ss *ShopemaaService) OrderDetails(orderID string) (*models.OrderDetail, error)
func (*ShopemaaService) OrderDetailsForGuest ¶
func (ss *ShopemaaService) OrderDetailsForGuest(orderHash, email string) (*models.OrderDetail, error)
func (*ShopemaaService) PlaceOrder ¶
func (ss *ShopemaaService) PlaceOrder(params *models.GuestCheckoutPlaceOrderParams) (string, error)
func (*ShopemaaService) SearchProducts ¶
func (*ShopemaaService) UpdateCart ¶
type StateService ¶
type StateService struct {
// contains filtered or unexported fields
}
func (*StateService) GetData ¶
func (s *StateService) GetData(customerID, key string) (interface{}, error)
func (*StateService) GetIdentityByCartID ¶
func (s *StateService) GetIdentityByCartID(key, cartID string) (string, error)
func (*StateService) GetState ¶
func (s *StateService) GetState(customerID string) (models.CustomerState, error)
func (*StateService) SetData ¶
func (s *StateService) SetData(customerID, key string, data interface{}) error
func (*StateService) SetIdentityByCartID ¶
func (s *StateService) SetIdentityByCartID(key, cartID, identity string) error
func (*StateService) SetState ¶
func (s *StateService) SetState(customerID string, state models.CustomerState) error
type TwilioService ¶
type TwilioService struct {
// contains filtered or unexported fields
}
func (*TwilioService) Api ¶
func (ts *TwilioService) Api() *twilio2.RestClient
func (*TwilioService) Send ¶
func (ts *TwilioService) Send(to, from, payload string) error
Click to show internal directories.
Click to hide internal directories.