summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions/config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/solidus_subscriptions/config.rb')
-rw-r--r--lib/solidus_subscriptions/config.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/solidus_subscriptions/config.rb b/lib/solidus_subscriptions/config.rb
index d6dbbf6..549c1ce 100644
--- a/lib/solidus_subscriptions/config.rb
+++ b/lib/solidus_subscriptions/config.rb
@@ -56,27 +56,25 @@ module SolidusSubscriptions
# This is useful in the case where certain fields should not be allowed to
# be modified by the user. This locks these attributes from being passed
# in to the orders controller (or the api controller).
-
# Ie. if a store does not want to allow users to configure the end date of
# a subscription. Add this to an initializer:
-
# ```
# SolidusSubscriptions::Config.subscription_line_item_attributes = [
# :quantity,
+ # :subscribable_id,
# :interval_length,
# :interval_units,
- # :subscribable_id
# ]
# ```
# This configuration also easily allows the gem to be customized to track
- # more information on the subcriptions line items.
+ # more information on the subscriptions line items.
mattr_accessor(:subscription_line_item_attributes) do
[
:quantity,
:subscribable_id,
:interval_length,
:interval_units,
- :end_date
+ :end_date,
]
end
@@ -84,8 +82,12 @@ module SolidusSubscriptions
# be updated from user data
mattr_accessor(:subscription_attributes) do
[
+ :interval_length,
+ :interval_units,
+ :end_date,
:actionable_date,
- shipping_address_attributes: Spree::PermittedAttributes.address_attributes
+ shipping_address_attributes: Spree::PermittedAttributes.address_attributes,
+ billing_address_attributes: Spree::PermittedAttributes.address_attributes,
]
end
end