Skip to content

Commit

Permalink
Add ID on PayInRecurringRegistration
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineLemaire committed Sep 5, 2022
1 parent 4888fd8 commit 23955d5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
14 changes: 14 additions & 0 deletions MangoPay/PayInRecurringRegistration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

class PayInRecurringRegistration extends Libraries\Dto
{
/**
* @var string
*/
public $Id;

/**
* @var string
*/
Expand Down Expand Up @@ -88,4 +93,13 @@ class PayInRecurringRegistration extends Libraries\Dto
* @var int
*/
public $FreeCycles;

/**
* Get array with read-only properties
* @return array
*/
public function GetReadOnlyProperties()
{
return [ 'Id' ];
}
}
10 changes: 0 additions & 10 deletions MangoPay/PayInRecurringRegistrationRequestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@

class PayInRecurringRegistrationRequestResponse extends PayInRecurringRegistration
{
/**
* @var string
*/
public $Id;

/**
* @var string
*/
public $Status;

/**
* @var string
*/
Expand Down
2 changes: 2 additions & 0 deletions tests/Cases/PayInsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ public function test_Create_Recurring_Payment()
$result = $this->getRecurringPayin();

$this->assertNotNull($result);
$this->assertTrue($result->Id > 0);
$this->assertNotNull($result->FreeCycles);
}

Expand All @@ -513,6 +514,7 @@ public function test_Get_Recurring_Payment()
$this->assertNotNull($result);

$get = $this->_api->PayIns->GetRecurringRegistration($result->Id);
$this->assertSame($result->Id, $get->Id);
$this->assertNotNull($get);

$this->assertNotNull($get->FreeCycles);
Expand Down

0 comments on commit 23955d5

Please sign in to comment.