lib/snaptrade/models/universal_activity.rb in snaptrade-1.15.1 vs lib/snaptrade/models/universal_activity.rb in snaptrade-1.16.0

- old
+ new

@@ -1,13 +1,13 @@ =begin -#SnapTrade - -#Connect brokerage accounts to your app for live positions and trading - -The version of the OpenAPI document: 1.0.0 -Contact: api@snaptrade.com +#SnapTrade +#Connect brokerage accounts to your app for live positions and trading + +The version of the OpenAPI document: 1.0.0 +Contact: api@snaptrade.com + =end require 'date' require 'time' @@ -24,10 +24,13 @@ attr_accessor :description attr_accessor :fee + # The forex conversion rate involved in the transaction if provided by the brokerage + attr_accessor :fx_rate + attr_accessor :institution # If an option transaction, then it's type (BUY_TO_OPEN, SELL_TO_CLOSE, etc), otherwise empty string attr_accessor :option_type @@ -57,10 +60,11 @@ :'account' => :'account', :'amount' => :'amount', :'currency' => :'currency', :'description' => :'description', :'fee' => :'fee', + :'fx_rate' => :'fx_rate', :'institution' => :'institution', :'option_type' => :'option_type', :'price' => :'price', :'settlement_date' => :'settlement_date', :'external_reference_id' => :'external_reference_id', @@ -84,10 +88,11 @@ :'account' => :'AccountSimple', :'amount' => :'Float', :'currency' => :'Currency', :'description' => :'String', :'fee' => :'Float', + :'fx_rate' => :'Float', :'institution' => :'String', :'option_type' => :'String', :'price' => :'Float', :'settlement_date' => :'String', :'external_reference_id' => :'String', @@ -101,10 +106,11 @@ # List of attributes with nullable: true def self.openapi_nullable Set.new([ :'amount', + :'fx_rate', :'external_reference_id', :'trade_date', ]) end @@ -145,10 +151,14 @@ if attributes.key?(:'fee') self.fee = attributes[:'fee'] end + if attributes.key?(:'fx_rate') + self.fx_rate = attributes[:'fx_rate'] + end + if attributes.key?(:'institution') self.institution = attributes[:'institution'] end if attributes.key?(:'option_type') @@ -210,10 +220,11 @@ account == o.account && amount == o.amount && currency == o.currency && description == o.description && fee == o.fee && + fx_rate == o.fx_rate && institution == o.institution && option_type == o.option_type && price == o.price && settlement_date == o.settlement_date && external_reference_id == o.external_reference_id && @@ -231,10 +242,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, account, amount, currency, description, fee, institution, option_type, price, settlement_date, external_reference_id, symbol, option_symbol, trade_date, type, units].hash + [id, account, amount, currency, description, fee, fx_rate, institution, option_type, price, settlement_date, external_reference_id, symbol, option_symbol, trade_date, type, units].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself