Update a customer from its id.

        :param customer: The customer id or object
        :type customer: string|Customer
        :param data: The data you want to update

        :return: The customer resource
        :rtype resources.Customer
497840
def update(customer, **data):
        
        if isinstance(customer, resources.Customer):
            customer = customer.id

        http_client = HttpClient()
        response, _ = http_client.patch(routes.url(routes.CUSTOMER_RESOURCE, resource_id=customer), data)
        return resources.Customer(**response)
203121
def update(self, typ, id, **kwargs):
        
        return self._load(self._request(typ, id=id, method='PUT', data=kwargs))
1071460
def create_customer(self, *, full_name, email):
        
        payload = {
            "fullName": full_name,
            "email": email
        }
        return self.client._post(self.url + 'customers', json=payload, headers=self.get_headers())
609901
def update(self, identifier, new_instance):
        
        with self.flushing():
            instance = self.retrieve(identifier)
            self.merge(instance, new_instance)
            instance.updated_at = instance.new_timestamp()
        return instance
458905
private function setSalesDataOnCustomer($salesData, $customer)
    {
        foreach ($salesData as $column => $value) {
            $customer->setData($column, $value);
        }
        return $customer;
    }
587737
def update_customer(self, customer_id, customer_deets):
        """"""
        request = self._put("customers/" + str(customer_id), customer_deets)
        return self.responder(request)
311861
def add_new_source(self, source_token, stripe_js_response=None):
        
        customer = self.retrieve_from_stripe()
        customer.source = source_token
        customer.save()
        if stripe_js_response:
            self.stripe_js_response = stripe_js_response
        self._update_from_stripe_object(customer)
10139
def save!
      result = Api.post("#{BASE_PATH}/#{customer_id}", body: attributes.to_json)
      Customer.new(result.parsed_response["rg_customer"])
    end
613876
def update_company_user(self, email, userdata):
        

        if not isinstance(userdata, dict):
            raise AttributeError('userdata must be a <dict>')

        method, url = get_URL('company_update_user')

        payload = {
            'apikey': self.config.get('apikey'),
            'logintoken': self.session.cookies.get('logintoken'),
            'useremail': email
            }

        payload.update(userdata)

        res = getattr(self.session, method)(url, params=payload)

        if res.status_code == 200:
            return True

        hellraiser(res)
553584
def _update_data(self, datapoint, key, new_data):
        
        if new_data:
            try:
                self.data[datapoint].update({key: new_data})
            except KeyError:
                self.data[datapoint] = {key: new_data}
1225633
def update_user(self, instance, user, name=None, password=None, host=None):
        
        return instance.update_user(user, name=name, password=password,
                host=host)
1266814
def customer_id=(customer_id)

      if !customer_id.nil? && customer_id.to_s.length > 50
        fail ArgumentError, "invalid value for 'customer_id', the character length must be smaller than or equal to 50."
      end

      @customer_id = customer_id
    end
524592
def update_user(id, user, opts = {})
      data, _status_code, _headers = update_user_with_http_info(id, user, opts)
      return data
    end
704479
def create_customer(self, full_name, email):
        
        log.warning('Creating customer...')
        data = {'fullName': full_name, 'email': email}

        return self.post('rest/servicedeskapi/customer', headers=self.experimental_headers, data=data)
734315
def tempo_account_add_customer(self, data=None):
        
        if data is None:
            return """Please, set the data as { isNew:boolean
                                                name:string
                                                key:string
                                                id:number } or you can put only name and key parameters"""
        url = 'rest/tempo-accounts/1/customer'
        return self.post(url, data=data)
115900
def modify(self, **params):
        """"""
        data = self.api_client.update_account(self.id, **params)
        self.update(data)
        return data
601023
def info(self, id, attributes=None):
        
        if attributes:
            return self.call('customer.info', [id, attributes])
        else:
            return self.call('customer.info', [id])