Commit 19ba4873 authored by Michael Iseard's avatar Michael Iseard
Browse files

Remove redundant methods

parent 875d90fa
......@@ -68,19 +68,4 @@ class DonorEntity extends AbstractEntity {
*/
public $customer_id;
/**
* Gets all transactions for current user
*
* @return TransactionEntity|null
*/
public function get_transactions(): ?TransactionEntity {
$mapper = new MapperService( TransactionEntity::class );
/** @var TransactionEntity $transactions */
$transactions = $mapper->get_all_by( [ 'customer_id' => $this->customer_id ] );
return $transactions ?? null;
}
}
......@@ -60,20 +60,4 @@ class SubscriptionEntity extends AbstractEntity {
* @var string
*/
public $subscription_id;
/**
* Gets donor associated with subscription
*
* @return DonorEntity|null
* @since 2.0.0
*/
public function get_donor(): ?EntityInterface {
$mapper = new MapperService( DonorEntity::class );
/** @var DonorEntity $donor */
$donor = $mapper->get_one_by( [ 'customer_id' => $this->customer_id ] );
return $donor ?? null;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment