Exception: Tastytrade::OrderValidationError
- Inherits:
-
OrderError
- Object
- StandardError
- Error
- OrderError
- Tastytrade::OrderValidationError
- 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.
Direct Known Subclasses
AccountRestrictedError, InsufficientBuyingPowerError, InvalidPriceError, InvalidQuantityError, InvalidSymbolError
Instance Attribute Summary collapse
-
#errors ⇒ Array<String>
readonly
List of validation errors.
Instance Method Summary collapse
-
#initialize(errors) ⇒ OrderValidationError
constructor
A new instance of OrderValidationError.
Constructor Details
#initialize(errors) ⇒ OrderValidationError
Returns a new instance of OrderValidationError.
50 51 52 53 |
# File 'lib/tastytrade.rb', line 50 def initialize(errors) @errors = Array(errors) super(@errors.join("; ")) end |
Instance Attribute Details
#errors ⇒ Array<String> (readonly)
Returns List of validation errors.
47 48 49 |
# File 'lib/tastytrade.rb', line 47 def errors @errors end |