shipping.proto
path protobuffet/example/shipping/v1/shipping.proto
package protobuffet.example.shipping.v1
Messages
Address
Represents an Address that we ship to.
Name | Type | Description |
---|---|---|
street_address | string | Address Line 1. If a unit number is present, it should prefix the street number eg. 613-54 Albert St. |
city | string | City the address is within. See implementation docs for expected formatting. |
state | string | State the address is within. See implementation docs for expected formatting. |
country | string | Country the address is within. See implementation docs for expected formatting. |
zip_code | string | Postal area the address is within. See implementation docs for expected formatting. |
GetQuoteRequest
Request to fetch a quote for a proposed shipment/order.
Name | Type | Description |
---|---|---|
address | Address | Address for proposed order. |
items | repeated protobuffet.example.carts.v1.CartItem | Items within proposed order. |
GetQuoteResponse
Response for a proposed shipment quote.
Name | Type | Description |
---|---|---|
cost_usd | protobuffet.example.common.types.v1.Money | Shipment quote. See implementation docs for unique responses. |
ShipOrderRequest
Request to trigger a new order to be shipped.
Name | Type | Description |
---|---|---|
address | Address | Address order should be shipped to. |
items | repeated protobuffet.example.carts.v1.CartItem | Items the proposed order contains. |
ShipOrderResponse
Response for a successfully created order.
Name | Type | Description |
---|---|---|
tracking_id | string | Tracking ID for the created order. |
Services
ShippingService
Shipment management service. This is a service created for the purpose of demonstration.
GetQuote
Method | GetQuote |
---|---|
Request | GetQuoteRequest |
Response | GetQuoteResponse |
Description | Fetch a quote (cost) for a proposed shipment. |
ShipOrder
Method | ShipOrder |
---|---|
Request | ShipOrderRequest |
Response | ShipOrderResponse |
Description | Trigger a new order to be shipped. |