cart

package
v0.0.0-...-d71dbf0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT-0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ShoppingCartStatus_name = map[int32]string{
		0: "SCS_UNSPECIFIED",
		1: "SCS_OPEN",
		2: "SCS_ORDER_SUBMITTED",
		3: "SCS_ABANDONED_BY_USER",
		4: "SCS_ABANDONED_BY_TIMEOUT",
	}
	ShoppingCartStatus_value = map[string]int32{
		"SCS_UNSPECIFIED":          0,
		"SCS_OPEN":                 1,
		"SCS_ORDER_SUBMITTED":      2,
		"SCS_ABANDONED_BY_USER":    3,
		"SCS_ABANDONED_BY_TIMEOUT": 4,
	}
)

Enum value maps for ShoppingCartStatus.

View Source
var CartAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cart.CartAPI",
	HandlerType: (*CartAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateShoppingCart",
			Handler:    _CartAPI_CreateShoppingCart_Handler,
		},
		{
			MethodName: "GetShoppingCartByID",
			Handler:    _CartAPI_GetShoppingCartByID_Handler,
		},
		{
			MethodName: "AddItemToShoppingCart",
			Handler:    _CartAPI_AddItemToShoppingCart_Handler,
		},
		{
			MethodName: "RemoveItemFromShoppingCart",
			Handler:    _CartAPI_RemoveItemFromShoppingCart_Handler,
		},
		{
			MethodName: "SetDeliveryAddress",
			Handler:    _CartAPI_SetDeliveryAddress_Handler,
		},
		{
			MethodName: "CheckoutShoppingCart",
			Handler:    _CartAPI_CheckoutShoppingCart_Handler,
		},
		{
			MethodName: "AbandonShoppingCart",
			Handler:    _CartAPI_AbandonShoppingCart_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mikebway/cart/cart_api.proto",
}

CartAPI_ServiceDesc is the grpc.ServiceDesc for CartAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_mikebway_cart_cart_api_proto protoreflect.FileDescriptor
View Source
var File_mikebway_cart_cart_proto protoreflect.FileDescriptor

Functions

func RegisterCartAPIServer

func RegisterCartAPIServer(s grpc.ServiceRegistrar, srv CartAPIServer)

Types

type AbandonShoppingCartRequest

type AbandonShoppingCartRequest struct {
	CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"`
	// contains filtered or unexported fields
}

Request parameters for the AbandonShoppingCart API

func (*AbandonShoppingCartRequest) Descriptor deprecated

func (*AbandonShoppingCartRequest) Descriptor() ([]byte, []int)

Deprecated: Use AbandonShoppingCartRequest.ProtoReflect.Descriptor instead.

func (*AbandonShoppingCartRequest) GetCartId

func (x *AbandonShoppingCartRequest) GetCartId() string

func (*AbandonShoppingCartRequest) ProtoMessage

func (*AbandonShoppingCartRequest) ProtoMessage()

func (*AbandonShoppingCartRequest) ProtoReflect

func (*AbandonShoppingCartRequest) Reset

func (x *AbandonShoppingCartRequest) Reset()

func (*AbandonShoppingCartRequest) String

func (x *AbandonShoppingCartRequest) String() string

type AbandonShoppingCartResponse

type AbandonShoppingCartResponse struct {
	Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"`
	// contains filtered or unexported fields
}

Response parameters for the AbandonShoppingCart API.

func (*AbandonShoppingCartResponse) Descriptor deprecated

func (*AbandonShoppingCartResponse) Descriptor() ([]byte, []int)

Deprecated: Use AbandonShoppingCartResponse.ProtoReflect.Descriptor instead.

func (*AbandonShoppingCartResponse) GetCart

func (*AbandonShoppingCartResponse) ProtoMessage

func (*AbandonShoppingCartResponse) ProtoMessage()

func (*AbandonShoppingCartResponse) ProtoReflect

func (*AbandonShoppingCartResponse) Reset

func (x *AbandonShoppingCartResponse) Reset()

func (*AbandonShoppingCartResponse) String

func (x *AbandonShoppingCartResponse) String() string

type AddItemToShoppingCartRequest

type AddItemToShoppingCartRequest struct {

	// The ID of the cart that the item should be added too
	CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"`
	// The item to be added to the shopping cart
	Item *CartItem `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

Request parameters for the AddItemToShoppingCart API

func (*AddItemToShoppingCartRequest) Descriptor deprecated

func (*AddItemToShoppingCartRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddItemToShoppingCartRequest.ProtoReflect.Descriptor instead.

func (*AddItemToShoppingCartRequest) GetCartId

func (x *AddItemToShoppingCartRequest) GetCartId() string

func (*AddItemToShoppingCartRequest) GetItem

func (x *AddItemToShoppingCartRequest) GetItem() *CartItem

func (*AddItemToShoppingCartRequest) ProtoMessage

func (*AddItemToShoppingCartRequest) ProtoMessage()

func (*AddItemToShoppingCartRequest) ProtoReflect

func (*AddItemToShoppingCartRequest) Reset

func (x *AddItemToShoppingCartRequest) Reset()

func (*AddItemToShoppingCartRequest) String

type AddItemToShoppingCartResponse

type AddItemToShoppingCartResponse struct {

	// The populated cart requested
	Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"`
	// contains filtered or unexported fields
}

Response parameters for the AddItemToShoppingCart API

func (*AddItemToShoppingCartResponse) Descriptor deprecated

func (*AddItemToShoppingCartResponse) Descriptor() ([]byte, []int)

Deprecated: Use AddItemToShoppingCartResponse.ProtoReflect.Descriptor instead.

func (*AddItemToShoppingCartResponse) GetCart

func (*AddItemToShoppingCartResponse) ProtoMessage

func (*AddItemToShoppingCartResponse) ProtoMessage()

func (*AddItemToShoppingCartResponse) ProtoReflect

func (*AddItemToShoppingCartResponse) Reset

func (x *AddItemToShoppingCartResponse) Reset()

func (*AddItemToShoppingCartResponse) String

type CartAPIClient

type CartAPIClient interface {
	// Create a new shopping cart
	CreateShoppingCart(ctx context.Context, in *CreateShoppingCartRequest, opts ...grpc.CallOption) (*CreateShoppingCartResponse, error)
	// Retrieve a cart by UUID ID
	GetShoppingCartByID(ctx context.Context, in *GetShoppingCartByIDRequest, opts ...grpc.CallOption) (*GetShoppingCartByIDResponse, error)
	// Add an item to a cart
	AddItemToShoppingCart(ctx context.Context, in *AddItemToShoppingCartRequest, opts ...grpc.CallOption) (*AddItemToShoppingCartResponse, error)
	// Remove an item from the cart
	RemoveItemFromShoppingCart(ctx context.Context, in *RemoveItemFromShoppingCartRequest, opts ...grpc.CallOption) (*RemoveItemFromShoppingCartResponse, error)
	// Set the delivery address for physical cart items
	SetDeliveryAddress(ctx context.Context, in *SetDeliveryAddressRequest, opts ...grpc.CallOption) (*SetDeliveryAddressResponse, error)
	// Submit the order / checkout the shopping cart
	CheckoutShoppingCart(ctx context.Context, in *CheckoutShoppingCartRequest, opts ...grpc.CallOption) (*CheckoutShoppingCartResponse, error)
	// Explicitly abandon a shopping cart in response to a user request.
	AbandonShoppingCart(ctx context.Context, in *AbandonShoppingCartRequest, opts ...grpc.CallOption) (*AbandonShoppingCartResponse, error)
}

CartAPIClient is the client API for CartAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCartAPIClient

func NewCartAPIClient(cc grpc.ClientConnInterface) CartAPIClient

type CartAPIServer

