Skip to content

Instantly share code, notes, and snippets.

@flaviozantut
Created February 21, 2020 19:31
Show Gist options
  • Save flaviozantut/23609d9ef924fa3868c61df397e1565d to your computer and use it in GitHub Desktop.
Save flaviozantut/23609d9ef924fa3868c61df397e1565d to your computer and use it in GitHub Desktop.
serices:
# Tipos de serviços habilitadas
types:
# Serviço do tipo coleta
COLLECT:
# Atributos especificos do serviço
attributes:
fulfillmentId:
type: string
orderId:
type: string
items:
type: List[Object{sku,description,quantity}]
# Mapa de status do serviço
status:
CREATED:
allowed_status: [SCHEDULED]
SCHEDULED:
# Quantas vezes o serviço pode ser enviado para o mesmo status, coleta reagendada
repeat: 3
attributes:
scheduleDate:
type: date
required: true
rules: $scheduleDate > CURRENT_DATE
carrier:
type: object
required: false
allowed_status: [BEING_COLLECTED]
BEING_COLLECTED:
attributes:
date:
type: date
required: true
carrier:
type: object
required: true
allowed_status: [COLLECTED]
COLLECTED:
attributes:
date:
type: date
required: true
carrier:
type: object
required: true
collectedItems:
type: List[Object{sku,quantity}]
required: true
allowed_status: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment