Class: Coinone::Transaction::KrwHistory::History
- Inherits:
-
Object
- Object
- Coinone::Transaction::KrwHistory::History
- Defined in:
- lib/coinone/transaction/krw_history/history.rb
Instance Attribute Summary collapse
-
#account_number ⇒ Object
readonly
Returns the value of attribute account_number.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#bank_code ⇒ Object
readonly
Returns the value of attribute bank_code.
-
#depositor ⇒ Object
readonly
Returns the value of attribute depositor.
-
#process_level ⇒ Object
readonly
Returns the value of attribute process_level.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ History
constructor
A new instance of History.
- #process_level_to_s ⇒ Object
- #update_history(params = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ History
Returns a new instance of History.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/coinone/transaction/krw_history/history.rb', line 10 def initialize(={}) @bank_code = nil @account_number = nil @depositor = nil @amount = nil @process_level = nil @timestamp = nil update_history() end |
Instance Attribute Details
#account_number ⇒ Object (readonly)
Returns the value of attribute account_number.
8 9 10 |
# File 'lib/coinone/transaction/krw_history/history.rb', line 8 def account_number @account_number end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
8 9 10 |
# File 'lib/coinone/transaction/krw_history/history.rb', line 8 def amount @amount end |
#bank_code ⇒ Object (readonly)
Returns the value of attribute bank_code.
8 9 10 |
# File 'lib/coinone/transaction/krw_history/history.rb', line 8 def bank_code @bank_code end |
#depositor ⇒ Object (readonly)
Returns the value of attribute depositor.
8 9 10 |
# File 'lib/coinone/transaction/krw_history/history.rb', line 8 def depositor @depositor end |
#process_level ⇒ Object (readonly)
Returns the value of attribute process_level.
8 9 10 |
# File 'lib/coinone/transaction/krw_history/history.rb', line 8 def process_level @process_level end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
8 9 10 |
# File 'lib/coinone/transaction/krw_history/history.rb', line 8 def @timestamp end |
Instance Method Details
#process_level_to_s ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/coinone/transaction/krw_history/history.rb', line 35 def process_level_to_s level_list = ["", "Deposit Completed", "Request Withdrawal", "Request Accepted", "Withrawal Canceled", "Withdrawal Completed"] if @process_level.blank? str = "" else str = level_list[@process_level] end str end |
#update_history(params = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/coinone/transaction/krw_history/history.rb', line 24 def update_history(params={}) @bank_code = params[:bankCode].to_i if (params.has_key? :bankCode) && !params[:bankCode].nil? @account_number = params[:accountNumber].strip if (params.has_key? :accountNumber) && !params[:accountNumber].nil? @depositor = params[:depositor].strip if (params.has_key? :depositor) && !params[:depositor].nil? @amount = params[:amount].to_i if params.has_key? :amount @process_level = params[:processLevel].to_i if (params.has_key? :processLevel) && !params[:processLevel].nil? @timestamp = params[:timestamp].to_i if params.has_key? :timestamp end |