effective_orders 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/customer.rb +1 -1
- data/app/models/effective/order_item.rb +1 -1
- data/lib/effective_orders/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fb16bce7ab1576f59980e3774ca39033738a7fb1f5dfc26065ff037bdab48c7
|
4
|
+
data.tar.gz: 76b131fd50900070e6ef39214ef833ba5af31106092a0451f7a8bee6f6e7cb40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a012457f0896f338f98b164a393d1bb21e83f7cbaa55516b0d1d015277ca2fde3b82b988e933c3905b3447fdc7e2c6edbbcc7610292c12810fc39bb1f9922f37
|
7
|
+
data.tar.gz: 78a7aaa52c8b208f13229f5e969f6acf034e7086104246690d44dccdb9c0415a732eb6673b131c5d49137557e8de0edae720d928c3ee934c7e5b3638e488af42
|
@@ -32,7 +32,7 @@ module Effective
|
|
32
32
|
validates :stripe_customer_id, presence: true
|
33
33
|
validates :status, if: -> { stripe_subscription_id.present? }, inclusion: { in: %w(active past_due) }
|
34
34
|
|
35
|
-
def self.
|
35
|
+
def self.for_buyer(user)
|
36
36
|
Effective::Customer.where(user: user).first_or_initialize
|
37
37
|
end
|
38
38
|
|
@@ -4,7 +4,7 @@ module Effective
|
|
4
4
|
|
5
5
|
belongs_to :order, class_name: 'Effective::Order'
|
6
6
|
belongs_to :purchasable, polymorphic: true
|
7
|
-
belongs_to :seller, class_name: 'User'
|
7
|
+
belongs_to :seller, class_name: 'User', optional: true
|
8
8
|
|
9
9
|
delegate :purchased_download_url, to: :purchasable
|
10
10
|
delegate :purchased?, :declined?, to: :order
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_orders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|