effective_orders 4.2.3 → 4.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72c08933d3c22c22f82ef92827533f3f25c7c5190560490c4c31e76ed95d126e
4
- data.tar.gz: f3b46aad0378283ab3ac51f490ede086b4f71efcf5a254f9edbd11faf3fd3d09
3
+ metadata.gz: ffe0558f82d8b461a8fe062f0e789535e466cacf69dcdd6abb39532bcc3f0626
4
+ data.tar.gz: 51e1467d73b7d5a3044041d618a62e70276744bf9a69060982ee08fe7c7c0c7e
5
5
  SHA512:
6
- metadata.gz: 5831102b9a19e1b27899d269857393e28332a50b90c6bfdd2c959ad387e61ce933170095b4feee098afc3c791c68fd7e9cb2323b33c69dbec01338d385db4152
7
- data.tar.gz: fa3543aac3d26a7682b1a2ba58eaff35d78c0080bde4f0414a0c96a87dc261173abbe81f97c88d60c6828b783a40c05a3bda657aec3773c4178515f73243a937
6
+ metadata.gz: f8c766cb25230d4087105e538e6ae5a00c14eebd7d741977a010ab55c971ebddc0fc9d39711dcfeae533f85609497c4ebefb91b63a5ea6ad7adb854a53b3f2a0
7
+ data.tar.gz: 6dcaf4179fc2179ed551846a9dae3a4c32ac2adad392500f2da327211c963d39b1bcff4beedae77035206b082de6022070f6c3ac720e4451efee67f57473f10e
@@ -81,7 +81,12 @@ module Effective
81
81
 
82
82
  def stripe_plan_ids
83
83
  return unless @event.respond_to?(:data)
84
- @stripe_plan_ids ||= @event.data.object.lines.map { |line| line.plan.id }
84
+
85
+ @stripe_plan_ids ||= begin
86
+ object = @event.data.object
87
+ lines = object.respond_to?(:lines) ? object.lines : object.items
88
+ lines.map { |line| line.plan.id }
89
+ end
85
90
  end
86
91
 
87
92
  def send_email(email, *mailer_args)
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '4.2.3'.freeze
2
+ VERSION = '4.2.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.3
4
+ version: 4.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-31 00:00:00.000000000 Z
11
+ date: 2020-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails