Skip to content

Commit

Permalink
Merge pull request #16 from Acen/master
Browse files Browse the repository at this point in the history
Add "ended" subscription status to PlanSubscription.
  • Loading branch information
gerardojbaez authored Aug 4, 2017
2 parents 6be016d + dd66acf commit 399665d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor
/.phpintel
composer.phar
composer.phar
/.idea
9 changes: 7 additions & 2 deletions src/LaraPlans/Models/PlanSubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ class PlanSubscription extends Model implements PlanSubscriptionInterface
/**
* Subscription statuses
*/
const STATUS_ACTIVE = 'active';
const STATUS_CANCELED = 'canceled';
const STATUS_ENDED = 'ended';
const STATUS_ACTIVE = 'active';
const STATUS_CANCELED = 'canceled';

/**
* The attributes that are mass assignable.
Expand Down Expand Up @@ -113,6 +114,10 @@ public function getStatusAttribute()
if ($this->canceled()) {
return self::STATUS_CANCELED;
}

if ($this->ended()) {
return self::STATUS_ENDED;
}
}

/**
Expand Down

0 comments on commit 399665d

Please sign in to comment.