Class: SecureTrading::Requests::Authorisation
- Inherits:
-
SecureTrading::Request
- Object
- SecureTrading::Request
- SecureTrading::Requests::Authorisation
- Defined in:
- lib/secure_trading/requests/authorisation.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#order ⇒ Object
Returns the value of attribute order.
-
#payment_method ⇒ Object
Returns the value of attribute payment_method.
-
#settlement_day ⇒ Object
Returns the value of attribute settlement_day.
Attributes inherited from SecureTrading::Request
Instance Method Summary collapse
Methods inherited from SecureTrading::Request
#error_message, #initialize, #process, #sanitized_xml_request, #xml_request
Constructor Details
This class inherits a constructor from SecureTrading::Request
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
5 6 7 |
# File 'lib/secure_trading/requests/authorisation.rb', line 5 def amount @amount end |
#currency ⇒ Object
Returns the value of attribute currency.
5 6 7 |
# File 'lib/secure_trading/requests/authorisation.rb', line 5 def currency @currency end |
#customer ⇒ Object
Returns the value of attribute customer.
5 6 7 |
# File 'lib/secure_trading/requests/authorisation.rb', line 5 def customer @customer end |
#order ⇒ Object
Returns the value of attribute order.
5 6 7 |
# File 'lib/secure_trading/requests/authorisation.rb', line 5 def order @order end |
#payment_method ⇒ Object
Returns the value of attribute payment_method.
5 6 7 |
# File 'lib/secure_trading/requests/authorisation.rb', line 5 def payment_method @payment_method end |
#settlement_day ⇒ Object
Returns the value of attribute settlement_day.
5 6 7 |
# File 'lib/secure_trading/requests/authorisation.rb', line 5 def settlement_day @settlement_day end |
Instance Method Details
#request_type ⇒ Object
7 8 9 |
# File 'lib/secure_trading/requests/authorisation.rb', line 7 def request_type 'AUTH' end |
#to_hash ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/secure_trading/requests/authorisation.rb', line 11 def to_hash { 'Operation' => {'SiteReference' => self.connection.site_reference, 'Amount' => self.amount, 'Currency' => self.currency || 'GBP', 'SettlementDay' => self.settlement_day || 1 }, 'CustomerInfo' => customer, 'PaymentMethod' => {'CreditCard' => payment_method }, 'Order' => order } end |