Class: RakutenTrading::InlineResponse200
- Inherits:
-
Object
- Object
- RakutenTrading::InlineResponse200
- Defined in:
- lib/rakuten_trading/models/inline_response_200.rb
Instance Attribute Summary collapse
-
#authority ⇒ Object
口座種別.
-
#base_currency ⇒ Object
ベース通貨.
-
#base_scale ⇒ Object
数量の小数点以下桁数(ベース通貨桁数)。例) 1の場合0.1など.
-
#base_step_amount ⇒ Object
取扱単位(注文数量の最小単位).
-
#close_only ⇒ Object
新規停止(決済・取消のみ可能).
-
#currency_pair ⇒ Object
通貨ペア.
-
#enabled ⇒ Object
有効.
-
#id ⇒ Object
シンボルID.
-
#maker_trade_fee_percent ⇒ Object
メイカー約定手数料率%.
-
#max_order_amount ⇒ Object
1回の最大注文数量.
-
#min_order_amount ⇒ Object
1回の最小注文数量.
-
#quote_currency ⇒ Object
クォート通貨.
-
#quote_scale ⇒ Object
価格の小数点以下桁数(クォート通貨桁数)。例) 0の場合、50000など.
-
#taker_trade_fee_percent ⇒ Object
テイカー約定手数料率%.
-
#trade_type ⇒ Object
取引タイプ.
-
#view_only ⇒ Object
レポート閲覧のみ可能.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ InlineResponse200
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ InlineResponse200
Initializes the object
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 116 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `RakutenTrading::InlineResponse200` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `RakutenTrading::InlineResponse200`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'authority') self. = attributes[:'authority'] end if attributes.key?(:'trade_type') self.trade_type = attributes[:'trade_type'] end if attributes.key?(:'currency_pair') self.currency_pair = attributes[:'currency_pair'] end if attributes.key?(:'base_currency') self.base_currency = attributes[:'base_currency'] end if attributes.key?(:'quote_currency') self.quote_currency = attributes[:'quote_currency'] end if attributes.key?(:'base_scale') self.base_scale = attributes[:'base_scale'] end if attributes.key?(:'quote_scale') self.quote_scale = attributes[:'quote_scale'] end if attributes.key?(:'base_step_amount') self.base_step_amount = attributes[:'base_step_amount'] end if attributes.key?(:'min_order_amount') self.min_order_amount = attributes[:'min_order_amount'] end if attributes.key?(:'max_order_amount') self.max_order_amount = attributes[:'max_order_amount'] end if attributes.key?(:'maker_trade_fee_percent') self.maker_trade_fee_percent = attributes[:'maker_trade_fee_percent'] end if attributes.key?(:'taker_trade_fee_percent') self.taker_trade_fee_percent = attributes[:'taker_trade_fee_percent'] end if attributes.key?(:'close_only') self.close_only = attributes[:'close_only'] end if attributes.key?(:'view_only') self.view_only = attributes[:'view_only'] end if attributes.key?(:'enabled') self.enabled = attributes[:'enabled'] end end |
Instance Attribute Details
#authority ⇒ Object
口座種別
20 21 22 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 20 def @authority end |
#base_currency ⇒ Object
ベース通貨
29 30 31 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 29 def base_currency @base_currency end |
#base_scale ⇒ Object
数量の小数点以下桁数(ベース通貨桁数)。例) 1の場合0.1など
35 36 37 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 35 def base_scale @base_scale end |
#base_step_amount ⇒ Object
取扱単位(注文数量の最小単位)
41 42 43 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 41 def base_step_amount @base_step_amount end |
#close_only ⇒ Object
新規停止(決済・取消のみ可能)
56 57 58 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 56 def close_only @close_only end |
#currency_pair ⇒ Object
通貨ペア
26 27 28 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 26 def currency_pair @currency_pair end |
#enabled ⇒ Object
有効
62 63 64 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 62 def enabled @enabled end |
#id ⇒ Object
シンボルID
17 18 19 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 17 def id @id end |
#maker_trade_fee_percent ⇒ Object
メイカー約定手数料率%
50 51 52 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 50 def maker_trade_fee_percent @maker_trade_fee_percent end |
#max_order_amount ⇒ Object
1回の最大注文数量
47 48 49 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 47 def max_order_amount @max_order_amount end |
#min_order_amount ⇒ Object
1回の最小注文数量
44 45 46 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 44 def min_order_amount @min_order_amount end |
#quote_currency ⇒ Object
クォート通貨
32 33 34 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 32 def quote_currency @quote_currency end |
#quote_scale ⇒ Object
価格の小数点以下桁数(クォート通貨桁数)。例) 0の場合、50000など
38 39 40 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 38 def quote_scale @quote_scale end |
#taker_trade_fee_percent ⇒ Object
テイカー約定手数料率%
53 54 55 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 53 def taker_trade_fee_percent @taker_trade_fee_percent end |
#trade_type ⇒ Object
取引タイプ
23 24 25 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 23 def trade_type @trade_type end |
#view_only ⇒ Object
レポート閲覧のみ可能
59 60 61 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 59 def view_only @view_only end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 65 def self.attribute_map { :'id' => :'id', :'authority' => :'authority', :'trade_type' => :'tradeType', :'currency_pair' => :'currencyPair', :'base_currency' => :'baseCurrency', :'quote_currency' => :'quoteCurrency', :'base_scale' => :'baseScale', :'quote_scale' => :'quoteScale', :'base_step_amount' => :'baseStepAmount', :'min_order_amount' => :'minOrderAmount', :'max_order_amount' => :'maxOrderAmount', :'maker_trade_fee_percent' => :'makerTradeFeePercent', :'taker_trade_fee_percent' => :'takerTradeFeePercent', :'close_only' => :'closeOnly', :'view_only' => :'viewOnly', :'enabled' => :'enabled' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
245 246 247 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 245 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
109 110 111 112 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 109 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 87 def self.openapi_types { :'id' => :'Object', :'authority' => :'Object', :'trade_type' => :'Object', :'currency_pair' => :'Object', :'base_currency' => :'Object', :'quote_currency' => :'Object', :'base_scale' => :'Object', :'quote_scale' => :'Object', :'base_step_amount' => :'Object', :'min_order_amount' => :'Object', :'max_order_amount' => :'Object', :'maker_trade_fee_percent' => :'Object', :'taker_trade_fee_percent' => :'Object', :'close_only' => :'Object', :'view_only' => :'Object', :'enabled' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 209 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && == o. && trade_type == o.trade_type && currency_pair == o.currency_pair && base_currency == o.base_currency && quote_currency == o.quote_currency && base_scale == o.base_scale && quote_scale == o.quote_scale && base_step_amount == o.base_step_amount && min_order_amount == o.min_order_amount && max_order_amount == o.max_order_amount && maker_trade_fee_percent == o.maker_trade_fee_percent && taker_trade_fee_percent == o.taker_trade_fee_percent && close_only == o.close_only && view_only == o.view_only && enabled == o.enabled end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 275 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model RakutenTrading.const_get(type).build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 344 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 252 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end |
#eql?(o) ⇒ Boolean
232 233 234 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 232 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
238 239 240 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 238 def hash [id, , trade_type, currency_pair, base_currency, quote_currency, base_scale, quote_scale, base_step_amount, min_order_amount, max_order_amount, maker_trade_fee_percent, taker_trade_fee_percent, close_only, view_only, enabled].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
196 197 198 199 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 196 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
320 321 322 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 320 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 326 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
314 315 316 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 314 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
203 204 205 |
# File 'lib/rakuten_trading/models/inline_response_200.rb', line 203 def valid? true end |