Class: ClickClient::FX::CurrencyPair

Inherits:
Base
  • Object
show all
Defined in:
lib/clickclient/fx.rb

Overview

通貨ペア

定義済みの属性の他に、レスポンスXMLの要素名、属性名でも値にアクセスできます。 レスポンスXMLについては、クリック証券提供のドキュメントを参照ください。

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#eql?, #hash, #method_missing, #to_s

Constructor Details

#initialize(item) ⇒ CurrencyPair

Returns a new instance of CurrencyPair.



616
617
618
619
620
621
622
623
# File 'lib/clickclient/fx.rb', line 616

def initialize( item )
  super(item)
  @currency_pair_code = item.attributes["tsukaPairCode"].to_i
  @name = item.attributes["tsukaPairName"]
  @max_trade_quantity = item.text( "./maxTorihikiSuryo" ).to_i
  @min_trade_quantity = item.text( "./minTorihikiSuryo" ).to_i
  @trade_unit = item.text( "./torihikiTani" ).to_i
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ClickClient::Base

Instance Attribute Details

#currency_pair_codeObject

通貨ペアコード



625
626
627
# File 'lib/clickclient/fx.rb', line 625

def currency_pair_code
  @currency_pair_code
end

#max_trade_quantityObject

最大取引数量



629
630
631
# File 'lib/clickclient/fx.rb', line 629

def max_trade_quantity
  @max_trade_quantity
end

#min_trade_quantityObject

最低取引数量



631
632
633
# File 'lib/clickclient/fx.rb', line 631

def min_trade_quantity
  @min_trade_quantity
end

#nameObject

名前



627
628
629
# File 'lib/clickclient/fx.rb', line 627

def name
  @name
end

#trade_unitObject

取引単位



633
634
635
# File 'lib/clickclient/fx.rb', line 633

def trade_unit
  @trade_unit
end