You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.5 KiB
Go

package api
type (
SlugIdBase struct {
Slug *string `json:"slug,omitempty"`
Id *string `json:"id,omitempty"`
}
MonetaryValue struct {
Currency string `json:"currency"`
Amount float64 `json:"amount"`
}
UnitAmount struct {
Unit string `json:"currency"`
Amount float64 `json:"amount"`
}
HubResult struct {
SlugIdBase
Address string `json:"address"`
City string `json:"city"`
Details HubDetails `json:"details"`
Country string `json:"country"`
DeliversToRequestedLocation bool `json:"delivers_to_requested_location"`
}
HubClosure struct {
Message string
Title string
Case string
}
HubDetails struct {
Closure HubClosure `json:"closure"`
MinimumorderValue MonetaryValue `json:"minimum_order_value"`
ShippingFee MonetaryValue `json:"shipping_fee"`
}
// ConsumerBackend Discovery API v2
DiscoverCategoriesResult struct {
SlugIdBase
Categories DiscoverCategoriesList `json:"categories"`
Title *string `json:"title,omitempty"`
}
DiscoverCategoriesList struct {
Categories []DiscoverCategoryEntry `json:"categories"`
}
DiscoverCategoryEntry struct {
SlugIdBase
BackgroundImage *string `json:"backgroundImage,omitempty"`
Icon *string `json:"icon,omitempty"`
HREF *string `json:"href,omitempty"`
Name string `json:"name"`
SubCategories *[]DiscoverCategorySubEntry `json:"subCategories,omitempty"`
Products *DiscoverSubProductList `json:"products,omitempty"`
}
// first layer
DiscoverCategorySubEntry struct {
Name string `json:"name"`
Categories []DiscoverCategoryEntry `json:"categories"`
Title *string `json:"title,omitempty"`
SlugIdBase
}
//second layer with products
DiscoverSubProductList struct {
Products *[]DiscoverSubProductEntry `json:"products"`
}
DiscoverSubProductEntry struct {
SlugIdBase
BasePrice MonetaryValue `json:"base_price"`
BaseUnit UnitAmount `json:"base_unit"`
MaxSingleOrderquantity int64 `json:"max_single_order_quantity"`
Name string `json:"name"`
Price MonetaryValue `json:"price"`
Quantity float64 `json:"quantity"`
SKU string `json:"sku"`
Thumbnail string `json:"thumbnail"`
}
//
)