Class: StickyIoRestfulApiV2025731::PostbackProfileOneOf0
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::PostbackProfileOneOf0
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb
Overview
PostbackProfileOneOf0 Model.
Instance Attribute Summary collapse
-
#campaigns ⇒ Array[Integer]
TODO: Write general description for this method.
-
#created_at ⇒ String
TODO: Write general description for this method.
-
#creator ⇒ Creator
TODO: Write general description for this method.
-
#headers ⇒ Array[Header]
TODO: Write general description for this method.
-
#http_method ⇒ String
TODO: Write general description for this method.
-
#id ⇒ Integer
TODO: Write general description for this method.
-
#is_active ⇒ Integer
TODO: Write general description for this method.
-
#is_global ⇒ Integer
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#trigger_type_id ⇒ Object
TODO: Write general description for this method.
-
#triggers ⇒ Object
TODO: Write general description for this method.
-
#type ⇒ String
TODO: Write general description for this method.
-
#type_id ⇒ Integer
TODO: Write general description for this method.
-
#updated_at ⇒ String
TODO: Write general description for this method.
-
#updator ⇒ String
TODO: Write general description for this method.
-
#url ⇒ 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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(id: SKIP, name: SKIP, type_id: SKIP, url: SKIP, is_active: SKIP, is_global: SKIP, created_at: SKIP, updated_at: SKIP, http_method: SKIP, type: SKIP, headers: SKIP, campaigns: SKIP, triggers: SKIP, trigger_type_id: SKIP, creator: SKIP, updator: SKIP, additional_properties: nil) ⇒ PostbackProfileOneOf0
constructor
A new instance of PostbackProfileOneOf0.
-
#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(id: SKIP, name: SKIP, type_id: SKIP, url: SKIP, is_active: SKIP, is_global: SKIP, created_at: SKIP, updated_at: SKIP, http_method: SKIP, type: SKIP, headers: SKIP, campaigns: SKIP, triggers: SKIP, trigger_type_id: SKIP, creator: SKIP, updator: SKIP, additional_properties: nil) ⇒ PostbackProfileOneOf0
Returns a new instance of PostbackProfileOneOf0.
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 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 128 def initialize(id: SKIP, name: SKIP, type_id: SKIP, url: SKIP, is_active: SKIP, is_global: SKIP, created_at: SKIP, updated_at: SKIP, http_method: SKIP, type: SKIP, headers: SKIP, campaigns: SKIP, triggers: SKIP, trigger_type_id: SKIP, creator: SKIP, updator: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id unless id == SKIP @name = name unless name == SKIP @type_id = type_id unless type_id == SKIP @url = url unless url == SKIP @is_active = is_active unless is_active == SKIP @is_global = is_global unless is_global == SKIP @created_at = created_at unless created_at == SKIP @updated_at = updated_at unless updated_at == SKIP @http_method = http_method unless http_method == SKIP @type = type unless type == SKIP @headers = headers unless headers == SKIP @campaigns = campaigns unless campaigns == SKIP @triggers = triggers unless triggers == SKIP @trigger_type_id = trigger_type_id unless trigger_type_id == SKIP @creator = creator unless creator == SKIP @updator = updator unless updator == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#campaigns ⇒ Array[Integer]
TODO: Write general description for this method
58 59 60 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 58 def campaigns @campaigns end |
#created_at ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 38 def created_at @created_at end |
#creator ⇒ Creator
TODO: Write general description for this method
70 71 72 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 70 def creator @creator end |
#headers ⇒ Array[Header]
TODO: Write general description for this method
54 55 56 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 54 def headers @headers end |
#http_method ⇒ String
TODO: Write general description for this method
46 47 48 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 46 def http_method @http_method end |
#id ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 14 def id @id end |
#is_active ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 30 def is_active @is_active end |
#is_global ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 34 def is_global @is_global end |
#name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 18 def name @name end |
#trigger_type_id ⇒ Object
TODO: Write general description for this method
66 67 68 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 66 def trigger_type_id @trigger_type_id end |
#triggers ⇒ Object
TODO: Write general description for this method
62 63 64 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 62 def triggers @triggers end |
#type ⇒ String
TODO: Write general description for this method
50 51 52 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 50 def type @type end |
#type_id ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 22 def type_id @type_id end |
#updated_at ⇒ String
TODO: Write general description for this method
42 43 44 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 42 def updated_at @updated_at end |
#updator ⇒ String
TODO: Write general description for this method
74 75 76 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 74 def updator @updator end |
#url ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 26 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 157 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP type_id = hash.key?('type_id') ? hash['type_id'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP is_active = hash.key?('is_active') ? hash['is_active'] : SKIP is_global = hash.key?('is_global') ? hash['is_global'] : SKIP created_at = hash.key?('created_at') ? hash['created_at'] : SKIP updated_at = hash.key?('updated_at') ? hash['updated_at'] : SKIP http_method = hash.key?('http_method') ? hash['http_method'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP # Parameter is an array, so we need to iterate through it headers = nil unless hash['headers'].nil? headers = [] hash['headers'].each do |structure| headers << (Header.from_hash(structure) if structure) end end headers = SKIP unless hash.key?('headers') campaigns = hash.key?('campaigns') ? hash['campaigns'] : SKIP triggers = hash.key?('triggers') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:PostbackProfileOneOf0Triggers), hash['triggers'] ) : SKIP trigger_type_id = hash.key?('trigger_type_id') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:PostbackProfileOneOf0TriggerTypeId), hash['trigger_type_id'] ) : SKIP creator = Creator.from_hash(hash['creator']) if hash['creator'] updator = hash.key?('updator') ? hash['updator'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. PostbackProfileOneOf0.new(id: id, name: name, type_id: type_id, url: url, is_active: is_active, is_global: is_global, created_at: created_at, updated_at: updated_at, http_method: http_method, type: type, headers: headers, campaigns: campaigns, triggers: triggers, trigger_type_id: trigger_type_id, creator: creator, updator: updator, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 77 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['name'] = 'name' @_hash['type_id'] = 'type_id' @_hash['url'] = 'url' @_hash['is_active'] = 'is_active' @_hash['is_global'] = 'is_global' @_hash['created_at'] = 'created_at' @_hash['updated_at'] = 'updated_at' @_hash['http_method'] = 'http_method' @_hash['type'] = 'type' @_hash['headers'] = 'headers' @_hash['campaigns'] = 'campaigns' @_hash['triggers'] = 'triggers' @_hash['trigger_type_id'] = 'trigger_type_id' @_hash['creator'] = 'creator' @_hash['updator'] = 'updator' @_hash end |
.nullables ⇒ Object
An array for nullable fields
121 122 123 124 125 126 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 121 def self.nullables %w[ trigger_type_id updator ] end |
.optionals ⇒ Object
An array for optional fields
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 99 def self.optionals %w[ id name type_id url is_active is_global created_at updated_at http_method type headers campaigns triggers trigger_type_id creator updator ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
220 221 222 223 224 225 226 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 220 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.
240 241 242 243 244 245 246 247 248 249 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 240 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}, type_id: #{@type_id.inspect},"\ " url: #{@url.inspect}, is_active: #{@is_active.inspect}, is_global: #{@is_global.inspect},"\ " created_at: #{@created_at.inspect}, updated_at: #{@updated_at.inspect}, http_method:"\ " #{@http_method.inspect}, type: #{@type.inspect}, headers: #{@headers.inspect}, campaigns:"\ " #{@campaigns.inspect}, triggers: #{@triggers.inspect}, trigger_type_id:"\ " #{@trigger_type_id.inspect}, creator: #{@creator.inspect}, updator: #{@updator.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
229 230 231 232 233 234 235 236 237 |
# File 'lib/sticky_io_restful_api_v2025731/models/postback_profile_one_of0.rb', line 229 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, name: #{@name}, type_id: #{@type_id}, url: #{@url}, is_active:"\ " #{@is_active}, is_global: #{@is_global}, created_at: #{@created_at}, updated_at:"\ " #{@updated_at}, http_method: #{@http_method}, type: #{@type}, headers: #{@headers},"\ " campaigns: #{@campaigns}, triggers: #{@triggers}, trigger_type_id: #{@trigger_type_id},"\ " creator: #{@creator}, updator: #{@updator}, additional_properties:"\ " #{@additional_properties}>" end |