summaryrefslogtreecommitdiff
path: root/app/models/solidus_subscriptions
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/solidus_subscriptions')
-rw-r--r--app/models/solidus_subscriptions/installment.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/solidus_subscriptions/installment.rb b/app/models/solidus_subscriptions/installment.rb
index a899cee..1cad63e 100644
--- a/app/models/solidus_subscriptions/installment.rb
+++ b/app/models/solidus_subscriptions/installment.rb
@@ -95,6 +95,13 @@ module SolidusSubscriptions
details.where(success: true).exists?
end
+ # Returns the state of this fulfillment
+ #
+ # @return [Symbol] :fulfilled/:unfulfilled
+ def state
+ fulfilled? ? :fulfilled : :unfulfilled
+ end
+
# Mark this installment as having a failed payment
#
# @param order [Spree::Order] The order generated for this processing