3
3
from .urls import Urls , COUNTRY_USA
4
4
5
5
class Address (object ):
6
- """
7
- Create an address, for finding stores and placing orders.
6
+ """Create an address, for finding stores and placing orders.
8
7
9
8
The Address object describes a street address in North America (USA or
10
9
Canada, for now). Callers can use the Address object's methods to find
11
10
the closest or nearby stores from the API.
11
+
12
+ Attributes:
13
+ street (String): Street address
14
+ city (String): North American city
15
+ region (String): North American region (state, province, territory)
16
+ zip (String): North American ZIP code
17
+ urls (String): Country-specific URLs
18
+ country (String): Country
12
19
"""
13
20
14
21
def __init__ (self , street , city , region = '' , zip = '' , country = COUNTRY_USA , * args ):
@@ -33,8 +40,7 @@ def line2(self):
33
40
return '{City}, {Region}, {PostalCode}' .format (** self .data )
34
41
35
42
def nearby_stores (self , service = 'Delivery' ):
36
- """
37
- Query the API to find nearby stores.
43
+ """Query the API to find nearby stores.
38
44
39
45
nearby_stores will filter the information we receive from the API
40
46
to exclude stores that are not currently online (!['IsOnlineNow']),
0 commit comments