Skip to content

Commit

Permalink
Add CancelDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
viceromag committed Jan 29, 2017
1 parent 99eb059 commit 1aaef60
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/Entities/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,14 @@ public function getCanceledBy()
return $this->getAttribute('canceledBy');
}

/**
* @return string
*/
public function getCancelDescription()
{
return $this->getAttribute('cancelDescription');
}

/**
* @return null|LeadSource
*/
Expand Down
18 changes: 18 additions & 0 deletions src/Entities/SubscriptionCancel.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,24 @@ public function getCanceledBy()
return $this->getAttribute('cancelledBy');
}

/**
* @return string
*/
public function getCancelDescription()
{
return $this->getAttribute('cancelDescription');
}

/**
* @param string $value
*
* @return SubscriptionCancel
*/
public function setCancelDescription($value)
{
return $this->setAttribute('cancelDescription', $value);
}

/**
* @param string $value
*
Expand Down
4 changes: 0 additions & 4 deletions tests/Api/ApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1269,10 +1269,6 @@ private function getFakeValue($attribute, $class)
'quantity' => $faker->numberBetween(1, 100),
]
];
case 'cancelCategory':
return $faker->randomElement(Entities\SubscriptionCancel::cancelCategories());
case 'canceledBy':
return $faker->randomElement(Entities\SubscriptionCancel::canceledBySources());
default:
throw new InvalidArgumentException(
sprintf('Cannot generate fake value for "%s :: %s"', $class, $attribute)
Expand Down

0 comments on commit 1aaef60

Please sign in to comment.