Exception: Tastytrade::OrderValidationError

Inherits:
OrderError show all
Defined in:
lib/tastytrade.rb

Overview

Base class for order validation errors. Contains an array of specific validation failures that prevented the order from being placed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ OrderValidationError

Returns a new instance of OrderValidationError.

Parameters:

  • errors (String, Array<String>)

    One or more validation error messages



50
51
52
53
# File 'lib/tastytrade.rb', line 50

def initialize(errors)
  @errors = Array(errors)
  super(@errors.join("; "))
end

Instance Attribute Details

#errorsArray<String> (readonly)

Returns List of validation errors.

Returns:

  • (Array<String>)

    List of validation errors



47
48
49
# File 'lib/tastytrade.rb', line 47

def errors
  @errors
end