Documentation ¶
Index ¶
- Variables
- type Contact
- func (*Contact) Descriptor() ([]byte, []int)deprecated
- func (x *Contact) GetBusinessName() string
- func (x *Contact) GetEmail() string
- func (x *Contact) GetId() string
- func (x *Contact) GetPerson() *Person
- func (x *Contact) GetPhone() *phone_number.PhoneNumber
- func (*Contact) ProtoMessage()
- func (x *Contact) ProtoReflect() protoreflect.Message
- func (x *Contact) Reset()
- func (x *Contact) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetDeliveryAddress() *PostalAddress
- func (x *Order) GetId() string
- func (x *Order) GetOrderItems() []*OrderItem
- func (x *Order) GetOrderStatus() OrderStatus
- func (x *Order) GetOrderedBy() *Person
- func (x *Order) GetSubmissionTime() *timestamppb.Timestamp
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderItem
- func (*OrderItem) Descriptor() ([]byte, []int)deprecated
- func (x *OrderItem) GetId() string
- func (x *OrderItem) GetProductCode() string
- func (x *OrderItem) GetQuantity() int32
- func (x *OrderItem) GetStatus() OrderItemStatus
- func (x *OrderItem) GetUnitPrice() *money.Money
- func (*OrderItem) ProtoMessage()
- func (x *OrderItem) ProtoReflect() protoreflect.Message
- func (x *OrderItem) Reset()
- func (x *OrderItem) String() string
- type OrderItemStatus
- func (OrderItemStatus) Descriptor() protoreflect.EnumDescriptor
- func (x OrderItemStatus) Enum() *OrderItemStatus
- func (OrderItemStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderItemStatus) Number() protoreflect.EnumNumber
- func (x OrderItemStatus) String() string
- func (OrderItemStatus) Type() protoreflect.EnumType
- type OrderStatus
- func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
- func (x OrderStatus) Enum() *OrderStatus
- func (OrderStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderStatus) Number() protoreflect.EnumNumber
- func (x OrderStatus) String() string
- func (OrderStatus) Type() protoreflect.EnumType
- type Person
- func (*Person) Descriptor() ([]byte, []int)deprecated
- func (x *Person) GetDisplayName() string
- func (x *Person) GetFamilyName() string
- func (x *Person) GetGivenName() string
- func (x *Person) GetId() string
- func (x *Person) GetMiddleName() string
- func (*Person) ProtoMessage()
- func (x *Person) ProtoReflect() protoreflect.Message
- func (x *Person) Reset()
- func (x *Person) String() string
- type PostalAddress
- func (*PostalAddress) Descriptor() ([]byte, []int)deprecated
- func (x *PostalAddress) GetAddressLines() []string
- func (x *PostalAddress) GetAdministrativeArea() string
- func (x *PostalAddress) GetLanguageCode() string
- func (x *PostalAddress) GetLocality() string
- func (x *PostalAddress) GetMailboxId() string
- func (x *PostalAddress) GetOrganization() string
- func (x *PostalAddress) GetPostalCode() string
- func (x *PostalAddress) GetRecipients() []string
- func (x *PostalAddress) GetRegionCode() string
- func (x *PostalAddress) GetRevision() int32
- func (x *PostalAddress) GetSortingCode() string
- func (x *PostalAddress) GetSublocality() string
- func (*PostalAddress) ProtoMessage()
- func (x *PostalAddress) ProtoReflect() protoreflect.Message
- func (x *PostalAddress) Reset()
- func (x *PostalAddress) String() string
Constants ¶
This section is empty.
Variables ¶
var ( OrderStatus_name = map[int32]string{ 0: "OS_UNSPECIFIED", 1: "OS_PENDING", 2: "OS_COMPLETED", 3: "OS_CANCELED", 4: "OS_PARTIALLY_CANCELLED", } OrderStatus_value = map[string]int32{ "OS_UNSPECIFIED": 0, "OS_PENDING": 1, "OS_COMPLETED": 2, "OS_CANCELED": 3, "OS_PARTIALLY_CANCELLED": 4, } )
Enum value maps for OrderStatus.
var ( OrderItemStatus_name = map[int32]string{ 0: "OIS_UNSPECIFIED", 1: "OIS_PENDING", 2: "OIS_COMPLETED", 3: "OIS_REFUND_PENDING", 4: "OIS_REFUNDED", } OrderItemStatus_value = map[string]int32{ "OIS_UNSPECIFIED": 0, "OIS_PENDING": 1, "OIS_COMPLETED": 2, "OIS_REFUND_PENDING": 3, "OIS_REFUNDED": 4, } )
Enum value maps for OrderItemStatus.
var File_mikebway_types_address_proto protoreflect.FileDescriptor
var File_mikebway_types_order_proto protoreflect.FileDescriptor
var File_mikebway_types_person_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct { // A UUID ID in hexadecimal string form Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Optional. The person if the contact is a specific, individual, human Person *Person `protobuf:"bytes,2,opt,name=person,proto3" json:"person,omitempty"` // Optional. The name of the business / institution if the contact is either the business / institution in general // of the person is a representative of the business. BusinessName string `protobuf:"bytes,3,opt,name=business_name,json=businessName,proto3" json:"business_name,omitempty"` // Optional. The email address for the person or business entity Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // Optional. The phone number of the contact Phone *phone_number.PhoneNumber `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` // contains filtered or unexported fields }
Contact describes an entity (person, business, institution, etc) that serves as a contact for some purpose.
func (*Contact) Descriptor
deprecated
func (*Contact) GetBusinessName ¶
func (*Contact) GetPhone ¶
func (x *Contact) GetPhone() *phone_number.PhoneNumber
func (*Contact) ProtoMessage ¶
func (*Contact) ProtoMessage()
func (*Contact) ProtoReflect ¶
func (x *Contact) ProtoReflect() protoreflect.Message
type Order ¶
type Order struct { // A UUID ID in hexadecimal string form - a unique ID for this order. // This will be set by the cart when the order is submitted. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The time at which cart checkout was completed and the order was submitted for payment SubmissionTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=submission_time,json=submissionTime,proto3" json:"submission_time,omitempty"` // OrderStatus describes the overall status of the order, summarizing or // overriding the status of the individual order items. OrderStatus OrderStatus `` /* 127-byte string literal not displayed */ // The person who submitted the order OrderedBy *Person `protobuf:"bytes,4,opt,name=ordered_by,json=orderedBy,proto3" json:"ordered_by,omitempty"` // The delivery address for the order DeliveryAddress *PostalAddress `protobuf:"bytes,5,opt,name=delivery_address,json=deliveryAddress,proto3" json:"delivery_address,omitempty"` // Order items is the list of one to many items that make up the order OrderItems []*OrderItem `protobuf:"bytes,6,rep,name=order_items,json=orderItems,proto3" json:"order_items,omitempty"` // contains filtered or unexported fields }
An order is generated by the shopping cart service on checkout. Posted to the event bus by the cart service, it will trigger the payment phase.
func (*Order) Descriptor
deprecated
func (*Order) GetDeliveryAddress ¶
func (x *Order) GetDeliveryAddress() *PostalAddress
func (*Order) GetOrderItems ¶
func (*Order) GetOrderStatus ¶
func (x *Order) GetOrderStatus() OrderStatus
func (*Order) GetOrderedBy ¶
func (*Order) GetSubmissionTime ¶
func (x *Order) GetSubmissionTime() *timestamppb.Timestamp
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderItem ¶
type OrderItem struct { // A UUID ID in hexadecimal string form - a unique ID for this item. // This will be set by the cart when the item is added to the shopper's cart Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Product code is the equivalent of a SKU code identifying the type of // product or service being ordered. ProductCode string `protobuf:"bytes,2,opt,name=product_code,json=productCode,proto3" json:"product_code,omitempty"` // Quantity is the number of this item type that is being ordered. Quantity int32 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` // The unit price is the price that the customer was shown for a single item // when they selected the item for their cart UnitPrice *money.Money `protobuf:"bytes,4,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"` // The fulfillment state of the oder item as an enumerated value Status OrderItemStatus `protobuf:"varint,5,opt,name=status,proto3,enum=mikebway.types.OrderItemStatus" json:"status,omitempty"` // contains filtered or unexported fields }
OrderItem represents a single entry in an order. An order will contain one to many order items.
func (*OrderItem) Descriptor
deprecated
func (*OrderItem) GetProductCode ¶
func (*OrderItem) GetQuantity ¶
func (*OrderItem) GetStatus ¶
func (x *OrderItem) GetStatus() OrderItemStatus
func (*OrderItem) GetUnitPrice ¶
func (*OrderItem) ProtoMessage ¶
func (*OrderItem) ProtoMessage()
func (*OrderItem) ProtoReflect ¶
func (x *OrderItem) ProtoReflect() protoreflect.Message
type OrderItemStatus ¶
type OrderItemStatus int32
An enumeration of order item states
const ( OrderItemStatus_OIS_UNSPECIFIED OrderItemStatus = 0 OrderItemStatus_OIS_PENDING OrderItemStatus = 1 OrderItemStatus_OIS_COMPLETED OrderItemStatus = 2 OrderItemStatus_OIS_REFUND_PENDING OrderItemStatus = 3 OrderItemStatus_OIS_REFUNDED OrderItemStatus = 4 )
func (OrderItemStatus) Descriptor ¶
func (OrderItemStatus) Descriptor() protoreflect.EnumDescriptor
func (OrderItemStatus) Enum ¶
func (x OrderItemStatus) Enum() *OrderItemStatus
func (OrderItemStatus) EnumDescriptor
deprecated
func (OrderItemStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderItemStatus.Descriptor instead.
func (OrderItemStatus) Number ¶
func (x OrderItemStatus) Number() protoreflect.EnumNumber
func (OrderItemStatus) String ¶
func (x OrderItemStatus) String() string
func (OrderItemStatus) Type ¶
func (OrderItemStatus) Type() protoreflect.EnumType
type OrderStatus ¶
type OrderStatus int32
An enumeration of order item states
const ( OrderStatus_OS_UNSPECIFIED OrderStatus = 0 OrderStatus_OS_PENDING OrderStatus = 1 OrderStatus_OS_COMPLETED OrderStatus = 2 OrderStatus_OS_CANCELED OrderStatus = 3 OrderStatus_OS_PARTIALLY_CANCELLED OrderStatus = 4 )
func (OrderStatus) Descriptor ¶
func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
func (OrderStatus) Enum ¶
func (x OrderStatus) Enum() *OrderStatus
func (OrderStatus) EnumDescriptor
deprecated
func (OrderStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderStatus.Descriptor instead.
func (OrderStatus) Number ¶
func (x OrderStatus) Number() protoreflect.EnumNumber
func (OrderStatus) String ¶
func (x OrderStatus) String() string
func (OrderStatus) Type ¶
func (OrderStatus) Type() protoreflect.EnumType
type Person ¶
type Person struct { // A UUID ID in hexadecimal string form Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Optional. In western cultures, the person's last name (e.g. "Broadway") FamilyName string `protobuf:"bytes,2,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"` // Optional. In western cultures, the person's first name (e.g. "Michael") GivenName string `protobuf:"bytes,3,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"` // Optional. The person's middle name(s), space delimited, if any (e.g. "Dennis Albert") MiddleName string `protobuf:"bytes,4,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"` // Optional. How the name might be displayed on a web page (e.g. "Mike Broadway") DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // contains filtered or unexported fields }
Person describes a human individual.
See https://developers.google.com/people/api/rest/v1/people#Person.Name as field naming reference.
func (*Person) Descriptor
deprecated
func (*Person) GetDisplayName ¶
func (*Person) GetFamilyName ¶
func (*Person) GetGivenName ¶
func (*Person) GetMiddleName ¶
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) ProtoReflect ¶
func (x *Person) ProtoReflect() protoreflect.Message
type PostalAddress ¶
type PostalAddress struct { // The schema revision of the `PostalAddress`. // All new revisions **must** be backward compatible with old revisions. // // This is retained in the message definition for compatibility with the // Google PostalAddress but the primary versioning mechanism at // ZenBusiness shall be in the package name. Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` // Required. CLDR region code of the country/region of the address. This // is never inferred and it is up to the user to ensure the value is // correct. See http://cldr.unicode.org/ and // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html // for details. Example: "CH" for Switzerland. RegionCode string `protobuf:"bytes,2,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"` // Optional. BCP-47 language code of the contents of this address (if // known). This is often the UI language of the input form or is expected // to match one of the languages used in the address' country/region, or their // transliterated equivalents. // This can affect formatting in certain countries, but is not critical // to the correctness of the data and will never affect any validation or // other non-formatting related operations. // // If this value is not known, it should be omitted (rather than specifying a // possibly incorrect default). // // Examples: "zh-Hant", "ja", "ja-Latn", "en". LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` // Optional. Postal code of the address. Not all countries use or require // postal codes to be present, but where they are used, they may trigger // additional validation with other parts of the address (e.g. state/zip // validation in the U.S.A.). PostalCode string `protobuf:"bytes,4,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"` // Optional. Additional, country-specific, sorting code. This is not used // in most regions. Where it is used, the value is either a string like // "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number // alone, representing the "sector code" (Jamaica), "delivery area indicator" // (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). SortingCode string `protobuf:"bytes,5,opt,name=sorting_code,json=sortingCode,proto3" json:"sorting_code,omitempty"` // Optional. Highest administrative subdivision which is used for postal // addresses of a country or region. // For example, this can be a state, a province, an oblast, or a prefecture. // Specifically, for Spain this is the province and not the autonomous // community (e.g. "Barcelona" and not "Catalonia"). // Many countries don't use an administrative area in postal addresses. E.g. // in Switzerland this should be left unpopulated. AdministrativeArea string `protobuf:"bytes,6,opt,name=administrative_area,json=administrativeArea,proto3" json:"administrative_area,omitempty"` // Optional. Generally refers to the city/town portion of the address. // Examples: US city, IT comune, UK post town. // In regions of the world where localities are not well defined or do not fit // into this structure well, leave locality empty and use address_lines. Locality string `protobuf:"bytes,7,opt,name=locality,proto3" json:"locality,omitempty"` // Optional. Sublocality of the address. // For example, this can be neighborhoods, boroughs, districts. Sublocality string `protobuf:"bytes,8,opt,name=sublocality,proto3" json:"sublocality,omitempty"` // Unstructured address lines describing the lower levels of an address. // // Because values in address_lines do not have type information and may // sometimes contain multiple values in a single field (e.g. // "Austin, TX"), it is important that the line order is clear. The order of // address lines should be "envelope order" for the country/region of the // address. In places where this can vary (e.g. Japan), address_language is // used to make it explicit (e.g. "ja" for large-to-small ordering and // "ja-Latn" or "en" for small-to-large). This way, the most specific line of // an address can be selected based on the language. // // The minimum permitted structural representation of an address consists // of a region_code with all remaining information placed in the // address_lines. It would be possible to format such an address very // approximately without geocoding, but no semantic reasoning could be // made about any of the address components until it was at least // partially resolved. // // Creating an address only containing a region_code and address_lines, and // then geocoding is the recommended way to handle completely unstructured // addresses (as opposed to guessing which parts of the address should be // localities or administrative areas). AddressLines []string `protobuf:"bytes,9,rep,name=address_lines,json=addressLines,proto3" json:"address_lines,omitempty"` // Optional. The recipient at the address. // This field may, under certain circumstances, contain multiline information. // For example, it might contain "care of" information. Recipients []string `protobuf:"bytes,10,rep,name=recipients,proto3" json:"recipients,omitempty"` // Optional. The name of the organization at the address. Organization string `protobuf:"bytes,11,opt,name=organization,proto3" json:"organization,omitempty"` // Optional. The identifier of a mailbox at this address. Used in the case // where multiple entities may be registered at the same address, divided // by per entity delivery boxes. MailboxId string `protobuf:"bytes,12,opt,name=mailbox_id,json=mailboxId,proto3" json:"mailbox_id,omitempty"` // contains filtered or unexported fields }
Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains).
In typical usage an address would be created via user input or from importing existing data, depending on the type of process.
Advice on address input / editing:
- Use an i18n-ready address widget such as https://github.com/googlei18n/libaddressinput)
- Users should not be presented with UI elements for input or editing of fields outside countries where that field is used.
For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478
func (*PostalAddress) Descriptor
deprecated
func (*PostalAddress) Descriptor() ([]byte, []int)
Deprecated: Use PostalAddress.ProtoReflect.Descriptor instead.
func (*PostalAddress) GetAddressLines ¶
func (x *PostalAddress) GetAddressLines() []string
func (*PostalAddress) GetAdministrativeArea ¶
func (x *PostalAddress) GetAdministrativeArea() string
func (*PostalAddress) GetLanguageCode ¶
func (x *PostalAddress) GetLanguageCode() string
func (*PostalAddress) GetLocality ¶
func (x *PostalAddress) GetLocality() string
func (*PostalAddress) GetMailboxId ¶
func (x *PostalAddress) GetMailboxId() string
func (*PostalAddress) GetOrganization ¶
func (x *PostalAddress) GetOrganization() string
func (*PostalAddress) GetPostalCode ¶
func (x *PostalAddress) GetPostalCode() string
func (*PostalAddress) GetRecipients ¶
func (x *PostalAddress) GetRecipients() []string
func (*PostalAddress) GetRegionCode ¶
func (x *PostalAddress) GetRegionCode() string
func (*PostalAddress) GetRevision ¶
func (x *PostalAddress) GetRevision() int32
func (*PostalAddress) GetSortingCode ¶
func (x *PostalAddress) GetSortingCode() string
func (*PostalAddress) GetSublocality ¶
func (x *PostalAddress) GetSublocality() string
func (*PostalAddress) ProtoMessage ¶
func (*PostalAddress) ProtoMessage()
func (*PostalAddress) ProtoReflect ¶
func (x *PostalAddress) ProtoReflect() protoreflect.Message
func (*PostalAddress) Reset ¶
func (x *PostalAddress) Reset()
func (*PostalAddress) String ¶
func (x *PostalAddress) String() string