Class: EWS::Transaction::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/ews/transaction/response.rb

Overview

This class encapsulates all the data returned from the E-xact Web Service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def amount
  @amount
end

#authorization_numObject

Returns the value of attribute authorization_num.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def authorization_num
  @authorization_num
end

#avsObject

Returns the value of attribute avs.



9
10
11
# File 'lib/ews/transaction/response.rb', line 9

def avs
  @avs
end

#bank_messageObject

Returns the value of attribute bank_message.



8
9
10
# File 'lib/ews/transaction/response.rb', line 8

def bank_message
  @bank_message
end

#bank_resp_codeObject

Returns the value of attribute bank_resp_code.



8
9
10
# File 'lib/ews/transaction/response.rb', line 8

def bank_resp_code
  @bank_resp_code
end

#bank_resp_code_2Object

Returns the value of attribute bank_resp_code_2.



8
9
10
# File 'lib/ews/transaction/response.rb', line 8

def bank_resp_code_2
  @bank_resp_code_2
end

#cardholder_nameObject

Returns the value of attribute cardholder_name.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def cardholder_name
  @cardholder_name
end

#cavvObject

Returns the value of attribute cavv.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def cavv
  @cavv
end

#cavv_algorithmObject

Returns the value of attribute cavv_algorithm.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def cavv_algorithm
  @cavv_algorithm
end

#cavv_responseObject

Returns the value of attribute cavv_response.



9
10
11
# File 'lib/ews/transaction/response.rb', line 9

def cavv_response
  @cavv_response
end

#cc_expiryObject

Returns the value of attribute cc_expiry.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def cc_expiry
  @cc_expiry
end

#cc_numberObject

Returns the value of attribute cc_number.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def cc_number
  @cc_number
end

#cc_verification_str1Object

Returns the value of attribute cc_verification_str1.



13
14
15
# File 'lib/ews/transaction/response.rb', line 13

def cc_verification_str1
  @cc_verification_str1
end

#cc_verification_str2Object

Returns the value of attribute cc_verification_str2.



13
14
15
# File 'lib/ews/transaction/response.rb', line 13

def cc_verification_str2
  @cc_verification_str2
end

#client_emailObject

Returns the value of attribute client_email.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def client_email
  @client_email
end

#client_ipObject

Returns the value of attribute client_ip.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def client_ip
  @client_ip
end

#ctrObject

Returns the value of attribute ctr.



10
11
12
# File 'lib/ews/transaction/response.rb', line 10

def ctr
  @ctr
end

#customer_refObject

Returns the value of attribute customer_ref.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def customer_ref
  @customer_ref
end

#cvd_presence_indObject

Returns the value of attribute cvd_presence_ind.



13
14
15
# File 'lib/ews/transaction/response.rb', line 13

def cvd_presence_ind
  @cvd_presence_ind
end

#cvv2Object

Returns the value of attribute cvv2.



9
10
11
# File 'lib/ews/transaction/response.rb', line 9

def cvv2
  @cvv2
end

#ecommerce_flagObject

Returns the value of attribute ecommerce_flag.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def ecommerce_flag
  @ecommerce_flag
end

#error_descriptionObject

Returns the value of attribute error_description.



7
8
9
# File 'lib/ews/transaction/response.rb', line 7

def error_description
  @error_description
end

#error_numberObject

Returns the value of attribute error_number.



7
8
9
# File 'lib/ews/transaction/response.rb', line 7

def error_number
  @error_number
end

#exact_messageObject

Returns the value of attribute exact_message.



8
9
10
# File 'lib/ews/transaction/response.rb', line 8

def exact_message
  @exact_message
end

#exact_resp_codeObject

Returns the value of attribute exact_resp_code.



8
9
10
# File 'lib/ews/transaction/response.rb', line 8

def exact_resp_code
  @exact_resp_code
end

#gateway_idObject

Returns the value of attribute gateway_id.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def gateway_id
  @gateway_id
end

#languageObject

Returns the value of attribute language.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def language
  @language
end

#logon_messageObject

Returns the value of attribute logon_message.



7
8
9
# File 'lib/ews/transaction/response.rb', line 7

def logon_message
  @logon_message
end

#merchant_addressObject

Returns the value of attribute merchant_address.



10
11
12
# File 'lib/ews/transaction/response.rb', line 10

def merchant_address
  @merchant_address
end

#merchant_cityObject

Returns the value of attribute merchant_city.



10
11
12
# File 'lib/ews/transaction/response.rb', line 10

