Class: Verizon::GetTriggerResponse
- Defined in:
- lib/verizon/models/get_trigger_response.rb
Overview
GetTriggerResponse Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
TODO: Write general description for this method.
-
#comparator ⇒ String
TODO: Write general description for this method.
-
#created_at ⇒ DateTime
TODO: Write general description for this method.
-
#group_name ⇒ String
TODO: Write general description for this method.
-
#modified_at ⇒ DateTime
TODO: Write general description for this method.
-
#notification_group_name ⇒ String
TODO: Write general description for this method.
-
#organization_name ⇒ String
TODO: Write general description for this method.
-
#sms_type ⇒ String
TODO: Write general description for this method.
-
#threshold ⇒ String
TODO: Write general description for this method.
-
#threshold_unit ⇒ String
TODO: Write general description for this method.
-
#trigger_category ⇒ String
TODO: Write general description for this method.
-
#trigger_cycle ⇒ String
TODO: Write general description for this method.
-
#trigger_id ⇒ String
TODO: Write general description for this method.
-
#trigger_name ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(account_name = SKIP, comparator = SKIP, created_at = SKIP, group_name = SKIP, modified_at = SKIP, notification_group_name = SKIP, organization_name = SKIP, sms_type = SKIP, threshold = SKIP, threshold_unit = SKIP, trigger_category = SKIP, trigger_cycle = SKIP, trigger_id = SKIP, trigger_name = SKIP) ⇒ GetTriggerResponse
constructor
A new instance of GetTriggerResponse.
- #to_custom_created_at ⇒ Object
- #to_custom_modified_at ⇒ Object
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = SKIP, comparator = SKIP, created_at = SKIP, group_name = SKIP, modified_at = SKIP, notification_group_name = SKIP, organization_name = SKIP, sms_type = SKIP, threshold = SKIP, threshold_unit = SKIP, trigger_category = SKIP, trigger_cycle = SKIP, trigger_id = SKIP, trigger_name = SKIP) ⇒ GetTriggerResponse
Returns a new instance of GetTriggerResponse.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/verizon/models/get_trigger_response.rb', line 114 def initialize(account_name = SKIP, comparator = SKIP, created_at = SKIP, group_name = SKIP, modified_at = SKIP, notification_group_name = SKIP, organization_name = SKIP, sms_type = SKIP, threshold = SKIP, threshold_unit = SKIP, trigger_category = SKIP, trigger_cycle = SKIP, trigger_id = SKIP, trigger_name = SKIP) @account_name = account_name unless account_name == SKIP @comparator = comparator unless comparator == SKIP @created_at = created_at unless created_at == SKIP @group_name = group_name unless group_name == SKIP @modified_at = modified_at unless modified_at == SKIP @notification_group_name = notification_group_name unless notification_group_name == SKIP @organization_name = organization_name unless organization_name == SKIP @sms_type = sms_type unless sms_type == SKIP @threshold = threshold unless threshold == SKIP @threshold_unit = threshold_unit unless threshold_unit == SKIP @trigger_category = trigger_category unless trigger_category == SKIP @trigger_cycle = trigger_cycle unless trigger_cycle == SKIP @trigger_id = trigger_id unless trigger_id == SKIP @trigger_name = trigger_name unless trigger_name == SKIP end |
Instance Attribute Details
#account_name ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/verizon/models/get_trigger_response.rb', line 15 def account_name @account_name end |
#comparator ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/verizon/models/get_trigger_response.rb', line 19 def comparator @comparator end |
#created_at ⇒ DateTime
TODO: Write general description for this method
23 24 25 |
# File 'lib/verizon/models/get_trigger_response.rb', line 23 def created_at @created_at end |
#group_name ⇒ String
TODO: Write general description for this method
27 28 29 |
# File 'lib/verizon/models/get_trigger_response.rb', line 27 def group_name @group_name end |
#modified_at ⇒ DateTime
TODO: Write general description for this method
31 32 33 |
# File 'lib/verizon/models/get_trigger_response.rb', line 31 def modified_at @modified_at end |
#notification_group_name ⇒ String
TODO: Write general description for this method
35 36 37 |
# File 'lib/verizon/models/get_trigger_response.rb', line 35 def notification_group_name @notification_group_name end |
#organization_name ⇒ String
TODO: Write general description for this method
39 40 41 |
# File 'lib/verizon/models/get_trigger_response.rb', line 39 def organization_name @organization_name end |
#sms_type ⇒ String
TODO: Write general description for this method
43 44 45 |
# File 'lib/verizon/models/get_trigger_response.rb', line 43 def sms_type @sms_type end |
#threshold ⇒ String
TODO: Write general description for this method
47 48 49 |
# File 'lib/verizon/models/get_trigger_response.rb', line 47 def threshold @threshold end |
#threshold_unit ⇒ String
TODO: Write general description for this method
51 52 53 |
# File 'lib/verizon/models/get_trigger_response.rb', line 51 def threshold_unit @threshold_unit end |
#trigger_category ⇒ String
TODO: Write general description for this method
55 56 57 |
# File 'lib/verizon/models/get_trigger_response.rb', line 55 def trigger_category @trigger_category end |
#trigger_cycle ⇒ String
TODO: Write general description for this method
59 60 61 |
# File 'lib/verizon/models/get_trigger_response.rb', line 59 def trigger_cycle @trigger_cycle end |
#trigger_id ⇒ String
TODO: Write general description for this method
63 64 65 |
# File 'lib/verizon/models/get_trigger_response.rb', line 63 def trigger_id @trigger_id end |
#trigger_name ⇒ String
TODO: Write general description for this method
67 68 69 |
# File 'lib/verizon/models/get_trigger_response.rb', line 67 def trigger_name @trigger_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/verizon/models/get_trigger_response.rb', line 137 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP comparator = hash.key?('comparator') ? hash['comparator'] : SKIP created_at = if hash.key?('createdAt') (DateTimeHelper.from_rfc3339(hash['createdAt']) if hash['createdAt']) else SKIP end group_name = hash.key?('groupName') ? hash['groupName'] : SKIP modified_at = if hash.key?('modifiedAt') (DateTimeHelper.from_rfc3339(hash['modifiedAt']) if hash['modifiedAt']) else SKIP end notification_group_name = hash.key?('notificationGroupName') ? hash['notificationGroupName'] : SKIP organization_name = hash.key?('organizationName') ? hash['organizationName'] : SKIP sms_type = hash.key?('smsType') ? hash['smsType'] : SKIP threshold = hash.key?('threshold') ? hash['threshold'] : SKIP threshold_unit = hash.key?('thresholdUnit') ? hash['thresholdUnit'] : SKIP trigger_category = hash.key?('triggerCategory') ? hash['triggerCategory'] : SKIP trigger_cycle = hash.key?('triggerCycle') ? hash['triggerCycle'] : SKIP trigger_id = hash.key?('triggerId') ? hash['triggerId'] : SKIP trigger_name = hash.key?('triggerName') ? hash['triggerName'] : SKIP # Create object from extracted values. GetTriggerResponse.new(account_name, comparator, created_at, group_name, modified_at, notification_group_name, organization_name, sms_type, threshold, threshold_unit, trigger_category, trigger_cycle, trigger_id, trigger_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/verizon/models/get_trigger_response.rb', line 70 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['comparator'] = 'comparator' @_hash['created_at'] = 'createdAt' @_hash['group_name'] = 'groupName' @_hash['modified_at'] = 'modifiedAt' @_hash['notification_group_name'] = 'notificationGroupName' @_hash['organization_name'] = 'organizationName' @_hash['sms_type'] = 'smsType' @_hash['threshold'] = 'threshold' @_hash['threshold_unit'] = 'thresholdUnit' @_hash['trigger_category'] = 'triggerCategory' @_hash['trigger_cycle'] = 'triggerCycle' @_hash['trigger_id'] = 'triggerId' @_hash['trigger_name'] = 'triggerName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
110 111 112 |
# File 'lib/verizon/models/get_trigger_response.rb', line 110 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verizon/models/get_trigger_response.rb', line 90 def self.optionals %w[ account_name comparator created_at group_name modified_at notification_group_name organization_name sms_type threshold threshold_unit trigger_category trigger_cycle trigger_id trigger_name ] end |
Instance Method Details
#to_custom_created_at ⇒ Object
184 185 186 |
# File 'lib/verizon/models/get_trigger_response.rb', line 184 def to_custom_created_at DateTimeHelper.to_rfc3339(created_at) end |
#to_custom_modified_at ⇒ Object
188 189 190 |
# File 'lib/verizon/models/get_trigger_response.rb', line 188 def to_custom_modified_at DateTimeHelper.to_rfc3339(modified_at) end |