Class: EportRequestPlainText
- Inherits:
-
Object
- Object
- EportRequestPlainText
- Defined in:
- lib/eport_request_plain_text.rb
Constant Summary collapse
- OPERATION_TYPES =
[ "CHECK", "OPERATION", "CONFIRM", "CANCEL" ]
- STRING_SEPARATOR =
"\r\n"
Instance Attribute Summary collapse
-
#account ⇒ Object
Returns the value of attribute account.
-
#operation_id ⇒ Object
Returns the value of attribute operation_id.
-
#operation_type ⇒ Object
Returns the value of attribute operation_type.
-
#product_id ⇒ Object
Returns the value of attribute product_id.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(&block) ⇒ EportRequestPlainText
constructor
A new instance of EportRequestPlainText.
Constructor Details
#initialize(&block) ⇒ EportRequestPlainText
Returns a new instance of EportRequestPlainText.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/eport_request_plain_text.rb', line 21 def initialize(&block) @operation_type = nil @operation_id = nil @product_id = nil @value = nil @account = nil if block block.call end end |
Instance Attribute Details
#account ⇒ Object
Returns the value of attribute account.
11 12 13 |
# File 'lib/eport_request_plain_text.rb', line 11 def account @account end |
#operation_id ⇒ Object
Returns the value of attribute operation_id.
11 12 13 |
# File 'lib/eport_request_plain_text.rb', line 11 def operation_id @operation_id end |
#operation_type ⇒ Object
Returns the value of attribute operation_type.
11 12 13 |
# File 'lib/eport_request_plain_text.rb', line 11 def operation_type @operation_type end |
#product_id ⇒ Object
Returns the value of attribute product_id.
11 12 13 |
# File 'lib/eport_request_plain_text.rb', line 11 def product_id @product_id end |
#value ⇒ Object
Returns the value of attribute value.
11 12 13 |
# File 'lib/eport_request_plain_text.rb', line 11 def value @value end |
Instance Method Details
#body ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/eport_request_plain_text.rb', line 33 def body output = "" output << @operation_type + STRING_SEPARATOR output << key_value("id", @operation_id) output << key_value("checkid", @operation_id) output << key_value("product", @product_id) output << key_value("value", @value) output << key_value("account", @account) output end |