stripe_model_callbacks 0.1.8 → 0.1.9
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/stripe_model_callbacks/application_record.rb +18 -8
- data/app/services/stripe_model_callbacks/attributes_assigner_service.rb +154 -8
- data/app/services/stripe_model_callbacks/base_service.rb +4 -1
- data/app/services/stripe_model_callbacks/configure_service.rb +4 -0
- data/app/services/stripe_model_callbacks/source/transaction_created_service.rb +17 -0
- data/lib/stripe_model_callbacks/factories/stripe_coupons.rb +1 -0
- data/lib/stripe_model_callbacks/factories/stripe_invoice_items.rb +1 -0
- data/lib/stripe_model_callbacks/factories/stripe_invoices.rb +1 -0
- data/lib/stripe_model_callbacks/factories/stripe_products.rb +3 -0
- data/lib/stripe_model_callbacks/factories/stripe_recipients.rb +2 -0
- data/lib/stripe_model_callbacks/factories/stripe_reviews.rb +2 -0
- data/lib/stripe_model_callbacks/factories/stripe_skus.rb +1 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_items.rb +1 -0
- data/lib/stripe_model_callbacks/factories/stripe_transfers.rb +2 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.upcoming.json +0 -1
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/{source.transaction_created.json → source.transaction.created.json} +2 -1
- data/lib/stripe_model_callbacks/models/stripe_charge.rb +6 -3
- data/lib/stripe_model_callbacks/models/stripe_coupon.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_invoice.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_payment_intent.rb +1 -2
- data/lib/stripe_model_callbacks/models/stripe_payment_method.rb +1 -2
- data/lib/stripe_model_callbacks/models/stripe_recipient.rb +1 -1
- data/lib/stripe_model_callbacks/models/stripe_subscription_item.rb +18 -1
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule.rb +1 -1
- data/lib/stripe_model_callbacks/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00d4ab8c0fd0b78be1ebca4dae1507afacb17d06812e3cf76d62f1999cee23eb
|
|
4
|
+
data.tar.gz: 77e3fd6aa86bea4217294b30a8a570747c7688f9e3bf583a21adbe7b3524780e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c60062b0347c8c843ea108dda2d871925afd5b644cc0affc2ff8db6945f51b4014c3f82c930be7057dbcc1fb0b37780806188fc407ea257333e6b9adb1e0ef3e
|
|
7
|
+
data.tar.gz: 93a37540a9c8f7a3ebc1e087a6d777e71a28f977433bb2861828afa63b2120ec4fb55ef56472fa968a96ce936f9a06fc4884a14fca9a279336811bf95d96f5c8
|
|
@@ -6,6 +6,19 @@ class StripeModelCallbacks::ApplicationRecord < ActiveRecord::Base
|
|
|
6
6
|
def self.inherited(child)
|
|
7
7
|
super
|
|
8
8
|
child.include ActiveRecordAuditable::Audited
|
|
9
|
+
apply_json_attribute_types(child)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.apply_json_attribute_types(model_class)
|
|
13
|
+
json_columns = StripeModelCallbacks::AttributesAssignerService::JSON_COLUMNS_BY_TABLE.fetch(
|
|
14
|
+
model_class.table_name,
|
|
15
|
+
[]
|
|
16
|
+
)
|
|
17
|
+
return if json_columns.empty?
|
|
18
|
+
|
|
19
|
+
json_columns.each do |column_name|
|
|
20
|
+
model_class.attribute(column_name, :json)
|
|
21
|
+
end
|
|
9
22
|
end
|
|
10
23
|
|
|
11
24
|
def self.check_object_is_stripe_class(object, allowed = nil)
|
|
@@ -52,13 +65,10 @@ class StripeModelCallbacks::ApplicationRecord < ActiveRecord::Base
|
|
|
52
65
|
super
|
|
53
66
|
end
|
|
54
67
|
|
|
55
|
-
def update_on_stripe(attributes)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
to_stripe.save
|
|
61
|
-
reload_from_stripe!
|
|
68
|
+
def update_on_stripe(attributes) # rubocop:disable Naming/PredicateMethod
|
|
69
|
+
updated_object = self.class.stripe_class.update(stripe_id, attributes)
|
|
70
|
+
assign_from_stripe(updated_object)
|
|
71
|
+
save!
|
|
62
72
|
true
|
|
63
73
|
end
|
|
64
74
|
|
|
@@ -66,7 +76,7 @@ class StripeModelCallbacks::ApplicationRecord < ActiveRecord::Base
|
|
|
66
76
|
raise ActiveRecord::RecordInvalid, self unless update_on_stripe(attributes)
|
|
67
77
|
end
|
|
68
78
|
|
|
69
|
-
def destroy_on_stripe
|
|
79
|
+
def destroy_on_stripe # rubocop:disable Naming/PredicateMethod
|
|
70
80
|
raise "Can't delete #{self.class.name} on Stripe because it isn't supported" unless to_stripe.respond_to?(:delete)
|
|
71
81
|
|
|
72
82
|
to_stripe.delete
|
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
class StripeModelCallbacks::AttributesAssignerService < ServicePattern::Service
|
|
2
2
|
attr_reader :attributes, :model, :stripe_model
|
|
3
3
|
|
|
4
|
+
SKIP_VALUE = Object.new
|
|
5
|
+
JSON_COLUMNS_BY_TABLE = {
|
|
6
|
+
"audits" => %w[audited_changes params],
|
|
7
|
+
"stripe_payment_intents" => %w[
|
|
8
|
+
amount_details
|
|
9
|
+
automatic_payment_methods
|
|
10
|
+
last_payment_error
|
|
11
|
+
metadata
|
|
12
|
+
next_action
|
|
13
|
+
payment_method_options
|
|
14
|
+
payment_method_types
|
|
15
|
+
processing
|
|
16
|
+
shipping
|
|
17
|
+
transfer_data
|
|
18
|
+
],
|
|
19
|
+
"stripe_payment_methods" => %w[billing_details card metadata],
|
|
20
|
+
"stripe_setup_intents" => %w[
|
|
21
|
+
flow_directions
|
|
22
|
+
mandate
|
|
23
|
+
payment_method_old
|
|
24
|
+
payment_method_options
|
|
25
|
+
payment_method_types
|
|
26
|
+
]
|
|
27
|
+
}.freeze
|
|
28
|
+
|
|
4
29
|
def initialize(attributes:, model:, stripe_model:)
|
|
5
30
|
@attributes = attributes
|
|
6
31
|
@model = model
|
|
@@ -9,15 +34,10 @@ class StripeModelCallbacks::AttributesAssignerService < ServicePattern::Service
|
|
|
9
34
|
|
|
10
35
|
def perform
|
|
11
36
|
attributes.each do |attribute|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
value = stripe_model.__send__(attribute)
|
|
37
|
+
value = value_for_attribute(attribute)
|
|
38
|
+
next if value == SKIP_VALUE
|
|
15
39
|
|
|
16
|
-
|
|
17
|
-
value = JSON.generate(value)
|
|
18
|
-
elsif attribute == "created" && value
|
|
19
|
-
value = Time.zone.at(value)
|
|
20
|
-
end
|
|
40
|
+
value = normalize_value(attribute, value)
|
|
21
41
|
|
|
22
42
|
model.__send__(setter_method(attribute), value)
|
|
23
43
|
end
|
|
@@ -25,6 +45,132 @@ class StripeModelCallbacks::AttributesAssignerService < ServicePattern::Service
|
|
|
25
45
|
succeed!
|
|
26
46
|
end
|
|
27
47
|
|
|
48
|
+
def value_for_attribute(attribute)
|
|
49
|
+
return value_from_stripe(attribute) if stripe_model.respond_to?(attribute)
|
|
50
|
+
|
|
51
|
+
return nil if allow_nil_attribute?(attribute)
|
|
52
|
+
return SKIP_VALUE unless model_value(attribute).nil?
|
|
53
|
+
|
|
54
|
+
default_value = default_value_for(attribute)
|
|
55
|
+
return SKIP_VALUE if default_value.nil?
|
|
56
|
+
|
|
57
|
+
default_value
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def value_from_stripe(attribute)
|
|
61
|
+
return nil if allow_nil_attribute?(attribute) && stripe_attribute_missing?(attribute)
|
|
62
|
+
|
|
63
|
+
value = stripe_model.__send__(attribute)
|
|
64
|
+
return nil if value.nil? && allow_nil_attribute?(attribute)
|
|
65
|
+
return default_value_for(attribute) if value.nil?
|
|
66
|
+
|
|
67
|
+
value
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def stripe_attribute_missing?(attribute)
|
|
71
|
+
return false unless stripe_model.respond_to?(:to_hash)
|
|
72
|
+
|
|
73
|
+
values = stripe_model.instance_variable_get(:@values)
|
|
74
|
+
return !values.key?(attribute.to_sym) && !values.key?(attribute.to_s) if values.is_a?(Hash)
|
|
75
|
+
|
|
76
|
+
stripe_values = stripe_model.to_hash
|
|
77
|
+
!stripe_values.key?(attribute.to_sym) && !stripe_values.key?(attribute.to_s)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def normalize_value(attribute, value)
|
|
81
|
+
if attribute == "created" && value
|
|
82
|
+
Time.zone.at(value)
|
|
83
|
+
elsif (converted_value = datetime_column_value(attribute, value))
|
|
84
|
+
converted_value
|
|
85
|
+
elsif json_column?(attribute)
|
|
86
|
+
normalize_json_value(value)
|
|
87
|
+
elsif attribute == "metadata"
|
|
88
|
+
JSON.generate(normalize_json_value(value))
|
|
89
|
+
else
|
|
90
|
+
value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def model_value(attribute)
|
|
95
|
+
model.__send__(column_name_for(attribute))
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def default_value_for(attribute)
|
|
99
|
+
default_value = model.class.column_defaults[column_name_for(attribute)]
|
|
100
|
+
|
|
101
|
+
return default_value unless default_value.nil?
|
|
102
|
+
|
|
103
|
+
nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def allow_nil_attribute?(attribute)
|
|
107
|
+
attribute == "auto_advance"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def json_column?(attribute)
|
|
111
|
+
column_name = column_name_for(attribute)
|
|
112
|
+
return true if json_columns_for_table.include?(column_name)
|
|
113
|
+
|
|
114
|
+
column = model.class.columns_hash[column_name]
|
|
115
|
+
return false unless column
|
|
116
|
+
return true if column.type == :json
|
|
117
|
+
|
|
118
|
+
false
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def json_columns_for_table
|
|
122
|
+
JSON_COLUMNS_BY_TABLE.fetch(model.class.table_name, [])
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def datetime_column_value(attribute, value)
|
|
126
|
+
return false unless value
|
|
127
|
+
|
|
128
|
+
column = model.class.columns_hash[column_name_for(attribute)]
|
|
129
|
+
return false unless column&.type == :datetime
|
|
130
|
+
|
|
131
|
+
timestamp = numeric_timestamp_value(value)
|
|
132
|
+
return Time.zone.at(timestamp) if timestamp
|
|
133
|
+
|
|
134
|
+
value
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def numeric_timestamp_value(value)
|
|
138
|
+
return value.to_i if value.is_a?(Integer) || value.is_a?(Float)
|
|
139
|
+
|
|
140
|
+
value.to_i if value.is_a?(String) && value.match?(/\A\d+\z/)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def normalize_json_value(value)
|
|
144
|
+
return value if value.nil?
|
|
145
|
+
|
|
146
|
+
return normalize_json_string(value) if value.is_a?(String)
|
|
147
|
+
|
|
148
|
+
return value.map { |item| normalize_json_value(item) } if value.is_a?(Array)
|
|
149
|
+
|
|
150
|
+
return value.transform_values { |item| normalize_json_value(item) } if value.is_a?(Hash)
|
|
151
|
+
|
|
152
|
+
return normalize_json_value(value.to_hash) if value.respond_to?(:to_hash)
|
|
153
|
+
|
|
154
|
+
value
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def normalize_json_string(value)
|
|
158
|
+
sanitized_value = value.tr("\u00A0", " ")
|
|
159
|
+
stripped_value = sanitized_value.strip
|
|
160
|
+
return value unless stripped_value.start_with?("{", "[")
|
|
161
|
+
|
|
162
|
+
begin
|
|
163
|
+
parsed_value = JSON.parse(sanitized_value)
|
|
164
|
+
normalize_json_value(parsed_value)
|
|
165
|
+
rescue JSON::ParserError
|
|
166
|
+
value
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
def column_name_for(attribute)
|
|
171
|
+
attribute == "id" ? "stripe_id" : attribute
|
|
172
|
+
end
|
|
173
|
+
|
|
28
174
|
def setter_method(attribute)
|
|
29
175
|
if attribute == "id"
|
|
30
176
|
"stripe_id="
|
|
@@ -30,7 +30,10 @@ class StripeModelCallbacks::BaseService < ServicePattern::Service
|
|
|
30
30
|
# we will prevent from creating duplicated objects due to race condition.
|
|
31
31
|
# https://stripe.com/docs/webhooks/best-practices#event-ordering
|
|
32
32
|
with_exception_notifications do
|
|
33
|
-
StripeModelCallbacks::ApplicationRecord.with_advisory_lock(
|
|
33
|
+
StripeModelCallbacks::ApplicationRecord.with_advisory_lock!(
|
|
34
|
+
advisory_lock_name(*, **),
|
|
35
|
+
timeout_seconds: 10
|
|
36
|
+
) do
|
|
34
37
|
response = execute(*, **, &)
|
|
35
38
|
raise response.errors.join(". ") unless response.success?
|
|
36
39
|
|
|
@@ -237,6 +237,10 @@ private
|
|
|
237
237
|
StripeModelCallbacks::Source::UpdatedService.execute_with_advisory_lock!(event:)
|
|
238
238
|
end
|
|
239
239
|
end
|
|
240
|
+
|
|
241
|
+
subscribe "source.transaction.created" do |event|
|
|
242
|
+
StripeModelCallbacks::Source::TransactionCreatedService.execute_with_advisory_lock!(event:)
|
|
243
|
+
end
|
|
240
244
|
end
|
|
241
245
|
|
|
242
246
|
def subscribe(event_name)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class StripeModelCallbacks::Source::TransactionCreatedService < StripeModelCallbacks::BaseEventService
|
|
2
|
+
def perform
|
|
3
|
+
return succeed! unless source
|
|
4
|
+
|
|
5
|
+
source.create_audit!(action: :transaction_created)
|
|
6
|
+
succeed!
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def source
|
|
12
|
+
@source ||= begin
|
|
13
|
+
source_id = object.respond_to?(:source) ? object.source : nil
|
|
14
|
+
source_id ? StripeSource.find_by(stripe_id: source_id) : nil
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -2,6 +2,9 @@ FactoryBot.define do
|
|
|
2
2
|
factory :stripe_product do
|
|
3
3
|
sequence(:name) { |n| "Stripe product #{n}" }
|
|
4
4
|
sequence(:stripe_id) { |n| "stripe-product-#{n}" }
|
|
5
|
+
active { false }
|
|
6
|
+
livemode { false }
|
|
7
|
+
shippable { false }
|
|
5
8
|
|
|
6
9
|
trait :with_conditional_stripe_mock do
|
|
7
10
|
after :create do |stripe_product|
|
|
@@ -84,11 +84,14 @@ class StripeCharge < StripeModelCallbacks::ApplicationRecord
|
|
|
84
84
|
private
|
|
85
85
|
|
|
86
86
|
def assign_amounts_from_stripe(object)
|
|
87
|
+
amount_captured_value = object.try(:amount_captured)
|
|
88
|
+
amount_captured_value = object.amount if amount_captured_value.nil? && object.respond_to?(:amount)
|
|
89
|
+
|
|
87
90
|
assign_attributes(
|
|
88
91
|
amount: Money.new(object.amount, object.currency),
|
|
89
|
-
amount_captured:
|
|
90
|
-
amount_refunded: object.amount_refunded ? Money.new(object.amount_refunded, object.currency)
|
|
91
|
-
application: object.try(:application) ? Money.new(object.application, object.currency)
|
|
92
|
+
amount_captured: amount_captured_value.nil? ? nil : Money.new(amount_captured_value, object.currency),
|
|
93
|
+
amount_refunded: object.amount_refunded.nil? ? nil : Money.new(object.amount_refunded, object.currency),
|
|
94
|
+
application: object.try(:application).nil? ? nil : Money.new(object.application, object.currency)
|
|
92
95
|
)
|
|
93
96
|
end
|
|
94
97
|
end
|
|
@@ -11,6 +11,7 @@ class StripeCoupon < StripeModelCallbacks::ApplicationRecord
|
|
|
11
11
|
check_object_is_stripe_class(object)
|
|
12
12
|
assign_attributes(
|
|
13
13
|
amount_off: object.amount_off ? Money.new(object.amount_off, object.currency) : nil,
|
|
14
|
+
livemode: object.respond_to?(:livemode) ? object.livemode == true : false,
|
|
14
15
|
stripe_valid: object.valid
|
|
15
16
|
)
|
|
16
17
|
|
|
@@ -22,8 +22,6 @@ class StripePaymentIntent < StripeModelCallbacks::ApplicationRecord
|
|
|
22
22
|
def assign_from_stripe(object)
|
|
23
23
|
check_object_is_stripe_class(object)
|
|
24
24
|
|
|
25
|
-
self.metadata = object.metadata
|
|
26
|
-
|
|
27
25
|
StripeModelCallbacks::AttributesAssignerService.execute!(
|
|
28
26
|
model: self,
|
|
29
27
|
stripe_model: object,
|
|
@@ -49,6 +47,7 @@ class StripePaymentIntent < StripeModelCallbacks::ApplicationRecord
|
|
|
49
47
|
last_payment_error
|
|
50
48
|
latest_charge
|
|
51
49
|
livemode
|
|
50
|
+
metadata
|
|
52
51
|
next_action
|
|
53
52
|
on_behalf_of
|
|
54
53
|
payment_method
|
|
@@ -11,7 +11,6 @@ class StripePaymentMethod < StripeModelCallbacks::ApplicationRecord
|
|
|
11
11
|
def assign_from_stripe(object)
|
|
12
12
|
check_object_is_stripe_class(object)
|
|
13
13
|
|
|
14
|
-
self.metadata = object.metadata
|
|
15
14
|
self.stripe_id = object.id
|
|
16
15
|
self.stripe_type = object.type
|
|
17
16
|
|
|
@@ -19,7 +18,7 @@ class StripePaymentMethod < StripeModelCallbacks::ApplicationRecord
|
|
|
19
18
|
model: self,
|
|
20
19
|
stripe_model: object,
|
|
21
20
|
attributes: %w[
|
|
22
|
-
billing_details card created customer livemode
|
|
21
|
+
billing_details card created customer livemode metadata
|
|
23
22
|
]
|
|
24
23
|
)
|
|
25
24
|
end
|
|
@@ -11,7 +11,7 @@ class StripeRecipient < StripeModelCallbacks::ApplicationRecord
|
|
|
11
11
|
|
|
12
12
|
StripeModelCallbacks::AttributesAssignerService.execute!(
|
|
13
13
|
model: self, stripe_model: object,
|
|
14
|
-
attributes: %w[active_account description email name migrated_to verified]
|
|
14
|
+
attributes: %w[active_account description email livemode name migrated_to verified]
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -15,10 +15,11 @@ class StripeSubscriptionItem < StripeModelCallbacks::ApplicationRecord
|
|
|
15
15
|
self.stripe_plan_id = object.plan.id if object.try(:plan).respond_to?(:id)
|
|
16
16
|
|
|
17
17
|
assign_price_from_stripe(object)
|
|
18
|
+
assign_deleted_from_stripe(object)
|
|
18
19
|
|
|
19
20
|
StripeModelCallbacks::AttributesAssignerService.execute!(
|
|
20
21
|
model: self, stripe_model: object,
|
|
21
|
-
attributes: %w[id created metadata quantity]
|
|
22
|
+
attributes: %w[id created deleted metadata quantity]
|
|
22
23
|
)
|
|
23
24
|
end
|
|
24
25
|
|
|
@@ -60,4 +61,20 @@ private
|
|
|
60
61
|
# Set stripe ID on the subscription item
|
|
61
62
|
self.stripe_price_id = object.price.id
|
|
62
63
|
end
|
|
64
|
+
|
|
65
|
+
def assign_deleted_from_stripe(object)
|
|
66
|
+
return if stripe_attribute_missing?(object, "deleted")
|
|
67
|
+
|
|
68
|
+
self.deleted = object.deleted == true
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def stripe_attribute_missing?(object, attribute)
|
|
72
|
+
return false unless object.respond_to?(:to_hash)
|
|
73
|
+
|
|
74
|
+
values = object.instance_variable_get(:@values)
|
|
75
|
+
return !values.key?(attribute.to_sym) && !values.key?(attribute.to_s) if values.is_a?(Hash)
|
|
76
|
+
|
|
77
|
+
stripe_values = object.to_hash
|
|
78
|
+
!stripe_values.key?(attribute.to_sym) && !stripe_values.key?(attribute.to_s)
|
|
79
|
+
end
|
|
63
80
|
end
|
|
@@ -39,7 +39,7 @@ class StripeSubscriptionSchedule < StripeModelCallbacks::ApplicationRecord
|
|
|
39
39
|
assign_subscription_schedule_phases(object)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
def cancel_on_stripe
|
|
42
|
+
def cancel_on_stripe # rubocop:disable Naming/PredicateMethod
|
|
43
43
|
to_stripe.cancel
|
|
44
44
|
update!(canceled_at: Time.zone.now) if respond_to?(:canceled_at)
|
|
45
45
|
reload_from_stripe!
|
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.9
|
|
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: 2026-01-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -165,6 +165,7 @@ files:
|
|
|
165
165
|
- app/services/stripe_model_callbacks/review/updated_service.rb
|
|
166
166
|
- app/services/stripe_model_callbacks/setup_intent/updated_service.rb
|
|
167
167
|
- app/services/stripe_model_callbacks/sku/updated_service.rb
|
|
168
|
+
- app/services/stripe_model_callbacks/source/transaction_created_service.rb
|
|
168
169
|
- app/services/stripe_model_callbacks/source/updated_service.rb
|
|
169
170
|
- app/services/stripe_model_callbacks/subscription/state_checker_service.rb
|
|
170
171
|
- app/services/stripe_model_callbacks/subscription_schedule/updated_service.rb
|
|
@@ -361,7 +362,7 @@ files:
|
|
|
361
362
|
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.chargeable.json
|
|
362
363
|
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.failed.json
|
|
363
364
|
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.mandate_notification.json
|
|
364
|
-
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.
|
|
365
|
+
- lib/stripe_model_callbacks/fixtures/stripe_events/source/source.transaction.created.json
|
|
365
366
|
- lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.canceled.json
|
|
366
367
|
- lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.created.json
|
|
367
368
|
- lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.updated.json
|