Class: Verizon::FlowInfo

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/verizon/models/flow_info.rb

Overview

FlowInfo Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(flow_server = SKIP, flow_device = SKIP, flow_direction = SKIP, flow_protocol = SKIP, qci_option = SKIP) ⇒ FlowInfo

Returns a new instance of FlowInfo.



59
60
61
62
63
64
65
66
67
# File 'lib/verizon/models/flow_info.rb', line 59

def initialize(flow_server = SKIP, flow_device = SKIP,
               flow_direction = SKIP, flow_protocol = SKIP,
               qci_option = SKIP)
  @flow_server = flow_server unless flow_server == SKIP
  @flow_device = flow_device unless flow_device == SKIP
  @flow_direction = flow_direction unless flow_direction == SKIP
  @flow_protocol = flow_protocol unless flow_protocol == SKIP
  @qci_option = qci_option unless qci_option == SKIP
end

Instance Attribute Details

#flow_deviceString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/verizon/models/flow_info.rb', line 18

def flow_device
  @flow_device
end

#flow_directionString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/verizon/models/flow_info.rb', line 22

def flow_direction
  @flow_direction
end

#flow_protocolString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/verizon/models/flow_info.rb', line 26

def flow_protocol
  @flow_protocol
end

#flow_serverString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/verizon/models/flow_info.rb', line 14

def flow_server
  @flow_server
end

#qci_optionString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/verizon/models/flow_info.rb', line 30

def qci_option
  @qci_option
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/verizon/models/flow_info.rb', line 70

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  flow_server = hash.key?('flowServer') ? hash['flowServer'] : SKIP
  flow_device = hash.key?('flowDevice') ? hash['flowDevice'] : SKIP
  flow_direction = hash.key?('flowDirection') ? hash['flowDirection'] : SKIP
  flow_protocol = hash.key?('flowProtocol') ? hash['flowProtocol'] : SKIP
  qci_option = hash.key?('qciOption') ? hash['qciOption'] : SKIP

  # Create object from extracted values.
  FlowInfo.new(flow_server,
               flow_device,
               flow_direction,
               flow_protocol,
               qci_option)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
41
# File 'lib/verizon/models/flow_info.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['flow_server'] = 'flowServer'
  @_hash['flow_device'] = 'flowDevice'
  @_hash['flow_direction'] = 'flowDirection'
  @_hash['flow_protocol'] = 'flowProtocol'
  @_hash['qci_option'] = 'qciOption'
  @_hash
end

.nullablesObject

An array for nullable fields



55
56
57
# File 'lib/verizon/models/flow_info.rb', line 55

def self.nullables
  []
end

.optionalsObject

An array for optional fields



44
45
46
47
48
49
50
51
52
# File 'lib/verizon/models/flow_info.rb', line 44

def self.optionals
  %w[
    flow_server
    flow_device
    flow_direction
    flow_protocol
    qci_option
  ]
end