def update(self, customer_id, params={}): Resource.verify_keys(params, Customer.update_signature()) response = self.config.http().put(self.config.base_merchant_path() + "/customers/" + customer_id, {"customer": params}) if "customer" in response: return SuccessfulResult({"customer": Customer(self.gateway, response["customer"])}) elif "api_error_response" in response: return ErrorResult(self.gateway, response["api_error_response"])
def tr_data_for_update(self, tr_data, redirect_url): Resource.verify_keys( tr_data, ["customer_id", { "customer": Customer.update_signature() }]) tr_data["kind"] = TransparentRedirect.Kind.UpdateCustomer return self.gateway.transparent_redirect.tr_data(tr_data, redirect_url)
def tr_data_for_update(self, tr_data, redirect_url): Resource.verify_keys(tr_data, ["customer_id", {"customer": Customer.update_signature()}]) tr_data["kind"] = TransparentRedirect.Kind.UpdateCustomer return self.gateway.transparent_redirect.tr_data(tr_data, redirect_url)