models

package
v0.0.0-...-61222dd Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Street    string   `json:"street"`
	StreetTwo string   `json:"streetTwo"`
	City      string   `json:"city"`
	State     string   `json:"state"`
	Postcode  string   `json:"postcode"`
	Phone     string   `json:"phone"`
	Email     string   `json:"email"`
	Location  Location `json:"location"`
}

type AddressParams

type AddressParams struct {
	Street     string `json:"street"`
	StreetTwo  string `json:"streetTwo"`
	City       string `json:"city"`
	State      string `json:"state"`
	Postcode   string `json:"postcode"`
	LocationId string `json:"locationId"`
	Phone      string `json:"phone"`
	Email      string `json:"email"`
}

func (AddressParams) GetGraphQLType

func (AddressParams) GetGraphQLType() string

type Cart

type Cart struct {
	ID                 string          `json:"id"`
	IsShippingRequired bool            `json:"isShippingRequired"`
	CartItems          []QueryCartItem `json:"cartItems"`
}

type CartItem

type CartItem struct {
	ProductID string `json:"productId"`
	Quantity  int    `json:"quantity"`
}

func (CartItem) GetGraphQLType

func (CartItem) GetGraphQLType() string

type Category

type Category struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	ProductCount int    `json:"product_count"`
}

type CouponCode

type CouponCode struct {
	Code string `json:"code"`
}

type Customer

type Customer struct {
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
	Email     string `json:"email"`
}

type CustomerState

type CustomerState string
const (
	CustomerStateStart          CustomerState = "start"
	CustomerStateChooseMenu     CustomerState = "choose_menu"
	CustomerStateCheckout       CustomerState = "checkout"
	CustomerStateAdditionalData CustomerState = "additional_data"
	CustomerStatePay            CustomerState = "pay"
	CustomerStateOrderConfirmed CustomerState = "order_confirmed"
	CustomerStateSearchProducts CustomerState = "search_products"
)

type GuestCheckoutPlaceOrderParams

type GuestCheckoutPlaceOrderParams struct {
	CartID           string        `json:"cartId"`
	BillingAddress   AddressParams `json:"billingAddress"`
	ShippingAddress  AddressParams `json:"shippingAddress"`
	PaymentMethodId  string        `json:"paymentMethodId"`
	ShippingMethodId string        `json:"shippingMethodId"`
	FirstName        string        `json:"firstName"`
	LastName         string        `json:"lastName"`
	Email            string        `json:"email"`
	Note             string        `json:"note"`
	CouponCode       string        `json:"couponCode"`
}

func (GuestCheckoutPlaceOrderParams) GetGraphQLType

func (GuestCheckoutPlaceOrderParams) GetGraphQLType() string

type Location

type Location struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type NewCartParams

type NewCartParams struct {
	CartItems []CartItem `json:"cartItems"`
}

func (NewCartParams) GetGraphQLType

func (NewCartParams) GetGraphQLType() string

type OrderDetail

type OrderDetail struct {
	ID                   string         `json:"id"`
	Hash                 string         `json:"hash"`
	Subtotal             int64          `json:"subtotal"`
	GrandTotal           int64          `json:"grandTotal"`
	DiscountedAmount     int64          `json:"discountedAmount"`
	Status               string         `json:"status"`
	PaymentStatus        string         `json:"paymentStatus"`
	CreatedAt            string         `json:"createdAt"`
	Cart                 OrderedCart    `json:"cart"`
	CouponCode           CouponCode     `json:"couponCode"`
	Note                 string         `json:"note"`
	ShippingCharge       int64          `json:"shippingCharge"`
	PaymentProcessingFee int64          `json:"paymentProcessingFee"`
	BillingAddress       Address        `json:"billingAddress"`
	ShippingAddress      Address        `json:"shippingAddress"`
	PaymentMethod        PaymentMethod  `json:"paymentMethod"`
	ShippingMethod       ShippingMethod `json:"shippingMethod"`
	Customer             Customer       `json:"customer"`
}

type OrderedCart

type OrderedCart struct {
	CartItems []OrderedItem `json:"cartItems"`
}

type OrderedItem

type OrderedItem struct {
	PurchasePrice int64   `json:"purchasePrice"`
	Quantity      int     `json:"quantity"`
	Product       Product `json:"product"`
}

type Pagination

type Pagination struct {
	PerPage int `json:"perPage"`
	Page    int `json:"page"`
}

func (Pagination) GetGraphQLType

func (Pagination) GetGraphQLType() string

type PaymentCallbackOverrides

type PaymentCallbackOverrides struct {
	SuccessCallback string `json:"SuccessCallback"`
	FailureCallback string `json:"FailureCallback"`
}

func (PaymentCallbackOverrides) GetGraphQLType

func (PaymentCallbackOverrides) GetGraphQLType() string

type PaymentMethod

type PaymentMethod struct {
	ID               string `json:"id"`
	DisplayName      string `json:"displayName"`
	IsDigitalPayment bool   `json:"isDigitalPayment"`
}

type PaymentNonce

type PaymentNonce struct {
	PaymentGatewayName   string `json:"PaymentGatewayName" graphql:"PaymentGatewayName"`
	Nonce                string `json:"Nonce" graphql:"Nonce"`
	StripePublishableKey string `json:"StripePublishableKey" graphql:"StripePublishableKey"`
}

type PlaceOrderParams

type PlaceOrderParams struct {
	CustomerID string
	CartID     string
	FirstName  string
	LastName   string
	Phone      string
	Email      string
}

type Product

type Product struct {
	Index                   string   `graphql:"-"`
	ID                      string   `json:"id"`
	Name                    string   `json:"name"`
	Price                   int64    `json:"price"`
	Stock                   int64    `json:"stock"`
	ProductSpecificDiscount int64    `json:"productSpecificDiscount"`
	FullImages              []string `json:"fullImages"`
}

type QueryCartItem

type QueryCartItem struct {
	Product       Product `json:"product"`
	Quantity      int     `json:"quantity"`
	PurchasePrice int64   `json:"purchasePrice"`
}
type Search struct {
	Query   string              `json:"query"`
	Filters []map[string]string `json:"filters"`
}

func (Search) GetGraphQLType

func (Search) GetGraphQLType() string

type ShippingMethod

type ShippingMethod struct {
	ID                 string `json:"id"`
	DisplayName        string `json:"displayName"`
	DeliveryTimeInDays int    `json:"deliveryTimeInDays"`
	DeliveryCharge     int64  `json:"deliveryCharge"`
	IsFlat             bool   `json:"isFlat"`
}

type Shop

type Shop struct {
	Name            string   `json:"name"`
	Title           string   `json:"title"`
	Description     string   `json:"description"`
	Tags            []string `json:"tags"`
	MetaName        string   `json:"metaName"`
	MetaDescription string   `json:"metaDescription"`
	MetaTags        []string `json:"metaTags"`
	LogoPath        string   `json:"logoPath"`
	Favicon         string   `json:"favicon"`
	FaviconPath     string   `json:"faviconPath"`
	IsOpen          bool     `json:"isOpen"`
	Currency        string   `json:"currency"`
	SupportPhone    string   `json:"supportPhone"`
}

type Sort

type Sort struct {
	By        string `json:"by"`
	Direction string `json:"direction"`
}

func (Sort) GetGraphQLType

func (Sort) GetGraphQLType() string

type UpdateCartParams

type UpdateCartParams struct {
	CartItems []CartItem `json:"cartItems"`
}

func (UpdateCartParams) GetGraphQLType

func (UpdateCartParams) GetGraphQLType() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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