pay 11.2.3 → 11.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71299748a825cda0c189c61f051f666840c413df3e33e177d126dffa9feaa2fe
4
- data.tar.gz: 3d6ad655b364d9fea688fbeae0e1f013bd6966e796559ec4cf1e2d5cb181dda0
3
+ metadata.gz: 9edcf51b1a6346022cd5d504b2d6e730dadeb31580ae60da69b3f5c5414b97d8
4
+ data.tar.gz: 9cd3ea459bdd0f853efab3a72f32af739125740f22e78f756da1e6ea2a059a5e
5
5
  SHA512:
6
- metadata.gz: 530ea9ae04118c33c7aa91e17bb945cb752b22d175b3bdc32eef915e7e304f97f2017409eb53c3adb4ebeb319abf5e9c698ffa618167065d230c548d64ac23df
7
- data.tar.gz: a39c4b305ce5083fcf44fdd8813de11292938bd2439a6288039d0f737e6f134b0ed869c61a06b99d1db4b105207e017de805c5a6cc86cbf9c2230add37dc69da
6
+ metadata.gz: 3e92c7fd1cd767d5d67160abd1bda24d1d9a9c56a4ea3ea883a1be04e65bdaf21fc5a2ad4c9268cad9d37747e6927f79bfcc4beadecbf3f6c79e499d7c890c64
7
+ data.tar.gz: ca5742925df0d3f6aaae8ed148a9710f5c1be43394c0918eb2f0afcba9cf3968546e9388768b98ff3181df8c8e9ddb83ad7ae8d27a5d1266100863e4dcb0b2d8
@@ -31,7 +31,7 @@ module Pay
31
31
  return
32
32
  end
33
33
 
34
- default_payment_method_id = pay_customer.api_record.invoice_settings.default_payment_method
34
+ default_payment_method_id = pay_customer.api_record.invoice_settings&.default_payment_method
35
35
  default = (id == default_payment_method_id)
36
36
 
37
37
  attributes = extract_attributes(object).merge(default: default, stripe_account: stripe_account)
@@ -279,7 +279,6 @@ module Pay
279
279
  unpause
280
280
  else
281
281
  @api_record = ::Stripe::Subscription.update(processor_id, {
282
- plan: processor_plan,
283
282
  trial_end: (on_trial? ? trial_ends_at.to_i : "now"),
284
283
  cancel_at_period_end: false
285
284
  }.merge(expand_options),
@@ -300,10 +299,9 @@ module Pay
300
299
  processor_id,
301
300
  {
302
301
  cancel_at_period_end: false,
303
- plan: plan,
302
+ items: [{id: subscription_items.first.id, plan: plan, quantity: quantity}],
304
303
  proration_behavior: proration_behavior,
305
- trial_end: (on_trial? ? trial_ends_at.to_i : "now"),
306
- quantity: quantity
304
+ trial_end: (on_trial? ? trial_ends_at.to_i : "now")
307
305
  }.merge(expand_options).merge(options),
308
306
  stripe_options
309
307
  )
data/lib/pay/stripe.rb CHANGED
@@ -27,7 +27,7 @@ module Pay
27
27
 
28
28
  extend Env
29
29
 
30
- REQUIRED_VERSION = "~> 15"
30
+ REQUIRED_VERSION = "~> 17"
31
31
 
32
32
  # A list of database model names that include Pay
33
33
  # Used for safely looking up models with client_reference_id
data/lib/pay/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pay
2
- VERSION = "11.2.3"
2
+ VERSION = "11.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pay
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.2.3
4
+ version: 11.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Charnes