Method: Twilio::REST::Trusthub::V1::PoliciesInstance#initialize

Defined in:
lib/twilio-ruby/rest/trusthub/v1/policies.rb

#initialize(version, payload, sid: nil) ⇒ PoliciesInstance

Initialize the PoliciesInstance

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 Policies resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/twilio-ruby/rest/trusthub/v1/policies.rb', line 218

def initialize(version, payload , sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'friendly_name' => payload['friendly_name'],
        'requirements' => payload['requirements'],
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'sid' => sid  || @properties['sid']  , }
end