managers

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package managers ...

Package managers ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartView

type CartView struct {
	Items *[]*CartViewItem
	Total float64
}

CartView CartView

type CartViewItem

type CartViewItem struct {
	ProductID   int64
	ProductName string
	Desc        string
	Image       string
	Quantity    int64
	Stock       int64
	Price       float64
	Total       float64
}

CartViewItem CartViewItem

type CustomerAccount

type CustomerAccount struct {
	Customer  *sdbi.Customer
	Addresses *[]sdbi.Address
	User      *api.User
}

CustomerAccount CustomerAccount

type CustomerCart

type CustomerCart struct {
	Cart              *sdbi.Cart
	Items             *[]sdbi.CartItem
	CartView          *CartView
	Comment           string
	CustomerAccount   *CustomerAccount
	InsuranceCost     float64
	OrderType         string
	Pickup            bool
	ShippingHandling  float64
	Subtotal          float64
	Taxes             float64
	Total             float64
	PaymentGatewayID  int64
	ShippingMethodID  int64
	InsuranceID       int64
	BillingAddressID  int64
	ShippingAddressID int64
	OrderID           int64
	BillMeLater       bool
}

CustomerCart CustomerCart

type CustomerOrder

type CustomerOrder struct {
	Success         bool
	Order           *sdbi.Order
	Items           *[]sdbi.OrderItem
	Comments        *[]sdbi.OrderComment
	CustomerAccount *CustomerAccount
	Cart            *sdbi.Cart
}

CustomerOrder CustomerOrder

type CustomerProduct

type CustomerProduct struct {
	ProductID int64
	Quantity  int64
	//Cart      *CustomerCart
	CustomerID int64
	//CartID     int64
	Cart     *sdbi.Cart
	CartItem *sdbi.CartItem
	//CustomerEmail string
	StoreID int64
}

CustomerProduct Product

type CustomerProductUpdate

type CustomerProductUpdate struct {
	//ProductID int64
	//Quantity  int64
	//Cart      *CustomerCart
	CustomerID int64
	Cart       *sdbi.Cart
	CartItem   *sdbi.CartItem
}

CustomerProductUpdate Product

type Manager

type Manager interface {
	AddProductToCart(cc *CustomerCart, cp *CustomerProduct, hd *api.Headers) *CustomerCart
	ViewCart(cc *CustomerCart, hd *api.Headers) *CartView
	UpdateProductToCart(cc *CustomerCart, cp *CustomerProductUpdate, hd *api.Headers) *CustomerCart
	CheckOut(cart *CustomerCart, hd *api.Headers) *CustomerOrder
	CalculateCartTotals(cart *CustomerCart, hd *api.Headers) *CustomerCart

	CreateCustomerAccount(cus *CustomerAccount, hd *api.Headers) (bool, *CustomerAccount)
	UpdateCustomerAccount(cus *CustomerAccount, hd *api.Headers) bool

	ViewCustomerOrder(orderID int64, cid int64, hd *api.Headers) *CustomerOrder
	ViewCustomerOrderList(cid int64, hd *api.Headers) *[]CustomerOrder

	CustomerLogin(u *api.User, hd *api.Headers) (bool, *api.User)
	CustomerChangePassword(u *api.User, hd *api.Headers) (bool, *api.User)

	StoreAdminLogin(u *api.User, hd *api.Headers) (bool, *api.User)
	StoreAdminChangePassword(u *api.User, hd *api.Headers) (bool, *api.User)
	UploadProductFile(file []byte, hd *api.Headers) (productsImported int, productNotImported int)
}

Manager Manager

type OrderItemResults

type OrderItemResults struct {
	OrderItem *sdbi.OrderItem
	Resp      *api.ResponseID
}

OrderItemResults OrderItemResults

type Product

