Class: Twilio::REST::Numbers::V1::BulkEligibilityContext

Inherits:
InstanceContext show all
Defined in:
lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, request_id) ⇒ BulkEligibilityContext

Initialize the BulkEligibilityContext

Parameters:

  • version (Version)

    Version that contains the resource

  • request_id (String)

    The SID of the bulk eligibility check that you want to know about.


69
70
71
72
73
74
75
76
77
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 69

def initialize(version, request_id)
    super(version)

    # Path Solution
    @solution = { request_id: request_id,  }
    @uri = "/HostedNumber/Eligibility/Bulk/#{@solution[:request_id]}"

    
end

Instance Method Details

#fetchBulkEligibilityInstance

Fetch the BulkEligibilityInstance

Returns:


81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 81

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    BulkEligibilityInstance.new(
        @version,
        payload,
        request_id: @solution[:request_id],
    )
end

#inspectObject

Provide a detailed, user friendly representation


107
108
109
110
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 107

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Numbers.V1.BulkEligibilityContext #{context}>"
end

#to_sObject

Provide a user friendly representation


100
101
102
103
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 100

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Numbers.V1.BulkEligibilityContext #{context}>"
end