def merchant_city
  @merchant_city
end

#merchant_countryObject

Returns the value of attribute merchant_country.



10
11
12
# File 'lib/ews/transaction/response.rb', line 10

def merchant_country
  @merchant_country
end

#merchant_nameObject

Returns the value of attribute merchant_name.



10
11
12
# File 'lib/ews/transaction/response.rb', line 10

def merchant_name
  @merchant_name
end

#merchant_postalObject

Returns the value of attribute merchant_postal.



10
11
12
# File 'lib/ews/transaction/response.rb', line 10

def merchant_postal
  @merchant_postal
end

#merchant_provinceObject

Returns the value of attribute merchant_province.



10
11
12
# File 'lib/ews/transaction/response.rb', line 10

def merchant_province
  @merchant_province
end

#merchant_urlObject

Returns the value of attribute merchant_url.



10
11
12
# File 'lib/ews/transaction/response.rb', line 10

def merchant_url
  @merchant_url
end

#panObject

Returns the value of attribute pan.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def pan
  @pan
end

#passwordObject

Returns the value of attribute password.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def password
  @password
end

#reference_3Object

Returns the value of attribute reference_3.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def reference_3
  @reference_3
end

#reference_noObject

Returns the value of attribute reference_no.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def reference_no
  @reference_no
end

#retrieval_ref_noObject

Returns the value of attribute retrieval_ref_no.



9
10
11
# File 'lib/ews/transaction/response.rb', line 9

def retrieval_ref_no
  @retrieval_ref_no
end

#secure_auth_requiredObject

Returns the value of attribute secure_auth_required.



13
14
15
# File 'lib/ews/transaction/response.rb', line 13

def secure_auth_required
  @secure_auth_required
end

#secure_auth_resultObject

Returns the value of attribute secure_auth_result.



13
14
15
# File 'lib/ews/transaction/response.rb', line 13

def secure_auth_result
  @secure_auth_result
end

#sequence_noObject

Returns the value of attribute sequence_no.



9
10
11
# File 'lib/ews/transaction/response.rb', line 9

def sequence_no
  @sequence_no
end

#surcharge_amountObject

Returns the value of attribute surcharge_amount.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def surcharge_amount
  @surcharge_amount
end

#tax1_amountObject

Returns the value of attribute tax1_amount.



13
14
15
# File 'lib/ews/transaction/response.rb', line 13

def tax1_amount
  @tax1_amount
end

#tax1_numberObject

Returns the value of attribute tax1_number.



13
14
15
# File 'lib/ews/transaction/response.rb', line 13

def tax1_number
  @tax1_number
end

#tax2_amountObject

Returns the value of attribute tax2_amount.



13
14
15
# File 'lib/ews/transaction/response.rb', line 13

def tax2_amount
  @tax2_amount
end

#tax2_numberObject

Returns the value of attribute tax2_number.



13
14
15
# File 'lib/ews/transaction/response.rb', line 13

def tax2_number
  @tax2_number
end

#track1Object

Returns the value of attribute track1.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def track1
  @track1
end

#track2Object

Returns the value of attribute track2.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def track2
  @track2
end

#transaction_approvedObject

Returns the value of attribute transaction_approved.



7
8
9
# File 'lib/ews/transaction/response.rb', line 7

def transaction_approved
  @transaction_approved
end

#transaction_errorObject

Returns the value of attribute transaction_error.



7
8
9
# File 'lib/ews/transaction/response.rb', line 7

def transaction_error
  @transaction_error
end

#transaction_tagObject

Returns the value of attribute transaction_tag.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def transaction_tag
  @transaction_tag
end

#transaction_typeObject

Returns the value of attribute transaction_type.



12
13
14
# File 'lib/ews/transaction/response.rb', line 12

def transaction_type
  @transaction_type
end

#user_nameObject

Returns the value of attribute user_name.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def user_name
  @user_name
end

#xidObject

Returns the value of attribute xid.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def xid
  @xid
end

#zip_codeObject

Returns the value of attribute zip_code.



14
15
16
# File 'lib/ews/transaction/response.rb', line 14

def zip_code
  @zip_code
end

Instance Method Details

#approved?Boolean

Indicates whether or not the transaction was approved

Returns:

  • (Boolean)


17
18
19
# File 'lib/ews/transaction/response.rb', line 17

def approved?
  self.transaction_approved == 1
end

#transaction_error?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/ews/transaction/response.rb', line 21

def transaction_error?
  self.transaction_error == 1
end