Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMerchantNotSpecified no merchant ErrMerchantNotSpecified = errors.New("merchant not specified") ErrMerchantORUnavailabilityIDNotSpecified = errors.New("merchant or unavailability not specified") )
Functions ¶
Types ¶
type Address ¶
type Address struct { Formattedaddress string `json:"formattedAddress"` Country string `json:"country"` State string `json:"state"` City string `json:"city"` Neighborhood string `json:"neighborhood"` Streetname string `json:"streetName"` Streetnumber string `json:"streetNumber"` Postalcode string `json:"postalCode"` }
Address in a merchant
type Availability ¶
type Availability struct { Context string `json:"context"` Available bool `json:"available"` State string `json:"state"` Reopenable struct { // Identifier interface{} `json:"identifier"` // Type interface{} `json:"type"` Reopenable bool `json:"reopenable"` } `json:"reopenable"` Validations []struct { ID string `json:"id"` Code string `json:"code"` State string `json:"state"` Message struct { Title string `json:"title"` Subtitle string `json:"subtitle"` Description string `json:"description"` Priority int `json:"priority"` } `json:"message"` } `json:"validations"` Message struct { Title string `json:"title"` Subtitle string `json:"subtitle"` Description string `json:"description"` Priority int `json:"priority"` } `json:"message"` }
Availability struct to API validate
type AvailabilityResponse ¶
type AvailabilityResponse []Availability
AvailabilityResponse group of Availability
type Merchant ¶
type Merchant struct { ID string `json:"id"` Name string `json:"name"` Phones []string `json:"phones"` Address Address `json:"address"` }
Merchant API response
type Service ¶
type Service interface { ListAll() ([]Merchant, error) Availability(merchantUUID string) (AvailabilityResponse, error) }
Service describes the merchant API abstraction
type Unavailabilities ¶
type Unavailabilities []Unavailability
Unavailabilities group of Unavailability
type UnavailabilityResponse ¶
type UnavailabilityResponse struct {}
UnavailabilityResponse API response
Click to show internal directories.
Click to hide internal directories.