1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
use crate;
/// # Delivery Status Webhook Event Definitions
///
/// | Name| Type| Description|
/// | :--- | :--- | :--- |
/// | status| String| Status of the delivery the event refers to.|
/// | kind| String| The kind of the event in more detail (event.delivery_status, event.delivery_return).|
/// | created| LocalDateTime| LocalDateTime indicating when the event was generated.|
/// | live_mode| bool| A flag indicating if the event applies to a live vs a test delivery.|
/// | delivery_id| String| The id of the delivery the event applies to.|
/// | id| String| A unique id for this event instance.|
/// | data| DeliveryData| Information about the delivery|
/// | customer_id| String| Unique identifier for the customer this delivery belongs to.|
/// | developer_id| String| Unique identifier for the developer the above customer_id maps to.|
/// | account_id| String| Unique identifier for the account of the above developer that this delivery belongs to.|
/// | route_id| String| Unique identifier of the route. This value can be used to identify when multiple deliveries are being picked up by a single courier.|
///
/// Courier Update Webhook Event Definitions
/// |Name| Type| Description|
/// | :--- | :--- | :--- |
/// |location| LatLng| A latitude and longitude indicating the courier’s location.|
/// |kind| string| The kind of the event in more detail (event.courier_update).|
/// |live_mode| boolean| A flag indicating if the event applies to a live vs a test delivery.|
/// |delivery_id| string| The id of the delivery the event applies to.|
/// |job_id| string| |
/// |data| DeliveryData| Information about the delivery|
///
/// # Webhook Event Definitions - DeliveryData
///
///| Name| Type |Description|
/// | :--- | :--- | :--- |
/// |id| String| The id of the delivery the event applies to.|
/// |status| String| Status of the delivery the event refers to.|
/// |created| LocalDateTime (RFC 3339)| Date/Time at which the delivery was created.|
/// |updated| LocalDateTime (RFC 3339)| Date/Time at which the delivery was last updated.|
/// |pickup_eta| LocalDateTime (RFC 3339)| Estimated time the courier will arrive at the pickup location.|
/// |pickup_ready| LocalDateTime (RFC 3339)| When a delivery is ready to be picked up. This is the start of the pickup window.|
/// |pickup_deadline| LocalDateTime (RFC 3339)| When a delivery must be picked up by. This is the end of the pickup window.|
/// |dropoff_eta| LocalDateTime (RFC 3339)| Estimated drop-off time.|
/// |dropoff_ready| LocalDateTime (RFC 3339)| When a delivery is ready to be dropped off. This is the start of the dropoff window.|
/// |dropoff_deadline| LocalDateTime (RFC 3339)| When a delivery must be dropped off. This is the end of the dropoff window.|
/// |quote_id| String| ID for the Delivery Quote if one was provided when creating this Delivery.|
/// |fee| i64| Amount in cents that is charged for this delivery.|
/// |currency| String| Three-letter ISO currency code, in lowercase.|
/// |tip| i64| Amount in cents that will be paid to the courier as a tip.|
/// |manifest| ManifestInfo| A detailed description of what the courier will be delivering.|
/// |manifest_items| ManifestItem|[] List of items being delivered.|
/// |pickup| DeliveryInfo| The pickup details for the delivery.|
/// |dropoff| DeliveryInfo| The dropoff details for the delivery|
/// |courier| CourierInfo| The courier associated with this delivery.|
/// |live_mode| bool| Indicates if the delivery is live mode or test mode.|
/// |related_deliveries| RelatedDelivery|[] A collection describing other jobs that share an association.|
/// |tracking_url| String| This url can be used to track the courier during the delivery.|
/// |dropoff_identifier| String| This field identifies who received delivery at the dropoff location.|
/// |courier_imminent| bool| Flag indicating if the courier is close to the pickup or dropoff location|
/// |undeliverable_reason| String| If a delivery was undeliverable, this field will contain the reason why it was undeliverable.|
/// |undeliverable_action| String| If a delivery was undeliverable, this field will contain the resulting action taken by the courier.|
/// |complete| bool| Flag indicating if the delivery is ongoing.|
/// |kind| String| The type of object being described.|
/// |uuid| String| Alternative delivery identifier. “Id” field should be used for any identification purposes. “uuid” field is equally unique but loses contextual information (i.e. nothing in this identifier points out that it relates to a delivery). Unlike “Id” field, “uuid” is case-insensitive. Value for “uuid” field is UUID v4 with ‘-’ characters removed.|
/// |route_id| String| Defines an ID for a contiguous series of waypoints. Batched deliveries will have the same route.|
/// |order| OrderInfo| Order details for a delivery|
/// |cancelation_reason| CancellationReason| Info on why the delivery was cancelled|
/// |return| DeliveryInfo| The return details for the delivery.|
///
/// # DeliveryData - DeliveryInfo|
///
/// |Name| Type| Description|
/// | :--- | :--- | :--- |
/// |name| string| The name of the person at the waypoint|
/// |phone_number| string| The phone number of the waypoint|
/// |address| string| The address of the waypoint|
/// |detailed_address| StructuredAddress| The full address of the waypoint|
/// |location| LatLng| Geographic location (Latitude, Longitude) associated with the waypoint|
/// |notes| string| Additional instructions at the waypoint location.|
/// |verification| VerificationProof| The details about different verification types|
/// |courier_notes| string| When a picture is requested as proof-of-delivery, this field contains the notes provided by the courier (e.g. where the items were left).|
///
/// # DeliveryData - OrderInfo
///
/// |Name| Type| Description|
/// | :--- | :--- | :--- |
/// |id| string| Unique identifier for order|
/// |number| string| A 3-digit customer and courier facing order id|
/// |display_name| string| Customer name includes customer’s first name and last initial|
///
/// # DeliveryData - CancellationReason
///
/// |Name| Type| Description|
/// | :--- | :--- | :--- |
/// |primary_reason| string| |
/// |secondary_reason| string| |
///