type CartAPIServer interface {
	// Create a new shopping cart
	CreateShoppingCart(context.Context, *CreateShoppingCartRequest) (*CreateShoppingCartResponse, error)
	// Retrieve a cart by UUID ID
	GetShoppingCartByID(context.Context, *GetShoppingCartByIDRequest) (*GetShoppingCartByIDResponse, error)
	// Add an item to a cart
	AddItemToShoppingCart(context.Context, *AddItemToShoppingCartRequest) (*AddItemToShoppingCartResponse, error)
	// Remove an item from the cart
	RemoveItemFromShoppingCart(context.Context, *RemoveItemFromShoppingCartRequest) (*RemoveItemFromShoppingCartResponse, error)
	// Set the delivery address for physical cart items
	SetDeliveryAddress(context.Context, *SetDeliveryAddressRequest) (*SetDeliveryAddressResponse, error)
	// Submit the order / checkout the shopping cart
	CheckoutShoppingCart(context.Context, *CheckoutShoppingCartRequest) (*CheckoutShoppingCartResponse, error)
	// Explicitly abandon a shopping cart in response to a user request.
	AbandonShoppingCart(context.Context, *AbandonShoppingCartRequest) (*AbandonShoppingCartResponse, error)
	// contains filtered or unexported methods
}

CartAPIServer is the server API for CartAPI service. All implementations must embed UnimplementedCartAPIServer for forward compatibility

type CartItem

type CartItem struct {

	// A UUID ID in hexadecimal string form - a unique ID for this item.
	// This will be set by the cart when the item is added to the shopper's cart
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The UUID ID (as a hexadecimal string) of the shopping cart that this item belongs to
	CartId string `protobuf:"bytes,2,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"`
	// Product code is the equivalent of a SKU code identifying the type of
	// product or service being ordered.
	ProductCode string `protobuf:"bytes,3,opt,name=product_code,json=productCode,proto3" json:"product_code,omitempty"`
	// Quantity is the number of this item type that is being ordered.
	Quantity int32 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// The unit price is the price that the customer was shown for a single item
	// when they selected the item for their cart
	UnitPrice *money.Money `protobuf:"bytes,5,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"`
	// contains filtered or unexported fields
}

CartItem represents a single entry in an order. An order will contain one to many order items.

func (*CartItem) Descriptor deprecated

func (*CartItem) Descriptor() ([]byte, []int)

Deprecated: Use CartItem.ProtoReflect.Descriptor instead.

func (*CartItem) GetCartId

func (x *CartItem) GetCartId() string

func (*CartItem) GetId

func (x *CartItem) GetId() string

func (*CartItem) GetProductCode

func (x *CartItem) GetProductCode() string

func (*CartItem) GetQuantity

func (x *CartItem) GetQuantity() int32

func (*CartItem) GetUnitPrice

func (x *CartItem) GetUnitPrice() *money.Money

func (*CartItem) ProtoMessage

func (*CartItem) ProtoMessage()

func (*CartItem) ProtoReflect

func (x *CartItem) ProtoReflect() protoreflect.Message

func (*CartItem) Reset

func (x *CartItem) Reset()

func (*CartItem) String

func (x *CartItem) String() string

type CheckoutShoppingCartRequest

type CheckoutShoppingCartRequest struct {
	CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"`
	// contains filtered or unexported fields
}

Request parameters for the CheckoutShoppingCart API

func (*CheckoutShoppingCartRequest) Descriptor deprecated

