Class: Twilio::REST::Lookups::V2::QueryList
- Inherits:
-
Twilio::REST::ListResource
- Object
- Twilio::REST::ListResource
- Twilio::REST::Lookups::V2::QueryList
- Defined in:
- lib/twilio-ruby/rest/lookups/v2/query.rb
Defined Under Namespace
Classes: IdentityMatchParameters, LastSimSwapInfo, LookupBatchRequest, LookupRequest, ReassignedNumberParameters, RiskParameters
Instance Method Summary collapse
-
#create(lookup_request: :unset) ⇒ QueryInstance
Create the QueryInstance.
-
#initialize(version) ⇒ QueryList
constructor
Initialize the QueryList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ QueryList
Initialize the QueryList
156 157 158 159 160 161 162 |
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 156 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/batch/query" end |
Instance Method Details
#create(lookup_request: :unset) ⇒ QueryInstance
Create the QueryInstance
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 167 def create(lookup_request: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' payload = @version.create('POST', @uri, headers: headers, data: lookup_request.to_json) QueryInstance.new( @version, payload, ) end |
#to_s ⇒ Object
Provide a user friendly representation
187 188 189 |
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 187 def to_s '#<Twilio.Lookups.V2.QueryList>' end |