pay 2.6.10 → 2.6.11
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.
Potentially problematic release.
This version of pay might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/models/pay/subscription.rb +2 -2
- data/db/migrate/20210423235138_add_currency_to_pay_charges.rb +5 -0
- data/lib/generators/active_record/templates/migration.rb +1 -1
- data/lib/pay/braintree/subscription.rb +4 -0
- data/lib/pay/fake_processor/subscription.rb +4 -0
- data/lib/pay/paddle/subscription.rb +7 -0
- data/lib/pay/stripe/subscription.rb +4 -0
- data/lib/pay/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c258d50a32d486777f2439f2fd2cd75e6cac1adba558afe630b9eda760c87717
|
4
|
+
data.tar.gz: 1f079e5382a0f8c3cda2e7b70b56c36162bc32926dae8b9c5226ed1c2e508160
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad9e9b98b5ed50f2e0f6599742b70f3c274afdc994949b445d921a5ae4451fbbaf2afcbad47e8d7d2a2c1b382fbb3ab3f97a85b2640048b937fab4d8dca10920
|
7
|
+
data.tar.gz: 21eaa1e667271af7f64e3e1f4544c8f1f6e11e32d3dec80e9e70b05159ac0a4ae9dba390b1e4f1a6cac6b8223df547ec8bc87bb7505425a365fe7a06b713c3ea
|
@@ -115,8 +115,8 @@ module Pay
|
|
115
115
|
owner.invoice!(subscription_id: processor_id)
|
116
116
|
end
|
117
117
|
|
118
|
-
def processor_subscription(options
|
119
|
-
|
118
|
+
def processor_subscription(**options)
|
119
|
+
payment_processor.subscription(**options)
|
120
120
|
end
|
121
121
|
|
122
122
|
def latest_payment
|
@@ -24,6 +24,13 @@ module Pay
|
|
24
24
|
@pay_subscription = pay_subscription
|
25
25
|
end
|
26
26
|
|
27
|
+
def subscription(**options)
|
28
|
+
hash = PaddlePay::Subscription::User.list({subscription_id: processor_id}, options).try(:first)
|
29
|
+
OpenStruct.new(hash)
|
30
|
+
rescue ::PaddlePay::PaddlePayError => e
|
31
|
+
raise Pay::Paddle::Error, e
|
32
|
+
end
|
33
|
+
|
27
34
|
def cancel
|
28
35
|
subscription = processor_subscription
|
29
36
|
PaddlePay::Subscription::User.cancel(processor_id)
|
@@ -23,6 +23,10 @@ module Pay
|
|
23
23
|
@pay_subscription = pay_subscription
|
24
24
|
end
|
25
25
|
|
26
|
+
def subscription(**options)
|
27
|
+
::Stripe::Subscription.retrieve(options.merge(id: processor_id))
|
28
|
+
end
|
29
|
+
|
26
30
|
def cancel
|
27
31
|
subscription = processor_subscription
|
28
32
|
subscription.cancel_at_period_end = true
|
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: 2.6.
|
4
|
+
version: 2.6.11
|
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: 2021-04
|
12
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- db/migrate/20170727235816_create_pay_charges.rb
|
142
142
|
- db/migrate/20190816015720_add_status_to_pay_subscriptions.rb
|
143
143
|
- db/migrate/20200603134434_add_data_to_pay_models.rb
|
144
|
+
- db/migrate/20210423235138_add_currency_to_pay_charges.rb
|
144
145
|
- lib/generators/active_record/pay_generator.rb
|
145
146
|
- lib/generators/active_record/templates/migration.rb
|
146
147
|
- lib/generators/pay/email_views_generator.rb
|