ordrin 0.1.4 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ordrin/api_helper.rb +124 -0
- data/lib/ordrin/cacert.pem +569 -8
- data/lib/ordrin/mutate.rb +24 -0
- data/lib/ordrin/schemas.json +1109 -0
- data/lib/ordrin.rb +351 -51
- metadata +22 -14
- data/LICENSE.txt +0 -7
- data/README.md +0 -95
- data/bin/ordrindemo.rb +0 -323
- data/lib/ordrin/data.rb +0 -148
- data/lib/ordrin/errors.rb +0 -147
- data/lib/ordrin/normalize.rb +0 -186
- data/lib/ordrin/order.rb +0 -79
- data/lib/ordrin/ordrinapi.rb +0 -66
- data/lib/ordrin/restaurant.rb +0 -56
- data/lib/ordrin/user.rb +0 -142
|
@@ -0,0 +1,1109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"order": {
|
|
3
|
+
"order_guest": {
|
|
4
|
+
"type": "object",
|
|
5
|
+
"title": "Guest Order",
|
|
6
|
+
"description": "Place an order to a restaurant as a guest",
|
|
7
|
+
"required": [
|
|
8
|
+
"rid",
|
|
9
|
+
"em",
|
|
10
|
+
"tray",
|
|
11
|
+
"tip",
|
|
12
|
+
"first_name",
|
|
13
|
+
"last_name",
|
|
14
|
+
"phone",
|
|
15
|
+
"zip",
|
|
16
|
+
"addr",
|
|
17
|
+
"city",
|
|
18
|
+
"state",
|
|
19
|
+
"card_number",
|
|
20
|
+
"card_cvc",
|
|
21
|
+
"card_expiry",
|
|
22
|
+
"card_bill_addr",
|
|
23
|
+
"card_bill_city",
|
|
24
|
+
"card_bill_state",
|
|
25
|
+
"card_bill_zip",
|
|
26
|
+
"card_bill_phone"
|
|
27
|
+
],
|
|
28
|
+
"meta": {
|
|
29
|
+
"uri": "/o/{rid}",
|
|
30
|
+
"method": "POST",
|
|
31
|
+
"userAuth": false,
|
|
32
|
+
"response": "order"
|
|
33
|
+
},
|
|
34
|
+
"properties": {
|
|
35
|
+
"rid": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Ordr.in's unique restaurant identifier for the restaurant.",
|
|
38
|
+
"formatDescription": "A number",
|
|
39
|
+
"pattern": "^[0-9]+$",
|
|
40
|
+
"default_value": "10517"
|
|
41
|
+
},
|
|
42
|
+
"em": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "The customer's email address",
|
|
45
|
+
"format": "email",
|
|
46
|
+
"default_value": "test@example.com"
|
|
47
|
+
},
|
|
48
|
+
"tray": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Represents a tray of menu items in the format '[menu item id]/[qty],[option id],...,[option id]'",
|
|
51
|
+
"pattern": "^([0-9]+/[0-9]+(,[0-9]+)*(\\+(?=[0-9]))?)+$",
|
|
52
|
+
"default_value": "13621733/2,13621743+13621799/1"
|
|
53
|
+
},
|
|
54
|
+
"tip": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "Tip amount in dollars and cents",
|
|
57
|
+
"pattern": "[0-9]+\\.[0-9]{2}",
|
|
58
|
+
"default_value": "5.00"
|
|
59
|
+
},
|
|
60
|
+
"first_name": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "The customer's first name",
|
|
63
|
+
"default_value": "Test"
|
|
64
|
+
},
|
|
65
|
+
"last_name": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "The customer's last name",
|
|
68
|
+
"default_value": "User"
|
|
69
|
+
},
|
|
70
|
+
"phone": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "The customer's phone number",
|
|
73
|
+
"format": "phone",
|
|
74
|
+
"mutator": "phone",
|
|
75
|
+
"default_value": "555-555-5555"
|
|
76
|
+
},
|
|
77
|
+
"zip": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "The zip code part of the address",
|
|
80
|
+
"formatDescription": "5 digits",
|
|
81
|
+
"pattern": "^[0-9]{5}$",
|
|
82
|
+
"default_value": "10003"
|
|
83
|
+
},
|
|
84
|
+
"addr": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "The street address",
|
|
87
|
+
"default_value": "900 Broadway"
|
|
88
|
+
},
|
|
89
|
+
"addr2": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "The second part of the street address, if needed"
|
|
92
|
+
},
|
|
93
|
+
"city": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"description": "The city part of the address",
|
|
96
|
+
"default_value": "New York"
|
|
97
|
+
},
|
|
98
|
+
"state": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"description": "The state part of the address",
|
|
101
|
+
"formatDescription": "Two letters",
|
|
102
|
+
"pattern": "^[A-Za-z]{2}$",
|
|
103
|
+
"mutator": "state",
|
|
104
|
+
"default_value": "NY"
|
|
105
|
+
},
|
|
106
|
+
"card_name": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"description": "Full name as it appears on the credit card",
|
|
109
|
+
"default_value": "Test User"
|
|
110
|
+
},
|
|
111
|
+
"card_number": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"description": "Credit card number",
|
|
114
|
+
"formatDescription": "16 digits",
|
|
115
|
+
"pattern": "^[0-9]{16}$",
|
|
116
|
+
"default_value": "4111111111111111"
|
|
117
|
+
},
|
|
118
|
+
"card_cvc": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "3 or 4 digit security code",
|
|
121
|
+
"formatDescription": "3 or 4 digits",
|
|
122
|
+
"pattern": "^[0-9]{3,4}$",
|
|
123
|
+
"default_value": "000"
|
|
124
|
+
},
|
|
125
|
+
"card_expiry": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"description": "The credit card expiration date.",
|
|
128
|
+
"formatDescription": "mm/yyyy",
|
|
129
|
+
"pattern": "^[0-9]{2}/[0-9]{4}$",
|
|
130
|
+
"default_value": "12/2121"
|
|
131
|
+
},
|
|
132
|
+
"card_bill_addr": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"description": "The credit card's billing street address",
|
|
135
|
+
"default_value": "900 Broadway"
|
|
136
|
+
},
|
|
137
|
+
"card_bill_addr2": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"description": "The second part of the credit card's biling street address."
|
|
140
|
+
},
|
|
141
|
+
"card_bill_city": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "The credit card's billing city",
|
|
144
|
+
"default_value": "New York"
|
|
145
|
+
},
|
|
146
|
+
"card_bill_state": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"description": "The credit card's billing state",
|
|
149
|
+
"formatDescription": "2 letters",
|
|
150
|
+
"pattern": "^[A-Za-z]{2}$",
|
|
151
|
+
"mutator": "state",
|
|
152
|
+
"default_value": "NY"
|
|
153
|
+
},
|
|
154
|
+
"card_bill_zip": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"description": "The credit card's billing zip code",
|
|
157
|
+
"formatDescription": "5 digits",
|
|
158
|
+
"pattern": "^[0-9]{5}$",
|
|
159
|
+
"default_value": "10003"
|
|
160
|
+
},
|
|
161
|
+
"card_bill_phone": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "The credit card's billing phone number",
|
|
164
|
+
"format": "phone",
|
|
165
|
+
"mutator": "phone",
|
|
166
|
+
"default_value": "555-555-5555"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"id": "addr",
|
|
170
|
+
"allOf": [
|
|
171
|
+
{
|
|
172
|
+
"split": false,
|
|
173
|
+
"oneOf": [
|
|
174
|
+
{
|
|
175
|
+
"required": [
|
|
176
|
+
"delivery_date",
|
|
177
|
+
"delivery_time"
|
|
178
|
+
],
|
|
179
|
+
"properties": {
|
|
180
|
+
"delivery_date": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"description": "Delivery date",
|
|
183
|
+
"formatDescription": "mm-dd",
|
|
184
|
+
"pattern": "^[0-9]{2}-[0-9]{2}$"
|
|
185
|
+
},
|
|
186
|
+
"delivery_time": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"description": "Delivery time",
|
|
189
|
+
"formatDescription": "HH:MM",
|
|
190
|
+
"pattern": "^[0-9]{2}:[0-9]{2}$"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"required": [
|
|
196
|
+
"delivery_date"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"delivery_date": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"description": "Delivery date",
|
|
202
|
+
"formatDescription": "ASAP",
|
|
203
|
+
"pattern": "^ASAP$",
|
|
204
|
+
"default_value": "ASAP"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"order_user": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"title": "User Order",
|
|
215
|
+
"description": "Place an order to a restaurant as a user",
|
|
216
|
+
"required": [
|
|
217
|
+
"rid",
|
|
218
|
+
"tray",
|
|
219
|
+
"tip",
|
|
220
|
+
"first_name",
|
|
221
|
+
"last_name"
|
|
222
|
+
],
|
|
223
|
+
"meta": {
|
|
224
|
+
"uri": "/o/{rid}",
|
|
225
|
+
"method": "POST",
|
|
226
|
+
"userAuth": true,
|
|
227
|
+
"response": "order"
|
|
228
|
+
},
|
|
229
|
+
"properties": {
|
|
230
|
+
"rid": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"description": "Ordr.in's unique restaurant identifier for the restaurant.",
|
|
233
|
+
"formatDescription": "A number",
|
|
234
|
+
"pattern": "^[0-9]+$",
|
|
235
|
+
"default_value": "10517"
|
|
236
|
+
},
|
|
237
|
+
"tray": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"description": "Represents a tray of menu items in the format '[menu item id]/[qty],[option id],...,[option id]'",
|
|
240
|
+
"pattern": "^([0-9]+/[0-9]+(,[0-9]+)*(\\+(?=[0-9]))?)+$",
|
|
241
|
+
"default_value": "13621733/2,13621743+13621799/1"
|
|
242
|
+
},
|
|
243
|
+
"tip": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"description": "Tip amount in dollars and cents",
|
|
246
|
+
"pattern": "[0-9]+\\.[0-9]{2}",
|
|
247
|
+
"default_value": "5.00"
|
|
248
|
+
},
|
|
249
|
+
"first_name": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "The customer's first name",
|
|
252
|
+
"default_value": "Test"
|
|
253
|
+
},
|
|
254
|
+
"last_name": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"description": "The customer's last name",
|
|
257
|
+
"default_value": "User"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"allOf": [
|
|
261
|
+
{
|
|
262
|
+
"split": true,
|
|
263
|
+
"oneOf": [
|
|
264
|
+
{
|
|
265
|
+
"title": "Address",
|
|
266
|
+
"id": "addr",
|
|
267
|
+
"required": [
|
|
268
|
+
"phone",
|
|
269
|
+
"zip",
|
|
270
|
+
"addr",
|
|
271
|
+
"city",
|
|
272
|
+
"state"
|
|
273
|
+
],
|
|
274
|
+
"properties": {
|
|
275
|
+
"phone": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"description": "The customer's phone number",
|
|
278
|
+
"format": "phone",
|
|
279
|
+
"mutator": "phone",
|
|
280
|
+
"default_value": "555-555-5555"
|
|
281
|
+
},
|
|
282
|
+
"zip": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"description": "The zip code part of the address",
|
|
285
|
+
"formatDescription": "5 digits",
|
|
286
|
+
"pattern": "^[0-9]{5}$",
|
|
287
|
+
"default_value": "10003"
|
|
288
|
+
},
|
|
289
|
+
"addr": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"description": "The street address",
|
|
292
|
+
"default_value": "900 Broadway"
|
|
293
|
+
},
|
|
294
|
+
"addr2": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"description": "The second part of the street address, if needed"
|
|
297
|
+
},
|
|
298
|
+
"city": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"description": "The city part of the address",
|
|
301
|
+
"default_value": "New York"
|
|
302
|
+
},
|
|
303
|
+
"state": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"description": "The state part of the address",
|
|
306
|
+
"formatDescription": "Two letters",
|
|
307
|
+
"pattern": "^[A-Za-z]{2}$",
|
|
308
|
+
"mutator": "state",
|
|
309
|
+
"default_value": "NY"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"type": "object"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"title": "Saved Address",
|
|
316
|
+
"id": "saved_addr",
|
|
317
|
+
"required": [
|
|
318
|
+
"nick"
|
|
319
|
+
],
|
|
320
|
+
"properties": {
|
|
321
|
+
"nick": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"description": "The delivery location nickname. (From the user's addresses)",
|
|
324
|
+
"default_value": "temp"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"split": true,
|
|
332
|
+
"oneOf": [
|
|
333
|
+
{
|
|
334
|
+
"title": "Credit Card",
|
|
335
|
+
"id": "cc",
|
|
336
|
+
"required": [
|
|
337
|
+
"card_number",
|
|
338
|
+
"card_cvc",
|
|
339
|
+
"card_expiry",
|
|
340
|
+
"card_bill_addr",
|
|
341
|
+
"card_bill_city",
|
|
342
|
+
"card_bill_state",
|
|
343
|
+
"card_bill_zip",
|
|
344
|
+
"card_bill_phone"
|
|
345
|
+
],
|
|
346
|
+
"properties": {
|
|
347
|
+
"card_name": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"description": "Full name as it appears on the credit card",
|
|
350
|
+
"default_value": "Test User"
|
|
351
|
+
},
|
|
352
|
+
"card_number": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"description": "Credit card number",
|
|
355
|
+
"formatDescription": "16 digits",
|
|
356
|
+
"pattern": "^[0-9]{16}$",
|
|
357
|
+
"default_value": "4111111111111111"
|
|
358
|
+
},
|
|
359
|
+
"card_cvc": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"description": "3 or 4 digit security code",
|
|
362
|
+
"formatDescription": "3 or 4 digits",
|
|
363
|
+
"pattern": "^[0-9]{3,4}$",
|
|
364
|
+
"default_value": "000"
|
|
365
|
+
},
|
|
366
|
+
"card_expiry": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"description": "The credit card expiration date.",
|
|
369
|
+
"formatDescription": "mm/yyyy",
|
|
370
|
+
"pattern": "^[0-9]{2}/[0-9]{4}$",
|
|
371
|
+
"default_value": "12/2121"
|
|
372
|
+
},
|
|
373
|
+
"card_bill_addr": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"description": "The credit card's billing street address",
|
|
376
|
+
"default_value": "900 Broadway"
|
|
377
|
+
},
|
|
378
|
+
"card_bill_addr2": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"description": "The second part of the credit card's biling street address."
|
|
381
|
+
},
|
|
382
|
+
"card_bill_city": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"description": "The credit card's billing city",
|
|
385
|
+
"default_value": "New York"
|
|
386
|
+
},
|
|
387
|
+
"card_bill_state": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"description": "The credit card's billing state",
|
|
390
|
+
"formatDescription": "2 letters",
|
|
391
|
+
"pattern": "^[A-Za-z]{2}$",
|
|
392
|
+
"mutator": "state",
|
|
393
|
+
"default_value": "NY"
|
|
394
|
+
},
|
|
395
|
+
"card_bill_zip": {
|
|
396
|
+
"type": "string",
|
|
397
|
+
"description": "The credit card's billing zip code",
|
|
398
|
+
"formatDescription": "5 digits",
|
|
399
|
+
"pattern": "^[0-9]{5}$",
|
|
400
|
+
"default_value": "10003"
|
|
401
|
+
},
|
|
402
|
+
"card_bill_phone": {
|
|
403
|
+
"type": "string",
|
|
404
|
+
"description": "The credit card's billing phone number",
|
|
405
|
+
"format": "phone",
|
|
406
|
+
"mutator": "phone",
|
|
407
|
+
"default_value": "555-555-5555"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"title": "Saved Credit Card",
|
|
413
|
+
"id": "saved_cc",
|
|
414
|
+
"required": [
|
|
415
|
+
"card_nick"
|
|
416
|
+
],
|
|
417
|
+
"properties": {
|
|
418
|
+
"card_nick": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"description": "The credit card nickname. (From the user's credit cards)",
|
|
421
|
+
"default_value": "temp"
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"split": false,
|
|
429
|
+
"oneOf": [
|
|
430
|
+
{
|
|
431
|
+
"required": [
|
|
432
|
+
"delivery_date",
|
|
433
|
+
"delivery_time"
|
|
434
|
+
],
|
|
435
|
+
"properties": {
|
|
436
|
+
"delivery_date": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"description": "Delivery date",
|
|
439
|
+
"formatDescription": "mm-dd",
|
|
440
|
+
"pattern": "^[0-9]{2}-[0-9]{2}$"
|
|
441
|
+
},
|
|
442
|
+
"delivery_time": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"description": "Delivery time",
|
|
445
|
+
"formatDescription": "HH:MM",
|
|
446
|
+
"pattern": "^[0-9]{2}:[0-9]{2}$"
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"required": [
|
|
452
|
+
"delivery_date"
|
|
453
|
+
],
|
|
454
|
+
"properties": {
|
|
455
|
+
"delivery_date": {
|
|
456
|
+
"type": "string",
|
|
457
|
+
"description": "Delivery date",
|
|
458
|
+
"formatDescription": "ASAP",
|
|
459
|
+
"pattern": "^ASAP$",
|
|
460
|
+
"default_value": "ASAP"
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"restaurant": {
|
|
470
|
+
"delivery_check": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"title": "Delivery Check",
|
|
473
|
+
"description": "Gets if a particular restaurant will deliver to a given address at a given time",
|
|
474
|
+
"required": [
|
|
475
|
+
"datetime",
|
|
476
|
+
"rid",
|
|
477
|
+
"addr",
|
|
478
|
+
"city",
|
|
479
|
+
"zip"
|
|
480
|
+
],
|
|
481
|
+
"meta": {
|
|
482
|
+
"uri": "/dc/{rid}/{datetime}/{zip}/{city}/{addr}",
|
|
483
|
+
"method": "GET",
|
|
484
|
+
"userAuth": false,
|
|
485
|
+
"controller": "DeliverabilityCtrl",
|
|
486
|
+
"ctrl_fn": "handleDelivery",
|
|
487
|
+
"response": "delivery_check"
|
|
488
|
+
},
|
|
489
|
+
"properties": {
|
|
490
|
+
"datetime": {
|
|
491
|
+
"type": "string",
|
|
492
|
+
"description": "Delivery date and time",
|
|
493
|
+
"formatDescription": "ASAP or mm-dd+HH:MM",
|
|
494
|
+
"pattern": "^(ASAP)|[0-9]{2}-[0-9]{2}\\+[0-9]{2}:[0-9]{2}$",
|
|
495
|
+
"default_value": "ASAP"
|
|
496
|
+
},
|
|
497
|
+
"rid": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"description": "Ordr.in's unique restaurant identifier for the restaurant.",
|
|
500
|
+
"formatDescription": "A number",
|
|
501
|
+
"pattern": "^[0-9]+$",
|
|
502
|
+
"default_value": "10517"
|
|
503
|
+
},
|
|
504
|
+
"addr": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"description": "Delivery location street address",
|
|
507
|
+
"default_value": "900 Broadway"
|
|
508
|
+
},
|
|
509
|
+
"city": {
|
|
510
|
+
"type": "string",
|
|
511
|
+
"description": "Delivery location city",
|
|
512
|
+
"default_value": "New York"
|
|
513
|
+
},
|
|
514
|
+
"zip": {
|
|
515
|
+
"type": "string",
|
|
516
|
+
"description": "The zip code part of the address",
|
|
517
|
+
"formatDescription": "5 digits",
|
|
518
|
+
"pattern": "^[0-9]{5}$",
|
|
519
|
+
"default_value": "10003"
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"delivery_list": {
|
|
524
|
+
"type": "object",
|
|
525
|
+
"title": "Delivery List",
|
|
526
|
+
"description": "Gets a list of all restaurants that deliver to a given address",
|
|
527
|
+
"required": [
|
|
528
|
+
"datetime",
|
|
529
|
+
"addr",
|
|
530
|
+
"city",
|
|
531
|
+
"zip"
|
|
532
|
+
],
|
|
533
|
+
"meta": {
|
|
534
|
+
"uri": "/dl/{datetime}/{zip}/{city}/{addr}/",
|
|
535
|
+
"method": "GET",
|
|
536
|
+
"userAuth": false,
|
|
537
|
+
"controller": "RestaurantListCtrl",
|
|
538
|
+
"ctrl_fn": "getList",
|
|
539
|
+
"response": "delivery_list"
|
|
540
|
+
},
|
|
541
|
+
"properties": {
|
|
542
|
+
"datetime": {
|
|
543
|
+
"type": "string",
|
|
544
|
+
"description": "Delivery date and time",
|
|
545
|
+
"formatDescription": "ASAP or mm-dd+HH:MM",
|
|
546
|
+
"pattern": "^(ASAP)|[0-9]{2}-[0-9]{2}\\+[0-9]{2}:[0-9]{2}$",
|
|
547
|
+
"default_value": "ASAP"
|
|
548
|
+
},
|
|
549
|
+
"addr": {
|
|
550
|
+
"type": "string",
|
|
551
|
+
"description": "Delivery location street address",
|
|
552
|
+
"default_value": "900 Broadway"
|
|
553
|
+
},
|
|
554
|
+
"city": {
|
|
555
|
+
"type": "string",
|
|
556
|
+
"description": "Delivery location city",
|
|
557
|
+
"default_value": "New York"
|
|
558
|
+
},
|
|
559
|
+
"zip": {
|
|
560
|
+
"type": "string",
|
|
561
|
+
"description": "The zip code part of the address",
|
|
562
|
+
"formatDescription": "5 digits",
|
|
563
|
+
"pattern": "^[0-9]{5}$",
|
|
564
|
+
"default_value": "10003"
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
"fee": {
|
|
569
|
+
"type": "object",
|
|
570
|
+
"title": "Fee",
|
|
571
|
+
"description": "Calculates all fees for a given subtotal and delivery address",
|
|
572
|
+
"required": [
|
|
573
|
+
"datetime",
|
|
574
|
+
"rid",
|
|
575
|
+
"subtotal",
|
|
576
|
+
"tip",
|
|
577
|
+
"addr",
|
|
578
|
+
"city",
|
|
579
|
+
"zip"
|
|
580
|
+
],
|
|
581
|
+
"meta": {
|
|
582
|
+
"uri": "/fee/{rid}/{subtotal}/{tip}/{datetime}/{zip}/{city}/{addr}",
|
|
583
|
+
"method": "GET",
|
|
584
|
+
"userAuth": false,
|
|
585
|
+
"controller": "DeliverabilityCtrl",
|
|
586
|
+
"ctrl_fn": "handleDelivery",
|
|
587
|
+
"response": "fee"
|
|
588
|
+
},
|
|
589
|
+
"properties": {
|
|
590
|
+
"datetime": {
|
|
591
|
+
"type": "string",
|
|
592
|
+
"description": "Delivery date and time",
|
|
593
|
+
"formatDescription": "ASAP or mm-dd+HH:MM",
|
|
594
|
+
"pattern": "^(ASAP)|[0-9]{2}-[0-9]{2}\\+[0-9]{2}:[0-9]{2}$",
|
|
595
|
+
"default_value": "ASAP"
|
|
596
|
+
},
|
|
597
|
+
"rid": {
|
|
598
|
+
"type": "string",
|
|
599
|
+
"description": "Ordr.in's unique restaurant identifier for the restaurant.",
|
|
600
|
+
"formatDescription": "A number",
|
|
601
|
+
"pattern": "^[0-9]+$",
|
|
602
|
+
"default_value": "10517"
|
|
603
|
+
},
|
|
604
|
+
"subtotal": {
|
|
605
|
+
"type": "string",
|
|
606
|
+
"description": "The cost of all items in the tray in dollars and cents.",
|
|
607
|
+
"pattern": "[0-9]+\\.[0-9]{2}",
|
|
608
|
+
"default_value": "30.00"
|
|
609
|
+
},
|
|
610
|
+
"tip": {
|
|
611
|
+
"type": "string",
|
|
612
|
+
"description": "The tip in dollars and cents.",
|
|
613
|
+
"pattern": "[0-9]+\\.[0-9]{2}",
|
|
614
|
+
"default_value": "4.50"
|
|
615
|
+
},
|
|
616
|
+
"addr": {
|
|
617
|
+
"type": "string",
|
|
618
|
+
"description": "Delivery location street address",
|
|
619
|
+
"default_value": "900 Broadway"
|
|
620
|
+
},
|
|
621
|
+
"city": {
|
|
622
|
+
"type": "string",
|
|
623
|
+
"description": "Delivery location city",
|
|
624
|
+
"default_value": "New York"
|
|
625
|
+
},
|
|
626
|
+
"zip": {
|
|
627
|
+
"type": "string",
|
|
628
|
+
"description": "The zip code part of the address",
|
|
629
|
+
"formatDescription": "5 digits",
|
|
630
|
+
"pattern": "^[0-9]{5}$",
|
|
631
|
+
"default_value": "10003"
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
"restaurant_details": {
|
|
636
|
+
"type": "object",
|
|
637
|
+
"title": "Restaurant Details",
|
|
638
|
+
"description": "Gets restaurant details such as the restaurant's menu",
|
|
639
|
+
"required": [
|
|
640
|
+
"rid"
|
|
641
|
+
],
|
|
642
|
+
"meta": {
|
|
643
|
+
"uri": "/rd/{rid}",
|
|
644
|
+
"method": "GET",
|
|
645
|
+
"userAuth": false,
|
|
646
|
+
"response": "restaurant_details"
|
|
647
|
+
},
|
|
648
|
+
"properties": {
|
|
649
|
+
"rid": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"description": "Ordr.in's unique restaurant identifier for the restaurant.",
|
|
652
|
+
"formatDescription": "A number",
|
|
653
|
+
"pattern": "^[0-9]+$",
|
|
654
|
+
"default_value": "10517"
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
"user": {
|
|
660
|
+
"change_password": {
|
|
661
|
+
"type": "object",
|
|
662
|
+
"title": "Change Password",
|
|
663
|
+
"description": "Changes a user's password",
|
|
664
|
+
"required": [
|
|
665
|
+
"email",
|
|
666
|
+
"password"
|
|
667
|
+
],
|
|
668
|
+
"meta": {
|
|
669
|
+
"uri": "/u/{email}/password",
|
|
670
|
+
"method": "PUT",
|
|
671
|
+
"userAuth": true,
|
|
672
|
+
"response": "success_fail"
|
|
673
|
+
},
|
|
674
|
+
"properties": {
|
|
675
|
+
"email": {
|
|
676
|
+
"type": "string",
|
|
677
|
+
"description": "The user's email address",
|
|
678
|
+
"format": "email"
|
|
679
|
+
},
|
|
680
|
+
"password": {
|
|
681
|
+
"type": "string",
|
|
682
|
+
"description": "The user's new password",
|
|
683
|
+
"formatDescription": "SHA256 hex encoded",
|
|
684
|
+
"mutator": "sha256"
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
"create_account": {
|
|
689
|
+
"type": "object",
|
|
690
|
+
"title": "Create Account",
|
|
691
|
+
"description": "Creates a new account",
|
|
692
|
+
"required": [
|
|
693
|
+
"email",
|
|
694
|
+
"pw",
|
|
695
|
+
"first_name",
|
|
696
|
+
"last_name"
|
|
697
|
+
],
|
|
698
|
+
"meta": {
|
|
699
|
+
"uri": "/u/{email}",
|
|
700
|
+
"method": "POST",
|
|
701
|
+
"userAuth": false,
|
|
702
|
+
"response": "success_fail"
|
|
703
|
+
},
|
|
704
|
+
"properties": {
|
|
705
|
+
"email": {
|
|
706
|
+
"type": "string",
|
|
707
|
+
"description": "The user's email address",
|
|
708
|
+
"format": "email"
|
|
709
|
+
},
|
|
710
|
+
"pw": {
|
|
711
|
+
"type": "string",
|
|
712
|
+
"description": "The user's password",
|
|
713
|
+
"mutator": "sha256"
|
|
714
|
+
},
|
|
715
|
+
"first_name": {
|
|
716
|
+
"type": "string",
|
|
717
|
+
"description": "The user's first name",
|
|
718
|
+
"default_value": "Test"
|
|
719
|
+
},
|
|
720
|
+
"last_name": {
|
|
721
|
+
"type": "string",
|
|
722
|
+
"description": "The user's last name",
|
|
723
|
+
"default_value": "User"
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
"create_addr": {
|
|
728
|
+
"type": "object",
|
|
729
|
+
"title": "Create Address",
|
|
730
|
+
"description": "Create a new address or modify an existing address",
|
|
731
|
+
"required": [
|
|
732
|
+
"email",
|
|
733
|
+
"nick",
|
|
734
|
+
"phone",
|
|
735
|
+
"zip",
|
|
736
|
+
"addr",
|
|
737
|
+
"city",
|
|
738
|
+
"state"
|
|
739
|
+
],
|
|
740
|
+
"meta": {
|
|
741
|
+
"uri": "/u/{email}/addrs/{nick}",
|
|
742
|
+
"method": "PUT",
|
|
743
|
+
"userAuth": true,
|
|
744
|
+
"response": "success_fail"
|
|
745
|
+
},
|
|
746
|
+
"properties": {
|
|
747
|
+
"email": {
|
|
748
|
+
"type": "string",
|
|
749
|
+
"description": "The user's email address",
|
|
750
|
+
"format": "email"
|
|
751
|
+
},
|
|
752
|
+
"nick": {
|
|
753
|
+
"type": "string",
|
|
754
|
+
"description": "The nickname of this address",
|
|
755
|
+
"default_value": "temp"
|
|
756
|
+
},
|
|
757
|
+
"phone": {
|
|
758
|
+
"type": "string",
|
|
759
|
+
"description": "The customer's phone number",
|
|
760
|
+
"format": "phone",
|
|
761
|
+
"mutator": "phone",
|
|
762
|
+
"default_value": "555-555-5555"
|
|
763
|
+
},
|
|
764
|
+
"zip": {
|
|
765
|
+
"type": "string",
|
|
766
|
+
"description": "The zip code part of the address",
|
|
767
|
+
"formatDescription": "5 digits",
|
|
768
|
+
"pattern": "^[0-9]{5}$",
|
|
769
|
+
"default_value": "10003"
|
|
770
|
+
},
|
|
771
|
+
"addr": {
|
|
772
|
+
"type": "string",
|
|
773
|
+
"description": "The street address",
|
|
774
|
+
"default_value": "900 Broadway"
|
|
775
|
+
},
|
|
776
|
+
"addr2": {
|
|
777
|
+
"type": "string",
|
|
778
|
+
"description": "The second part of the street address, if needed"
|
|
779
|
+
},
|
|
780
|
+
"city": {
|
|
781
|
+
"type": "string",
|
|
782
|
+
"description": "The city part of the address",
|
|
783
|
+
"default_value": "New York"
|
|
784
|
+
},
|
|
785
|
+
"state": {
|
|
786
|
+
"type": "string",
|
|
787
|
+
"description": "The state part of the address",
|
|
788
|
+
"formatDescription": "Two letters",
|
|
789
|
+
"pattern": "^[A-Za-z]{2}$",
|
|
790
|
+
"mutator": "state",
|
|
791
|
+
"default_value": "NY"
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
"id": "addr"
|
|
795
|
+
},
|
|
796
|
+
"create_cc": {
|
|
797
|
+
"type": "object",
|
|
798
|
+
"title": "Create Credit Card",
|
|
799
|
+
"description": "Create a new credit card or modify an existing address",
|
|
800
|
+
"required": [
|
|
801
|
+
"email",
|
|
802
|
+
"nick",
|
|
803
|
+
"card_number",
|
|
804
|
+
"card_cvc",
|
|
805
|
+
"card_expiry",
|
|
806
|
+
"bill_addr",
|
|
807
|
+
"bill_city",
|
|
808
|
+
"bill_state",
|
|
809
|
+
"bill_zip",
|
|
810
|
+
"bill_phone"
|
|
811
|
+
],
|
|
812
|
+
"meta": {
|
|
813
|
+
"uri": "/u/{email}/ccs/{nick}",
|
|
814
|
+
"method": "PUT",
|
|
815
|
+
"userAuth": true,
|
|
816
|
+
"response": "success_fail"
|
|
817
|
+
},
|
|
818
|
+
"properties": {
|
|
819
|
+
"email": {
|
|
820
|
+
"type": "string",
|
|
821
|
+
"description": "The user's email address",
|
|
822
|
+
"format": "email"
|
|
823
|
+
},
|
|
824
|
+
"nick": {
|
|
825
|
+
"type": "string",
|
|
826
|
+
"description": "The nickname of this address",
|
|
827
|
+
"default_value": "temp"
|
|
828
|
+
},
|
|
829
|
+
"card_number": {
|
|
830
|
+
"type": "string",
|
|
831
|
+
"description": "Credit card number",
|
|
832
|
+
"formatDescription": "16 digits",
|
|
833
|
+
"pattern": "^[0-9]{16}$",
|
|
834
|
+
"default_value": "4111111111111111"
|
|
835
|
+
},
|
|
836
|
+
"card_cvc": {
|
|
837
|
+
"type": "string",
|
|
838
|
+
"description": "3 or 4 digit security code",
|
|
839
|
+
"formatDescription": "3 or 4 digits",
|
|
840
|
+
"pattern": "^[0-9]{3,4}$",
|
|
841
|
+
"default_value": "000"
|
|
842
|
+
},
|
|
843
|
+
"card_expiry": {
|
|
844
|
+
"type": "string",
|
|
845
|
+
"description": "The credit card expiration date.",
|
|
846
|
+
"formatDescription": "Two digits/Four digits",
|
|
847
|
+
"pattern": "^[0-9]{2}/[0-9]{4}$",
|
|
848
|
+
"default_value": "12/2121"
|
|
849
|
+
},
|
|
850
|
+
"bill_addr": {
|
|
851
|
+
"type": "string",
|
|
852
|
+
"description": "The credit card's billing street address",
|
|
853
|
+
"default_value": "900 Broadway"
|
|
854
|
+
},
|
|
855
|
+
"bill_addr2": {
|
|
856
|
+
"type": "string",
|
|
857
|
+
"description": "The second part of the credit card's biling street address."
|
|
858
|
+
},
|
|
859
|
+
"bill_city": {
|
|
860
|
+
"type": "string",
|
|
861
|
+
"description": "The credit card's billing city",
|
|
862
|
+
"default_value": "New York"
|
|
863
|
+
},
|
|
864
|
+
"bill_state": {
|
|
865
|
+
"type": "string",
|
|
866
|
+
"description": "The credit card's billing state",
|
|
867
|
+
"formatDescription": "2 letters",
|
|
868
|
+
"pattern": "^[A-Za-z]{2}$",
|
|
869
|
+
"mutator": "state",
|
|
870
|
+
"default_value": "NY"
|
|
871
|
+
},
|
|
872
|
+
"bill_zip": {
|
|
873
|
+
"type": "string",
|
|
874
|
+
"description": "The credit card's billing zip code",
|
|
875
|
+
"formatDescription": "5 digits",
|
|
876
|
+
"pattern": "^[0-9]{5}$",
|
|
877
|
+
"default_value": "10003"
|
|
878
|
+
},
|
|
879
|
+
"bill_phone": {
|
|
880
|
+
"type": "string",
|
|
881
|
+
"description": "The credit card's billing phone number",
|
|
882
|
+
"format": "phone",
|
|
883
|
+
"mutator": "phone",
|
|
884
|
+
"default_value": "555-555-5555"
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
"delete_addr": {
|
|
889
|
+
"type": "object",
|
|
890
|
+
"title": "Remove address",
|
|
891
|
+
"description": "Deletes a single saved address",
|
|
892
|
+
"required": [
|
|
893
|
+
"email",
|
|
894
|
+
"nick"
|
|
895
|
+
],
|
|
896
|
+
"meta": {
|
|
897
|
+
"uri": "/u/{email}/addrs/{nick}",
|
|
898
|
+
"method": "DELETE",
|
|
899
|
+
"userAuth": true,
|
|
900
|
+
"response": "success_fail"
|
|
901
|
+
},
|
|
902
|
+
"properties": {
|
|
903
|
+
"email": {
|
|
904
|
+
"type": "string",
|
|
905
|
+
"description": "The user's email address",
|
|
906
|
+
"format": "email"
|
|
907
|
+
},
|
|
908
|
+
"nick": {
|
|
909
|
+
"type": "string",
|
|
910
|
+
"description": "The nickname of this address",
|
|
911
|
+
"default_value": "temp"
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
"delete_cc": {
|
|
916
|
+
"type": "object",
|
|
917
|
+
"title": "Remove Credit Card",
|
|
918
|
+
"description": "Deletes a single saved credit card",
|
|
919
|
+
"required": [
|
|
920
|
+
"email",
|
|
921
|
+
"nick"
|
|
922
|
+
],
|
|
923
|
+
"meta": {
|
|
924
|
+
"uri": "/u/{email}/ccs/{nick}",
|
|
925
|
+
"method": "DELETE",
|
|
926
|
+
"userAuth": true,
|
|
927
|
+
"response": "success_fail"
|
|
928
|
+
},
|
|
929
|
+
"properties": {
|
|
930
|
+
"email": {
|
|
931
|
+
"type": "string",
|
|
932
|
+
"description": "The user's email address",
|
|
933
|
+
"format": "email"
|
|
934
|
+
},
|
|
935
|
+
"nick": {
|
|
936
|
+
"type": "string",
|
|
937
|
+
"description": "The nickname of this address",
|
|
938
|
+
"default_value": "temp"
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
"get_account_info": {
|
|
943
|
+
"type": "object",
|
|
944
|
+
"title": "Get Account Information",
|
|
945
|
+
"description": "Gets information about an authenticated user",
|
|
946
|
+
"required": [
|
|
947
|
+
"email"
|
|
948
|
+
],
|
|
949
|
+
"meta": {
|
|
950
|
+
"uri": "/u/{email}",
|
|
951
|
+
"method": "GET",
|
|
952
|
+
"userAuth": true,
|
|
953
|
+
"response": "user_info"
|
|
954
|
+
},
|
|
955
|
+
"properties": {
|
|
956
|
+
"email": {
|
|
957
|
+
"type": "string",
|
|
958
|
+
"description": "The user's email address",
|
|
959
|
+
"format": "email"
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
},
|
|
963
|
+
"get_all_saved_addrs": {
|
|
964
|
+
"type": "object",
|
|
965
|
+
"title": "Get All Saved Addresses",
|
|
966
|
+
"description": "Gets all addresses saved to a user's account",
|
|
967
|
+
"required": [
|
|
968
|
+
"email"
|
|
969
|
+
],
|
|
970
|
+
"meta": {
|
|
971
|
+
"uri": "/u/{email}/addrs",
|
|
972
|
+
"method": "GET",
|
|
973
|
+
"userAuth": true,
|
|
974
|
+
"response": "all_saved_addrs"
|
|
975
|
+
},
|
|
976
|
+
"properties": {
|
|
977
|
+
"email": {
|
|
978
|
+
"type": "string",
|
|
979
|
+
"description": "The user's email address",
|
|
980
|
+
"format": "email"
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
"get_all_saved_ccs": {
|
|
985
|
+
"type": "object",
|
|
986
|
+
"title": "Get all saved credit cards",
|
|
987
|
+
"description": "Gets all credit cards saved to a user's account",
|
|
988
|
+
"required": [
|
|
989
|
+
"email"
|
|
990
|
+
],
|
|
991
|
+
"meta": {
|
|
992
|
+
"uri": "/u/{email}/ccs",
|
|
993
|
+
"method": "GET",
|
|
994
|
+
"userAuth": true,
|
|
995
|
+
"response": "all_saved_ccs"
|
|
996
|
+
},
|
|
997
|
+
"properties": {
|
|
998
|
+
"email": {
|
|
999
|
+
"type": "string",
|
|
1000
|
+
"description": "The user's email address",
|
|
1001
|
+
"format": "email"
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
"get_order": {
|
|
1006
|
+
"type": "object",
|
|
1007
|
+
"title": "Get an Order",
|
|
1008
|
+
"description": "Gets a summary of previous orders",
|
|
1009
|
+
"required": [
|
|
1010
|
+
"email",
|
|
1011
|
+
"oid"
|
|
1012
|
+
],
|
|
1013
|
+
"meta": {
|
|
1014
|
+
"uri": "/u/{email}/orders/{oid}",
|
|
1015
|
+
"method": "GET",
|
|
1016
|
+
"userAuth": true,
|
|
1017
|
+
"response": "saved_order"
|
|
1018
|
+
},
|
|
1019
|
+
"properties": {
|
|
1020
|
+
"email": {
|
|
1021
|
+
"type": "string",
|
|
1022
|
+
"description": "The user's email address",
|
|
1023
|
+
"format": "email"
|
|
1024
|
+
},
|
|
1025
|
+
"oid": {
|
|
1026
|
+
"type": "string",
|
|
1027
|
+
"description": "Ordr.in's unique order id number.",
|
|
1028
|
+
"formatDescription": "A number",
|
|
1029
|
+
"pattern": "^[0-9]+$"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
"get_order_history": {
|
|
1034
|
+
"type": "object",
|
|
1035
|
+
"title": "Get Order History",
|
|
1036
|
+
"description": "Gets a summary of previous orders",
|
|
1037
|
+
"required": [
|
|
1038
|
+
"email"
|
|
1039
|
+
],
|
|
1040
|
+
"meta": {
|
|
1041
|
+
"uri": "/u/{email}/orders",
|
|
1042
|
+
"method": "GET",
|
|
1043
|
+
"userAuth": true,
|
|
1044
|
+
"response": "all_saved_orders"
|
|
1045
|
+
},
|
|
1046
|
+
"properties": {
|
|
1047
|
+
"email": {
|
|
1048
|
+
"type": "string",
|
|
1049
|
+
"description": "The user's email address",
|
|
1050
|
+
"format": "email"
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
"get_saved_addr": {
|
|
1055
|
+
"type": "object",
|
|
1056
|
+
"title": "Get a single saved address",
|
|
1057
|
+
"description": "Gets a single saved address by its nickname",
|
|
1058
|
+
"required": [
|
|
1059
|
+
"email",
|
|
1060
|
+
"nick"
|
|
1061
|
+
],
|
|
1062
|
+
"meta": {
|
|
1063
|
+
"uri": "/u/{email}/addrs/{nick}",
|
|
1064
|
+
"method": "GET",
|
|
1065
|
+
"userAuth": true,
|
|
1066
|
+
"response": "saved_addr"
|
|
1067
|
+
},
|
|
1068
|
+
"properties": {
|
|
1069
|
+
"email": {
|
|
1070
|
+
"type": "string",
|
|
1071
|
+
"description": "The user's email address",
|
|
1072
|
+
"format": "email"
|
|
1073
|
+
},
|
|
1074
|
+
"nick": {
|
|
1075
|
+
"type": "string",
|
|
1076
|
+
"description": "The nickname of this address",
|
|
1077
|
+
"default_value": "temp"
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
"get_saved_cc": {
|
|
1082
|
+
"type": "object",
|
|
1083
|
+
"title": "Get a single saved credit card",
|
|
1084
|
+
"description": "Gets a single saved credit card by its nickname",
|
|
1085
|
+
"required": [
|
|
1086
|
+
"email",
|
|
1087
|
+
"nick"
|
|
1088
|
+
],
|
|
1089
|
+
"meta": {
|
|
1090
|
+
"uri": "/u/{email}/ccs/{nick}",
|
|
1091
|
+
"method": "GET",
|
|
1092
|
+
"userAuth": true,
|
|
1093
|
+
"response": "saved_cc"
|
|
1094
|
+
},
|
|
1095
|
+
"properties": {
|
|
1096
|
+
"email": {
|
|
1097
|
+
"type": "string",
|
|
1098
|
+
"description": "The user's email address",
|
|
1099
|
+
"format": "email"
|
|
1100
|
+
},
|
|
1101
|
+
"nick": {
|
|
1102
|
+
"type": "string",
|
|
1103
|
+
"description": "The nickname of this address",
|
|
1104
|
+
"default_value": "temp"
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
}
|