Class: BigMachines::Transaction
- Inherits:
-
Object
- Object
- BigMachines::Transaction
- Defined in:
- lib/big_machines/transaction.rb
Instance Attribute Summary collapse
-
#raw_transaction ⇒ Object
readonly
Returns the value of attribute raw_transaction.
Instance Method Summary collapse
-
#initialize(response) ⇒ Transaction
constructor
A new instance of Transaction.
- #method_missing(method, *args) ⇒ Object
- #quote ⇒ Object
- #quote_line_items ⇒ Object
Constructor Details
#initialize(response) ⇒ Transaction
Returns a new instance of Transaction.
5 6 7 8 9 10 11 12 13 |
# File 'lib/big_machines/transaction.rb', line 5 def initialize(response) @raw_transaction = response # Metadata @transaction = response[:transaction] # Quote @quote_process = @transaction[:data_xml][:quote_process] # Quote Line Items @line_process = @quote_process[:sub_documents][:line_process] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
15 16 17 |
# File 'lib/big_machines/transaction.rb', line 15 def method_missing(method, *args) @transaction[method] end |
Instance Attribute Details
#raw_transaction ⇒ Object (readonly)
Returns the value of attribute raw_transaction.
3 4 5 |
# File 'lib/big_machines/transaction.rb', line 3 def raw_transaction @raw_transaction end |
Instance Method Details
#quote ⇒ Object
19 20 21 |
# File 'lib/big_machines/transaction.rb', line 19 def quote @quote_process end |
#quote_line_items ⇒ Object
23 24 25 |
# File 'lib/big_machines/transaction.rb', line 23 def quote_line_items @line_process end |