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

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

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:



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

def initialize(client:)
  @client = client
end

Instance Method Details

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

Set the status for an [Entity’s validation](/documentation/api/entities#entity-object.validation). In production, Know Your Customer validations [run automatically](/documentation/entity-validation#entity-validation). While developing, it can be helpful to override the behavior in Sandbox.

Parameters:

Returns:

See Also:



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

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