Skip to content

Commit

Permalink
Moving RecurringPayment to new namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
zaporylie committed Jul 30, 2024
1 parent 416c993 commit 56f5a90
Show file tree
Hide file tree
Showing 34 changed files with 123 additions and 142 deletions.
31 changes: 16 additions & 15 deletions src/Api/RecurringPayment.php → src/Api/v3/RecurringPayment.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?php

namespace zaporylie\Vipps\Api;
namespace zaporylie\Vipps\Api\v3;

use zaporylie\Vipps\Api\ApiBase;
use zaporylie\Vipps\Exceptions\Api\InvalidArgumentException;
use zaporylie\Vipps\Model\RecurringPayment\RequestCreateAgreement;
use zaporylie\Vipps\Model\RecurringPayment\RequestCreateCharge;
use zaporylie\Vipps\Model\RecurringPayment\RequestRefundCharge;
use zaporylie\Vipps\Model\RecurringPayment\RequestUpdateAgreement;
use zaporylie\Vipps\Resource\RecurringPayment\CancelCharge;
use zaporylie\Vipps\Resource\RecurringPayment\CaptureCharge;
use zaporylie\Vipps\Resource\RecurringPayment\CreateAgreement;
use zaporylie\Vipps\Resource\RecurringPayment\CreateCharge;
use zaporylie\Vipps\Resource\RecurringPayment\GetAgreement;
use zaporylie\Vipps\Resource\RecurringPayment\GetAgreements;
use zaporylie\Vipps\Resource\RecurringPayment\GetCharge;
use zaporylie\Vipps\Resource\RecurringPayment\GetCharges;
use zaporylie\Vipps\Resource\RecurringPayment\RefundCharge;
use zaporylie\Vipps\Resource\RecurringPayment\UpdateAgreement;
use zaporylie\Vipps\Model\RecurringPayment\v3\RequestCreateAgreement;
use zaporylie\Vipps\Model\RecurringPayment\v3\RequestCreateCharge;
use zaporylie\Vipps\Model\RecurringPayment\v3\RequestRefundCharge;
use zaporylie\Vipps\Model\RecurringPayment\v3\RequestUpdateAgreement;
use zaporylie\Vipps\Resource\RecurringPayment\v3\CancelCharge;
use zaporylie\Vipps\Resource\RecurringPayment\v3\CaptureCharge;
use zaporylie\Vipps\Resource\RecurringPayment\v3\CreateAgreement;
use zaporylie\Vipps\Resource\RecurringPayment\v3\CreateCharge;
use zaporylie\Vipps\Resource\RecurringPayment\v3\GetAgreement;
use zaporylie\Vipps\Resource\RecurringPayment\v3\GetAgreements;
use zaporylie\Vipps\Resource\RecurringPayment\v3\GetCharge;
use zaporylie\Vipps\Resource\RecurringPayment\v3\GetCharges;
use zaporylie\Vipps\Resource\RecurringPayment\v3\RefundCharge;
use zaporylie\Vipps\Resource\RecurringPayment\v3\UpdateAgreement;
use zaporylie\Vipps\VippsInterface;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace zaporylie\Vipps\Api;
namespace zaporylie\Vipps\Api\v3;

use zaporylie\Vipps\Model\RecurringPayment\RequestCreateAgreement;
use zaporylie\Vipps\Model\RecurringPayment\RequestCreateCharge;
use zaporylie\Vipps\Model\RecurringPayment\RequestRefundCharge;
use zaporylie\Vipps\Model\RecurringPayment\RequestUpdateAgreement;
use zaporylie\Vipps\Model\RecurringPayment\v3\RequestCreateAgreement;
use zaporylie\Vipps\Model\RecurringPayment\v3\RequestCreateCharge;
use zaporylie\Vipps\Model\RecurringPayment\v3\RequestRefundCharge;
use zaporylie\Vipps\Model\RecurringPayment\v3\RequestUpdateAgreement;

/**
* Interface PaymentInterface
Expand All @@ -16,50 +16,50 @@ interface RecurringPaymentInterface
{

/**
* @param \zaporylie\Vipps\Model\RecurringPayment\RequestCreateAgreement
* @param \zaporylie\Vipps\Model\RecurringPayment\v3\RequestCreateAgreement
*
* @return \zaporylie\Vipps\Model\RecurringPayment\ResponseCreateAgreement
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\ResponseCreateAgreement
*/
public function createAgreement(RequestCreateAgreement $requestCreateAgreement);

