syntax = "proto3";

option csharp_namespace = "GrpcBasket";

package BasketApi;

service Basket {
	rpc GetBasketById(BasketRequest) returns (CustomerBasketResponse) {}
	rpc UpdateBasket(CustomerBasketRequest) returns (CustomerBasketResponse) {}
}

message BasketRequest {
	string id = 1;
}

message CustomerBasketRequest {
	string buyerid = 1;
	repeated BasketItemResponse items = 2;
}

message CustomerBasketResponse {
	string buyerid = 1;
	repeated BasketItemResponse items = 2;
}

message BasketItemResponse {
	string id = 1;
	int32 productid = 2;
	string productname = 3;
	double unitprice = 4;
	double oldunitprice = 5;
	int32 quantity = 6;
	string pictureurl = 7;
}
