class Zype::Pin
Read more at docs.zype.com/v1.0/reference#device-linking
@since 0.15.0
Public Instance Methods
acquire(linked_device_id:)
click to toggle source
Create the device pin
@param linked_device_id [String] @return [Hash] the device pin
# File lib/zype/models/pin.rb, line 18 def acquire(linked_device_id:) client.execute(method: :post, path: '/pin/acquire', params: { linked_device_id: linked_device_id }) end
link(consumer_id:, pin:)
click to toggle source
@return [Hash] the consumer
# File lib/zype/models/pin.rb, line 24 def link(consumer_id:, pin:) client.execute(method: :put, path: '/pin/link', params: { consumer_id: consumer_id, pin: pin }) end
status(linked_device_id:)
click to toggle source
Retrieve the pin for the device
@param linked_device_id [String] @return [Hash] the device pin
# File lib/zype/models/pin.rb, line 10 def status(linked_device_id:) client.execute(method: :get, path: '/pin/status', params: { linked_device_id: linked_device_id }) end
unlink(consumer_id:, pin:)
click to toggle source
@return [Hash] the consumer
# File lib/zype/models/pin.rb, line 29 def unlink(consumer_id:, pin:) client.execute(method: :put, path: '/pin/unlink', params: { consumer_id: consumer_id, pin: pin }) end