checkout.proto
path protobuffet/example/checkout/v1/checkout.proto
package protobuffet.example.checkout.v1
Messages
OrderItem
Represents a single item within an order.
Name | Type | Description |
---|---|---|
item | protobuffet.example.carts.v1.CartItem | Associated item within a cart. |
cost | protobuffet.example.common.types.v1.Money | Cost for this order item record. |
OrderResult
Represents a successfully placed order.
Name | Type | Description |
---|---|---|
order_id | string | Identifier for this placed order. |
shipping_tracking_id | string | Reference to help track this placed order through its shipment. |
shipping_cost | protobuffet.example.common.types.v1.Money | Cost for us to ship this order. |
shipping_address | protobuffet.example.shipping.v1.Address | Address the order is being shipped to. |
items | repeated OrderItem | Items the order contains. |
PlaceOrderRequest
Request to place an order for a given user.
Name | Type | Description |
---|---|---|
user_id | string | User to place order for. |
user_currency | string | The currency that the user would like to pay in. See implementation docs for supported values. |
address | protobuffet.example.shipping.v1.Address | Address the user would like the order to be shipped to. |
email | string | Email the user would like order updates to be sent to. See implementation docs for formatting. |
credit_card | protobuffet.example.payment.v1.CreditCardInfo | The user's credit card to charge for this order. |
PlaceOrderResponse
Response containing a successfully placed order.
Name | Type | Description |
---|---|---|
order | OrderResult | Successfully 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
Method | PlaceOrder |
---|---|
Request | PlaceOrderRequest |
Response | PlaceOrderResponse |
Description | Action taken on user checkout, place the provided order for the user. |