lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb in twilio-ruby-5.6.0 vs lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb in twilio-ruby-5.6.1
- old
+ new
@@ -53,11 +53,11 @@
'POST',
@uri,
data: data
)
- DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid])
+ DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], )
end
##
# Lists DeviceInstance records from the API as a list.
# Unlike stream(), this operation is eager and will load `limit` records into
@@ -89,11 +89,11 @@
# efficient page size, i.e. min(limit, 1000)
# @return [Enumerable] Enumerable that will yield up to limit results
def stream(deployment_sid: :unset, limit: nil, page_size: nil)
limits = @version.read_limits(limit, page_size)
- page = self.page(deployment_sid: deployment_sid, page_size: limits[:page_size])
+ page = self.page(deployment_sid: deployment_sid, page_size: limits[:page_size], )
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
end
##
@@ -101,11 +101,11 @@
# This operation lazily loads records as efficiently as possible until the limit
# is reached.
def each
limits = @version.read_limits
- page = self.page(page_size: limits[:page_size])
+ page = self.page(page_size: limits[:page_size], )
@version.stream(page,
limit: limits[:limit],
page_limit: limits[:page_limit]).each {|x| yield x}
end
@@ -173,11 +173,11 @@
##
# Build an instance of DeviceInstance
# @param [Hash] payload Payload response from the API
# @return [DeviceInstance] DeviceInstance
def get_instance(payload)
- DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid])
+ DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], )
end
##
# Provide a user friendly representation
def to_s
@@ -197,11 +197,11 @@
# @return [DeviceContext] DeviceContext
def initialize(version, fleet_sid, sid)
super(version)
# Path Solution
- @solution = {fleet_sid: fleet_sid, sid: sid}
+ @solution = {fleet_sid: fleet_sid, sid: sid, }
@uri = "/Fleets/#{@solution[:fleet_sid]}/Devices/#{@solution[:sid]}"
end
##
# Fetch a DeviceInstance
@@ -213,11 +213,11 @@
'GET',
@uri,
params,
)
- DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid])
+ DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid], )
end
##
# Deletes the DeviceInstance
# @return [Boolean] true if delete succeeds, true otherwise
@@ -247,11 +247,11 @@
'POST',
@uri,
data: data,
)
- DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid])
+ DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid], )
end
##
# Provide a user friendly representation
def to_s
@@ -291,19 +291,19 @@
'date_authenticated' => Twilio.deserialize_iso8601_datetime(payload['date_authenticated']),
}
# Context
@instance_context = nil
- @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid']}
+ @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid'], }
end
##
# Generate an instance context for the instance, the context is capable of
# performing various actions. All instance actions are proxied to the context
# @return [DeviceContext] DeviceContext for this DeviceInstance
def context
unless @instance_context
- @instance_context = DeviceContext.new(@version, @params['fleet_sid'], @params['sid'])
+ @instance_context = DeviceContext.new(@version, @params['fleet_sid'], @params['sid'], )
end
@instance_context
end
##
\ No newline at end of file