Class: Karaden::Model::BulkFile

Inherits:
Requestable show all
Defined in:
lib/karaden/model/bulk_file.rb

Constant Summary collapse

OBJECT_NAME =
'bulk_file'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Requestable

request, request_and_return_response_interface, requestor, requestor=

Methods inherited from KaradenObject

#id, #initialize, #object, #property, #property_keys, #set_property

Constructor Details

This class inherits a constructor from Karaden::Model::KaradenObject

Class Method Details

.create(request_options = nil) ⇒ Object



28
29
30
31
# File 'lib/karaden/model/bulk_file.rb', line 28

def self.create(request_options = nil)
  path = "#{Karaden::Param::Message::Bulk::BulkMessageParams::CONTEXT_PATH}/files"
  request('POST', path, nil, nil, nil, request_options)
end

Instance Method Details

#created_atObject



10
11
12
13
14
15
16
17
# File 'lib/karaden/model/bulk_file.rb', line 10

def created_at()
  created_at = property('created_at')
  begin
    Time.parse(created_at)
  rescue StandardError
    nil
  end
end

#expires_atObject



19
20
21
22
23
24
25
26
# File 'lib/karaden/model/bulk_file.rb', line 19

def expires_at()
  expires_at = property('expires_at')
  begin
    Time.parse(expires_at)
  rescue StandardError
    nil
  end
end

#urlObject



6
7
8
# File 'lib/karaden/model/bulk_file.rb', line 6

def url()
  property('url')
end