Class: Seam::Clients::PhonesSimulate

Inherits:
Object
  • Object
show all
Defined in:
lib/seam/routes/phones_simulate.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:, defaults:) ⇒ PhonesSimulate

Returns a new instance of PhonesSimulate.



6
7
8
9
# File 'lib/seam/routes/phones_simulate.rb', line 6

def initialize(client:, defaults:)
  @client = client
  @defaults = defaults
end

Instance Method Details

#create_sandbox_phone(user_identity_id:, assa_abloy_metadata: nil, custom_sdk_installation_id: nil, phone_metadata: nil) ⇒ Seam::Resources::Phone

Creates a new simulated phone in a sandbox workspace. See also Creating a Simulated Phone for a User Identity.

Parameters:

  • user_identity_id

    ID of the user identity that you want to associate with the simulated phone.

  • assa_abloy_metadata (defaults to: nil)

    ASSA ABLOY metadata that you want to associate with the simulated phone.

  • custom_sdk_installation_id (defaults to: nil)

    ID of the custom SDK installation that you want to use for the simulated phone.

  • phone_metadata (defaults to: nil)

    Metadata that you want to associate with the simulated phone.

Returns:



17
18
19
20
21
# File 'lib/seam/routes/phones_simulate.rb', line 17

def create_sandbox_phone(user_identity_id:, assa_abloy_metadata: nil, custom_sdk_installation_id: nil, phone_metadata: nil)
  res = @client.post("/phones/simulate/create_sandbox_phone", {user_identity_id: user_identity_id, assa_abloy_metadata: , custom_sdk_installation_id: custom_sdk_installation_id, phone_metadata: }.compact)

  Seam::Resources::Phone.load_from_response(res.body["phone"])
end