Class: Activity::ResourceList::OrderFormatter
Instance Attribute Summary
#record
Instance Method Summary
collapse
#created_at, #identifier, #initialize, #state
Instance Method Details
#display ⇒ Object
218
219
220
|
# File 'app/services/activity/resource_list.rb', line 218
def display
[reference_number, state, total, created_at].compact.join(' - ')
end
|
#ship_to ⇒ Object
222
223
224
225
226
227
228
|
# File 'app/services/activity/resource_list.rb', line 222
def ship_to
[
shipping_address&.person_name,
shipping_address&.city,
shipping_address&.state_code
].compact.join(' ')
end
|
#total ⇒ Object
230
231
232
|
# File 'app/services/activity/resource_list.rb', line 230
def total
Money.new((record.total || 0) * 100, record.currency).format
end
|