/**
* @return \zaporylie\Vipps\Model\RecurringPayment\ResponseGetAgreement[]
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\ResponseGetAgreement[]
*/
public function getAgreements();

/**
* @return \zaporylie\Vipps\Model\RecurringPayment\ResponseGetAgreement
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\ResponseGetAgreement
*/
public function getAgreement($agreement_id);

/**
* @param $agreement_id
* @param \zaporylie\Vipps\Model\RecurringPayment\RequestUpdateAgreement $request
* @param \zaporylie\Vipps\Model\RecurringPayment\v3\RequestUpdateAgreement $request
*
* @return \zaporylie\Vipps\Model\RecurringPayment\ResponseUpdateAgreement
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\ResponseUpdateAgreement
*/
public function updateAgreement($agreement_id, RequestUpdateAgreement $request);

/**
* @param $agreement_id
*
* @return \zaporylie\Vipps\Model\RecurringPayment\Charge[]
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\Charge[]
*/
public function getCharges($agreement_id);

/**
* @param $agreement_id
* @param $charge_id
*
* @return \zaporylie\Vipps\Model\RecurringPayment\Charge
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\Charge
*/
public function getCharge($agreement_id, $charge_id);

/**
* @param $agreement_id
* @param \zaporylie\Vipps\Model\RecurringPayment\RequestCreateCharge $request
* @param \zaporylie\Vipps\Model\RecurringPayment\v3\RequestCreateCharge $request
*
* @return \zaporylie\Vipps\Model\RecurringPayment\ResponseCreateCharge
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\ResponseCreateCharge
*/
public function createCharge($agreement_id, RequestCreateCharge $request);

Expand All @@ -82,7 +82,7 @@ public function captureCharge($agreement_id, $charge_id);
/**
* @param string $agreement_id
* @param string $charge_id
* @param \zaporylie\Vipps\Model\RecurringPayment\RequestRefundCharge $requestObject
* @param \zaporylie\Vipps\Model\RecurringPayment\v3\RequestRefundCharge $requestObject
*
* @return string
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand All @@ -13,7 +13,7 @@ class Agreement
{

/**
* @var \zaporylie\Vipps\Model\RecurringPayment\CampaignRequest
* @var \zaporylie\Vipps\Model\RecurringPayment\v3\CampaignRequest
* @Serializer\Type("zaporylie\Vipps\Model\RecurringPayment\CampaignRequest")
*/
protected $campaign;
Expand All @@ -25,13 +25,13 @@ class Agreement
protected $id;

/**
* @var \zaporylie\Vipps\Model\RecurringPayment\AgreementInterval
* @var \zaporylie\Vipps\Model\RecurringPayment\v3\AgreementInterval
* @Serializer\Type("zaporylie\Vipps\Model\RecurringPayment\AgreementInterval")
*/
protected $interval;

