/**
  * Creates an search transaction through the HpsPayPlanCustomerService
  */
 public function execute()
 {
     parent::execute();
     $service = new HpsPayPlanCustomerService($this->service->servicesConfig());
     $usableData = array_intersect_key($this->data, array_flip(HpsPayPlanCustomer::getSearchableFields()));
     return $service->search($usableData);
 }
 /**
  * Creates an edit transaction through the HpsPayPlanCustomerService
  */
 public function execute()
 {
     parent::execute();
     if ($this->customer != null) {
         $this->customerKey = $this->customer->customerKey;
     }
     $service = new HpsPayPlanCustomerService($this->service->servicesConfig());
     $obj = new HpsPayPlanCustomer();
     $obj->customerKey = $this->customerKey;
     $usableData = array_intersect_key($this->data, array_flip(HpsPayPlanCustomer::getEditableFields()));
     foreach ($usableData as $k => $v) {
         $obj->{$k} = $v;
     }
     unset($usableData, $k, $v);
     return $service->edit($obj);
 }
 public function edit(HpsPayPlanCustomer $customer)
 {
     $data = $customer->getEditableFieldsWithValues();
     $result = $this->doRequest($data, array('verb' => 'PUT', 'endpoint' => 'customers/' . $customer->customerKey));
     return $this->hydrateObject($result, 'HpsPayPlanCustomer');
 }
 public function edit(HpsPayPlanCustomer $customer)
 {
     $data = $customer->getEditableFieldsWithValues();
     $result = $this->doRequest('PUT', 'customers/' . $customer->customerKey, $data);
     return $this->hydrateObject($result, 'HpsPayPlanCustomer');
 }