Class: Verizon::CreateTriggerV2Request
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::CreateTriggerV2Request
- Defined in:
- lib/verizon/models/create_trigger_v2_request.rb
Overview
Create Trigger Request
Instance Attribute Summary collapse
-
#active ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#device_group_name ⇒ String
TODO: Write general description for this method.
-
#ecpd_id ⇒ String
TODO: Write general description for this method.
-
#notification ⇒ Notification
TODO: Write general description for this method.
-
#price_plan_trigger ⇒ PricePlanTrigger
TODO: Write general description for this method.
-
#trigger_category ⇒ 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(trigger_name = SKIP, ecpd_id = SKIP, device_group_name = SKIP, trigger_category = SKIP, price_plan_trigger = SKIP, notification = SKIP, active = SKIP) ⇒ CreateTriggerV2Request
constructor
A new instance of CreateTriggerV2Request.
Methods inherited from BaseModel
Constructor Details
#initialize(trigger_name = SKIP, ecpd_id = SKIP, device_group_name = SKIP, trigger_category = SKIP, price_plan_trigger = SKIP, notification = SKIP, active = SKIP) ⇒ CreateTriggerV2Request
Returns a new instance of CreateTriggerV2Request.
71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 71 def initialize(trigger_name = SKIP, ecpd_id = SKIP, device_group_name = SKIP, trigger_category = SKIP, price_plan_trigger = SKIP, notification = SKIP, active = SKIP) @trigger_name = trigger_name unless trigger_name == SKIP @ecpd_id = ecpd_id unless ecpd_id == SKIP @device_group_name = device_group_name unless device_group_name == SKIP @trigger_category = trigger_category unless trigger_category == SKIP @price_plan_trigger = price_plan_trigger unless price_plan_trigger == SKIP @notification = notification unless notification == SKIP @active = active unless active == SKIP end |
Instance Attribute Details
#active ⇒ TrueClass | FalseClass
TODO: Write general description for this method
38 39 40 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 38 def active @active end |
#device_group_name ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 22 def device_group_name @device_group_name end |
#ecpd_id ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 18 def ecpd_id @ecpd_id end |
#notification ⇒ Notification
TODO: Write general description for this method
34 35 36 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 34 def notification @notification end |
#price_plan_trigger ⇒ PricePlanTrigger
TODO: Write general description for this method
30 31 32 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 30 def price_plan_trigger @price_plan_trigger end |
#trigger_category ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 26 def trigger_category @trigger_category end |
#trigger_name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/verizon/models/create_trigger_v2_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.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 85 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 device_group_name = hash.key?('deviceGroupName') ? hash['deviceGroupName'] : SKIP trigger_category = hash.key?('triggerCategory') ? hash['triggerCategory'] : SKIP price_plan_trigger = PricePlanTrigger.from_hash(hash['pricePlanTrigger']) if hash['pricePlanTrigger'] notification = Notification.from_hash(hash['notification']) if hash['notification'] active = hash.key?('active') ? hash['active'] : SKIP # Create object from extracted values. CreateTriggerV2Request.new(trigger_name, ecpd_id, device_group_name, trigger_category, price_plan_trigger, notification, active) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['trigger_name'] = 'triggerName' @_hash['ecpd_id'] = 'ecpdId' @_hash['device_group_name'] = 'deviceGroupName' @_hash['trigger_category'] = 'triggerCategory' @_hash['price_plan_trigger'] = 'pricePlanTrigger' @_hash['notification'] = 'notification' @_hash['active'] = 'active' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/verizon/models/create_trigger_v2_request.rb', line 54 def self.optionals %w[ trigger_name ecpd_id device_group_name trigger_category price_plan_trigger notification active ] end |