Class: Increase::Resources::Simulations::Entities

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/simulations/entities.rb,
sig/increase/resources/simulations/entities.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Entities

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Entities.

Parameters:



41
42
43
# File 'lib/increase/resources/simulations/entities.rb', line 41

def initialize(client:)
  @client = client
end

Instance Method Details

#update_validation(entity_id, issues:, request_options: {}) ⇒ Increase::Models::Entity

Simulate updates to an Entity's validation. In production, Know Your Customer validations run automatically for eligible programs. While developing, use this API to simulate issues with information submissions.

Parameters:

Returns:

See Also:



27
28
29
30
31
32
33
34
35
36
# File 'lib/increase/resources/simulations/entities.rb', line 27

def update_validation(entity_id, params)
  parsed, options = Increase::Simulations::EntityUpdateValidationParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["simulations/entities/%1$s/update_validation", entity_id],
    body: parsed,
    model: Increase::Entity,
    options: options
  )
end