pay 8.0.0 → 8.1.1
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 +4 -4
- data/app/models/pay/braintree/subscription.rb +2 -2
- data/app/models/pay/stripe/subscription.rb +1 -1
- data/app/models/pay/webhook.rb +1 -1
- data/lib/pay/stripe.rb +1 -1
- data/lib/pay/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b493128b8cda84a754699e14ae59d19c88948998591ba8e52494c201c4af12ad
|
4
|
+
data.tar.gz: 85cdd057383abbd32ae348f0f05951f93a77dabf3221c220bdd6fa415fbf7c9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56b5fdcb946e5f951a6169e61f954abcdb8a1f3e56bfbd0627752660305ec6ebe143837d014a8c6113e377a17ad46185232b0d0f18c0e81014b73271caafee36
|
7
|
+
data.tar.gz: 3e3c5a3ae2664590ffa99a09c6e3ffbd9a622a0972509509cb020e78491e0993346801c0918f59978f4ebf241723e743beb99dd273ac29c11b06f6da61c1bfa2
|
@@ -191,7 +191,7 @@ module Pay
|
|
191
191
|
|
192
192
|
def discount_for_switching_to_monthly(current_plan, plan)
|
193
193
|
cycles = (money_remaining_on_yearly_plan(current_plan) / plan.price).floor
|
194
|
-
|
194
|
+
ActiveSupport::InheritableOptions.new(
|
195
195
|
amount: plan.price,
|
196
196
|
number_of_billing_cycles: cycles
|
197
197
|
)
|
@@ -209,7 +209,7 @@ module Pay
|
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
212
|
-
|
212
|
+
ActiveSupport::InheritableOptions.new(amount: amount, number_of_billing_cycles: 1)
|
213
213
|
end
|
214
214
|
|
215
215
|
def swap_across_frequencies(plan)
|
@@ -332,7 +332,7 @@ module Pay
|
|
332
332
|
|
333
333
|
# Retries the latest invoice for a Past Due subscription and attempts to pay it
|
334
334
|
def retry_failed_payment(payment_intent_id: nil)
|
335
|
-
payment_intent_id ||=
|
335
|
+
payment_intent_id ||= api_record.latest_invoice.payment_intent.id
|
336
336
|
payment_intent = ::Stripe::PaymentIntent.retrieve({id: payment_intent_id}, stripe_options)
|
337
337
|
|
338
338
|
payment_intent = if payment_intent.status == "requires_payment_method"
|
data/app/models/pay/webhook.rb
CHANGED
@@ -32,7 +32,7 @@ module Pay
|
|
32
32
|
|
33
33
|
def to_recursive_ostruct(obj)
|
34
34
|
if obj.is_a?(Hash)
|
35
|
-
|
35
|
+
ActiveSupport::InheritableOptions.new(obj.map { |key, val| [key.to_sym, to_recursive_ostruct(val)] }.to_h)
|
36
36
|
elsif obj.is_a?(Array)
|
37
37
|
obj.map { |o| to_recursive_ostruct(o) }
|
38
38
|
else # Assumed to be a primitive value
|
data/lib/pay/stripe.rb
CHANGED
data/lib/pay/version.rb
CHANGED
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: 8.
|
4
|
+
version: 8.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Charnes
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-10-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
|
-
rubygems_version: 3.5.
|
183
|
+
rubygems_version: 3.5.18
|
184
184
|
signing_key:
|
185
185
|
specification_version: 4
|
186
186
|
summary: Payments engine for Ruby on Rails
|