Skip to main content

checkout.proto

path protobuffet/example/checkout/v1/checkout.proto

package protobuffet.example.checkout.v1


Messages

OrderItem

Represents a single item within an order.

NameTypeDescription
itemprotobuffet.example.carts.v1.CartItemAssociated item within a cart.
costprotobuffet.example.common.types.v1.MoneyCost for this order item record.

OrderResult

Represents a successfully placed order.

NameTypeDescription
order_idstringIdentifier for this placed order.
shipping_tracking_idstringReference to help track this placed order through its shipment.
shipping_costprotobuffet.example.common.types.v1.MoneyCost for us to ship this order.
shipping_addressprotobuffet.example.shipping.v1.AddressAddress the order is being shipped to.
itemsrepeated OrderItemItems the order contains.

PlaceOrderRequest

Request to place an order for a given user.

NameTypeDescription
user_idstringUser to place order for.
user_currencystringThe currency that the user would like to pay in. See implementation docs for supported values.
addressprotobuffet.example.shipping.v1.AddressAddress the user would like the order to be shipped to.
emailstringEmail the user would like order updates to be sent to. See implementation docs for formatting.
credit_cardprotobuffet.example.payment.v1.CreditCardInfoThe user's credit card to charge for this order.

PlaceOrderResponse

Response containing a successfully placed order.

NameTypeDescription
orderOrderResultSuccessfully placed order.

Services

CheckoutService

Checkout management service. Given a user's action of checking out for an order, we orchestrate the necessary dependency calls to make that happen in our system.

PlaceOrder

MethodPlaceOrder
RequestPlaceOrderRequest
ResponsePlaceOrderResponse
DescriptionAction taken on user checkout, place the provided order for the user.