Class: MethodRuby::Resources::Simulate::Entities::Connect

Inherits:
Object
  • Object
show all
Defined in:
lib/method_ruby/resources/simulate/entities/connect.rb

Overview

Sandbox entity simulation

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Connect

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 Connect.

Parameters:



44
45
46
# File 'lib/method_ruby/resources/simulate/entities/connect.rb', line 44

def initialize(client:)
  @client = client
end

Instance Method Details

#create(entity_id, method_version:, request_options: {}) ⇒ MethodRuby::Models::Simulate::Entities::ConnectCreateResponse

Some parameter documentations has been truncated, see Models::Simulate::Entities::ConnectCreateParams for more details.

Simulates the entity connect flow in the sandbox environment. Use this to test account discovery and connection flows during development.

**Development only** - This endpoint is only available in the sandbox environment.

Parameters:

Returns:

See Also:



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/method_ruby/resources/simulate/entities/connect.rb', line 29

def create(entity_id, params)
  parsed, options = MethodRuby::Simulate::Entities::ConnectCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["simulate/entities/%1$s/connect", entity_id],
    headers: parsed.transform_keys(method_version: "method-version"),
    model: MethodRuby::Models::Simulate::Entities::ConnectCreateResponse,
    security: {secret_key: true},
    options: options
  )
end