receipt

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReceiptType_name = map[int32]string{
		0: "RECEIPT_TYPE_RECEIPT_WITH_ACCOUNTING",
		1: "RECEIPT_TYPE_RECEIPT_WITHOUT_ACCOUNTING",
	}
	ReceiptType_value = map[string]int32{
		"RECEIPT_TYPE_RECEIPT_WITH_ACCOUNTING":    0,
		"RECEIPT_TYPE_RECEIPT_WITHOUT_ACCOUNTING": 1,
	}
)

Enum value maps for ReceiptType.

View Source
var File_receipt_receipt_proto protoreflect.FileDescriptor
View Source
var ReceiptService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "receipt.ReceiptService",
	HandlerType: (*ReceiptServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateWithAccounting",
			Handler:    _ReceiptService_CreateWithAccounting_Handler,
		},
		{
			MethodName: "CreateWithoutAccounting",
			Handler:    _ReceiptService_CreateWithoutAccounting_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "receipt/receipt.proto",
}

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

Functions

func RegisterReceiptServiceServer added in v0.0.27

func RegisterReceiptServiceServer(s grpc.ServiceRegistrar, srv ReceiptServiceServer)

Types

type CreateWithAccountingRequest added in v0.0.27

type CreateWithAccountingRequest struct {
	SellerId                          int32                                          `protobuf:"varint,1,opt,name=seller_id,json=sellerId,proto3" json:"seller_id,omitempty"`
	Products                          []*ReceiptProduct                              `protobuf:"bytes,2,rep,name=products,proto3" json:"products,omitempty"`
	CustomerId                        int32                                          `protobuf:"varint,3,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
	ReceiptingPointWithAccountingId   int32                                          `` /* 161-byte string literal not displayed */
	ReceiptingPointWithAccountingType tradingpoint.ReceiptingPointWithAccountingType `` /* 219-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CreateWithAccountingRequest) Descriptor deprecated added in v0.0.27

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

Deprecated: Use CreateWithAccountingRequest.ProtoReflect.Descriptor instead.

func (*CreateWithAccountingRequest) GetCustomerId added in v0.0.27

func (x *CreateWithAccountingRequest) GetCustomerId() int32

func (*CreateWithAccountingRequest) GetProducts added in v0.0.27

func (x *CreateWithAccountingRequest) GetProducts() []*ReceiptProduct

func (*CreateWithAccountingRequest) GetReceiptingPointWithAccountingId added in v0.0.27

func (x *CreateWithAccountingRequest) GetReceiptingPointWithAccountingId() int32

func (*CreateWithAccountingRequest) GetReceiptingPointWithAccountingType added in v0.0.27

func (x *CreateWithAccountingRequest) GetReceiptingPointWithAccountingType() tradingpoint.ReceiptingPointWithAccountingType

func (*CreateWithAccountingRequest) GetSellerId added in v0.0.27

func (x *CreateWithAccountingRequest) GetSellerId() int32

func (*CreateWithAccountingRequest) ProtoMessage added in v0.0.27

func (*CreateWithAccountingRequest) ProtoMessage()

func (*CreateWithAccountingRequest) ProtoReflect added in v0.0.27

func (*CreateWithAccountingRequest) Reset added in v0.0.27

func (x *CreateWithAccountingRequest) Reset()

func (*CreateWithAccountingRequest) String added in v0.0.27

func (x *CreateWithAccountingRequest) String() string

type CreateWithAccountingResponse added in v0.0.27

type CreateWithAccountingResponse struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateWithAccountingResponse) Descriptor deprecated added in v0.0.27

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

Deprecated: Use CreateWithAccountingResponse.ProtoReflect.Descriptor instead.

func (*CreateWithAccountingResponse) GetId added in v0.0.27

func (*CreateWithAccountingResponse) ProtoMessage added in v0.0.27

func (*CreateWithAccountingResponse) ProtoMessage()

func (*CreateWithAccountingResponse) ProtoReflect added in v0.0.27

func (*CreateWithAccountingResponse) Reset added in v0.0.27

func (x *CreateWithAccountingResponse) Reset()

func (*CreateWithAccountingResponse) String added in v0.0.27

type CreateWithoutAccountingRequest added in v0.0.27

type CreateWithoutAccountingRequest struct {
	SellerId                             int32                                             `protobuf:"varint,1,opt,name=seller_id,json=sellerId,proto3" json:"seller_id,omitempty"`
	Products                             []*ReceiptProduct                                 `protobuf:"bytes,2,rep,name=products,proto3" json:"products,omitempty"`
	ReceiptingPointWithoutAccountingId   int32                                             `` /* 170-byte string literal not displayed */
	ReceiptingPointWithoutAccountingType tradingpoint.ReceiptingPointWithoutAccountingType `` /* 231-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CreateWithoutAccountingRequest) Descriptor deprecated added in v0.0.27

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

Deprecated: Use CreateWithoutAccountingRequest.ProtoReflect.Descriptor instead.

func (*CreateWithoutAccountingRequest) GetProducts added in v0.0.27

func (x *CreateWithoutAccountingRequest) GetProducts() []*ReceiptProduct

func (*CreateWithoutAccountingRequest) GetReceiptingPointWithoutAccountingId added in v0.0.27

func (x *CreateWithoutAccountingRequest) GetReceiptingPointWithoutAccountingId() int32

func (*CreateWithoutAccountingRequest) GetReceiptingPointWithoutAccountingType added in v0.0.27

func (x *CreateWithoutAccountingRequest) GetReceiptingPointWithoutAccountingType() tradingpoint.ReceiptingPointWithoutAccountingType

func (*CreateWithoutAccountingRequest) GetSellerId added in v0.0.27

func (x *CreateWithoutAccountingRequest) GetSellerId() int32

func (*CreateWithoutAccountingRequest) ProtoMessage added in v0.0.27

func (*CreateWithoutAccountingRequest) ProtoMessage()

func (*CreateWithoutAccountingRequest) ProtoReflect added in v0.0.27

func (*CreateWithoutAccountingRequest) Reset added in v0.0.27

func (x *CreateWithoutAccountingRequest) Reset()

func (*CreateWithoutAccountingRequest) String added in v0.0.27

type CreateWithoutAccountingResponse added in v0.0.27

type CreateWithoutAccountingResponse struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateWithoutAccountingResponse) Descriptor deprecated added in v0.0.27

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

Deprecated: Use CreateWithoutAccountingResponse.ProtoReflect.Descriptor instead.

func (*CreateWithoutAccountingResponse) GetId added in v0.0.27

func (*CreateWithoutAccountingResponse) ProtoMessage added in v0.0.27

func (*CreateWithoutAccountingResponse) ProtoMessage()

func (*CreateWithoutAccountingResponse) ProtoReflect added in v0.0.27

func (*CreateWithoutAccountingResponse) Reset added in v0.0.27

func (*CreateWithoutAccountingResponse) String added in v0.0.27

type Receipt added in v0.0.27

type Receipt struct {
	Id        int32                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Type      ReceiptType            `protobuf:"varint,2,opt,name=type,proto3,enum=receipt.ReceiptType" json:"type,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	SellerId  int32                  `protobuf:"varint,4,opt,name=seller_id,json=sellerId,proto3" json:"seller_id,omitempty"`
	Products  []*ReceiptProduct      `protobuf:"bytes,5,rep,name=products,proto3" json:"products,omitempty"`
	// contains filtered or unexported fields
}

