pay 10.0.4 → 10.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/charge.rb +2 -0
- data/app/models/pay/braintree/customer.rb +2 -0
- data/app/models/pay/braintree/payment_method.rb +2 -0
- data/app/models/pay/braintree/subscription.rb +2 -0
- data/app/models/pay/charge.rb +2 -0
- data/app/models/pay/customer.rb +2 -0
- data/app/models/pay/fake_processor/charge.rb +2 -0
- data/app/models/pay/fake_processor/customer.rb +2 -0
- data/app/models/pay/fake_processor/merchant.rb +2 -0
- data/app/models/pay/fake_processor/payment_method.rb +2 -0
- data/app/models/pay/fake_processor/subscription.rb +2 -0
- data/app/models/pay/lemon_squeezy/charge.rb +2 -0
- data/app/models/pay/lemon_squeezy/customer.rb +2 -0
- data/app/models/pay/lemon_squeezy/payment_method.rb +2 -0
- data/app/models/pay/lemon_squeezy/subscription.rb +2 -0
- data/app/models/pay/merchant.rb +2 -0
- data/app/models/pay/paddle_billing/charge.rb +2 -0
- data/app/models/pay/paddle_billing/customer.rb +2 -0
- data/app/models/pay/paddle_billing/payment_method.rb +2 -0
- data/app/models/pay/paddle_billing/subscription.rb +2 -0
- data/app/models/pay/paddle_classic/charge.rb +2 -0
- data/app/models/pay/paddle_classic/customer.rb +2 -0
- data/app/models/pay/paddle_classic/payment_method.rb +2 -0
- data/app/models/pay/paddle_classic/subscription.rb +2 -0
- data/app/models/pay/payment_method.rb +2 -0
- data/app/models/pay/stripe/charge.rb +3 -1
- data/app/models/pay/stripe/customer.rb +4 -2
- data/app/models/pay/stripe/merchant.rb +2 -0
- data/app/models/pay/stripe/payment_method.rb +2 -0
- data/app/models/pay/stripe/subscription.rb +6 -3
- data/app/models/pay/subscription.rb +2 -0
- data/app/models/pay/webhook.rb +2 -0
- data/lib/pay/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60ed8a33d928f8be5f8873e25bc9d52e659f3129750184b6bf5f7aa838f7d5a2
|
4
|
+
data.tar.gz: 9969b2de4dcc2d3509529c62b27cbc28eb7fb440218523f9fb066625ea1897a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a764e343c15ee7afde06ed527b34e93398e4aa6a2314418d8ebfec733b7b4bf1d887ce4817b90100d5e4ce7be6ba0109c40b262f999bf5f4a78d942018b5d38b
|
7
|
+
data.tar.gz: 8b1914ae7921a70334c5ec06b780e41952c77a0d3d1ab640fd9d0fe237df3f0e30c0cb82d2d736dabf22c1453e5442a0f5608d725137b7a299a5cd1b06b5e442
|
data/app/models/pay/charge.rb
CHANGED
data/app/models/pay/customer.rb
CHANGED
data/app/models/pay/merchant.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Pay
|
2
2
|
module Stripe
|
3
3
|
class Charge < Pay::Charge
|
4
|
-
EXPAND = ["balance_transaction", "refunds"]
|
4
|
+
EXPAND = ["balance_transaction", "payment_intent", "refunds.data.balance_transaction"]
|
5
5
|
|
6
6
|
delegate :amount_captured, :payment_intent, to: :stripe_object
|
7
7
|
|
@@ -147,3 +147,5 @@ module Pay
|
|
147
147
|
end
|
148
148
|
end
|
149
149
|
end
|
150
|
+
|
151
|
+
ActiveSupport.run_load_hooks :pay_stripe_charge, Pay::Stripe::Charge
|
@@ -142,8 +142,8 @@ module Pay
|
|
142
142
|
::Stripe::Invoice.create(options.merge(customer: processor_id || api_record.id), stripe_options).pay
|
143
143
|
end
|
144
144
|
|
145
|
-
def
|
146
|
-
::Stripe::Invoice.
|
145
|
+
def preview_invoice(**options)
|
146
|
+
::Stripe::Invoice.create_preview(options.merge(customer: processor_id || api_record.id), stripe_options)
|
147
147
|
end
|
148
148
|
|
149
149
|
# Syncs a customer's subscriptions from Stripe to the database.
|
@@ -270,3 +270,5 @@ module Pay
|
|
270
270
|
end
|
271
271
|
end
|
272
272
|
end
|
273
|
+
|
274
|
+
ActiveSupport.run_load_hooks :pay_stripe_customer, Pay::Stripe::Customer
|
@@ -120,12 +120,13 @@ module Pay
|
|
120
120
|
def self.expand_options
|
121
121
|
{
|
122
122
|
expand: [
|
123
|
-
"discounts",
|
124
123
|
"default_payment_method",
|
125
|
-
"
|
124
|
+
"discounts",
|
126
125
|
"latest_invoice.confirmation_secret",
|
127
126
|
"latest_invoice.payments",
|
128
|
-
"latest_invoice.total_discount_amounts.discount"
|
127
|
+
"latest_invoice.total_discount_amounts.discount",
|
128
|
+
"pending_setup_intent",
|
129
|
+
"schedule"
|
129
130
|
]
|
130
131
|
}
|
131
132
|
end
|
@@ -359,3 +360,5 @@ module Pay
|
|
359
360
|
end
|
360
361
|
end
|
361
362
|
end
|
363
|
+
|
364
|
+
ActiveSupport.run_load_hooks :pay_stripe_subscription, Pay::Stripe::Subscription
|
data/app/models/pay/webhook.rb
CHANGED
data/lib/pay/version.rb
CHANGED