Class: Zernio::StartSmsRegistrationRequestBrand
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zernio::StartSmsRegistrationRequestBrand
- Defined in:
- lib/zernio-sdk/models/start_sms_registration_request_brand.rb
Overview
Required for 10DLC. The legal entity behind the traffic (TCR brand).
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#company_name ⇒ Object
Legal company name.
-
#country ⇒ Object
ISO 3166-1 alpha-2 country where the company is registered.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#ein ⇒ Object
Required for every entityType except SOLE_PROPRIETOR.
-
#email ⇒ Object
Brand contact email; defaults to your account email when omitted.
-
#entity_type ⇒ Object
Returns the value of attribute entity_type.
-
#mobile_phone ⇒ Object
Required for SOLE_PROPRIETOR; the verification OTP is texted there (US/CA mobile).
-
#phone ⇒ Object
Business contact phone.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#state ⇒ Object
Returns the value of attribute state.
-
#stock_symbol ⇒ Object
Returns the value of attribute stock_symbol.
-
#street ⇒ Object
Returns the value of attribute street.
-
#vertical ⇒ Object
Returns the value of attribute vertical.
-
#website ⇒ Object
The brand's website (sole proprietors may use a social profile such as LinkedIn or a business Facebook page).
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ StartSmsRegistrationRequestBrand
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ StartSmsRegistrationRequestBrand
Initializes the object
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 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 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 138 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::StartSmsRegistrationRequestBrand` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::StartSmsRegistrationRequestBrand`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'entity_type') self.entity_type = attributes[:'entity_type'] else self.entity_type = nil end if attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] else self.display_name = nil end if attributes.key?(:'company_name') self.company_name = attributes[:'company_name'] end if attributes.key?(:'ein') self.ein = attributes[:'ein'] end if attributes.key?(:'phone') self.phone = attributes[:'phone'] end if attributes.key?(:'mobile_phone') self.mobile_phone = attributes[:'mobile_phone'] end if attributes.key?(:'street') self.street = attributes[:'street'] else self.street = nil end if attributes.key?(:'city') self.city = attributes[:'city'] else self.city = nil end if attributes.key?(:'state') self.state = attributes[:'state'] else self.state = nil end if attributes.key?(:'postal_code') self.postal_code = attributes[:'postal_code'] else self.postal_code = nil end if attributes.key?(:'country') self.country = attributes[:'country'] else self.country = nil end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'website') self.website = attributes[:'website'] else self.website = nil end if attributes.key?(:'vertical') self.vertical = attributes[:'vertical'] else self.vertical = nil end if attributes.key?(:'stock_symbol') self.stock_symbol = attributes[:'stock_symbol'] end end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
37 38 39 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 37 def city @city end |
#company_name ⇒ Object
Legal company name. Required for every entityType except SOLE_PROPRIETOR.
24 25 26 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 24 def company_name @company_name end |
#country ⇒ Object
ISO 3166-1 alpha-2 country where the company is registered. Companies worldwide can register standard 10DLC (non-US companies use their local tax ID in ein; carrier vetting may take longer). SOLE_PROPRIETOR is US/CA only.
44 45 46 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 44 def country @country end |
#display_name ⇒ Object
Returns the value of attribute display_name.
21 22 23 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 21 def display_name @display_name end |
#ein ⇒ Object
Required for every entityType except SOLE_PROPRIETOR.
27 28 29 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 27 def ein @ein end |
#email ⇒ Object
Brand contact email; defaults to your account email when omitted.
47 48 49 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 47 def email @email end |
#entity_type ⇒ Object
Returns the value of attribute entity_type.
19 20 21 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 19 def entity_type @entity_type end |
#mobile_phone ⇒ Object
Required for SOLE_PROPRIETOR; the verification OTP is texted there (US/CA mobile).
33 34 35 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 33 def mobile_phone @mobile_phone end |
#phone ⇒ Object
Business contact phone. Required for every entityType except SOLE_PROPRIETOR.
30 31 32 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 30 def phone @phone end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
41 42 43 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 41 def postal_code @postal_code end |
#state ⇒ Object
Returns the value of attribute state.
39 40 41 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 39 def state @state end |
#stock_symbol ⇒ Object
Returns the value of attribute stock_symbol.
54 55 56 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 54 def stock_symbol @stock_symbol end |
#street ⇒ Object
Returns the value of attribute street.
35 36 37 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 35 def street @street end |
#vertical ⇒ Object
Returns the value of attribute vertical.
52 53 54 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 52 def vertical @vertical end |
#website ⇒ Object
The brand's website (sole proprietors may use a social profile such as LinkedIn or a business Facebook page). Carriers verify the brand against it; a bare domain is normalized to https://.
50 51 52 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 50 def website @website end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
100 101 102 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 100 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
105 106 107 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 105 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 79 def self.attribute_map { :'entity_type' => :'entityType', :'display_name' => :'displayName', :'company_name' => :'companyName', :'ein' => :'ein', :'phone' => :'phone', :'mobile_phone' => :'mobilePhone', :'street' => :'street', :'city' => :'city', :'state' => :'state', :'postal_code' => :'postalCode', :'country' => :'country', :'email' => :'email', :'website' => :'website', :'vertical' => :'vertical', :'stock_symbol' => :'stockSymbol' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 440 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
131 132 133 134 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 131 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 110 def self.openapi_types { :'entity_type' => :'String', :'display_name' => :'String', :'company_name' => :'String', :'ein' => :'String', :'phone' => :'String', :'mobile_phone' => :'String', :'street' => :'String', :'city' => :'String', :'state' => :'String', :'postal_code' => :'String', :'country' => :'String', :'email' => :'String', :'website' => :'String', :'vertical' => :'String', :'stock_symbol' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 405 def ==(o) return true if self.equal?(o) self.class == o.class && entity_type == o.entity_type && display_name == o.display_name && company_name == o.company_name && ein == o.ein && phone == o.phone && mobile_phone == o.mobile_phone && street == o.street && city == o.city && state == o.state && postal_code == o.postal_code && country == o.country && email == o.email && website == o.website && vertical == o.vertical && stock_symbol == o.stock_symbol end |
#eql?(o) ⇒ Boolean
427 428 429 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 427 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
433 434 435 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 433 def hash [entity_type, display_name, company_name, ein, phone, mobile_phone, street, city, state, postal_code, country, email, website, vertical, stock_symbol].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 233 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @entity_type.nil? invalid_properties.push('invalid value for "entity_type", entity_type cannot be nil.') end if @display_name.nil? invalid_properties.push('invalid value for "display_name", display_name cannot be nil.') end if @street.nil? invalid_properties.push('invalid value for "street", street cannot be nil.') end if @city.nil? invalid_properties.push('invalid value for "city", city cannot be nil.') end if @state.nil? invalid_properties.push('invalid value for "state", state cannot be nil.') end if @postal_code.nil? invalid_properties.push('invalid value for "postal_code", postal_code cannot be nil.') end if @country.nil? invalid_properties.push('invalid value for "country", country cannot be nil.') end if @country.to_s.length > 2 invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 2.') end if @country.to_s.length < 2 invalid_properties.push('invalid value for "country", the character length must be greater than or equal to 2.') end if @website.nil? invalid_properties.push('invalid value for "website", website cannot be nil.') end if @vertical.nil? invalid_properties.push('invalid value for "vertical", vertical cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 462 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/zernio-sdk/models/start_sms_registration_request_brand.rb', line 285 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @entity_type.nil? entity_type_validator = EnumAttributeValidator.new('String', ["PRIVATE_PROFIT", "PUBLIC_PROFIT", "NON_PROFIT", "GOVERNMENT", "SOLE_PROPRIETOR"]) return false unless entity_type_validator.valid?(@entity_type) return false if @display_name.nil? return false if @street.nil? return false if @city.nil? return false if @state.nil? return false if @postal_code.nil? return false if @country.nil? return false if @country.to_s.length > 2 return false if @country.to_s.length < 2 return false if @website.nil? return false if @vertical.nil? vertical_validator = EnumAttributeValidator.new('String', ["AGRICULTURE", "COMMUNICATION", "CONSTRUCTION", "EDUCATION", "ENERGY", "ENTERTAINMENT", "FINANCIAL", "GAMBLING", "GOVERNMENT", "HEALTHCARE", "HOSPITALITY", "HUMAN_RESOURCES", "INSURANCE", "LEGAL", "MANUFACTURING", "NGO", "POLITICAL", "POSTAL", "PROFESSIONAL", "REAL_ESTATE", "RETAIL", "TECHNOLOGY", "TRANSPORTATION"]) return false unless vertical_validator.valid?(@vertical) true end |