Class: Alula::DeviceRegisterProc

Inherits:
RpcResource show all
Defined in:
lib/alula/procedures/device_register_proc.rb

Defined Under Namespace

Classes: Response

Class Method Summary collapse

Methods inherited from RpcResource

ok?, request, wrap_payload

Class Method Details

.call(mac:, dealer_id:, crc:, skip_partner_claim: false) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/alula/procedures/device_register_proc.rb', line 15

def self.call(mac:, dealer_id:, crc:, skip_partner_claim: false)
  payload = {
    mac: mac,
    crc: crc,
    dealerId: dealer_id,
    skipPartnerClaim: skip_partner_claim
  }

  request( 
    http_method: :post,
    path: '/rpc/v1/devices/register',
    payload: payload,
    handler: Response
  )
end