Class: Bcash::Transaction
- Inherits:
-
Object
- Object
- Bcash::Transaction
- Defined in:
- lib/bcash/transaction.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#id_order ⇒ Object
Returns the value of attribute id_order.
-
#id_transaction ⇒ Object
Returns the value of attribute id_transaction.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(email = nil, token = nil, id_transaction = nil, id_order = nil) ⇒ Transaction
constructor
A new instance of Transaction.
Constructor Details
#initialize(email = nil, token = nil, id_transaction = nil, id_order = nil) ⇒ Transaction
Returns a new instance of Transaction.
8 9 10 11 12 13 |
# File 'lib/bcash/transaction.rb', line 8 def initialize(email = nil, token = nil, id_transaction = nil, id_order = nil) @email = email @token = token @id_transaction = id_transaction @id_order = id_order end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
5 6 7 |
# File 'lib/bcash/transaction.rb', line 5 def email @email end |
#id_order ⇒ Object
Returns the value of attribute id_order.
5 6 7 |
# File 'lib/bcash/transaction.rb', line 5 def id_order @id_order end |
#id_transaction ⇒ Object
Returns the value of attribute id_transaction.
5 6 7 |
# File 'lib/bcash/transaction.rb', line 5 def id_transaction @id_transaction end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
6 7 8 |
# File 'lib/bcash/transaction.rb', line 6 def items @items end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/bcash/transaction.rb', line 5 def token @token end |
Instance Method Details
#get ⇒ Object
16 17 18 19 20 21 |
# File 'lib/bcash/transaction.rb', line 16 def get transaction = Nokogiri::XML(get_transaction_url) self.instance_variables.each{|variable| raise Bcash::Errors::EmptyAttributes.new if self.instance_variable_get(variable).nil?} create_transaction_attrs(transaction) end |