Class: SpreeCmCommissioner::Export
- Inherits:
-
Base
- Object
- Spree::Base
- Base
- SpreeCmCommissioner::Export
show all
- Includes:
- StoreMetadata
- Defined in:
- app/models/spree_cm_commissioner/export.rb
Instance Method Summary
collapse
Instance Method Details
#enqueue_export ⇒ Object
44
45
46
|
# File 'app/models/spree_cm_commissioner/export.rb', line 44
def enqueue_export
SpreeCmCommissioner::ExportJob.perform_later(export_id: id)
end
|
#export ⇒ Object
48
49
50
|
# File 'app/models/spree_cm_commissioner/export.rb', line 48
def export
raise NotImplementedError, 'Subclasses must implement the export method'
end
|
#exported_file_name ⇒ Object
32
33
34
35
36
|
# File 'app/models/spree_cm_commissioner/export.rb', line 32
def exported_file_name
return nil if exported_file.blank?
exported_file.filename.to_s
end
|
#exported_file_url ⇒ Object
38
39
40
41
42
|
# File 'app/models/spree_cm_commissioner/export.rb', line 38
def exported_file_url
return nil if exported_file.blank?
cdn_image_url(exported_file)
end
|
#set_uuid ⇒ Object
28
29
30
|
# File 'app/models/spree_cm_commissioner/export.rb', line 28
def set_uuid
self.uuid = SecureRandom.uuid
end
|