func (*Receipt) Descriptor deprecated added in v0.0.27

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

Deprecated: Use Receipt.ProtoReflect.Descriptor instead.

func (*Receipt) GetCreatedAt added in v0.0.27

func (x *Receipt) GetCreatedAt() *timestamppb.Timestamp

func (*Receipt) GetId added in v0.0.27

func (x *Receipt) GetId() int32

func (*Receipt) GetProducts added in v0.0.27

func (x *Receipt) GetProducts() []*ReceiptProduct

func (*Receipt) GetSellerId added in v0.0.27

func (x *Receipt) GetSellerId() int32

func (*Receipt) GetType added in v0.0.27

func (x *Receipt) GetType() ReceiptType

func (*Receipt) ProtoMessage added in v0.0.27

func (*Receipt) ProtoMessage()

func (*Receipt) ProtoReflect added in v0.0.27

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

func (*Receipt) Reset added in v0.0.27

func (x *Receipt) Reset()

func (*Receipt) String added in v0.0.27

func (x *Receipt) String() string

type ReceiptProduct added in v0.0.27

type ReceiptProduct struct {
	Quantity int32            `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	Price    *core.Money      `protobuf:"bytes,3,opt,name=price,proto3" json:"price,omitempty"`
	Product  *product.Product `protobuf:"bytes,4,opt,name=product,proto3" json:"product,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiptProduct) Descriptor deprecated added in v0.0.27

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

Deprecated: Use ReceiptProduct.ProtoReflect.Descriptor instead.

func (*ReceiptProduct) GetPrice added in v0.0.27

func (x *ReceiptProduct) GetPrice() *core.Money

func (*ReceiptProduct) GetProduct added in v0.0.27

func (x *ReceiptProduct) GetProduct() *product.Product

func (*ReceiptProduct) GetQuantity added in v0.0.27

func (x *ReceiptProduct) GetQuantity() int32

func (*ReceiptProduct) ProtoMessage added in v0.0.27

func (*ReceiptProduct) ProtoMessage()

func (*ReceiptProduct) ProtoReflect added in v0.0.27

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

func (*ReceiptProduct) Reset added in v0.0.27

func (x *ReceiptProduct) Reset()

func (*ReceiptProduct) String added in v0.0.27

func (x *ReceiptProduct) String() string

type ReceiptServiceClient added in v0.0.27

type ReceiptServiceClient interface {
	CreateWithAccounting(ctx context.Context, in *CreateWithAccountingRequest, opts ...grpc.CallOption) (*CreateWithAccountingResponse, error)
	CreateWithoutAccounting(ctx context.Context, in *CreateWithoutAccountingRequest, opts ...grpc.CallOption) (*CreateWithoutAccountingResponse, error)
}

ReceiptServiceClient is the client API for ReceiptService 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 NewReceiptServiceClient added in v0.0.27

func NewReceiptServiceClient(cc grpc.ClientConnInterface) ReceiptServiceClient

type ReceiptServiceServer added in v0.0.27

type ReceiptServiceServer interface {
	CreateWithAccounting(context.Context, *CreateWithAccountingRequest) (*CreateWithAccountingResponse, error)
	CreateWithoutAccounting(context.Context, *CreateWithoutAccountingRequest) (*CreateWithoutAccountingResponse, error)
	// contains filtered or unexported methods
}

ReceiptServiceServer is the server API for ReceiptService service. All implementations must embed UnimplementedReceiptServiceServer for forward compatibility

type ReceiptType added in v0.0.27

type ReceiptType int32
const (
	ReceiptType_RECEIPT_TYPE_RECEIPT_WITH_ACCOUNTING    ReceiptType = 0
	ReceiptType_RECEIPT_TYPE_RECEIPT_WITHOUT_ACCOUNTING ReceiptType = 1
)

func (ReceiptType) Descriptor added in v0.0.27

func (ReceiptType) Enum added in v0.0.27

func (x ReceiptType) Enum() *ReceiptType

func (ReceiptType) EnumDescriptor deprecated added in v0.0.27

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

Deprecated: Use ReceiptType.Descriptor instead.

func (ReceiptType) Number added in v0.0.27

func (x ReceiptType) Number() protoreflect.EnumNumber

func (ReceiptType) String added in v0.0.27

func (x ReceiptType) String() string

func (ReceiptType) Type added in v0.0.27

type ReceiptWithAccounting added in v0.0.27

type ReceiptWithAccounting struct {
	Id                                int32                                          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CustomerId                        int32                                          `protobuf:"varint,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
	ReceiptingPointWithAccountingId   int32                                          `` /* 161-byte string literal not displayed */
	ReceiptingPointWithAccountingType tradingpoint.ReceiptingPointWithAccountingType `` /* 219-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ReceiptWithAccounting) Descriptor deprecated added in v0.0.27

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

Deprecated: Use ReceiptWithAccounting.ProtoReflect.Descriptor instead.

func (*ReceiptWithAccounting) GetCustomerId added in v0.0.27

func (x *ReceiptWithAccounting) GetCustomerId() int32

func (*ReceiptWithAccounting) GetId added in v0.0.27

func (x *ReceiptWithAccounting) GetId() int32

func (*ReceiptWithAccounting) GetReceiptingPointWithAccountingId added in v0.0.27

func (x *ReceiptWithAccounting) GetReceiptingPointWithAccountingId() int32

func (*ReceiptWithAccounting) GetReceiptingPointWithAccountingType added in v0.0.27

func (x *ReceiptWithAccounting) GetReceiptingPointWithAccountingType() tradingpoint.ReceiptingPointWithAccountingType

func (*ReceiptWithAccounting) ProtoMessage added in v0.0.27

func (*ReceiptWithAccounting) ProtoMessage()

func (*ReceiptWithAccounting) ProtoReflect added in v0.0.27

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

func (*ReceiptWithAccounting) Reset added in v0.0.27

func (x *ReceiptWithAccounting) Reset()

func (*ReceiptWithAccounting) String added in v0.0.27

func (x *ReceiptWithAccounting) String() string

type ReceiptWithoutAccounting added in v0.0.27

type ReceiptWithoutAccounting struct {
	Id                                   int32                                             `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ReceiptingPointWithoutAccountingId   int32                                             `` /* 170-byte string literal not displayed */
	ReceiptingPointWithoutAccountingType tradingpoint.ReceiptingPointWithoutAccountingType `` /* 231-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ReceiptWithoutAccounting) Descriptor deprecated added in v0.0.27

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

Deprecated: Use ReceiptWithoutAccounting.ProtoReflect.Descriptor instead.

func (*ReceiptWithoutAccounting) GetId added in v0.0.27

func (x *ReceiptWithoutAccounting) GetId() int32

func (*ReceiptWithoutAccounting) GetReceiptingPointWithoutAccountingId added in v0.0.27

func (x *ReceiptWithoutAccounting) GetReceiptingPointWithoutAccountingId() int32

func (*ReceiptWithoutAccounting) GetReceiptingPointWithoutAccountingType added in v0.0.27

func (x *ReceiptWithoutAccounting) GetReceiptingPointWithoutAccountingType() tradingpoint.ReceiptingPointWithoutAccountingType

func (*ReceiptWithoutAccounting) ProtoMessage added in v0.0.27

func (*ReceiptWithoutAccounting) ProtoMessage()

func (*ReceiptWithoutAccounting) ProtoReflect added in v0.0.27

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

func (*ReceiptWithoutAccounting) Reset added in v0.0.27

func (x *ReceiptWithoutAccounting) Reset()

func (*ReceiptWithoutAccounting) String added in v0.0.27

func (x *ReceiptWithoutAccounting) String() string

type UnimplementedReceiptServiceServer added in v0.0.27

type UnimplementedReceiptServiceServer struct {
}

UnimplementedReceiptServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedReceiptServiceServer) CreateWithAccounting added in v0.0.27

func (UnimplementedReceiptServiceServer) CreateWithoutAccounting added in v0.0.27

type UnsafeReceiptServiceServer added in v0.0.27

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

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

Jump to

Keyboard shortcuts

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