Class: SchwabRb::DataObjects::OrderPreview::OrderValidationResult::Reject

Inherits:
Object
  • Object
show all
Defined in:
lib/schwab_rb/data_objects/order_preview.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ Reject

Returns a new instance of Reject.



131
132
133
134
# File 'lib/schwab_rb/data_objects/order_preview.rb', line 131

def initialize(attrs)
  @reject_code = attrs[:rejectCode]
  @reject_message = attrs[:rejectMessage]
end

Instance Attribute Details

#reject_codeObject (readonly)

Returns the value of attribute reject_code.



129
130
131
# File 'lib/schwab_rb/data_objects/order_preview.rb', line 129

def reject_code
  @reject_code
end

#reject_messageObject (readonly)

Returns the value of attribute reject_message.



129
130
131
# File 'lib/schwab_rb/data_objects/order_preview.rb', line 129

def reject_message
  @reject_message
end

Instance Method Details

#to_hObject



136
137
138
139
140
141
# File 'lib/schwab_rb/data_objects/order_preview.rb', line 136

def to_h
  {
    rejectCode: @reject_code,
    rejectMessage: @reject_message
  }
end