type Product struct {
	ID                    int64   `json:"id"`
	Sku                   string  `json:"sku"`
	Gtin                  string  `json:"gtin"`
	Name                  string  `json:"name"`
	ShortDesc             string  `json:"shortDesc"`
	Desc                  string  `json:"desc"`
	Cost                  float64 `json:"cost"`
	Msrp                  float64 `json:"msrp"`
	Map                   float64 `json:"map"`
	Price                 float64 `json:"price"`
	SalePrice             float64 `json:"salePrice"`
	Currency              string  `json:"currency"`
	ManufacturerID        string  `json:"manufacturerId"`
	Manufacturer          string  `json:"manufacturer"`
	Stock                 int64   `json:"stock"`
	StockAlert            int64   `json:"stockAlert"`
	Weight                float64 `json:"weight"`
	Width                 float64 `json:"width"`
	Height                float64 `json:"height"`
	Depth                 float64 `json:"depth"`
	ShippingMarkup        float64 `json:"shippingMarkup"`
	Visible               bool    `json:"visible"`
	Searchable            bool    `json:"searchable"`
	MultiBox              bool    `json:"multibox"`
	ShipSeparately        bool    `json:"shipSeparately"`
	FreeShipping          bool    `json:"freeShipping"`
	Promoted              bool    `json:"promoted"`
	Dropship              bool    `json:"dropship"`
	SpecialProcessing     bool    `json:"specialProcessing"`
	SpecialProcessingType string  `json:"specialProcessingType"`
	Size                  string  `json:"size"`
	Color                 string  `json:"color"`
	Thumbnail             string  `json:"thumbnail"`
	Image1                string  `json:"image1"`
	Image2                string  `json:"image2"`
	Image3                string  `json:"image3"`
	Image4                string  `json:"image4"`
	DistributorID         int64   `json:"distributorId"`
	StoreID               int64   `json:"storeId"`
	ParentProductID       int64   `json:"parentProductId"`
	CategoryID            int64
}

Product Product

type Six910Manager

type Six910Manager struct {
	API api.API
	//StoreID int64
	Log *lg.Logger
	// contains filtered or unexported fields
}

Six910Manager Six910Manager

func (*Six910Manager) AddProductToCart

func (m *Six910Manager) AddProductToCart(cc *CustomerCart, cp *CustomerProduct, hd *api.Headers) *CustomerCart

AddProductToCart AddProductToCart

func (*Six910Manager) CalculateCartTotals

func (m *Six910Manager) CalculateCartTotals(cart *CustomerCart, hd *api.Headers) *CustomerCart

CalculateCartTotals CalculateCartTotals

func (*Six910Manager) CheckOut

func (m *Six910Manager) CheckOut(cart *CustomerCart, hd *api.Headers) *CustomerOrder

CheckOut CheckOut

func (*Six910Manager) CreateCustomerAccount

func (m *Six910Manager) CreateCustomerAccount(cus *CustomerAccount, hd *api.Headers) (bool, *CustomerAccount)

CreateCustomerAccount CreateCustomerAccount

func (*Six910Manager) CustomerChangePassword

func (m *Six910Manager) CustomerChangePassword(u *api.User, hd *api.Headers) (bool, *api.User)

CustomerChangePassword CustomerChangePassword

func (*Six910Manager) CustomerLogin

func (m *Six910Manager) CustomerLogin(u *api.User, hd *api.Headers) (bool, *api.User)

CustomerLogin CustomerLogin

func (*Six910Manager) GetNew

func (m *Six910Manager) GetNew() Manager

GetNew GetNew

func (*Six910Manager) StoreAdminChangePassword

func (m *Six910Manager) StoreAdminChangePassword(u *api.User, hd *api.Headers) (bool, *api.User)

StoreAdminChangePassword StoreAdminChangePassword

func (*Six910Manager) StoreAdminLogin

func (m *Six910Manager) StoreAdminLogin(u *api.User, hd *api.Headers) (bool, *api.User)

StoreAdminLogin StoreAdminLogin

func (*Six910Manager) UpdateCustomerAccount

func (m *Six910Manager) UpdateCustomerAccount(cus *CustomerAccount, hd *api.Headers) bool

UpdateCustomerAccount UpdateCustomerAccount

func (*Six910Manager) UpdateProductToCart

func (m *Six910Manager) UpdateProductToCart(cc *CustomerCart, cp *CustomerProductUpdate, hd *api.Headers) *CustomerCart

UpdateProductToCart UpdateCart

func (*Six910Manager) UploadProductFile

func (m *Six910Manager) UploadProductFile(file []byte, hd *api.Headers) (productsImported int, productNotImported int)

UploadProductFile UploadProductFile

func (*Six910Manager) ViewCart

func (m *Six910Manager) ViewCart(cc *CustomerCart, hd *api.Headers) *CartView

ViewCart ViewCart

func (*Six910Manager) ViewCustomerOrder

func (m *Six910Manager) ViewCustomerOrder(orderID int64, cid int64, hd *api.Headers) *CustomerOrder

ViewCustomerOrder ViewCustomerOrder

func (*Six910Manager) ViewCustomerOrderList

func (m *Six910Manager) ViewCustomerOrderList(cid int64, hd *api.Headers) *[]CustomerOrder

ViewCustomerOrderList ViewCustomerOrderList

Jump to

Keyboard shortcuts

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