Class: Twilio::REST::Numbers::V1::BulkEligibilityContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V1::BulkEligibilityContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb
Instance Method Summary collapse
-
#fetch ⇒ BulkEligibilityInstance
Fetch the BulkEligibilityInstance.
-
#initialize(version, request_id) ⇒ BulkEligibilityContext
constructor
Initialize the BulkEligibilityContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, request_id) ⇒ BulkEligibilityContext
Initialize the BulkEligibilityContext
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
#fetch ⇒ BulkEligibilityInstance
Fetch the BulkEligibilityInstance
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 |
#inspect ⇒ Object
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_s ⇒ Object
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 |