Class: Bandwidth::ApiGetAccountRecordingsMetadataRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb

Overview

ApiGetAccountRecordingsMetadataRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(from = nil, to = nil, min_start_time = nil, max_start_time = nil) ⇒ ApiGetAccountRecordingsMetadataRequest

Returns a new instance of ApiGetAccountRecordingsMetadataRequest.



36
37
38
39
40
41
42
43
44
# File 'lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb', line 36

def initialize(from = nil,
               to = nil,
               min_start_time = nil,
               max_start_time = nil)
  @from = from
  @to = to
  @min_start_time = min_start_time
  @max_start_time = max_start_time
end

Instance Attribute Details

#fromString

Format is E164

Returns:

  • (String)


12
13
14
# File 'lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb', line 12

def from
  @from
end

#max_start_timeDateTime

ISO8601 format

Returns:

  • (DateTime)


24
25
26
# File 'lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb', line 24

def max_start_time
  @max_start_time
end

#min_start_timeDateTime

ISO8601 format

Returns:

  • (DateTime)


20
21
22
# File 'lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb', line 20

def min_start_time
  @min_start_time
end

#toString

Format is E164

Returns:

  • (String)


16
17
18
# File 'lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb', line 16

def to
  @to
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb', line 47

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  from = hash['from']
  to = hash['to']
  min_start_time = APIHelper.rfc3339(hash['minStartTime']) if
    hash['minStartTime']
  max_start_time = APIHelper.rfc3339(hash['maxStartTime']) if
    hash['maxStartTime']

  # Create object from extracted values.

  ApiGetAccountRecordingsMetadataRequest.new(from,
                                             to,
                                             min_start_time,
                                             max_start_time)
end

.namesObject

A mapping from model property names to API property names.



27
28
29
30
31
32
33
34
# File 'lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb', line 27

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['from'] = 'from'
  @_hash['to'] = 'to'
  @_hash['min_start_time'] = 'minStartTime'
  @_hash['max_start_time'] = 'maxStartTime'
  @_hash
end