lib/ig_markets/dealing_platform/position_methods.rb
# Checks that all required attributes for position creation are present.
Checks that all required attributes for position creation are present.
Checks that all required attributes for position creation are present .
def validate_required_attributes
          required = %i[currency_code direction epic force_open guaranteed_stop order_type size
                        time_in_force]
          required.each do |attribute|
            raise ArgumentError, "#{attribute} attribute must be set" if attributes[attribute].nil?
          end
        end
def validate_required_attributes required = %i[ currency_code direction epic force_open guaranteed_stop order_type size time_in_force ] required . each do | attribute | raise ArgumentError , "#{attribute} attribute must be set" if attributes [ attribute ] . nil? end end
Checks that all required attributes for position creation are present.
Checks that all required attributes for position creation are present .