Class: Workarea::Fulfillment::Token
- Inherits:
-
Object
- Object
- Workarea::Fulfillment::Token
show all
- Includes:
- ApplicationDocument
- Defined in:
- app/models/workarea/fulfillment/token.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#releasable?
add_worker, assert_valid_config!, async, caching_classes?, disable, enable, inline, #run_callbacks, workers, workers_list
#embedded_children
Class Method Details
.for_order_item(order_id, item_id) ⇒ Object
19
20
21
|
# File 'app/models/workarea/fulfillment/token.rb', line 19
def self.for_order_item(order_id, item_id)
where(order_id: order_id.to_s, order_item_id: item_id.to_s).first
end
|
Instance Method Details
#disabled? ⇒ Boolean
27
28
29
|
# File 'app/models/workarea/fulfillment/token.rb', line 27
def disabled?
!enabled?
end
|
#from_user_order? ⇒ Boolean
31
32
33
|
# File 'app/models/workarea/fulfillment/token.rb', line 31
def from_user_order?
user_id.present? && order_id.present?
end
|