Skip to content

Commit

Permalink
Merge pull request #20 from SafeChargeInternational/development
Browse files Browse the repository at this point in the history
Make UserPaymentOptions available via Safecharge instance
  • Loading branch information
nikivf authored Mar 5, 2021
2 parents 6ecb700 + b7cd285 commit ed7378b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/SafeCharge/Api/SafeCharge.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use SafeCharge\Api\Service\BaseService;
use SafeCharge\Api\Service\PaymentService;
use SafeCharge\Api\Service\UserService;
use SafeCharge\Api\Service\UserPaymentOptions;

class SafeCharge
{
Expand All @@ -20,6 +21,11 @@ class SafeCharge
*/
private $paymentService;

/**
* @var UserPaymentOptions
*/
private $userPaymentOptionsService;

/**
* @var UserService
*/
Expand Down Expand Up @@ -85,6 +91,18 @@ public function getPaymentService()
return $this->paymentService;
}

/**
* @return UserPaymentOptionsService
* @throws Exception\ConfigurationException
*/
public function getUserPaymentOptionsService()
{
if (is_null($this->userPaymentOptionsService)) {
$this->userPaymentOptionsService = new UserPaymentOptions($this->client);
}
return $this->userPaymentOptionsService;
}

/**
* @return UserService
* @throws Exception\ConfigurationException
Expand Down

0 comments on commit ed7378b

Please sign in to comment.