Class: SagePay::Server::RelatedTransaction

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/sage_pay/server/related_transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RelatedTransaction

Returns a new instance of RelatedTransaction.



14
15
16
17
18
# File 'lib/sage_pay/server/related_transaction.rb', line 14

def initialize(attributes = {})
  attributes.each do |k, v|
    send("#{k}=", v)
  end
end

Instance Attribute Details

#security_keyObject

Returns the value of attribute security_key.



6
7
8
# File 'lib/sage_pay/server/related_transaction.rb', line 6

def security_key
  @security_key
end

#tx_auth_noObject

Returns the value of attribute tx_auth_no.



6
7
8
# File 'lib/sage_pay/server/related_transaction.rb', line 6

def tx_auth_no
  @tx_auth_no
end

#vendor_tx_codeObject

Returns the value of attribute vendor_tx_code.



6
7
8
# File 'lib/sage_pay/server/related_transaction.rb', line 6

def vendor_tx_code
  @vendor_tx_code
end

#vps_tx_idObject

Returns the value of attribute vps_tx_id.



6
7
8
# File 'lib/sage_pay/server/related_transaction.rb', line 6

def vps_tx_id
  @vps_tx_id
end

Instance Method Details

#post_paramsObject



20
21
22
23
24
25
26
27
# File 'lib/sage_pay/server/related_transaction.rb', line 20

def post_params
  {
    "RelatedVPSTxId"      => vps_tx_id,
    "RelatedVendorTxCode" => vendor_tx_code,
    "RelatedSecurityKey"  => security_key,
    "RelatedTxAuthNo"     => tx_auth_no,
  }
end