Class: Fizzy::Services::DevicesService
- Inherits:
-
BaseService
- Object
- BaseService
- Fizzy::Services::DevicesService
- Defined in:
- lib/fizzy/generated/services/devices_service.rb
Overview
Service for Devices operations
Instance Method Summary collapse
-
#register(account_id:, token:, platform:, name: nil) ⇒ void
register operation.
-
#unregister(account_id:, device_token:) ⇒ void
unregister operation.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Fizzy::Services::BaseService
Instance Method Details
#register(account_id:, token:, platform:, name: nil) ⇒ void
This method returns an undefined value.
register operation
16 17 18 19 20 21 |
# File 'lib/fizzy/generated/services/devices_service.rb', line 16 def register(account_id:, token:, platform:, name: nil) with_operation(service: "devices", operation: "RegisterDevice", is_mutation: true, resource_id: account_id) do http_post("/#{account_id}/devices", body: compact_params(token: token, platform: platform, name: name)) nil end end |
#unregister(account_id:, device_token:) ⇒ void
This method returns an undefined value.
unregister operation
27 28 29 30 31 32 |
# File 'lib/fizzy/generated/services/devices_service.rb', line 27 def unregister(account_id:, device_token:) with_operation(service: "devices", operation: "UnregisterDevice", is_mutation: true, resource_id: device_token) do http_delete("/#{account_id}/devices/#{device_token}") nil end end |