Exemple #1
0
 def create_customer(self, customer, match):
     data = {
         'customer': customer,
         'match': match
     }
     r = self.http.post('/customer', data)
     return Customer.parse(r['customer'])
Exemple #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'])
Exemple #3
0
 def create_customer(self, customer, match):
     data = {
         'customer': customer,
         'match': match
     }
     r = self.http.post('/customer', data)
     return Customer.parse(r['customer'])
 def get_customers(self, query=None):
     r = self.http.get('/customers', query)
     return [Customer.parse(c) for c in r['customers']]
Exemple #5
0
 def get_customers(self, query=None):
     r = self.http.get('/customers', query)
     return [Customer.parse(c) for c in r['customers']]
Exemple #6
0
 def get_customer(self):
     return Customer.parse(self.http.get('/customer/%s' % id)['customer'])
Exemple #7
0
 def get_customer(self):
     return Customer.parse(self.http.get('/customer/%s' % id)['customer'])