internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColWebsite col = iota
	ColOrderID
	ColOrderDate
	ColPurchaseOrderNumber
	ColCurrency
	ColUnitPrice
	ColUnitPriceTax
	ColShippingCharge
	ColTotalDiscounts
	ColTotalOwed
	ColShipmentItemSubtotal
	ColShipmentItemSubtotalTax
	ColASIN
	ColProductCondition
	ColQuantity
	ColPaymentInstrumentType
	ColOrderStatus
	ColShipmentStatus
	ColShipDate
	ColShippingOption
	ColShippingAddress
	ColBillingAddress
	ColCarrierNameWTrackingNumber
	ColProductName
	ColGiftMessage
	ColGiftSenderName
	ColGiftRecipientContactDetail
	ColItemSerialNumber
)

Variables

This section is empty.

Functions

func CalculateSpends

func CalculateSpends(orders []Order) float64

func GetOrdersCurrencies

func GetOrdersCurrencies(orders []Order) []string

Types

type Order

type Order struct {
	Website                    string
	OrderID                    string
	OrderDate                  string // 2024-11-03T12:32:17Z layout
	PurchaseOrderNumber        string
	Currency                   string
	UnitPrice                  float64
	UnitPriceTax               float64
	ShippingCharge             float64
	TotalDiscounts             float64
	TotalOwed                  float64
	ShipmentItemSubtotal       string
	ShipmentItemSubtotalTax    string
	ASIN                       string
	ProductCondition           string
	Quantity                   int
	PaymentInstrumentType      string
	OrderStatus                orderStatus
	ShipmentStatus             shipmentStatus
	ShipDate                   string
	ShippingOption             string
	ShippingAddress            string
	BillingAddress             string
	CarrierNameWTrackingNumber string
	ProductName                string
	GiftMessage                string
	GiftSenderName             string
	GiftRecipientContactDetail string
	ItemSerialNumber           string
}

func GetOrdersByCurrency

func GetOrdersByCurrency(orders []Order, cur string) []Order

func ParseCSV

func ParseCSV(f *os.File) ([]Order, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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