Exemplo n.º 1
0
 def create_customer(self, customer, match):
     data = {
         'customer': customer,
         'match': match
     }
     r = self.http.post('/customer', data)
     return Customer.parse(r['customer'])
Exemplo n.º 2
0
 def update_customer(self, id, **kwargs):
     data = {
         'match': kwargs.get('match'),
         'customer': kwargs.get('customer')
     }
     r = self.http.put('/customer/{}'.format(id), data)
     return Customer.parse(r['customer'])
Exemplo n.º 3
0
 def create_customer(self, customer, match):
     data = {
         'customer': customer,
         'match': match
     }
     r = self.http.post('/customer', data)
     return Customer.parse(r['customer'])
Exemplo n.º 4
0
 def get_customers(self, query=None):
     r = self.http.get('/customers', query)
     return [Customer.parse(c) for c in r['customers']]
Exemplo n.º 5
0
 def get_customers(self, query=None):
     r = self.http.get('/customers', query)
     return [Customer.parse(c) for c in r['customers']]
Exemplo n.º 6
0
 def get_customer(self):
     return Customer.parse(self.http.get('/customer/%s' % id)['customer'])
Exemplo n.º 7
0
 def get_customer(self):
     return Customer.parse(self.http.get('/customer/%s' % id)['customer'])