Class: Seam::Clients::AcsEncodersSimulate

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

Instance Method Summary collapse

Constructor Details

#initialize(client:, defaults:) ⇒ AcsEncodersSimulate

Returns a new instance of AcsEncodersSimulate.



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

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

Instance Method Details

#next_credential_encode_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id: nil) ⇒ nil

Simulates that the next attempt to encode a credential using the specified encoder will fail. You can only perform this action within a sandbox workspace.

Parameters:

  • acs_encoder_id

    ID of the acs_encoder that will be used in the next request to encode the acs_credential.

  • error_code (defaults to: nil)

    Code of the error to simulate.

  • acs_credential_id (defaults to: nil)

    ID of the acs_credential that will fail to be encoded onto a card in the next request.

Returns:

  • (nil)

    OK



16
17
18
19
20
# File 'lib/seam/routes/acs_encoders_simulate.rb', line 16

def next_credential_encode_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id: nil)
  @client.post("/acs/encoders/simulate/next_credential_encode_will_fail", {acs_encoder_id: acs_encoder_id, error_code: error_code, acs_credential_id: acs_credential_id}.compact)

  nil
end

#next_credential_encode_will_succeed(acs_encoder_id:, scenario: nil) ⇒ nil

Simulates that the next attempt to encode a credential using the specified encoder will succeed. You can only perform this action within a sandbox workspace.

Parameters:

  • acs_encoder_id

    ID of the acs_encoder that will be used in the next request to encode the acs_credential.

  • scenario (defaults to: nil)

    Scenario to simulate.

Returns:

  • (nil)

    OK



26
27
28
29
30
# File 'lib/seam/routes/acs_encoders_simulate.rb', line 26

def next_credential_encode_will_succeed(acs_encoder_id:, scenario: nil)
  @client.post("/acs/encoders/simulate/next_credential_encode_will_succeed", {acs_encoder_id: acs_encoder_id, scenario: scenario}.compact)

  nil
end

#next_credential_scan_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id_on_seam: nil) ⇒ nil

Simulates that the next attempt to scan a credential using the specified encoder will fail. You can only perform this action within a sandbox workspace.

Parameters:

  • acs_encoder_id

    ID of the acs_encoder that will fail to scan the acs_credential in the next request.

  • error_code (defaults to: nil)
  • acs_credential_id_on_seam (defaults to: nil)

Returns:

  • (nil)

    OK



37
38
39
40
41
# File 'lib/seam/routes/acs_encoders_simulate.rb', line 37

def next_credential_scan_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id_on_seam: nil)
  @client.post("/acs/encoders/simulate/next_credential_scan_will_fail", {acs_encoder_id: acs_encoder_id, error_code: error_code, acs_credential_id_on_seam: acs_credential_id_on_seam}.compact)

  nil
end

#next_credential_scan_will_succeed(acs_encoder_id:, acs_credential_id_on_seam: nil, scenario: nil) ⇒ nil

Simulates that the next attempt to scan a credential using the specified encoder will succeed. You can only perform this action within a sandbox workspace.

Parameters:

  • acs_encoder_id

    ID of the acs_encoder that will be used in the next request to scan the acs_credential.

  • acs_credential_id_on_seam (defaults to: nil)

    ID of the Seam acs_credential that matches the acs_credential on the encoder in this simulation.

  • scenario (defaults to: nil)

    Scenario to simulate.

Returns:

  • (nil)

    OK



48
49
50
51
52
# File 'lib/seam/routes/acs_encoders_simulate.rb', line 48

def next_credential_scan_will_succeed(acs_encoder_id:, acs_credential_id_on_seam: nil, scenario: nil)
  @client.post("/acs/encoders/simulate/next_credential_scan_will_succeed", {acs_encoder_id: acs_encoder_id, acs_credential_id_on_seam: acs_credential_id_on_seam, scenario: scenario}.compact)

  nil
end