summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2016-09-28Register Subscription promotion rule with solidusBrendan Deere
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
2016-09-28Change interval enum units to singularAlex Blackie
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.
2016-09-27Override Spree Permitted attributes togetherBrendan Deere
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
2016-09-27Autoload constants in libBrendan Deere
2016-09-27Add processing rake taskBrendan Deere
Actionable subscriptions and installments can now be processed with the rake task: `bundle exec rake solidus_subscriptions:process`
2016-09-27Add ProcessorBrendan Deere
This class looks up all actionable subscriptions and installments, groups them by user and schedules them to be reprocessed.
2016-09-26Move decorators to the decorators directoryBrendan Deere
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
2016-09-26Add cancel endpoint for subscriptionsAlex Blackie
Allow an API request for canceling a subscription.
2016-09-23Add some improved factoriesBrendan Deere
Add some traits for the different installment and subscriptions states Subscriptions now initialize with user that owns a credit card
2016-09-23Autoload constants in the lib folderBrendan Deere
2016-09-23autoload app/jobsBrendan Deere
2016-09-23Configurable processing queueBrendan Deere
The queue which will process subscriptions is configurable. By default subscriptions will be run on the default queue
2016-09-23Merge pull request #45 from brendandeere/feature/abilitiesBrendan Deere
Add CanCan abilities class
2016-09-23Add CanCan abilities classAlex Blackie
This adds a CanCan class for modelling our permissions. This then modifies the LineItemsController to use the new CanCan abilities instead of manually checking.
2016-09-22Fix usage of LineItem#intervalAlex Blackie
Since it's a Duration, we can now use it just normally instead of adding its seconds to things.
2016-09-22Refactor interval to be stored more genericallyAlex Blackie
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.
2016-09-22Move factories to testing supportBrendan Deere
So that parent applications can use them
2016-09-21Add checkbox to variant form for subscribableAlex Blackie
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.
2016-09-21Fix isolated namespaceAlex Blackie
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`.
2016-09-20Configurable subscription line item paramsBrendan Deere
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
2016-09-14Make reprocessing interview a configurable option?Brendan Deere
2016-09-08Load Config module on initializationBrendan Deere
Load the config module after the default spree payment methods have been registered
2016-09-08Config.default_gateway=Brendan Deere
Allow the default gateway to be set
2016-09-08Add Config#default_gatewayBrendan Deere
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
2016-08-30Add state_machines as a dependency to the gemBrendan Deere
2016-08-29Load all overrides on activationBrendan Deere
All files in /overrides will be spree override files. Load them all
2016-08-25Namespace Engine modelsBrendan Deere
all models tables will be prefixed with 'solidus_subscriptions_'
2016-08-24initBrendan Deere