Class: Verizon::UpdateTriggerRequest
- Defined in:
- lib/verizon/models/update_trigger_request.rb
Overview
UpdateTriggerRequest Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
TODO: Write general description for this method.
-
#active ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#anomaly_trigger_request ⇒ AnomalyTriggerRequest
The details of the UsageAnomaly trigger.
-
#cycle_type ⇒ CycleTypeEnum
The details of the UsageAnomaly trigger.
-
#data_trigger_request ⇒ DataTriggerRequest
The details of the UsageAnomaly trigger.
-
#group_name ⇒ String
The details of the UsageAnomaly trigger.
-
#promo_alert_trigger_request ⇒ PromoAlertTriggerRequest
The details of the UsageAnomaly trigger.
-
#session_trigger_request ⇒ SessionTriggerRequest
The details of the UsageAnomaly trigger.
-
#sms_trigger_request ⇒ SMSTriggerRequest
The details of the UsageAnomaly trigger.
-
#trigger_category ⇒ String
The details of the UsageAnomaly trigger.
-
#trigger_id ⇒ String
The details of the UsageAnomaly trigger.
-
#trigger_name ⇒ String
The details of the UsageAnomaly 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.
Instance Method Summary collapse
-
#initialize(account_name = SKIP, active = SKIP, anomaly_trigger_request = SKIP, cycle_type = SKIP, data_trigger_request = SKIP, group_name = SKIP, promo_alert_trigger_request = SKIP, session_trigger_request = SKIP, sms_trigger_request = SKIP, trigger_category = SKIP, trigger_id = SKIP, trigger_name = SKIP) ⇒ UpdateTriggerRequest
constructor
A new instance of UpdateTriggerRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = SKIP, active = SKIP, anomaly_trigger_request = SKIP, cycle_type = SKIP, data_trigger_request = SKIP, group_name = SKIP, promo_alert_trigger_request = SKIP, session_trigger_request = SKIP, sms_trigger_request = SKIP, trigger_category = SKIP, trigger_id = SKIP, trigger_name = SKIP) ⇒ UpdateTriggerRequest
Returns a new instance of UpdateTriggerRequest.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/verizon/models/update_trigger_request.rb', line 101 def initialize(account_name = SKIP, active = SKIP, anomaly_trigger_request = SKIP, cycle_type = SKIP, data_trigger_request = SKIP, group_name = SKIP, promo_alert_trigger_request = SKIP, session_trigger_request = SKIP, sms_trigger_request = SKIP, trigger_category = SKIP, trigger_id = SKIP, trigger_name = SKIP) @account_name = account_name unless account_name == SKIP @active = active unless active == SKIP @anomaly_trigger_request = anomaly_trigger_request unless anomaly_trigger_request == SKIP @cycle_type = cycle_type unless cycle_type == SKIP @data_trigger_request = data_trigger_request unless data_trigger_request == SKIP @group_name = group_name unless group_name == SKIP unless promo_alert_trigger_request == SKIP @promo_alert_trigger_request = promo_alert_trigger_request end @session_trigger_request = session_trigger_request unless session_trigger_request == SKIP @sms_trigger_request = sms_trigger_request unless sms_trigger_request == SKIP @trigger_category = trigger_category unless trigger_category == 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
14 15 16 |
# File 'lib/verizon/models/update_trigger_request.rb', line 14 def account_name @account_name end |
#active ⇒ TrueClass | FalseClass
TODO: Write general description for this method
18 19 20 |
# File 'lib/verizon/models/update_trigger_request.rb', line 18 def active @active end |
#anomaly_trigger_request ⇒ AnomalyTriggerRequest
The details of the UsageAnomaly trigger.
22 23 24 |
# File 'lib/verizon/models/update_trigger_request.rb', line 22 def anomaly_trigger_request @anomaly_trigger_request end |
#cycle_type ⇒ CycleTypeEnum
The details of the UsageAnomaly trigger.
26 27 28 |
# File 'lib/verizon/models/update_trigger_request.rb', line 26 def cycle_type @cycle_type end |
#data_trigger_request ⇒ DataTriggerRequest
The details of the UsageAnomaly trigger.
30 31 32 |
# File 'lib/verizon/models/update_trigger_request.rb', line 30 def data_trigger_request @data_trigger_request end |
#group_name ⇒ String
The details of the UsageAnomaly trigger.
34 35 36 |
# File 'lib/verizon/models/update_trigger_request.rb', line 34 def group_name @group_name end |
#promo_alert_trigger_request ⇒ PromoAlertTriggerRequest
The details of the UsageAnomaly trigger.
38 39 40 |
# File 'lib/verizon/models/update_trigger_request.rb', line 38 def promo_alert_trigger_request @promo_alert_trigger_request end |
#session_trigger_request ⇒ SessionTriggerRequest
The details of the UsageAnomaly trigger.
42 43 44 |
# File 'lib/verizon/models/update_trigger_request.rb', line 42 def session_trigger_request @session_trigger_request end |
#sms_trigger_request ⇒ SMSTriggerRequest
The details of the UsageAnomaly trigger.
46 47 48 |
# File 'lib/verizon/models/update_trigger_request.rb', line 46 def sms_trigger_request @sms_trigger_request end |
#trigger_category ⇒ String
The details of the UsageAnomaly trigger.
50 51 52 |
# File 'lib/verizon/models/update_trigger_request.rb', line 50 def trigger_category @trigger_category end |
#trigger_id ⇒ String
The details of the UsageAnomaly trigger.
54 55 56 |
# File 'lib/verizon/models/update_trigger_request.rb', line 54 def trigger_id @trigger_id end |
#trigger_name ⇒ String
The details of the UsageAnomaly trigger.
58 59 60 |
# File 'lib/verizon/models/update_trigger_request.rb', line 58 def trigger_name @trigger_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
126 127 128 129 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 156 157 158 159 160 161 162 163 |
# File 'lib/verizon/models/update_trigger_request.rb', line 126 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP active = hash.key?('active') ? hash['active'] : SKIP anomaly_trigger_request = AnomalyTriggerRequest.from_hash(hash['anomalyTriggerRequest']) if hash['anomalyTriggerRequest'] cycle_type = hash.key?('cycleType') ? hash['cycleType'] : SKIP data_trigger_request = DataTriggerRequest.from_hash(hash['dataTriggerRequest']) if hash['dataTriggerRequest'] group_name = hash.key?('groupName') ? hash['groupName'] : SKIP if hash['promoAlertTriggerRequest'] promo_alert_trigger_request = PromoAlertTriggerRequest.from_hash(hash['promoAlertTriggerRequest']) end session_trigger_request = SessionTriggerRequest.from_hash(hash['sessionTriggerRequest']) if hash['sessionTriggerRequest'] sms_trigger_request = SMSTriggerRequest.from_hash(hash['smsTriggerRequest']) if hash['smsTriggerRequest'] trigger_category = hash.key?('triggerCategory') ? hash['triggerCategory'] : SKIP trigger_id = hash.key?('triggerId') ? hash['triggerId'] : SKIP trigger_name = hash.key?('triggerName') ? hash['triggerName'] : SKIP # Create object from extracted values. UpdateTriggerRequest.new(account_name, active, anomaly_trigger_request, cycle_type, data_trigger_request, group_name, promo_alert_trigger_request, session_trigger_request, sms_trigger_request, trigger_category, trigger_id, trigger_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/verizon/models/update_trigger_request.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['active'] = 'active' @_hash['anomaly_trigger_request'] = 'anomalyTriggerRequest' @_hash['cycle_type'] = 'cycleType' @_hash['data_trigger_request'] = 'dataTriggerRequest' @_hash['group_name'] = 'groupName' @_hash['promo_alert_trigger_request'] = 'promoAlertTriggerRequest' @_hash['session_trigger_request'] = 'sessionTriggerRequest' @_hash['sms_trigger_request'] = 'smsTriggerRequest' @_hash['trigger_category'] = 'triggerCategory' @_hash['trigger_id'] = 'triggerId' @_hash['trigger_name'] = 'triggerName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
97 98 99 |
# File 'lib/verizon/models/update_trigger_request.rb', line 97 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/verizon/models/update_trigger_request.rb', line 79 def self.optionals %w[ account_name active anomaly_trigger_request cycle_type data_trigger_request group_name promo_alert_trigger_request session_trigger_request sms_trigger_request trigger_category trigger_id trigger_name ] end |