Class: Verizon::UsageTriggerResponse
- Defined in:
- lib/verizon/models/usage_trigger_response.rb
Overview
UsageTriggerResponse Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Account name.
-
#allow_excess ⇒ TrueClass | FalseClass
allowExcess determines whether to restrict usage after exceeds limits.
-
#create_date ⇒ String
UTC Date when the usage trigger was created.
-
#email_addresses ⇒ String
comma seperated value of list of Email addresses for Email notifications.
-
#send_email_notification ⇒ TrueClass | FalseClass
Send email alerts when the thresholdValue is reached.
-
#send_sms_notification ⇒ TrueClass | FalseClass
Send SMS (text) alerts when the thresholdValue is reached.
-
#service_name ⇒ ServiceNameEnum
Service name.
-
#sms_phone_numbers ⇒ String
comma seperated value of list of Phone numbers for SMS notifications.
-
#threshold_value ⇒ String
Percent of subscription at which trigger will send an alert.
-
#trigger_id ⇒ String
Unique usage triggerId.
-
#trigger_name ⇒ String
Usage trigger name.
-
#update_date ⇒ String
UTC Date when the usage trigger was last updated.
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(trigger_id = nil, trigger_name = nil, account_name = nil, service_name = ServiceNameEnum::LOCATION, threshold_value = nil, allow_excess = nil, send_sms_notification = nil, sms_phone_numbers = nil, send_email_notification = nil, email_addresses = nil, create_date = nil, update_date = nil) ⇒ UsageTriggerResponse
constructor
A new instance of UsageTriggerResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(trigger_id = nil, trigger_name = nil, account_name = nil, service_name = ServiceNameEnum::LOCATION, threshold_value = nil, allow_excess = nil, send_sms_notification = nil, sms_phone_numbers = nil, send_email_notification = nil, email_addresses = nil, create_date = nil, update_date = nil) ⇒ UsageTriggerResponse
Returns a new instance of UsageTriggerResponse.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 88 def initialize(trigger_id = nil, trigger_name = nil, account_name = nil, service_name = ServiceNameEnum::LOCATION, threshold_value = nil, allow_excess = nil, send_sms_notification = nil, sms_phone_numbers = nil, send_email_notification = nil, email_addresses = nil, create_date = nil, update_date = nil) @trigger_id = trigger_id @trigger_name = trigger_name @account_name = account_name @service_name = service_name @threshold_value = threshold_value @allow_excess = allow_excess @send_sms_notification = send_sms_notification @sms_phone_numbers = sms_phone_numbers @send_email_notification = send_email_notification @email_addresses = email_addresses @create_date = create_date @update_date = update_date end |
Instance Attribute Details
#account_name ⇒ String
Account name
22 23 24 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 22 def account_name @account_name end |
#allow_excess ⇒ TrueClass | FalseClass
allowExcess determines whether to restrict usage after exceeds limits
34 35 36 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 34 def allow_excess @allow_excess end |
#create_date ⇒ String
UTC Date when the usage trigger was created
54 55 56 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 54 def create_date @create_date end |
#email_addresses ⇒ String
comma seperated value of list of Email addresses for Email notifications
50 51 52 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 50 def email_addresses @email_addresses end |
#send_email_notification ⇒ TrueClass | FalseClass
Send email alerts when the thresholdValue is reached.
46 47 48 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 46 def send_email_notification @send_email_notification end |
#send_sms_notification ⇒ TrueClass | FalseClass
Send SMS (text) alerts when the thresholdValue is reached.
38 39 40 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 38 def send_sms_notification @send_sms_notification end |
#service_name ⇒ ServiceNameEnum
Service name
26 27 28 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 26 def service_name @service_name end |
#sms_phone_numbers ⇒ String
comma seperated value of list of Phone numbers for SMS notifications
42 43 44 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 42 def sms_phone_numbers @sms_phone_numbers end |
#threshold_value ⇒ String
Percent of subscription at which trigger will send an alert
30 31 32 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 30 def threshold_value @threshold_value end |
#trigger_id ⇒ String
Unique usage triggerId
14 15 16 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 14 def trigger_id @trigger_id end |
#trigger_name ⇒ String
Usage trigger name
18 19 20 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 18 def trigger_name @trigger_name end |
#update_date ⇒ String
UTC Date when the usage trigger was last updated
58 59 60 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 58 def update_date @update_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 109 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. trigger_id = hash.key?('triggerId') ? hash['triggerId'] : nil trigger_name = hash.key?('triggerName') ? hash['triggerName'] : nil account_name = hash.key?('accountName') ? hash['accountName'] : nil service_name = hash['serviceName'] ||= ServiceNameEnum::LOCATION threshold_value = hash.key?('thresholdValue') ? hash['thresholdValue'] : nil allow_excess = hash.key?('allowExcess') ? hash['allowExcess'] : nil send_sms_notification = hash.key?('sendSmsNotification') ? hash['sendSmsNotification'] : nil sms_phone_numbers = hash.key?('smsPhoneNumbers') ? hash['smsPhoneNumbers'] : nil send_email_notification = hash.key?('sendEmailNotification') ? hash['sendEmailNotification'] : nil email_addresses = hash.key?('emailAddresses') ? hash['emailAddresses'] : nil create_date = hash.key?('createDate') ? hash['createDate'] : nil update_date = hash.key?('updateDate') ? hash['updateDate'] : nil # Create object from extracted values. UsageTriggerResponse.new(trigger_id, trigger_name, account_name, service_name, threshold_value, allow_excess, send_sms_notification, sms_phone_numbers, send_email_notification, email_addresses, create_date, update_date) 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/usage_trigger_response.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['trigger_id'] = 'triggerId' @_hash['trigger_name'] = 'triggerName' @_hash['account_name'] = 'accountName' @_hash['service_name'] = 'serviceName' @_hash['threshold_value'] = 'thresholdValue' @_hash['allow_excess'] = 'allowExcess' @_hash['send_sms_notification'] = 'sendSmsNotification' @_hash['sms_phone_numbers'] = 'smsPhoneNumbers' @_hash['send_email_notification'] = 'sendEmailNotification' @_hash['email_addresses'] = 'emailAddresses' @_hash['create_date'] = 'createDate' @_hash['update_date'] = 'updateDate' @_hash end |
.nullables ⇒ Object
An array for nullable fields
84 85 86 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 84 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
79 80 81 |
# File 'lib/verizon/models/usage_trigger_response.rb', line 79 def self.optionals [] end |