lib/twilio-ruby/rest/supersim/v1/sim.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/supersim/v1/sim.rb in twilio-ruby-5.39.0

- old
+ new

@@ -111,15 +111,13 @@ 'Iccid' => iccid, 'PageToken' => page_token, 'Page' => page_number, 'PageSize' => page_size, }) - response = @version.page( - 'GET', - @uri, - params - ) + + response = @version.page('GET', @uri, params) + SimPage.new(@version, response, @solution) end ## # Retrieve a single page of SimInstance records from the API. @@ -187,21 +185,15 @@ @solution = {sid: sid, } @uri = "/Sims/#{@solution[:sid]}" end ## - # Fetch a SimInstance + # Fetch the SimInstance # @return [SimInstance] Fetched SimInstance def fetch - params = Twilio::Values.of({}) + payload = @version.fetch('GET', @uri) - payload = @version.fetch( - 'GET', - @uri, - params, - ) - SimInstance.new(@version, payload, sid: @solution[:sid], ) end ## # Update the SimInstance @@ -216,15 +208,11 @@ # resource should be assigned. # @return [SimInstance] Updated SimInstance def update(unique_name: :unset, status: :unset, fleet: :unset) data = Twilio::Values.of({'UniqueName' => unique_name, 'Status' => status, 'Fleet' => fleet, }) - payload = @version.update( - 'POST', - @uri, - data: data, - ) + payload = @version.update('POST', @uri, data: data) SimInstance.new(@version, payload, sid: @solution[:sid], ) end ## @@ -336,10 +324,10 @@ def url @properties['url'] end ## - # Fetch a SimInstance + # Fetch the SimInstance # @return [SimInstance] Fetched SimInstance def fetch context.fetch end \ No newline at end of file