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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2452332fcebd03986bf33bd266f0a4f59002fcd24dd9734085cd341e1f32afa6
4
- data.tar.gz: d11d5da4657bed64443d42a7cb7b6fc3eb79c2eb832d97b84ceb5bc2ffa20c62
3
+ metadata.gz: 2fb16bce7ab1576f59980e3774ca39033738a7fb1f5dfc26065ff037bdab48c7
4
+ data.tar.gz: 76b131fd50900070e6ef39214ef833ba5af31106092a0451f7a8bee6f6e7cb40
5
5
  SHA512:
6
- metadata.gz: aac4714aaab0a7d4cd86b2b7e3496719a7d63b00844181ee25c25c1c92a2ff5e48f8e37a110d060af48aab3ab782f1bbcb17e42cab451d0204c4182bfca87d5b
7
- data.tar.gz: 20de7342f472d9b57a983fdc318c6bb90d6740d6d080c896c36928d9255b520e6a87de43d69a3322af83813f0a512c9699735c2411c7df46441b42f93555566f
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.for_user(user)
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
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '3.2.1'.freeze
2
+ VERSION = '3.2.2'.freeze
3
3
  end
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.1
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-04 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails