Class: Spree::Orders::FindComplete
- Inherits:
-
Object
- Object
- Spree::Orders::FindComplete
- Includes:
- FinderHelper
- Defined in:
- app/finders/spree/orders/find_complete.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#store ⇒ Object
readonly
Returns the value of attribute store.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(user: nil, number: nil, token: nil, store: nil, email: nil) ⇒ FindComplete
constructor
A new instance of FindComplete.
Methods included from FinderHelper
Constructor Details
#initialize(user: nil, number: nil, token: nil, store: nil, email: nil) ⇒ FindComplete
Returns a new instance of FindComplete.
8 9 10 11 12 13 14 |
# File 'app/finders/spree/orders/find_complete.rb', line 8 def initialize(user: nil, number: nil, token: nil, store: nil, email: nil) @user = user @number = number @token = token @store = store @email = email end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
6 7 8 |
# File 'app/finders/spree/orders/find_complete.rb', line 6 def email @email end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
6 7 8 |
# File 'app/finders/spree/orders/find_complete.rb', line 6 def number @number end |
#store ⇒ Object (readonly)
Returns the value of attribute store.
6 7 8 |
# File 'app/finders/spree/orders/find_complete.rb', line 6 def store @store end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
6 7 8 |
# File 'app/finders/spree/orders/find_complete.rb', line 6 def token @token end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
6 7 8 |
# File 'app/finders/spree/orders/find_complete.rb', line 6 def user @user end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'app/finders/spree/orders/find_complete.rb', line 16 def execute orders = by_user(scope) orders = by_number(orders) orders = by_token(orders) orders = by_store(orders) orders = by_email(orders) orders end |