stripe_model_callbacks 0.1.0 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -1
- data/app/models/stripe_model_callbacks/application_record.rb +17 -0
- data/app/services/stripe_model_callbacks/account/external_account/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/attributes_assigner_service.rb +1 -1
- data/app/services/stripe_model_callbacks/base_service.rb +35 -3
- data/app/services/stripe_model_callbacks/charge/dispute_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/charge/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/configure_service.rb +52 -24
- data/app/services/stripe_model_callbacks/coupon/sync_all.rb +9 -0
- data/app/services/stripe_model_callbacks/coupon/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/deleted_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/discount_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/source_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/subscription/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/event_mocker_service.rb +1 -1
- data/app/services/stripe_model_callbacks/invoice/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/invoice_item/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/notifier_service.rb +1 -1
- data/app/services/stripe_model_callbacks/order/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/payout/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/plan/sync_all.rb +9 -0
- data/app/services/stripe_model_callbacks/plan/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/price/updated_service.rb +14 -0
- data/app/services/stripe_model_callbacks/product/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/recipient/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/refund/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/review/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/sku/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/source/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/subscription/state_checker_service.rb +2 -2
- data/app/services/stripe_model_callbacks/subscription_schedule/updated_service.rb +46 -0
- data/app/services/stripe_model_callbacks/sync_everything.rb +8 -0
- data/app/services/stripe_model_callbacks/sync_from_stripe.rb +29 -0
- data/app/services/stripe_model_callbacks/tax_rate/updated_service.rb +27 -0
- data/app/services/stripe_model_callbacks/transfer/updated_service.rb +1 -1
- data/db/migrate/20200317160513_add_auto_advance_and_billing_reason_to_stripe_invoices.rb +6 -0
- data/db/migrate/20200317160602_add_status_and_status_transitions_to_stripe_invoices.rb +10 -0
- data/db/migrate/20200317180115_add_product_type_to_products.rb +5 -0
- data/db/migrate/20200317181224_rename_stripe_invoices_application_fee_to_application_fee_amount.rb +6 -0
- data/db/migrate/20200320105158_make_stripe_invoices_forgive_optional.rb +5 -0
- data/db/migrate/20200320114859_make_stripe_invoice_closed_optional.rb +5 -0
- data/db/migrate/20200323143634_add_amount_paid_and_remaining_and_invoice_url_and_pdf.rb +11 -0
- data/db/migrate/20200331074940_add_unit_label_to_stripe_products.rb +5 -0
- data/db/migrate/20200331075241_add_metered_info_to_stripe_plans.rb +9 -0
- data/db/migrate/20200513131105_create_stripe_subscription_schedules.rb +31 -0
- data/db/migrate/20200513131120_create_stripe_subscription_schedule_phases.rb +21 -0
- data/db/migrate/20200513131640_create_stripe_subscription_schedule_phase_plans.rb +13 -0
- data/db/migrate/20200514132247_add_stripe_id_uniq_to_stripe_invoices.rb +8 -0
- data/db/migrate/20200520152604_change_stripe_subscription_schedule_phase_id_to_bigint.rb +27 -0
- data/db/migrate/20200529144649_add_latest_invoice_id_to_stripe_subscription.rb +5 -0
- data/db/migrate/20201223173035_rename_stripe_subscriptions_start_to_start_date.rb +5 -0
- data/db/migrate/20201223202117_create_stripe_tax_rates.rb +15 -0
- data/db/migrate/20201224120534_create_stripe_subscription_default_tax_rates.rb +9 -0
- data/db/migrate/20201224122058_create_stripe_prices.rb +26 -0
- data/db/migrate/20201224123838_add_stripe_price_to_stripe_subscription_items.rb +6 -0
- data/db/migrate/20211121155313_change_invoice_billing_to_nullable.rb +5 -0
- data/db/migrate/20211121155732_rename_invoices_billing_to_deprecated_billing.rb +5 -0
- data/lib/stripe_model_callbacks/configuration.rb +1 -1
- data/lib/stripe_model_callbacks/factories/stripe_bank_accounts.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_cards.rb +7 -0
- data/lib/stripe_model_callbacks/factories/stripe_charges.rb +11 -0
- data/lib/stripe_model_callbacks/factories/stripe_coupons.rb +21 -0
- data/lib/stripe_model_callbacks/factories/stripe_customers.rb +17 -0
- data/lib/stripe_model_callbacks/factories/stripe_discounts.rb +6 -0
- data/lib/stripe_model_callbacks/factories/stripe_disputes.rb +7 -0
- data/lib/stripe_model_callbacks/factories/stripe_invoice_items.rb +11 -0
- data/lib/stripe_model_callbacks/factories/stripe_invoices.rb +16 -0
- data/lib/stripe_model_callbacks/factories/stripe_order_items.rb +8 -0
- data/lib/stripe_model_callbacks/factories/stripe_orders.rb +9 -0
- data/lib/stripe_model_callbacks/factories/stripe_payouts.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_plans.rb +30 -0
- data/lib/stripe_model_callbacks/factories/stripe_prices.rb +3 -0
- data/lib/stripe_model_callbacks/factories/stripe_products.rb +18 -0
- data/lib/stripe_model_callbacks/factories/stripe_recipients.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_refunds.rb +9 -0
- data/lib/stripe_model_callbacks/factories/stripe_reviews.rb +6 -0
- data/lib/stripe_model_callbacks/factories/stripe_skus.rb +7 -0
- data/lib/stripe_model_callbacks/factories/stripe_sources.rb +8 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_default_tax_rates.rb +6 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_items.rb +19 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule.rb.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phase_plan.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phases.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscriptions.rb +40 -0
- data/lib/stripe_model_callbacks/factories/stripe_tax_rates.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_transfers.rb +8 -0
- data/lib/stripe_model_callbacks/factory_bot_definitions.rb +1 -1
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.created.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.updated.json +31 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.closed.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.created.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_reinstated.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_withdrawn.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.updated.json +96 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refund.updated.json +28 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refunded.json +98 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.created.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.updated.json +31 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.bank_account.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.deleted.json +47 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.deleted.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.updated.json +55 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.card.json +80 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.deleted.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.expiring.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.updated.json +56 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.2020-12-24.json +112 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.json +84 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.deleted.json +83 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.trial_will_end.json +88 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.updated.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.updated.json +50 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.created.json +135 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_failed.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_succeeded.json +207 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.sent.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.upcoming.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.updated.json +105 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.voided.json +152 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoiceitem/invoiceitem.created.json +34 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.created.json +72 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.updated.json +74 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.canceled.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.created.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.failed.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.paid.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.updated.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.created.json +32 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.deleted.json +27 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.updated.json +30 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.created.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.deleted.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.updated.json +40 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.created.json +49 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.deleted.json +48 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.updated.json +50 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.created.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.deleted.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.updated.json +39 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.closed.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.opened.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.deleted.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.updated.json +38 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.canceled.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.chargeable.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.failed.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.mandate_notification.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.transaction_created.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.canceled.json +81 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.created.json +77 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.updated.json +87 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.created.json +26 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.updated.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.created.json +41 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.reversed.json +40 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.updated.json +44 -0
- data/lib/stripe_model_callbacks/models/stripe_bank_account.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_card.rb +2 -1
- data/lib/stripe_model_callbacks/models/stripe_charge.rb +3 -0
- data/lib/stripe_model_callbacks/models/stripe_coupon.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_customer.rb +4 -2
- data/lib/stripe_model_callbacks/models/stripe_discount.rb +10 -3
- data/lib/stripe_model_callbacks/models/stripe_dispute.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_invoice.rb +62 -7
- data/lib/stripe_model_callbacks/models/stripe_invoice_item.rb +2 -0
- data/lib/stripe_model_callbacks/models/stripe_order.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_order_item.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_payout.rb +2 -1
- data/lib/stripe_model_callbacks/models/stripe_plan.rb +4 -1
- data/lib/stripe_model_callbacks/models/stripe_price.rb +27 -0
- data/lib/stripe_model_callbacks/models/stripe_product.rb +17 -7
- data/lib/stripe_model_callbacks/models/stripe_recipient.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_refund.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_review.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_sku.rb +13 -6
- data/lib/stripe_model_callbacks/models/stripe_source.rb +4 -2
- data/lib/stripe_model_callbacks/models/stripe_subscription.rb +56 -6
- data/lib/stripe_model_callbacks/models/stripe_subscription_default_tax_rate.rb +4 -0
- data/lib/stripe_model_callbacks/models/stripe_subscription_item.rb +19 -1
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule.rb +94 -0
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase.rb +67 -0
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase_plan.rb +37 -0
- data/lib/stripe_model_callbacks/models/stripe_tax_rate.rb +22 -0
- data/lib/stripe_model_callbacks/models/stripe_transfer.rb +1 -0
- data/lib/stripe_model_callbacks/version.rb +1 -1
- data/lib/stripe_model_callbacks.rb +1 -0
- metadata +163 -11
@@ -0,0 +1,37 @@
|
|
1
|
+
class StripeSubscriptionSchedulePhasePlan < StripeModelCallbacks::ApplicationRecord
|
2
|
+
MATCHING_STRIPE_ATTRIBUTES = %w[quantity].freeze
|
3
|
+
private_constant :MATCHING_STRIPE_ATTRIBUTES
|
4
|
+
|
5
|
+
belongs_to :stripe_plan, optional: true, primary_key: "stripe_id"
|
6
|
+
belongs_to :stripe_subscription_schedule_phase
|
7
|
+
|
8
|
+
has_one :stripe_subscription_schedule, through: :stripe_subscription_schedule_phase
|
9
|
+
|
10
|
+
def self.stripe_class
|
11
|
+
Stripe::SubscriptionSchedulePhasePlan
|
12
|
+
end
|
13
|
+
|
14
|
+
def assign_from_stripe(object)
|
15
|
+
check_object_is_stripe_class(object)
|
16
|
+
StripeModelCallbacks::AttributesAssignerService.execute!(
|
17
|
+
model: self,
|
18
|
+
stripe_model: object,
|
19
|
+
attributes: MATCHING_STRIPE_ATTRIBUTES
|
20
|
+
)
|
21
|
+
|
22
|
+
assign_attributes(
|
23
|
+
stripe_plan_id: object.plan,
|
24
|
+
stripe_price_id: object.price
|
25
|
+
)
|
26
|
+
|
27
|
+
assign_billing_thresholds(object)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def assign_billing_thresholds(object)
|
33
|
+
billing_thresholds = object.billing_thresholds
|
34
|
+
|
35
|
+
self.billing_thresholds_usage_gte = billing_thresholds&.usage_gte
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class StripeTaxRate < StripeModelCallbacks::ApplicationRecord
|
2
|
+
has_many :stripe_subscription_default_tax_rates, dependent: :destroy
|
3
|
+
|
4
|
+
def self.stripe_class
|
5
|
+
Stripe::TaxRate
|
6
|
+
end
|
7
|
+
|
8
|
+
def assign_from_stripe(object)
|
9
|
+
check_object_is_stripe_class(object)
|
10
|
+
assign_attributes(
|
11
|
+
created: Time.zone.at(object.created),
|
12
|
+
inclusive: object.inclusive == true,
|
13
|
+
stripe_id: object.id
|
14
|
+
)
|
15
|
+
|
16
|
+
StripeModelCallbacks::AttributesAssignerService.execute!(
|
17
|
+
model: self,
|
18
|
+
stripe_model: object,
|
19
|
+
attributes: %w[display_name description jurisdiction percentage inclusive]
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
@@ -7,6 +7,7 @@ class StripeTransfer < StripeModelCallbacks::ApplicationRecord
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def assign_from_stripe(object)
|
10
|
+
check_object_is_stripe_class(object)
|
10
11
|
assign_attributes(
|
11
12
|
amount: Money.new(object.amount, object.currency),
|
12
13
|
amount_reversed: Money.new(object.amount_reversed, object.currency),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe_model_callbacks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 5.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: auto_autoloader
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: money-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: public_activity
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,21 +67,21 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: service_pattern
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 1.0.5
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 1.0.5
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: stripe
|
84
|
+
name: stripe
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.0.4
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: with_advisory_lock
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 4.6.0
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 4.6.0
|
111
125
|
description: Framework for getting Stripe webhook callbacks directly to your models
|
112
126
|
email:
|
113
127
|
- kaspernj@gmail.com
|
@@ -132,6 +146,7 @@ files:
|
|
132
146
|
- app/services/stripe_model_callbacks/charge/dispute_updated_service.rb
|
133
147
|
- app/services/stripe_model_callbacks/charge/updated_service.rb
|
134
148
|
- app/services/stripe_model_callbacks/configure_service.rb
|
149
|
+
- app/services/stripe_model_callbacks/coupon/sync_all.rb
|
135
150
|
- app/services/stripe_model_callbacks/coupon/updated_service.rb
|
136
151
|
- app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb
|
137
152
|
- app/services/stripe_model_callbacks/customer/deleted_service.rb
|
@@ -145,7 +160,9 @@ files:
|
|
145
160
|
- app/services/stripe_model_callbacks/notifier_service.rb
|
146
161
|
- app/services/stripe_model_callbacks/order/updated_service.rb
|
147
162
|
- app/services/stripe_model_callbacks/payout/updated_service.rb
|
163
|
+
- app/services/stripe_model_callbacks/plan/sync_all.rb
|
148
164
|
- app/services/stripe_model_callbacks/plan/updated_service.rb
|
165
|
+
- app/services/stripe_model_callbacks/price/updated_service.rb
|
149
166
|
- app/services/stripe_model_callbacks/product/updated_service.rb
|
150
167
|
- app/services/stripe_model_callbacks/recipient/updated_service.rb
|
151
168
|
- app/services/stripe_model_callbacks/refund/updated_service.rb
|
@@ -153,6 +170,10 @@ files:
|
|
153
170
|
- app/services/stripe_model_callbacks/sku/updated_service.rb
|
154
171
|
- app/services/stripe_model_callbacks/source/updated_service.rb
|
155
172
|
- app/services/stripe_model_callbacks/subscription/state_checker_service.rb
|
173
|
+
- app/services/stripe_model_callbacks/subscription_schedule/updated_service.rb
|
174
|
+
- app/services/stripe_model_callbacks/sync_everything.rb
|
175
|
+
- app/services/stripe_model_callbacks/sync_from_stripe.rb
|
176
|
+
- app/services/stripe_model_callbacks/tax_rate/updated_service.rb
|
156
177
|
- app/services/stripe_model_callbacks/transfer/updated_service.rb
|
157
178
|
- app/views/layouts/stripe_model_callbacks/application.html.erb
|
158
179
|
- config/rails_best_practices.yml
|
@@ -192,12 +213,137 @@ files:
|
|
192
213
|
- db/migrate/20180218092600_add_deleted_at_to_stripe_cards.rb
|
193
214
|
- db/migrate/20181219121712_add_new_primary_id_and_rename_old.rb
|
194
215
|
- db/migrate/20190629112050_rename_stripe_invoice_date_to_created.rb
|
216
|
+
- db/migrate/20200317160513_add_auto_advance_and_billing_reason_to_stripe_invoices.rb
|
217
|
+
- db/migrate/20200317160602_add_status_and_status_transitions_to_stripe_invoices.rb
|
218
|
+
- db/migrate/20200317180115_add_product_type_to_products.rb
|
219
|
+
- db/migrate/20200317181224_rename_stripe_invoices_application_fee_to_application_fee_amount.rb
|
220
|
+
- db/migrate/20200320105158_make_stripe_invoices_forgive_optional.rb
|
221
|
+
- db/migrate/20200320114859_make_stripe_invoice_closed_optional.rb
|
222
|
+
- db/migrate/20200323143634_add_amount_paid_and_remaining_and_invoice_url_and_pdf.rb
|
223
|
+
- db/migrate/20200331074940_add_unit_label_to_stripe_products.rb
|
224
|
+
- db/migrate/20200331075241_add_metered_info_to_stripe_plans.rb
|
225
|
+
- db/migrate/20200513131105_create_stripe_subscription_schedules.rb
|
226
|
+
- db/migrate/20200513131120_create_stripe_subscription_schedule_phases.rb
|
227
|
+
- db/migrate/20200513131640_create_stripe_subscription_schedule_phase_plans.rb
|
228
|
+
- db/migrate/20200514132247_add_stripe_id_uniq_to_stripe_invoices.rb
|
229
|
+
- db/migrate/20200520152604_change_stripe_subscription_schedule_phase_id_to_bigint.rb
|
230
|
+
- db/migrate/20200529144649_add_latest_invoice_id_to_stripe_subscription.rb
|
231
|
+
- db/migrate/20201223173035_rename_stripe_subscriptions_start_to_start_date.rb
|
232
|
+
- db/migrate/20201223202117_create_stripe_tax_rates.rb
|
233
|
+
- db/migrate/20201224120534_create_stripe_subscription_default_tax_rates.rb
|
234
|
+
- db/migrate/20201224122058_create_stripe_prices.rb
|
235
|
+
- db/migrate/20201224123838_add_stripe_price_to_stripe_subscription_items.rb
|
236
|
+
- db/migrate/20211121155313_change_invoice_billing_to_nullable.rb
|
237
|
+
- db/migrate/20211121155732_rename_invoices_billing_to_deprecated_billing.rb
|
195
238
|
- lib/stripe_model_callbacks.rb
|
196
239
|
- lib/stripe_model_callbacks/autoload_models.rb
|
197
240
|
- lib/stripe_model_callbacks/configuration.rb
|
198
241
|
- lib/stripe_model_callbacks/engine.rb
|
199
242
|
- lib/stripe_model_callbacks/event_mocker.rb
|
243
|
+
- lib/stripe_model_callbacks/factories/stripe_bank_accounts.rb
|
244
|
+
- lib/stripe_model_callbacks/factories/stripe_cards.rb
|
245
|
+
- lib/stripe_model_callbacks/factories/stripe_charges.rb
|
246
|
+
- lib/stripe_model_callbacks/factories/stripe_coupons.rb
|
247
|
+
- lib/stripe_model_callbacks/factories/stripe_customers.rb
|
248
|
+
- lib/stripe_model_callbacks/factories/stripe_discounts.rb
|
249
|
+
- lib/stripe_model_callbacks/factories/stripe_disputes.rb
|
250
|
+
- lib/stripe_model_callbacks/factories/stripe_invoice_items.rb
|
251
|
+
- lib/stripe_model_callbacks/factories/stripe_invoices.rb
|
252
|
+
- lib/stripe_model_callbacks/factories/stripe_order_items.rb
|
253
|
+
- lib/stripe_model_callbacks/factories/stripe_orders.rb
|
254
|
+
- lib/stripe_model_callbacks/factories/stripe_payouts.rb
|
255
|
+
- lib/stripe_model_callbacks/factories/stripe_plans.rb
|
256
|
+
- lib/stripe_model_callbacks/factories/stripe_prices.rb
|
257
|
+
- lib/stripe_model_callbacks/factories/stripe_products.rb
|
258
|
+
- lib/stripe_model_callbacks/factories/stripe_recipients.rb
|
259
|
+
- lib/stripe_model_callbacks/factories/stripe_refunds.rb
|
260
|
+
- lib/stripe_model_callbacks/factories/stripe_reviews.rb
|
261
|
+
- lib/stripe_model_callbacks/factories/stripe_skus.rb
|
262
|
+
- lib/stripe_model_callbacks/factories/stripe_sources.rb
|
263
|
+
- lib/stripe_model_callbacks/factories/stripe_subscription_default_tax_rates.rb
|
264
|
+
- lib/stripe_model_callbacks/factories/stripe_subscription_items.rb
|
265
|
+
- lib/stripe_model_callbacks/factories/stripe_subscription_schedule.rb.rb
|
266
|
+
- lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phase_plan.rb
|
267
|
+
- lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phases.rb
|
268
|
+
- lib/stripe_model_callbacks/factories/stripe_subscriptions.rb
|
269
|
+
- lib/stripe_model_callbacks/factories/stripe_tax_rates.rb
|
270
|
+
- lib/stripe_model_callbacks/factories/stripe_transfers.rb
|
200
271
|
- lib/stripe_model_callbacks/factory_bot_definitions.rb
|
272
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.created.json
|
273
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.deleted.json
|
274
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.updated.json
|
275
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.closed.json
|
276
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.created.json
|
277
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_reinstated.json
|
278
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_withdrawn.json
|
279
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.updated.json
|
280
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refund.updated.json
|
281
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refunded.json
|
282
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.created.json
|
283
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.deleted.json
|
284
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.updated.json
|
285
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.bank_account.deleted.json
|
286
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.created.json
|
287
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.deleted.json
|
288
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.created.json
|
289
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.deleted.json
|
290
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.updated.json
|
291
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.card.json
|
292
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.json
|
293
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.deleted.json
|
294
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.expiring.json
|
295
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.updated.json
|
296
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.2020-12-24.json
|
297
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.json
|
298
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.deleted.json
|
299
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.trial_will_end.json
|
300
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.updated.json
|
301
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.updated.json
|
302
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.created.json
|
303
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_failed.json
|
304
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_succeeded.json
|
305
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.sent.json
|
306
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.upcoming.json
|
307
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.updated.json
|
308
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.voided.json
|
309
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/invoiceitem/invoiceitem.created.json
|
310
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/order/order.created.json
|
311
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/order/order.updated.json
|
312
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.canceled.json
|
313
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.created.json
|
314
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.failed.json
|
315
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.paid.json
|
316
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.updated.json
|
317
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.created.json
|
318
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.deleted.json
|
319
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.updated.json
|
320
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/price/price.created.json
|
321
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/price/price.deleted.json
|
322
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/price/price.updated.json
|
323
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/product/product.created.json
|
324
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/product/product.deleted.json
|
325
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/product/product.updated.json
|
326
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.created.json
|
327
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.deleted.json
|
328
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.updated.json
|
329
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/review/review.closed.json
|
330
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/review/review.opened.json
|
331
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.created.json
|
332
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.deleted.json
|
333
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.updated.json
|
334
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.canceled.json
|
335
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.chargeable.json
|
336
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.failed.json
|
337
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.mandate_notification.json
|
338
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.transaction_created.json
|
339
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.canceled.json
|
340
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.created.json
|
341
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.updated.json
|
342
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.created.json
|
343
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.updated.json
|
344
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.created.json
|
345
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.reversed.json
|
346
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.updated.json
|
201
347
|
- lib/stripe_model_callbacks/models/stripe_bank_account.rb
|
202
348
|
- lib/stripe_model_callbacks/models/stripe_card.rb
|
203
349
|
- lib/stripe_model_callbacks/models/stripe_charge.rb
|
@@ -211,6 +357,7 @@ files:
|
|
211
357
|
- lib/stripe_model_callbacks/models/stripe_order_item.rb
|
212
358
|
- lib/stripe_model_callbacks/models/stripe_payout.rb
|
213
359
|
- lib/stripe_model_callbacks/models/stripe_plan.rb
|
360
|
+
- lib/stripe_model_callbacks/models/stripe_price.rb
|
214
361
|
- lib/stripe_model_callbacks/models/stripe_product.rb
|
215
362
|
- lib/stripe_model_callbacks/models/stripe_recipient.rb
|
216
363
|
- lib/stripe_model_callbacks/models/stripe_refund.rb
|
@@ -218,7 +365,12 @@ files:
|
|
218
365
|
- lib/stripe_model_callbacks/models/stripe_sku.rb
|
219
366
|
- lib/stripe_model_callbacks/models/stripe_source.rb
|
220
367
|
- lib/stripe_model_callbacks/models/stripe_subscription.rb
|
368
|
+
- lib/stripe_model_callbacks/models/stripe_subscription_default_tax_rate.rb
|
221
369
|
- lib/stripe_model_callbacks/models/stripe_subscription_item.rb
|
370
|
+
- lib/stripe_model_callbacks/models/stripe_subscription_schedule.rb
|
371
|
+
- lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase.rb
|
372
|
+
- lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase_plan.rb
|
373
|
+
- lib/stripe_model_callbacks/models/stripe_tax_rate.rb
|
222
374
|
- lib/stripe_model_callbacks/models/stripe_transfer.rb
|
223
375
|
- lib/stripe_model_callbacks/require_models.rb
|
224
376
|
- lib/stripe_model_callbacks/version.rb
|
@@ -235,14 +387,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
235
387
|
requirements:
|
236
388
|
- - ">="
|
237
389
|
- !ruby/object:Gem::Version
|
238
|
-
version: '
|
390
|
+
version: '2.5'
|
239
391
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
392
|
requirements:
|
241
393
|
- - ">="
|
242
394
|
- !ruby/object:Gem::Version
|
243
395
|
version: '0'
|
244
396
|
requirements: []
|
245
|
-
rubygems_version: 3.
|
397
|
+
rubygems_version: 3.2.32
|
246
398
|
signing_key:
|
247
399
|
specification_version: 4
|
248
400
|
summary: Framework for getting Stripe webhook callbacks directly to your models
|