Class: Workarea::Search::Admin::PaymentTransaction
Instance Method Summary
collapse
#as_document, #created_at, for, #id, jump_to, #jump_to_param, #jump_to_route_helper, #releasable?, #sanitized_keywords, #should_be_indexed?, #type, #updated_at
all, #as_bulk_document, #as_document, current_index_prefix, #destroy, #initialize, #save
Instance Method Details
#auth_status ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/models/workarea/search/admin/payment_transaction.rb', line 19
def auth_status
return nil unless model.authorize?
if model.captured_amount.zero?
'pending_capture'
elsif model.captured_amount > 0 &&
model.captured_amount < model.amount
'partially_captured'
elsif model.captured_amount == model.amount
'captured'
end
end
|
#facets ⇒ Object
32
33
34
35
36
37
38
|
# File 'app/models/workarea/search/admin/payment_transaction.rb', line 32
def facets
super.merge(
auth_status: auth_status,
tender_type: tender_type,
transaction: model.action
)
end
|
#jump_to_position ⇒ Object
56
57
58
|
# File 'app/models/workarea/search/admin/payment_transaction.rb', line 56
def jump_to_position
nil
end
|
#jump_to_search_text ⇒ Object
52
53
54
|
# File 'app/models/workarea/search/admin/payment_transaction.rb', line 52
def jump_to_search_text
nil
end
|
#jump_to_text ⇒ Object
48
49
50
|
# File 'app/models/workarea/search/admin/payment_transaction.rb', line 48
def jump_to_text
nil
end
|
#keywords ⇒ Object
15
16
17
|
# File 'app/models/workarea/search/admin/payment_transaction.rb', line 15
def keywords
super + [model.payment_id]
end
|
#name ⇒ Object
40
41
42
|
# File 'app/models/workarea/search/admin/payment_transaction.rb', line 40
def name
nil
end
|
#search_text ⇒ Object
44
45
46
|
# File 'app/models/workarea/search/admin/payment_transaction.rb', line 44
def search_text
nil
end
|
#status ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'app/models/workarea/search/admin/payment_transaction.rb', line 5
def status
if model.canceled?
'canceled'
elsif model.success?
'success'
else
'failure'
end
end
|