Age | Commit message (Collapse) | Author |
|
Add the custom promotion rule to the list of solidus promotion rules.
add some translations and an empty template so that the admin can render
the promotion rule properly
|
|
This makes it easier for people on the frontend to pluralize, instead of
conditionally singularizing. Since this is an enum, this change makes
virtually no difference to us.
|
|
Instead of overriding Spree::PermittedAttributes in various decorators,
group this override together in its own module.
At least now this is all happening in the same place
|
|
|
|
Actionable subscriptions and installments can now be processed with the
rake task:
`bundle exec rake solidus_subscriptions:process`
|
|
This class looks up all actionable subscriptions and installments,
groups them by user and schedules them to be reprocessed.
|
|
I mistakently put decorators in the overrides folder. These files were
loaded twice, once by the engine and once by deface.
Move these files where they belong and require them properly
|
|
Allow an API request for canceling a subscription.
|
|
Add some traits for the different installment and subscriptions states
Subscriptions now initialize with user that owns a credit card
|
|
|
|
|
|
The queue which will process subscriptions is configurable. By default
subscriptions will be run on the default queue
|
|
Add CanCan abilities class
|
|
This adds a CanCan class for modelling our permissions. This then
modifies the LineItemsController to use the new CanCan abilities instead
of manually checking.
|
|
Since it's a Duration, we can now use it just normally instead of adding
its seconds to things.
|
|
Forcing consumers of the API to calculate and provide the interval in
seconds is messy and unnecessary. Instead, we can store the interval as
length and units, and do the math ourselves. This makes the API much
easier to use and understand.
|
|
So that parent applications can use them
|
|
The backend changes were already made to add this field to Variants.
This adds the UI in the admin to modify the value of that field.
|
|
This should be set to our engine's module namepsace, but instead it was
set to Spree (probably because most extensions pollute the Spree
namespace so it's there by default from the generators). Changing this
allows our engine routes to be properly defined as
`solidus_subscriptions` instead of `spree`.
|
|
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 number of
installments they will receive. Add this to an initializer:
SolidusSubscriptions::Config.subscription_line_item_attributes = [
:quantity,
:interval,
:subscribable_id
]
This configuration also easily allows the gem to be customized to track
more information on the subcriptions line items if someone wanted to do
that
|
|
|
|
Load the config module after the default spree payment methods have been
registered
|
|
Allow the default gateway to be set
|
|
The subscriptions gem requires a credit card in order to setup recurring
billing. This configuration method will attempt to take the value of an
instance variable if it has been configured, and fallback to the first
active gateway which supports credit cards.
If not such gateway exists it raises a friendly error informing the
developer how they can configure the default gateway in their app
|
|
|
|
All files in /overrides will be spree override files. Load them all
|
|
all models tables will be prefixed with 'solidus_subscriptions_'
|
|
|