Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::RegulationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Numbers::V2::RegulatoryComplianceList::RegulationInstance
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb
Instance Method Summary collapse
-
#context ⇒ RegulationContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #end_user_type ⇒ EndUserType
-
#fetch(include_constraints: :unset) ⇒ RegulationInstance
Fetch the RegulationInstance.
-
#friendly_name ⇒ String
A human-readable description that is assigned to describe the Regulation resource.
-
#initialize(version, payload, sid: nil) ⇒ RegulationInstance
constructor
Initialize the RegulationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#iso_country ⇒ String
The ISO country code of the phone number’s country.
-
#number_type ⇒ String
The type of phone number restricted by the regulatory requirement.
-
#requirements ⇒ Hash
The SID of an object that holds the regulatory information of the phone number country, phone number type, and end user type.
-
#sid ⇒ String
The unique string that identifies the Regulation resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the Regulation resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ RegulationInstance
Initialize the RegulationInstance
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 250 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'friendly_name' => payload['friendly_name'], 'iso_country' => payload['iso_country'], 'number_type' => payload['number_type'], 'end_user_type' => payload['end_user_type'], 'requirements' => payload['requirements'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#context ⇒ RegulationContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
273 274 275 276 277 278 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 273 def context unless @instance_context @instance_context = RegulationContext.new(@version , @params['sid']) end @instance_context end |
#end_user_type ⇒ EndUserType
306 307 308 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 306 def end_user_type @properties['end_user_type'] end |
#fetch(include_constraints: :unset) ⇒ RegulationInstance
Fetch the RegulationInstance
326 327 328 329 330 331 332 333 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 326 def fetch( include_constraints: :unset ) context.fetch( include_constraints: include_constraints, ) end |
#friendly_name ⇒ String
Returns A human-readable description that is assigned to describe the Regulation resource. Examples can include Germany: Mobile - Business.
288 289 290 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 288 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
344 345 346 347 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 344 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V2.RegulationInstance #{values}>" end |
#iso_country ⇒ String
Returns The ISO country code of the phone number’s country.
294 295 296 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 294 def iso_country @properties['iso_country'] end |
#number_type ⇒ String
Returns The type of phone number restricted by the regulatory requirement. For example, Germany mobile phone numbers provisioned by businesses require a business name with commercial register proof from the Handelsregisterauszug and a proof of address from Handelsregisterauszug or a trade license by Gewerbeanmeldung.
300 301 302 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 300 def number_type @properties['number_type'] end |
#requirements ⇒ Hash
Returns The SID of an object that holds the regulatory information of the phone number country, phone number type, and end user type.
312 313 314 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 312 def requirements @properties['requirements'] end |
#sid ⇒ String
Returns The unique string that identifies the Regulation resource.
282 283 284 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 282 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
337 338 339 340 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 337 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V2.RegulationInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the Regulation resource.
318 319 320 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 318 def url @properties['url'] end |