summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-12Merge pull request #211 from ↵Alessandro Desantis
solidusio-contrib/luca-landa/handle-subscriptions-with-deleted-products Remove variant from subscriptions on soft deletion
2021-03-12Merge pull request #212 from solidusio-contrib/elia/solidus_support-versionAlessandro Desantis
Require a version of solidus_support that autoloads subscribers
2021-03-12Add docs for variant soft deletion supportluca-landa
2021-03-12Remove variant from subscriptions on soft deletionluca-landa
2021-03-11Require a version of solidus_support that autoloads subscribersElia Schito
This is required in Solidus v2.11+.
2021-03-09Merge pull request #201 from ↵Alessandro Desantis
solidusio-contrib/nirebu/190/move-subscription-processing-to-background-job Move subscription processing to its own background job
2021-03-05Merge pull request #203 from ↵Alberto Vena
solidusio-contrib/kennyadsl/use-new-factories-loading Load factories using the new standard
2021-03-05Merge pull request #192 from ↵Mattia Roccoberton
solidusio-contrib/mr/admin-subscription-orders-listing Admin: expose the subscription orders
2021-02-26Merge pull request #202 from ↵Alessandro Desantis
solidusio-contrib/mr/cleanup-duplicated-fields-on-order-finalize Cleanup the duplicated fields on subscription creation
2021-02-26Admin: expose the subscription ordersMattia Roccoberton
Add a new tab in the member view of subscriptions to list the orders processed by the current subscription.
2021-02-26Merge pull request #195 from igorbp/fix-duplicated-line-itemsAlessandro Desantis
Fix duplicated line items creation
2021-02-26Load factories using the new standardAlberto Vena
2021-02-26Move subscription processing to background jobsNicolò Rebughini
This change moves the processing of individual subscriptions to their own isolated jobs. The tasks of these individual jobs will be: - Deactivate/Cancel subscriptions pending one of those operations - Clear any past failed installment if it's configured to do so - Create a new installment for the subscription cycle - Enqueue a job to process any actionable installment for the subscription Given we've moved the concern of queueing the installment processing, that part can be removed safely from the main processor job. The final part of the change also touches the main processor job, whose task is now to collect any actionable subscription and any subscription with an actionable installment to enqueue them for individual processing.
2021-02-26Add actionable? instance method to subscriptionsNicolò Rebughini
2021-02-19Merge pull request #198 from ↵lucalanda
solidusio-contrib/luca-landa/add-currency-to-subscriptions Add currency to subscriptions
2021-02-19Set currency to orders on subscription processingluca-landa
2021-02-19Add currency to subscriptionluca-landa
2021-02-15fixup! Cleanup the duplicated fields on subscription creationMattia Roccoberton
2021-02-12Fix duplicated line items creationIgor Barbosa
When we update a subscription with new line items, the logic is assigning it twice. It's assigned in SubscriptionsController#update[1] and in ResourceController#update[2]. It only happened with new line items because there's no id for them. [1] https://github.com/solidusio-contrib/solidus_subscriptions/blob/69f0ca038b66d0ca36971405e51c0d3aa916cf19/app/controllers/spree/admin/subscriptions_controller.rb#L28 [2] https://github.com/solidusio/solidus/blob/b0092d0f3bda447494a586bf8eb96a18322b8bed/backend/app/controllers/spree/admin/resource_controller.rb#L36
2021-02-12Add tests for subscription payment method updateIgor Barbosa
The subscription payment method update on the admin panel was missing a test. To make it easier to add those specs, it removes the subject and let definitions in favor of making it explicit for each case.
2021-02-12Cleanup the duplicated fields on subscription creationMattia Roccoberton
2021-02-12Merge pull request #200 from nvandoorn/use-name-in-customer-serializerAlessandro Desantis
Use `name` in customer serializer
2021-02-09Use name in customer serializerNicholas Van Doorn
Solidus 3.0 removes `first_name` and `last_name` from `Spree::Address` so we should replace them with `name`. The Churn Buster documentation would suggest it's OK to pass any customer properties we need, but I have yet to get a developer account to verify.
2021-02-05Merge pull request #197 from solidusio-contrib/mr/fix-sandbox-creation-errorAlessandro Desantis
Fix sandbox creation error
2021-02-05Fix sandbox creation errorMattia Roccoberton
2021-02-05Merge pull request #193 from ↵Alessandro Desantis
solidusio-contrib/deprecate-nested-subscription-attributes-from-user Deprecate nested subscription attributes from user
2021-02-05Merge pull request #191 from solidusio-contrib/improve-unfulfilled-scope-queryAlessandro Desantis
Improve "unfulfilled" scope by adding subquery
2021-02-05Merge pull request #188 from solidusio-contrib/fix-skip-countAlessio Rocco
Fix skip counters to handle skip limits
2021-02-05Merge pull request #172 from solidusio-contrib/aldesantis/refactoringAlessandro Desantis
Processor and Checkout refactoring
2021-01-30Remove `dummy_order` and `dummy_line_item` helpersAlessandro Desantis
These helpers are dangerous: they provide a false sense of assurance by making you think that the order and the line item they return can be used to infer the correct total value of future subscription orders. In reality, order calculation in Solidus is an extremely complex process that may take a ton of different parameters into account, and each store is better off calculating the subscription total with their custom logic rather than this extension trying to provide a solution that works for everyone. In the future, we may provide a way to compute a subscription's total, but for the time being it's better to remove the helpers altogether.
2021-01-30Move all business logic to `lib`Alessandro Desantis
It wasn't clear why certain business logic should live in `app/services` while other should live in `lib`. By unifying everything in one directory, we make it easier for developers to inspect the code and reduce the cognitive load when implementing new classes.
2021-01-30Resume processing installments for cancelled subscriptionsAlessandro Desantis
Because it's very business-specific, this kind of change should be done at the application level in a decorator, rather than embedding it in the extension.
2021-01-30Set queue on `ProcessInstallmentJob` dynamicallyAlessandro Desantis
By setting the queue through a block rather than a boot-time method call, we ensure to play nicely with configuration stubs and in other non-obvious scenarios.
2021-01-30Pass one installment at a time to dispatcher classesAlessandro Desantis
2021-01-30Reorganize hierarchy of dispatcher classesAlessandro Desantis
2021-01-30Streamline and simplify `SolidusSubscriptions::Checkout`Alessandro Desantis
This service object contained a lot of indirection and took on too many responsibilities. The new version is much more streamlined and the flow of operations should be much clearer.
2021-01-30Process one installment at a time in background jobsAlessandro Desantis
Instead of attempting to process multiple installments at a time, which increases the chances something might go wrong, we are now only processing one installment at a time. This also improves the extension's performance, because the installments can be processed in parallel.
2021-01-29Deprecate User subscription nested attributesluca-landa
2021-01-29Fix file name and typoluca-landa
The wrong filename prevented the spec from being executed.
2021-01-29Improve "unfulfilled" scope by adding subqueryAlessio Rocco
"SolidusSubscriptions::Installment#unfulfilled" gets the list of fulfilled installments, loads them ALL into memory, and then performs a WHERE id NOT IN (...) to get the installments that were not fulfilled, this commit simplify the scope using a WHERE clause with a subquery.
2021-01-22Fix skip counters to handle skip limitsAlessio Rocco
Increments "skip_count" and "successive_skip_count" Subscription attributes when SolidusSubscriptions::Subscription#skip is called so the skip limits are correctly handled.
2021-01-20Streamline and simplify `SolidusSubscriptions::Processor`Alessandro Desantis
The processor was way too complicated, taking on too many responsibilities. As a result, it was complex to reason about and it was a very brittle part of the extension. The new processor simply does two things: it finds all actionable subscriptions and ensures to take the appropriate action on them (e.g., cancel, deactivate), including creating the new installment for later. Then, it finds all the actionable installments (including the ones that were just created), and schedules them for asynchronous processing. One side effect of this refactoring is that installments are not grouped by address and payment method/source anymore: each installment will always correspond to a new order. Any logistics-related optimizations should be implemented by the individual store.
2021-01-15Merge pull request #176 from igorbp/fix-subscription-typoIgor Barbosa
Fix typo in subscription admin notifications
2021-01-15Fix typo in subscription admin notificationsIgor Barbosa
2021-01-15Merge pull request #189 from solidusio-contrib/remove-canonical-railsAlessandro Desantis
Remove "canonical-rails" from the Gemfile
2021-01-15Fix Rubocop offensesAlessio Rocco
2021-01-15Remove canonical-rails from GemfileAlessio Rocco
The canonical-rails was locked down to 0.2.9 because Solidus still used the whitelisted_attributes method but with the new version 0.2.10 it was renamed to allowed_parameters and it can be removed.
2020-12-30Merge pull request #183 from ↵Sean Denny
seand7565/update_permissions_on_subscriptions_user_tab Update permissions check on user subscription tab
2020-12-30Update permissions check on user subscription tabSean
Previously, it would check your permissions on an ActiveRecord association - which would in most non-admin cases be false, even if they had permissions to manage subscriptions. This changes the check to return a new instance of the users subscriptions, so people with manage subscriptions permissions will still be able to view this tab, while also allowing for you to conditionally allow/deny permissions based on what users subscriptions they are attempting to view.
2020-12-28Merge pull request #182 from seand7565/add_installment_details_associationNicolò Rebughini
Add Installment Details association to Order