func (*CheckoutShoppingCartRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckoutShoppingCartRequest.ProtoReflect.Descriptor instead.

func (*CheckoutShoppingCartRequest) GetCartId

func (x *CheckoutShoppingCartRequest) GetCartId() string

func (*CheckoutShoppingCartRequest) ProtoMessage

func (*CheckoutShoppingCartRequest) ProtoMessage()

func (*CheckoutShoppingCartRequest) ProtoReflect

func (*CheckoutShoppingCartRequest) Reset

func (x *CheckoutShoppingCartRequest) Reset()

func (*CheckoutShoppingCartRequest) String

func (x *CheckoutShoppingCartRequest) String() string

type CheckoutShoppingCartResponse

type CheckoutShoppingCartResponse struct {
	Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"`
	// contains filtered or unexported fields
}

Response parameters for the CheckoutShoppingCart API.

func (*CheckoutShoppingCartResponse) Descriptor deprecated

func (*CheckoutShoppingCartResponse) Descriptor() ([]byte, []int)

Deprecated: Use CheckoutShoppingCartResponse.ProtoReflect.Descriptor instead.

func (*CheckoutShoppingCartResponse) GetCart

func (*CheckoutShoppingCartResponse) ProtoMessage

func (*CheckoutShoppingCartResponse) ProtoMessage()

func (*CheckoutShoppingCartResponse) ProtoReflect

func (*CheckoutShoppingCartResponse) Reset

func (x *CheckoutShoppingCartResponse) Reset()

func (*CheckoutShoppingCartResponse) String

type CreateShoppingCartRequest

type CreateShoppingCartRequest struct {

	// The person / user requesting to open a new shopping cart
	Shopper *types.Person `protobuf:"bytes,1,opt,name=shopper,proto3" json:"shopper,omitempty"`
	// contains filtered or unexported fields
}

Request parameters for the CreateShoppingCart API

func (*CreateShoppingCartRequest) Descriptor deprecated

func (*CreateShoppingCartRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateShoppingCartRequest.ProtoReflect.Descriptor instead.

func (*CreateShoppingCartRequest) GetShopper

func (x *CreateShoppingCartRequest) GetShopper() *types.Person

func (*CreateShoppingCartRequest) ProtoMessage

func (*CreateShoppingCartRequest) ProtoMessage()

func (*CreateShoppingCartRequest) ProtoReflect

func (*CreateShoppingCartRequest) Reset

func (x *CreateShoppingCartRequest) Reset()

func (*CreateShoppingCartRequest) String

func (x *CreateShoppingCartRequest) String() string

type CreateShoppingCartResponse

type CreateShoppingCartResponse struct {

	// The empty cart requested
	Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"`
	// contains filtered or unexported fields
}

Response parameters for the CreateShoppingCart API

func (*CreateShoppingCartResponse) Descriptor deprecated

func (*CreateShoppingCartResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateShoppingCartResponse.ProtoReflect.Descriptor instead.

func (*CreateShoppingCartResponse) GetCart

func (*CreateShoppingCartResponse) ProtoMessage

func (*CreateShoppingCartResponse) ProtoMessage()

func (*CreateShoppingCartResponse) ProtoReflect

func (*CreateShoppingCartResponse) Reset

func (x *CreateShoppingCartResponse) Reset()

func (*CreateShoppingCartResponse) String

func (x *CreateShoppingCartResponse) String() string

type GetShoppingCartByIDRequest

type GetShoppingCartByIDRequest struct {
	CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"`
	// contains filtered or unexported fields
}

Request parameters for the GetShoppingCartByID API

func (*GetShoppingCartByIDRequest) Descriptor deprecated

func (*GetShoppingCartByIDRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetShoppingCartByIDRequest.ProtoReflect.Descriptor instead.

func (*GetShoppingCartByIDRequest) GetCartId

func (x *GetShoppingCartByIDRequest) GetCartId() string

func (*GetShoppingCartByIDRequest) ProtoMessage

func (*GetShoppingCartByIDRequest) ProtoMessage()

func (*GetShoppingCartByIDRequest) ProtoReflect

func (*GetShoppingCartByIDRequest) Reset

func (x *GetShoppingCartByIDRequest) Reset()

func (*GetShoppingCartByIDRequest) String

func (x *GetShoppingCartByIDRequest) String() string

type GetShoppingCartByIDResponse

type GetShoppingCartByIDResponse struct {
	Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"`
	// contains filtered or unexported fields
}

Response parameters for the GetShoppingCartByID API.

The cart field shall be missing / empty if no match was wound for the given ID.

func (*GetShoppingCartByIDResponse) Descriptor deprecated

func (*GetShoppingCartByIDResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetShoppingCartByIDResponse.ProtoReflect.Descriptor instead.

func (*GetShoppingCartByIDResponse) GetCart

func (*GetShoppingCartByIDResponse) ProtoMessage

func (*GetShoppingCartByIDResponse) ProtoMessage()

func (*GetShoppingCartByIDResponse) ProtoReflect

func (*GetShoppingCartByIDResponse) Reset

func (x *GetShoppingCartByIDResponse) Reset()

func (*GetShoppingCartByIDResponse) String

func (x *GetShoppingCartByIDResponse) String() string

type RemoveItemFromShoppingCartRequest

type RemoveItemFromShoppingCartRequest struct {

	// The ID of the cart that the item should be removed from
	CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"`
	// The item to be removed from the shopping cart
	ItemId string `protobuf:"bytes,2,opt,name=item_id,json=itemId,proto3" json:"item_id,omitempty"`
	// contains filtered or unexported fields
}

Request parameters for the RemoveItemFromShoppingCart API

func (*RemoveItemFromShoppingCartRequest) Descriptor deprecated

func (*RemoveItemFromShoppingCartRequest) Descriptor() ([]byte, []int)

Deprecated: Use RemoveItemFromShoppingCartRequest.ProtoReflect.Descriptor instead.

func (*RemoveItemFromShoppingCartRequest) GetCartId

func (*RemoveItemFromShoppingCartRequest) GetItemId

func (*RemoveItemFromShoppingCartRequest) ProtoMessage

func (*RemoveItemFromShoppingCartRequest) ProtoMessage()

func (*RemoveItemFromShoppingCartRequest) ProtoReflect

func (*RemoveItemFromShoppingCartRequest) Reset

func (*RemoveItemFromShoppingCartRequest) String

type RemoveItemFromShoppingCartResponse

type RemoveItemFromShoppingCartResponse struct {

	// The (slightly) depopulated cart
	Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"`
	// contains filtered or unexported fields
}

Response parameters for the RemoveItemFromShoppingCart API

func (*RemoveItemFromShoppingCartResponse) Descriptor deprecated

func (*RemoveItemFromShoppingCartResponse) Descriptor() ([]byte, []int)

Deprecated: Use RemoveItemFromShoppingCartResponse.ProtoReflect.Descriptor instead.

func (*RemoveItemFromShoppingCartResponse) GetCart

func (*RemoveItemFromShoppingCartResponse) ProtoMessage

func (*RemoveItemFromShoppingCartResponse) ProtoMessage()

func (*RemoveItemFromShoppingCartResponse) ProtoReflect

func (*RemoveItemFromShoppingCartResponse) Reset

func (*RemoveItemFromShoppingCartResponse) String

type SetDeliveryAddressRequest

type SetDeliveryAddressRequest struct {

	// The ID of the cart that the address should be added too
	CartId string `protobuf:"bytes,1,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"`
	// The address to be set into the order
	DeliveryAddress *types.PostalAddress `protobuf:"bytes,2,opt,name=delivery_address,json=deliveryAddress,proto3" json:"delivery_address,omitempty"`
	// contains filtered or unexported fields
}

Request parameters for the SetDeliveryAddress API

func (*SetDeliveryAddressRequest) Descriptor deprecated

func (*SetDeliveryAddressRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetDeliveryAddressRequest.ProtoReflect.Descriptor instead.

func (*SetDeliveryAddressRequest) GetCartId

func (x *SetDeliveryAddressRequest) GetCartId() string

func (*SetDeliveryAddressRequest) GetDeliveryAddress

func (x *SetDeliveryAddressRequest) GetDeliveryAddress() *types.PostalAddress

func (*SetDeliveryAddressRequest) ProtoMessage

func (*SetDeliveryAddressRequest) ProtoMessage()

func (*SetDeliveryAddressRequest) ProtoReflect

func (*SetDeliveryAddressRequest) Reset

func (x *SetDeliveryAddressRequest) Reset()

func (*SetDeliveryAddressRequest) String

func (x *SetDeliveryAddressRequest) String() string

type SetDeliveryAddressResponse

type SetDeliveryAddressResponse struct {

	// The populated cart requested
	Cart *ShoppingCart `protobuf:"bytes,1,opt,name=cart,proto3" json:"cart,omitempty"`
	// contains filtered or unexported fields
}

Response parameters for the SetDeliveryAddress API

func (*SetDeliveryAddressResponse) Descriptor deprecated

func (*SetDeliveryAddressResponse) Descriptor() ([]byte, []int)

Deprecated: Use SetDeliveryAddressResponse.ProtoReflect.Descriptor instead.

func (*SetDeliveryAddressResponse) GetCart

func (*SetDeliveryAddressResponse) ProtoMessage

func (*SetDeliveryAddressResponse) ProtoMessage()

func (*SetDeliveryAddressResponse) ProtoReflect

func (*SetDeliveryAddressResponse) Reset

func (x *SetDeliveryAddressResponse) Reset()

func (*SetDeliveryAddressResponse) String

func (x *SetDeliveryAddressResponse) String() string

type ShoppingCart

type ShoppingCart struct {

	// A UUID ID in hexadecimal string form - a unique ID for this cart.
	// This will be set by the cart service when the cart is first created.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The time at which shopping cart was first instantiated
	CreationTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"`
	// Optional. The time at which shopping cart was closed, either  as
	// abandoned or submitted / checked out. See the Status to determine which
	ClosedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=closed_time,json=closedTime,proto3" json:"closed_time,omitempty"`
	// The state of the shopping cart as an enumerated value
	Status ShoppingCartStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cart.ShoppingCartStatus" json:"status,omitempty"`
	// The person who opened the shopping cart
	Shopper *types.Person `protobuf:"bytes,5,opt,name=shopper,proto3" json:"shopper,omitempty"`
	// The delivery address for the order
	DeliveryAddress *types.PostalAddress `protobuf:"bytes,6,opt,name=delivery_address,json=deliveryAddress,proto3" json:"delivery_address,omitempty"`
	// Cart items is the list of one to many items that make up the potential order
	CartItems []*CartItem `protobuf:"bytes,7,rep,name=cart_items,json=cartItems,proto3" json:"cart_items,omitempty"`
	// contains filtered or unexported fields
}

A shopping cart collects the cart items that a shopper is considering purchasing or has purchased. A cart should be considered immutable once purchase has been processed.

It is persisted in the cart datastore kind.

func (*ShoppingCart) Descriptor deprecated

func (*ShoppingCart) Descriptor() ([]byte, []int)

Deprecated: Use ShoppingCart.ProtoReflect.Descriptor instead.

func (*ShoppingCart) GetCartItems

func (x *ShoppingCart) GetCartItems() []*CartItem

func (*ShoppingCart) GetClosedTime

func (x *ShoppingCart) GetClosedTime() *timestamppb.Timestamp

func (*ShoppingCart) GetCreationTime

func (x *ShoppingCart) GetCreationTime() *timestamppb.Timestamp

func (*ShoppingCart) GetDeliveryAddress

func (x *ShoppingCart) GetDeliveryAddress() *types.PostalAddress

func (*ShoppingCart) GetId

func (x *ShoppingCart) GetId() string

func (*ShoppingCart) GetShopper

func (x *ShoppingCart) GetShopper() *types.Person

func (*ShoppingCart) GetStatus

func (x *ShoppingCart) GetStatus() ShoppingCartStatus

func (*ShoppingCart) ProtoMessage

func (*ShoppingCart) ProtoMessage()

func (*ShoppingCart) ProtoReflect

func (x *ShoppingCart) ProtoReflect() protoreflect.Message

func (*ShoppingCart) Reset

func (x *ShoppingCart) Reset()

func (*ShoppingCart) String

func (x *ShoppingCart) String() string

type ShoppingCartStatus

type ShoppingCartStatus int32

An enumeration of shopping cart states

const (
	ShoppingCartStatus_SCS_UNSPECIFIED          ShoppingCartStatus = 0
	ShoppingCartStatus_SCS_OPEN                 ShoppingCartStatus = 1
	ShoppingCartStatus_SCS_ORDER_SUBMITTED      ShoppingCartStatus = 2
	ShoppingCartStatus_SCS_ABANDONED_BY_USER    ShoppingCartStatus = 3
	ShoppingCartStatus_SCS_ABANDONED_BY_TIMEOUT ShoppingCartStatus = 4
)

func (ShoppingCartStatus) Descriptor

func (ShoppingCartStatus) Enum

func (ShoppingCartStatus) EnumDescriptor deprecated

func (ShoppingCartStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ShoppingCartStatus.Descriptor instead.

func (ShoppingCartStatus) Number

func (ShoppingCartStatus) String

func (x ShoppingCartStatus) String() string

func (ShoppingCartStatus) Type

type UnimplementedCartAPIServer

type UnimplementedCartAPIServer struct {
}

UnimplementedCartAPIServer must be embedded to have forward compatible implementations.

type UnsafeCartAPIServer

type UnsafeCartAPIServer interface {
	// contains filtered or unexported methods
}

UnsafeCartAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CartAPIServer will result in compilation errors.

Jump to

Keyboard shortcuts

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