1+ # -*- coding: utf-8 -*-
2+ from plivo .utils .validators import *
3+
4+ from ..base import ListResponseObject , PlivoResource , PlivoResourceInterface
5+ from ..exceptions import *
6+ from ..utils import *
7+
8+ class Brand (PlivoResource ):
9+ _name = 'Brand'
10+ _identifier_string = 'brand_id'
11+
12+ class Brand (PlivoResourceInterface ):
13+ _resource_type = Brand
14+
15+ @validate_args (brand_id = [of_type (six .text_type )])
16+ def get (self , brand_id ):
17+ return self .client .request (
18+ 'GET' , ('10dlc' ,'Brand' , brand_id ), response_type = None )
19+
20+ @validate_args (
21+ type = [optional (of_type (six .text_type ))],
22+ status = [optional (of_type (six .text_type ))])
23+ def list (self , type = None , status = None ):
24+ return self .client .request (
25+ 'GET' , ('10dlc' , 'Brand' ),
26+ to_param_dict (self .list , locals ()),
27+ response_type = None ,
28+ objects_type = None )
29+
30+ @validate_args (
31+ alt_business_id_type = [optional (of_type (six .text_type ))],
32+ alt_business_id = [optional (of_type (six .text_type ))],
33+ city = [optional (of_type (six .text_type ))],
34+ company_name = [optional (of_type (six .text_type ))],
35+ country = [optional (of_type (six .text_type ))],
36+ ein = [optional (of_type (six .text_type ))],
37+ ein_issuing_country = [optional (of_type (six .text_type ))],
38+ email = [optional (of_type (six .text_type ))],
39+ entity_type = [optional (of_type (six .text_type ))],
40+ first_name = [optional (of_type (six .text_type ))],
41+ last_name = [optional (of_type (six .text_type ))],
42+ phone = [optional (of_type (six .text_type ))],
43+ postal_code = [optional (of_type (six .text_type ))],
44+ registration_status = [optional (of_type (six .text_type ))],
45+ state = [optional (of_type (six .text_type ))],
46+ stock_exchange = [optional (of_type (six .text_type ))],
47+ stock_symbol = [optional (of_type (six .text_type ))],
48+ street = [optional (of_type (six .text_type ))],
49+ vertical = [optional (of_type (six .text_type ))],
50+ website = [optional (of_type (six .text_type ))],
51+ secondary_vetting = [optional (of_type (six .text_type ))])
52+ def create (self ,
53+ vertical ,
54+ street ,
55+ stock_symbol ,
56+ stock_exchange ,
57+ state ,
58+ registration_status ,
59+ postal_code ,
60+ phone ,
61+ entity_type ,
62+ email ,
63+ ein_issuing_country ,
64+ ein ,
65+ country ,
66+ company_name ,
67+ city ,
68+ alt_business_id_type = None ,
69+ alt_business_id = None ,
70+ first_name = None ,
71+ last_name = False ,
72+ website = None ,
73+ secondary_vetting = None ):
74+ return self .client .request ('POST' , ('10dlc' , 'Brand' ),
75+ to_param_dict (self .create , locals ()))
0 commit comments