solidusio / solidus_stripe

💳 Integrate Solidus with Stripe
https://stripe.com
BSD 3-Clause "New" or "Revised" License
36 stars 62 forks source link

Improve consistency in naming #289

Closed waiting-for-dev closed 1 year ago

waiting-for-dev commented 1 year ago

Summary

We're making naming more consistent:

Rename Event#spree_payment_method to Event#payment_method

We're using the prefix-less version for the Solidus payment method elsewhere.

Prefix factories with :solidus_stripe instead of :stripe

Having something like build(:stripe_payment_method) can be confusing because Stripe also has a different Payment Method entity. We're now renaming the factory for SolidusStripe::PaymentMethod instances to :solidus_stripe_payment_method, and using the same prefix for all other factories for consistency.

Rename :order_with_stripe_payment factory to :solidus_stripe_order

That's to be consistent with all the other factories, which are prefixed with solidus_stripe.

Prefix Stripe refund references with :stripe_

Prepend references to Stripe payment intents with :stripe_

Closes #283

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

codecov[bot] commented 1 year ago

Codecov Report

Merging #289 (0b070ec) into master (5e7a18a) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #289   +/-   ##
=======================================
  Coverage   99.62%   99.62%           
=======================================
  Files          30       30           
  Lines         540      540           
=======================================
  Hits          538      538           
  Misses          2        2           
Impacted Files Coverage Δ
app/models/solidus_stripe/gateway.rb 100.00% <100.00%> (ø)
...ribers/solidus_stripe/webhook/charge_subscriber.rb 100.00% <100.00%> (ø)
...olidus_stripe/webhook/payment_intent_subscriber.rb 100.00% <100.00%> (ø)
lib/solidus_stripe/refunds_synchronizer.rb 100.00% <100.00%> (ø)
lib/solidus_stripe/testing_support/factories.rb 100.00% <100.00%> (ø)
lib/solidus_stripe/webhook/event.rb 96.96% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more