summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-13Logs an error in the Rails logs when installment processing failsAlberto Vena
At the moment, by default, all installment prceissing errors are swallowed and there's no way for a developer to understand what's happening. Of course they can create a custom handler with the processing_error_handler configuration provided but usually, when the first errors happen, it's too late and those errors are lost. We are not raising errors of this job because if there's a retry mechanism in place for Active Job, the installment will be reprocessed twice. Once by Active Job and once by the installment retry mechanism already provided by the extension. Logging to Rails.error is a middle-ground that allows to intercept the message of the exception. Still, creating a custom handler based on the bug tracker/exception handler used is the suggested option here.
2021-05-16Bump SolidusSubscriptions to 1.0.0Alessandro Desantis
2021-05-06Merge pull request #229 from ↵Alessandro Desantis
solidusio-contrib/add-order-creation-serviceish-object Introduce Installment OrderCreator configuration
2021-05-06Change accessiblity of SolidusSubscriptions::OrderCreator from protected to ↵cesartalves
private
2021-05-05Installment OrderCreator configuration: keep extra attributes inside the ↵cesartalves
OrderCreator class and remove it from the configuration.
2021-05-04Introduce Installment OrderCreator configurationcesartalves
This adds both SolidusSubscriptions.configuration.order_creation_class and SolidusSubscriptions.configuration.order_creation_extra attributes, so that users can add attributes to each Installment Order at Checkout or even override how the Order is created
2021-04-26Merge pull request #225 from ↵Alberto Vena
solidusio-contrib/dependabot/bundler/solidus_core-gte-2.0.0-and-lt-4 Update solidus_core requirement from >= 2.0.0, < 3 to >= 2.0.0, < 4
2021-04-26Merge pull request #221 from solidusio-contrib/fix-orders-controller-decorationAlberto Vena
Fix Spree::OrdersController decoration
2021-04-22Update solidus_core requirement from >= 2.0.0, < 3 to >= 2.0.0, < 4dependabot-preview[bot]
Updates the requirements on [solidus_core](https://github.com/solidusio/solidus) to permit the latest version. - [Release notes](https://github.com/solidusio/solidus/releases) - [Changelog](https://github.com/solidusio/solidus/blob/master/CHANGELOG.md) - [Commits](https://github.com/solidusio/solidus/compare/v2.0.0...v3.0.0.rc2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-19Move all decorators to that should be solidus-x dependent to the lib foldercesartalves
2021-04-19Fix Spree::OrdersController decorationcesartalves
Move all decorators to nested library (api, core, backend, frontend) decorators folder so they don't get loaded unless the library is defined.
2021-04-19Fix Spree::OrdersController decorationcesartalves
The CreateSubscriptionLineItems decoration for the Front-end controller will break (obviously) if the Spree::OrdersController is not defined. However, some users might want to use the extension using only the Backend and Core of Solidus. This skips the decoration if Spree::Frontend is not defined
2021-04-19Merge pull request #223 from ↵César Alves
solidusio-contrib/fix-subscriptions-permitted-line-item-attributes Fix Api Subscription Permitted LineItem Attributes
2021-04-16Fix Api Subscription Permitted LineItem Attributescesartalves
This removes a filter on the api SubscriptionsController that made it impossible to add a subscribable_id to the nested line_item_attributes (effectively prohibiting the creation of LineItems on the creation of a Subscription. This allows the api to be more flexible but still allows users to limit certain operations by customizing the config.subscription_line_item_attributes
2021-04-07Merge pull request #220 from seand7565/add_reload_to_finalizeSean Denny
Reload order during finalize action
2021-04-07Reload order during finalize actionSean
If you decorate the subscription generator to change the order in any way (for instance, to associate the order to the subscription), that change is not persisted in the rest of the finalize action, as the order has already been loaded by that point. This can cause massive headaches with validations, so to fix it I've added a reload method before super, so we can ensure that the order is up-to-date before continuing. This also means that subscription_line_items interval is nil, since activating the subscription sets it to nil. So in the spec we're fetching the interval from the subscription instead.
2021-04-02Bump SolidusSubscriptions to 1.0.0.rc1Christian Rimondi
2021-03-28Merge pull request #199 from solidusio-contrib/mr/create-subscription-apiAlessandro Desantis
Setup the subcription create endpoint
2021-03-28Fix overly specific not_to raise_error RSpec expectationAlessandro Desantis
not_to raise_error should never be ued with specific error classes, since any other error would make the test pass, including the ones raised by Ruby, meaning that the code being tested may never be reached.
2021-03-28Accept shipping address, bill address and payment attributesMattia Roccoberton
We also check for the existence of the payment source class in order to avoid a runtime error.
2021-03-28Add a subscription create endpointMattia Roccoberton
Mostly the same as update endpoint.
2021-03-28Merge pull request #214 from ↵Alessandro Desantis
solidusio-contrib/christianr/payment-source-ownership Validate payment_source ownership on the subscription
2021-03-26Merge pull request #217 from seand7565/update_specsSean Denny
Update specs to conform with rubocop
2021-03-26Validate payment_source ownership on the subscriptionChristian Rimondi
2021-03-26Merge pull request #216 from ↵lucalanda
solidusio-contrib/luca-landa/update-promotion-rule-names-on-db Update promotion rule names on db
2021-03-26Merge pull request #206 from ↵Alessandro Desantis
solidusio-contrib/ikraamg/skip-activejob-default-retry Skip ActiveJob retrying for ProcessInstallmentJob
2021-03-26fixup! Skip ActiveJob retrying for ProcessInstallmentJobIkraam Ghoor
2021-03-26Skip ActiveJob retrying for ProcessInstallmentJobIkraam Ghoor
This disables the ActiveJob default retry mechanism because installment processing failures are already taken care of by solidus_subscriptions. Before this, there was a potentional for double retrying, which could causes background jobs and cancelled orders to accumulate leading to side effects such as a bad customer experience. Now, a `process_job_error_handler` configuration Proc is called when a ProcessInstallmentJob `#perfom` method fails. The rescued error can be managed/logged as preffered, or re-raised if the default retry behaviour is required in the job.
2021-03-25Fix remaining rubocop violations in specSean
2021-03-25Update promotion rule names on dbluca-landa
After https://github.com/solidusio-contrib/solidus_subscriptions/pull/215 update promotion rule names on db to avoid STI errors.
2021-03-25Fix type in spec nameSean
2021-03-25Add missing magic comment to specsSean
2021-03-22Merge pull request #215 from ↵Alessandro Desantis
solidusio-contrib/luca-landa/improve-promotion-rules-names Improve promotion rules names
2021-03-19Update README with promotion rulesluca-landa
2021-03-19Update promotion rules descriptionsluca-landa
This displays a correct description in the admin panel
2021-03-19Set promotion rules model paths similar to Solidusluca-landa
This allows for naming the models in a way more consistent to Solidus (which doesn't include "PromotionRule" in the name of the class). Also, it easily allows for the promotion rules to be displayed with a better name in the admin panel (which just uses the promotions model name humanized).
2021-03-19Improve installment order promotion rule nameluca-landa
2021-03-19Improve subscription creation order promotion rule nameluca-landa
2021-03-12Merge pull request #210 from ↵lucalanda
solidusio-contrib/luca-landa/set-default-currency-to-subscription Set default config currency to subscription
2021-03-12Fix admin subscription GUI typoluca-landa
2021-03-12Set default config currency to subscriptionluca-landa
Also add a spec that covers manual subscription creation from admin panel.
2021-03-12Merge pull request #213 from ↵Alessandro Desantis
solidusio-contrib/elia/add-missing-permissions-sets-for-2-11 Add missing permissions sets for Solidus v2.11
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-11Update permitted action names for Solidus v2.11Elia Schito
Under v2.11 :display won't be enough anymore for :show controller actions. The latter needs to be stated explicitly.
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