package lulu import ( "encoding/json" "fmt" ) // PodPkgId is a pod_package_id which represents the manufacturing options. // https://api.lulu.com/docs/#section/Getting-Started/Select-a-Product type PodPkgId struct { TrimSize ColorType Quality Binding Paper Finish Linen Foil } func (pod PodPkgId) MarshalJSON() ([]byte, error) { return json.Marshal(fmt.Sprintf("%s.%s.%s.%s.%s.%s%s%s", pod.TrimSize, pod.ColorType, pod.Quality, pod.Binding, pod.Paper, pod.Finish, pod.Linen, pod.Foil)) } // TrimSize is the final dimensions of the pages after the bleed margins // are trimmed off. type TrimSize string const ( Pocketbook TrimSize = "0425X0687" Novella = "0500X0800" Digest = "0550X0850" A5 = "0583X0827" UsTrade = "0600X0900" Royal = "0614X0921" Comic = "0663X1025" SmallSquare = "0750X0750" Executive = "0700X1000" CrownQuatro = "0744X0968" Square = "0850X0850" A4 = "0827X1169" UsLetter = "0850X1100" Landscape = "0900X0700" UsLetterLandscape = "1100X0850" A4Landscape = "1169X0827" ) // ColorType is the color mode of the printer. type ColorType string const ( Mono ColorType = "BW" Color = "FC" ) // Quality is the print quality. type Quality string const ( Premium Quality = "PRE" Standard = "STD" ) type Binding string const ( Perfect Binding = "PB" Coil = "CO" SaddleStitch = "SS" CaseWrap = "CW" LinenWrap = "LW" WireO = "WO" ) // Paper is the weight/thickness and hue of the paper. type Paper string const ( P60UncoatedWhite Paper = "060UW444" P60UncoatedCream = "060UC444" P70CoatedWhite = "070CW460" P80CoatedWhite = "080CW444" P100CoatedWhite = "100CW" ) // Finish is the surface finish of the cover. type Finish string const ( Gloss Finish = "G" Matte = "M" Unlaminated = "U" ) // Linen is the color of the linen-wrapped cover, if applicable. type Linen string const ( RedLinen Linen = "R" NavyLinen = "N" BlackLinen = "B" GrayLinen = "G" TanLinen = "T" ForestLinen = "F" InteriorCoverPrint = "I" NoLinen = "X" ) // Foil is the color of the foil stamping, if applicable. type Foil string const ( GoldFoil Foil = "G" BlackFoil = "B" WhiteFoil = "W" NoFoil = "X" )