Class: Spree::Orders::FindComplete

Inherits:
Object
  • Object
show all
Includes:
FinderHelper
Defined in:
app/finders/spree/orders/find_complete.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from FinderHelper

#order_includes

Constructor Details

#initialize(user: nil, number: nil, prefix_id: nil, param: nil, token: nil, store: nil, email: nil) ⇒ FindComplete

Returns a new instance of FindComplete.



8
9
10
11
12
13
14
15
16
# File 'app/finders/spree/orders/find_complete.rb', line 8

def initialize(user: nil, number: nil, prefix_id: nil, param: nil, token: nil, store: nil, email: nil)
  @user = user
  @number = number
  @prefix_id = prefix_id
  @param = param
  @token = token
  @store = store
  @email = email
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



6
7
8
# File 'app/finders/spree/orders/find_complete.rb', line 6

def email
  @email
end

#numberObject (readonly)

Returns the value of attribute number.



6
7
8
# File 'app/finders/spree/orders/find_complete.rb', line 6

def number
  @number
end

#paramObject (readonly)

Returns the value of attribute param.



6
7
8
# File 'app/finders/spree/orders/find_complete.rb', line 6

def param
  @param
end

#prefix_idObject (readonly)

Returns the value of attribute prefix_id.



6
7
8
# File 'app/finders/spree/orders/find_complete.rb', line 6

def prefix_id
  @prefix_id
end

#storeObject (readonly)

Returns the value of attribute store.



6
7
8
# File 'app/finders/spree/orders/find_complete.rb', line 6

def store
  @store
end

#tokenObject (readonly)

Returns the value of attribute token.



6
7
8
# File 'app/finders/spree/orders/find_complete.rb', line 6

def token
  @token
end

#userObject (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

#executeObject



18
19
20
21
22
23
24
25
26
27
28
# File 'app/finders/spree/orders/find_complete.rb', line 18

def execute
  orders = by_user(scope)
  orders = by_number(orders)
  orders = by_prefix_id(orders)
  orders = by_param(orders)
  orders = by_token(orders)
  orders = by_store(orders)
  orders = by_email(orders)

  orders
end