import "common_base.proto"; import "common.proto"; message AccountCartContents { repeated .AccountCartLineItem line_items = 1; optional .CartAmount subtotal = 2; optional bool is_valid = 3; optional .AccountCartValidationDetails validation_details = 4; } message AccountCartLineItem { optional uint64 line_item_id = 1; optional int32 type = 2 [(.description) = "enum"]; optional uint32 packageid = 3; optional uint32 bundleid = 4; optional bool is_valid = 8; optional .AccountCartValidationDetails validation_details = 9; optional uint32 time_added = 10; optional .CartAmount price_when_added = 11; optional .CartGiftInfo gift_info = 12; optional .AccountCartLineItemFlags flags = 13; optional uint64 gidcoupon_applied = 14; } message AccountCartLineItemFlags { optional bool is_gift = 1; optional bool is_private = 2; } message AccountCartValidationDetails { optional int32 validation_failure = 1 [default = 0, (.description) = "enum"]; } message CAccountCart_AddItemToCart_Request { optional uint32 packageid = 1; optional uint32 bundleid = 2; optional string user_country = 10; optional .CartGiftInfo gift_info = 11; optional .AccountCartLineItemFlags flags = 12; } message CAccountCart_AddItemToCart_Response { optional uint64 line_item_id = 1; optional .AccountCartContents cart = 2; } message CAccountCart_DeleteCart_Request { } message CAccountCart_DeleteCart_Response { } message CAccountCart_GetCart_Request { optional string user_country = 1; } message CAccountCart_GetCart_Response { optional .AccountCartContents cart = 1; } message CAccountCart_GetRelevantCoupons_Request { optional uint32 language = 1; } message CAccountCart_GetRelevantCoupons_Response { repeated .CAccountCart_GetRelevantCoupons_Response_LineItemCoupons line_items = 1; } message CAccountCart_GetRelevantCoupons_Response_LineItemCoupons { optional uint64 line_item_id = 1; repeated .CartCoupon coupons = 2; } message CAccountCart_MergeShoppingCartContents_Request { optional fixed64 gidshoppingcart = 1; optional string user_country = 2; } message CAccountCart_MergeShoppingCartContents_Response { optional .AccountCartContents cart = 1; } message CAccountCart_ModifyLineItem_Request { optional uint64 line_item_id = 1; optional string user_country = 2; optional .CartGiftInfo gift_info = 10; optional .AccountCartLineItemFlags flags = 11; optional uint64 apply_gidcoupon = 12; } message CAccountCart_ModifyLineItem_Response { optional .AccountCartContents cart = 1; } message CAccountCart_RemoveItemFromCart_Request { optional uint64 line_item_id = 1; optional string user_country = 2; } message CAccountCart_RemoveItemFromCart_Response { optional .AccountCartContents cart = 1; } service AccountCart { rpc AddItemToCart (.CAccountCart_AddItemToCart_Request) returns (.CAccountCart_AddItemToCart_Response); rpc DeleteCart (.CAccountCart_DeleteCart_Request) returns (.CAccountCart_DeleteCart_Response); rpc GetCart (.CAccountCart_GetCart_Request) returns (.CAccountCart_GetCart_Response); rpc GetRelevantCoupons (.CAccountCart_GetRelevantCoupons_Request) returns (.CAccountCart_GetRelevantCoupons_Response); rpc MergeShoppingCartContents (.CAccountCart_MergeShoppingCartContents_Request) returns (.CAccountCart_MergeShoppingCartContents_Response); rpc ModifyLineItem (.CAccountCart_ModifyLineItem_Request) returns (.CAccountCart_ModifyLineItem_Response); rpc RemoveItemFromCart (.CAccountCart_RemoveItemFromCart_Request) returns (.CAccountCart_RemoveItemFromCart_Response); }