pay 5.0.2 → 5.0.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pay might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7a284ee6da187cda76251887acb5192f351814f732b62708bec59ea1d016d80
4
- data.tar.gz: a9838d32ccf610468681a707f69c14958e1838e49ed3ab7399e0ef6ffaa5a679
3
+ metadata.gz: c607f5486ae4c1dfbf46b492e1a369e89e763e03e43bb25596882396285a416a
4
+ data.tar.gz: cbe12e5104c4cc18c9edc0a3d2ecf99f2d9d3adad431e4868747625f4934e6ec
5
5
  SHA512:
6
- metadata.gz: dc25980ecdfbeacdab79c0e5834a1c5c7c6932e693f1fb44f260d0ad0a468b0d8be34267d3eadd4a5cebe6d564bcf05c3b0bfc98c36cef749caa14bb76cf6406
7
- data.tar.gz: 2654d78eeaddac5a8c923f895eab07619a0e960f19192a28e991b14bdb7d98a2963bed9e5d2bc54676e01c75d3ed5ea9e4a0c6c0f1cec52edaec31f6d89ce23e
6
+ metadata.gz: ae0b3f32f96f2efcc5618df5b158397e1d6d1c6c79ee2109bb806628da2c53d998d8090fb7c9d7b2055a7ba660960b8ae4a36a6e6c4da54a943b4cd7020adae2
7
+ data.tar.gz: 356ba70d14722f9b083f366a957c26809082ce14193d7e4ec09350cf4c232de8dd215736b8c5968166d5659a8d9235df90104cc9367654b94e8905a09cfcdb77
@@ -153,7 +153,7 @@ module Pay
153
153
  # For a subscription with a single item, we can update the subscription directly if no SubscriptionItem ID is available
154
154
  # Otherwise a SubscriptionItem ID is required so Stripe knows which entry to update
155
155
  def change_quantity(quantity, **options)
156
- subscription_item_id = options.fetch(:subscription_item_id, subscription_items.first["id"])
156
+ subscription_item_id = options.fetch(:subscription_item_id, subscription_items&.first&.dig("id"))
157
157
  if subscription_item_id
158
158
  ::Stripe::SubscriptionItem.update(subscription_item_id, options.merge(quantity: quantity), stripe_options)
159
159
  @stripe_subscription = nil
data/lib/pay/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pay
2
- VERSION = "5.0.2"
2
+ VERSION = "5.0.3"
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: 5.0.2
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Charnes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-08-18 00:00:00.000000000 Z
12
+ date: 2022-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails