Class: Verizon::V2TriggersRequest
- Defined in:
- lib/verizon/models/v2_triggers_request.rb
Overview
V2TriggersRequest Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
The numeric name of the account and must include leading zeroes.
-
#action ⇒ AccountLevelActionEnum
The action taken when trigger conditions are met.
-
#active ⇒ ActiveEnum
A flag to indicate of the trigger is active, true, or not, false.
-
#callback ⇒ TrueClass | FalseClass
The type of trigger being created or modified.
-
#condition ⇒ Rateplantype2Condition
A flag to indicate of the trigger is active, true, or not, false.
-
#data_trigger ⇒ DataTrigger4
The type of trigger being created or modified.
-
#ecpd_id ⇒ String
The Enterprise Customer Profile Database ID.
-
#email_notification ⇒ TrueClass | FalseClass
The type of trigger being created or modified.
-
#external_email_recipients ⇒ String
The type of trigger being created or modified.
-
#filter_criteria ⇒ AccountLevelFilter
A flag to indicate of the trigger is active, true, or not, false.
-
#notification ⇒ Notificationarray
The type of trigger being created or modified.
-
#notification_frequency_factor ⇒ Integer
The type of trigger being created or modified.
-
#notification_frequency_interval ⇒ String
The type of trigger being created or modified.
-
#notification_group_name ⇒ String
The type of trigger being created or modified.
-
#notification_type ⇒ String
The type of trigger being created or modified.
-
#price_plan_trigger ⇒ PricePlanTrigger1
The numeric name of the account and must include leading zeroes.
-
#reminder ⇒ TrueClass | FalseClass
The type of trigger being created or modified.
-
#severity ⇒ String
The type of trigger being created or modified.
-
#sms_notification ⇒ TrueClass | FalseClass
The type of trigger being created or modified.
-
#sms_numbers ⇒ Array[Cellphonenumber]
The type of trigger being created or modified.
-
#trigger_category ⇒ TriggerCategoryEnum
The type of trigger being created or modified.
-
#trigger_name ⇒ String
The user defined name of the trigger.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(trigger_name = SKIP, ecpd_id = SKIP, trigger_category = SKIP, data_trigger = SKIP, notification = SKIP, notification_type = SKIP, callback = SKIP, email_notification = SKIP, notification_group_name = SKIP, notification_frequency_factor = SKIP, notification_frequency_interval = SKIP, external_email_recipients = SKIP, sms_notification = SKIP, sms_numbers = SKIP, reminder = SKIP, severity = SKIP, active = SKIP, filter_criteria = SKIP, condition = SKIP, action = SKIP, account_name = SKIP, price_plan_trigger = SKIP) ⇒ V2TriggersRequest
constructor
A new instance of V2TriggersRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(trigger_name = SKIP, ecpd_id = SKIP, trigger_category = SKIP, data_trigger = SKIP, notification = SKIP, notification_type = SKIP, callback = SKIP, email_notification = SKIP, notification_group_name = SKIP, notification_frequency_factor = SKIP, notification_frequency_interval = SKIP, external_email_recipients = SKIP, sms_notification = SKIP, sms_numbers = SKIP, reminder = SKIP, severity = SKIP, active = SKIP, filter_criteria = SKIP, condition = SKIP, action = SKIP, account_name = SKIP, price_plan_trigger = SKIP) ⇒ V2TriggersRequest
Returns a new instance of V2TriggersRequest.
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 162 def initialize(trigger_name = SKIP, ecpd_id = SKIP, trigger_category = SKIP, data_trigger = SKIP, notification = SKIP, notification_type = SKIP, callback = SKIP, email_notification = SKIP, notification_group_name = SKIP, notification_frequency_factor = SKIP, notification_frequency_interval = SKIP, external_email_recipients = SKIP, sms_notification = SKIP, sms_numbers = SKIP, reminder = SKIP, severity = SKIP, active = SKIP, filter_criteria = SKIP, condition = SKIP, action = SKIP, account_name = SKIP, price_plan_trigger = SKIP) @trigger_name = trigger_name unless trigger_name == SKIP @ecpd_id = ecpd_id unless ecpd_id == SKIP @trigger_category = trigger_category unless trigger_category == SKIP @data_trigger = data_trigger unless data_trigger == SKIP @notification = notification unless notification == SKIP @notification_type = notification_type unless notification_type == SKIP @callback = callback unless callback == SKIP @email_notification = email_notification unless email_notification == SKIP @notification_group_name = notification_group_name unless notification_group_name == SKIP unless notification_frequency_factor == SKIP @notification_frequency_factor = notification_frequency_factor end unless notification_frequency_interval == SKIP @notification_frequency_interval = notification_frequency_interval end unless external_email_recipients == SKIP @external_email_recipients = external_email_recipients end @sms_notification = sms_notification unless sms_notification == SKIP @sms_numbers = sms_numbers unless sms_numbers == SKIP @reminder = reminder unless reminder == SKIP @severity = severity unless severity == SKIP @active = active unless active == SKIP @filter_criteria = filter_criteria unless filter_criteria == SKIP @condition = condition unless condition == SKIP @action = action unless action == SKIP @account_name = account_name unless account_name == SKIP @price_plan_trigger = price_plan_trigger unless price_plan_trigger == SKIP end |
Instance Attribute Details
#account_name ⇒ String
The numeric name of the account and must include leading zeroes
94 95 96 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 94 def account_name @account_name end |
#action ⇒ AccountLevelActionEnum
The action taken when trigger conditions are met
90 91 92 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 90 def action @action end |
#active ⇒ ActiveEnum
A flag to indicate of the trigger is active, true, or not, false
78 79 80 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 78 def active @active end |
#callback ⇒ TrueClass | FalseClass
The type of trigger being created or modified
38 39 40 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 38 def callback @callback end |
#condition ⇒ Rateplantype2Condition
A flag to indicate of the trigger is active, true, or not, false
86 87 88 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 86 def condition @condition end |
#data_trigger ⇒ DataTrigger4
The type of trigger being created or modified
26 27 28 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 26 def data_trigger @data_trigger end |
#ecpd_id ⇒ String
The Enterprise Customer Profile Database ID
18 19 20 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 18 def ecpd_id @ecpd_id end |
#email_notification ⇒ TrueClass | FalseClass
The type of trigger being created or modified
42 43 44 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 42 def email_notification @email_notification end |
#external_email_recipients ⇒ String
The type of trigger being created or modified
58 59 60 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 58 def external_email_recipients @external_email_recipients end |
#filter_criteria ⇒ AccountLevelFilter
A flag to indicate of the trigger is active, true, or not, false
82 83 84 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 82 def filter_criteria @filter_criteria end |
#notification ⇒ Notificationarray
The type of trigger being created or modified
30 31 32 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 30 def notification @notification end |
#notification_frequency_factor ⇒ Integer
The type of trigger being created or modified
50 51 52 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 50 def notification_frequency_factor @notification_frequency_factor end |
#notification_frequency_interval ⇒ String
The type of trigger being created or modified
54 55 56 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 54 def notification_frequency_interval @notification_frequency_interval end |
#notification_group_name ⇒ String
The type of trigger being created or modified
46 47 48 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 46 def notification_group_name @notification_group_name end |
#notification_type ⇒ String
The type of trigger being created or modified
34 35 36 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 34 def notification_type @notification_type end |
#price_plan_trigger ⇒ PricePlanTrigger1
The numeric name of the account and must include leading zeroes
98 99 100 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 98 def price_plan_trigger @price_plan_trigger end |
#reminder ⇒ TrueClass | FalseClass
The type of trigger being created or modified
70 71 72 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 70 def reminder @reminder end |
#severity ⇒ String
The type of trigger being created or modified
74 75 76 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 74 def severity @severity end |
#sms_notification ⇒ TrueClass | FalseClass
The type of trigger being created or modified
62 63 64 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 62 def sms_notification @sms_notification end |
#sms_numbers ⇒ Array[Cellphonenumber]
The type of trigger being created or modified
66 67 68 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 66 def sms_numbers @sms_numbers end |
#trigger_category ⇒ TriggerCategoryEnum
The type of trigger being created or modified
22 23 24 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 22 def trigger_category @trigger_category end |
#trigger_name ⇒ String
The user defined name of the trigger
14 15 16 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 14 def trigger_name @trigger_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 207 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. trigger_name = hash.key?('triggerName') ? hash['triggerName'] : SKIP ecpd_id = hash.key?('ecpdId') ? hash['ecpdId'] : SKIP trigger_category = hash.key?('triggerCategory') ? hash['triggerCategory'] : SKIP data_trigger = DataTrigger4.from_hash(hash['dataTrigger']) if hash['dataTrigger'] notification = Notificationarray.from_hash(hash['notification']) if hash['notification'] notification_type = hash.key?('notificationType') ? hash['notificationType'] : SKIP callback = hash.key?('callback') ? hash['callback'] : SKIP email_notification = hash.key?('emailNotification') ? hash['emailNotification'] : SKIP notification_group_name = hash.key?('notificationGroupName') ? hash['notificationGroupName'] : SKIP notification_frequency_factor = hash.key?('notificationFrequencyFactor') ? hash['notificationFrequencyFactor'] : SKIP notification_frequency_interval = hash.key?('notificationFrequencyInterval') ? hash['notificationFrequencyInterval'] : SKIP external_email_recipients = hash.key?('externalEmailRecipients') ? hash['externalEmailRecipients'] : SKIP sms_notification = hash.key?('smsNotification') ? hash['smsNotification'] : SKIP sms_numbers = hash.key?('smsNumbers') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:V2TriggersRequestSmsNumbers), hash['smsNumbers'] ) : SKIP reminder = hash.key?('reminder') ? hash['reminder'] : SKIP severity = hash.key?('severity') ? hash['severity'] : SKIP active = hash.key?('active') ? hash['active'] : SKIP filter_criteria = AccountLevelFilter.from_hash(hash['filterCriteria']) if hash['filterCriteria'] condition = hash.key?('condition') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:V2TriggersRequestCondition), hash['condition'] ) : SKIP action = hash.key?('action') ? hash['action'] : SKIP account_name = hash.key?('accountName') ? hash['accountName'] : SKIP price_plan_trigger = PricePlanTrigger1.from_hash(hash['pricePlanTrigger']) if hash['pricePlanTrigger'] # Create object from extracted values. V2TriggersRequest.new(trigger_name, ecpd_id, trigger_category, data_trigger, notification, notification_type, callback, email_notification, notification_group_name, notification_frequency_factor, notification_frequency_interval, external_email_recipients, sms_notification, sms_numbers, reminder, severity, active, filter_criteria, condition, action, account_name, price_plan_trigger) end |
.names ⇒ Object
A mapping from model property names to API property names.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 101 def self.names @_hash = {} if @_hash.nil? @_hash['trigger_name'] = 'triggerName' @_hash['ecpd_id'] = 'ecpdId' @_hash['trigger_category'] = 'triggerCategory' @_hash['data_trigger'] = 'dataTrigger' @_hash['notification'] = 'notification' @_hash['notification_type'] = 'notificationType' @_hash['callback'] = 'callback' @_hash['email_notification'] = 'emailNotification' @_hash['notification_group_name'] = 'notificationGroupName' @_hash['notification_frequency_factor'] = 'notificationFrequencyFactor' @_hash['notification_frequency_interval'] = 'notificationFrequencyInterval' @_hash['external_email_recipients'] = 'externalEmailRecipients' @_hash['sms_notification'] = 'smsNotification' @_hash['sms_numbers'] = 'smsNumbers' @_hash['reminder'] = 'reminder' @_hash['severity'] = 'severity' @_hash['active'] = 'active' @_hash['filter_criteria'] = 'filterCriteria' @_hash['condition'] = 'condition' @_hash['action'] = 'action' @_hash['account_name'] = 'accountName' @_hash['price_plan_trigger'] = 'pricePlanTrigger' @_hash end |
.nullables ⇒ Object
An array for nullable fields
158 159 160 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 158 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 130 def self.optionals %w[ trigger_name ecpd_id trigger_category data_trigger notification notification_type callback email_notification notification_group_name notification_frequency_factor notification_frequency_interval external_email_recipients sms_notification sms_numbers reminder severity active filter_criteria condition action account_name price_plan_trigger ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
275 276 277 278 279 280 281 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 275 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 300 def inspect class_name = self.class.name.split('::').last "<#{class_name} trigger_name: #{@trigger_name.inspect}, ecpd_id: #{@ecpd_id.inspect},"\ " trigger_category: #{@trigger_category.inspect}, data_trigger: #{@data_trigger.inspect},"\ " notification: #{@notification.inspect}, notification_type: #{@notification_type.inspect},"\ " callback: #{@callback.inspect}, email_notification: #{@email_notification.inspect},"\ " notification_group_name: #{@notification_group_name.inspect},"\ " notification_frequency_factor: #{@notification_frequency_factor.inspect},"\ " notification_frequency_interval: #{@notification_frequency_interval.inspect},"\ " external_email_recipients: #{@external_email_recipients.inspect}, sms_notification:"\ " #{@sms_notification.inspect}, sms_numbers: #{@sms_numbers.inspect}, reminder:"\ " #{@reminder.inspect}, severity: #{@severity.inspect}, active: #{@active.inspect},"\ " filter_criteria: #{@filter_criteria.inspect}, condition: #{@condition.inspect}, action:"\ " #{@action.inspect}, account_name: #{@account_name.inspect}, price_plan_trigger:"\ " #{@price_plan_trigger.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/verizon/models/v2_triggers_request.rb', line 284 def to_s class_name = self.class.name.split('::').last "<#{class_name} trigger_name: #{@trigger_name}, ecpd_id: #{@ecpd_id}, trigger_category:"\ " #{@trigger_category}, data_trigger: #{@data_trigger}, notification: #{@notification},"\ " notification_type: #{@notification_type}, callback: #{@callback}, email_notification:"\ " #{@email_notification}, notification_group_name: #{@notification_group_name},"\ " notification_frequency_factor: #{@notification_frequency_factor},"\ " notification_frequency_interval: #{@notification_frequency_interval},"\ " external_email_recipients: #{@external_email_recipients}, sms_notification:"\ " #{@sms_notification}, sms_numbers: #{@sms_numbers}, reminder: #{@reminder}, severity:"\ " #{@severity}, active: #{@active}, filter_criteria: #{@filter_criteria}, condition:"\ " #{@condition}, action: #{@action}, account_name: #{@account_name}, price_plan_trigger:"\ " #{@price_plan_trigger}>" end |