/**
* @var \zaporylie\Vipps\Model\RecurringPayment\Pricing
* @var \zaporylie\Vipps\Model\RecurringPayment\v3\Pricing
* @Serializer\Type("zaporylie\Vipps\Model\RecurringPayment\Pricing")
*/
protected $pricing;
Expand Down Expand Up @@ -87,7 +87,7 @@ class Agreement
/**
* Gets campaign value.
*
* @return \zaporylie\Vipps\Model\RecurringPayment\CampaignRequest
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\CampaignRequest
*/
public function getCampaign()
{
Expand All @@ -107,7 +107,7 @@ public function getId()
/**
* Gets interval value.
*
* @return \zaporylie\Vipps\Model\RecurringPayment\AgreementInterval
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\AgreementInterval
*/
public function getInterval()
{
Expand All @@ -117,7 +117,7 @@ public function getInterval()
/**
* Gets price value.
*
* @return \zaporylie\Vipps\Model\RecurringPayment\Pricing
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\Pricing
*/
public function getPricing()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand All @@ -18,7 +18,7 @@ class Charge
protected $amount;

/**
* @var \zaporylie\Vipps\Model\RecurringPayment\Summary
* @var \zaporylie\Vipps\Model\RecurringPayment\v3\Summary
* @Serializer\Type("zaporylie\Vipps\Model\RecurringPayment\Summary")
*/
protected $summary;
Expand Down Expand Up @@ -84,7 +84,7 @@ public function getAmount()
/**
* Gets amountRefunded value.
*
* @return \zaporylie\Vipps\Model\RecurringPayment\Summary
* @return \zaporylie\Vipps\Model\RecurringPayment\v3\Summary
*/
public function getSummary()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use Eloquent\Enumeration\AbstractEnumeration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand All @@ -12,7 +12,7 @@
class RequestCreateAgreement
{
/**
* @var \zaporylie\Vipps\Model\RecurringPayment\CampaignRequest
* @var \zaporylie\Vipps\Model\RecurringPayment\v3\CampaignRequest
* @Serializer\Type("zaporylie\Vipps\Model\RecurringPayment\CampaignRequest")
*/
protected $campaign;
Expand All @@ -24,13 +24,13 @@ class RequestCreateAgreement
protected $customerPhoneNumber;

/**
* @var \zaporylie\Vipps\Model\RecurringPayment\InitialCharge
* @var \zaporylie\Vipps\Model\RecurringPayment\v3\InitialCharge
* @Serializer\Type("zaporylie\Vipps\Model\RecurringPayment\InitialCharge")
*/
protected $initialCharge;

/**
* @var \zaporylie\Vipps\Model\RecurringPayment\AgreementInterval
* @var \zaporylie\Vipps\Model\RecurringPayment\v3\AgreementInterval
* @Serializer\Type("zaporylie\Vipps\Model\RecurringPayment\AgreementInterval")
*/
protected $interval;
Expand All @@ -54,7 +54,7 @@ class RequestCreateAgreement
protected $merchantRedirectUrl;

/**
* @var \zaporylie\Vipps\Model\RecurringPayment\Pricing
* @var \zaporylie\Vipps\Model\RecurringPayment\v3\Pricing
* @Serializer\Type("zaporylie\Vipps\Model\RecurringPayment\Pricing")
*/
protected $pricing;
Expand All @@ -80,7 +80,7 @@ class RequestCreateAgreement
/**
* Sets campaign variable.
*
* @param \zaporylie\Vipps\Model\RecurringPayment\CampaignRequest $campaign
* @param \zaporylie\Vipps\Model\RecurringPayment\v3\CampaignRequest $campaign
*
* @return $this
*/
Expand All @@ -106,7 +106,7 @@ public function setCustomerPhoneNumber($customerPhoneNumber)
/**
* Sets initialCharge variable.
*
* @param \zaporylie\Vipps\Model\RecurringPayment\InitialCharge $initialCharge
* @param \zaporylie\Vipps\Model\RecurringPayment\v3\InitialCharge $initialCharge
*
* @return $this
*/
Expand All @@ -119,7 +119,7 @@ public function setInitialCharge(InitialCharge $initialCharge)
/**
* Sets interval variable.
*
* @param \zaporylie\Vipps\Model\RecurringPayment\AgreementInterval $interval
* @param \zaporylie\Vipps\Model\RecurringPayment\v3\AgreementInterval $interval
*
* @return $this
*/
Expand Down Expand Up @@ -171,7 +171,7 @@ public function setMerchantRedirectUrl($merchantRedirectUrl)
/**
* Sets price variable.
*
* @param \zaporylie\Vipps\Model\RecurringPayment\Pricing
* @param \zaporylie\Vipps\Model\RecurringPayment\v3\Pricing
*
* @return $this
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand All @@ -13,7 +13,7 @@ class RequestUpdateAgreement
{

/**
* @var \zaporylie\Vipps\Model\RecurringPayment\Pricing
* @var \zaporylie\Vipps\Model\RecurringPayment\v3\Pricing
* @Serializer\Type("zaporylie\Vipps\Model\RecurringPayment\Pricing")
*/
protected $pricing;
Expand All @@ -39,7 +39,7 @@ class RequestUpdateAgreement
/**
* Sets price variable.
*
* @param \zaporylie\Vipps\Model\RecurringPayment\Pricing $price
* @param \zaporylie\Vipps\Model\RecurringPayment\v3\Pricing $price
*
* @return $this
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;

use JMS\Serializer\Annotation as Serializer;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

/**
* Class ResponseCaptureCharge
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace zaporylie\Vipps\Model\RecurringPayment;
namespace zaporylie\Vipps\Model\RecurringPayment\v3;

use JMS\Serializer\Annotation as Serializer;

Expand Down
Loading

0 comments on commit 56f5a90

Please sign in to comment.