Class: Twilio::REST::Accounts::V1::MessagingGeopermissionsInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ MessagingGeopermissionsInstance

Initialize the MessagingGeopermissionsInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this MessagingGeopermissions resource.

  • sid (String)

    The SID of the Call resource to fetch.



252
253
254
255
256
257
258
259
260
# File 'lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb', line 252

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'permissions' => payload['permissions'],
    }
end

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



277
278
279
# File 'lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb', line 277

def inspect
    "<Twilio.Accounts.V1.MessagingGeopermissionsInstance>"
end

#permissionsHash

Returns A list of objects where each object represents the result of processing a messaging Geo Permission. Each object contains the following fields: country_code, the country code of the country for which the permission was updated; type, the type of the permission i.e. country; enabled, true if the permission is enabled else false; error_code, an integer where 0 indicates success and any non-zero value represents an error; and error_messages, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.

Returns:

  • (Hash)

    A list of objects where each object represents the result of processing a messaging Geo Permission. Each object contains the following fields: country_code, the country code of the country for which the permission was updated; type, the type of the permission i.e. country; enabled, true if the permission is enabled else false; error_code, an integer where 0 indicates success and any non-zero value represents an error; and error_messages, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.



265
266
267
# File 'lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb', line 265

def permissions
    @properties['permissions']
end

#to_sObject

Provide a user friendly representation



271
272
273
# File 'lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb', line 271

def to_s
    "<Twilio.Accounts.V1.MessagingGeopermissionsInstance>"
end