class Orbital::Gateway::OrbitalResponse::ProfileResponse

Attributes

cc_account_num[R]
cc_expire_date[R]
customer_account_type[R]
customer_address_one[R]
customer_address_two[R]
customer_bin[R]
customer_city[R]
customer_country_code[R]
customer_email[R]
customer_merchant_id[R]
customer_name[R]
customer_phone[R]
customer_profile_action[R]
customer_profile_message[R]
customer_profile_order_override_ind[R]
customer_ref_num[R]
customer_state[R]
customer_zip[R]
ecp_account_dda[R]
ecp_account_rt[R]
ecp_account_type[R]
ecp_bank_pmt_dlv[R]
mit_msg_type[R]
mit_submitted_transaction_id[R]
order_default_amount[R]
order_default_description[R]
profile_proc_status[R]
resp_time[R]
status[R]
switch_solo_start_date[R]
swith_solo_issue_num[R]

Public Class Methods

new(response_xml, request_xml) click to toggle source
Calls superclass method Orbital::Gateway::OrbitalResponse::new
# File lib/orbital/gateway/orbital_response/profile_response.rb, line 38
def initialize(response_xml, request_xml)
  super
  @customer_bin = nokogiri.at_css("Response ProfileResp CustomerBin")&.text
  @customer_merchant_id = nokogiri.at_css("Response ProfileResp CustomerMerchantID")&.text
  @customer_name = nokogiri.at_css("Response ProfileResp CustomerName")&.text
  @customer_ref_num = nokogiri.at_css("Response ProfileResp CustomerRefNum")&.text
  @customer_profile_action = nokogiri.at_css("Response ProfileResp CustomerProfileAction")&.text
  @profile_proc_status = nokogiri.at_css("Response ProfileResp ProfileProcStatus")&.text
  @customer_profile_message = nokogiri.at_css("Response ProfileResp CustomerProfileMessage")&.text
  @customer_address_one = nokogiri.at_css("Response ProfileResp CustomerAddress1")&.text
  @customer_address_two = nokogiri.at_css("Response ProfileResp CustomerAddress2")&.text
  @customer_city = nokogiri.at_css("Response ProfileResp CustomerCity")&.text
  @customer_state = nokogiri.at_css("Response ProfileResp CustomerState")&.text
  @customer_zip = nokogiri.at_css("Response ProfileResp CustomerZIP")&.text
  @customer_email = nokogiri.at_css("Response ProfileResp CustomerEmail")&.text
  @customer_phone = nokogiri.at_css("Response ProfileResp CustomerPhone")&.text
  @customer_country_code = nokogiri.at_css("Response ProfileResp CustomerCountryCode")&.text
  @customer_profile_order_override_ind = nokogiri.at_css("Response ProfileResp CustomerProfileOrderOverrideInd")&.text
  @order_default_description = nokogiri.at_css("Response ProfileResp OrderDefaultDescription")&.text
  @order_default_amount = nokogiri.at_css("Response ProfileResp OrderDefaultAmount")&.text
  @customer_account_type = nokogiri.at_css("Response ProfileResp CustomerAccountType")&.text
  @status = nokogiri.at_css("Response ProfileResp Status")&.text
  @cc_account_num = nokogiri.at_css("Response ProfileResp CCAccountNum")&.text
  @cc_expire_date = nokogiri.at_css("Response ProfileResp CCExpireDate")&.text
  @ecp_account_dda = nokogiri.at_css("Response ProfileResp ECPAccountDDA")&.text
  @ecp_account_type = nokogiri.at_css("Response ProfileResp ECPAccountType")&.text
  @ecp_account_rt = nokogiri.at_css("Response ProfileResp ECPAccountRT")&.text
  @ecp_bank_pmt_dlv = nokogiri.at_css("Response ProfileResp ECPBankPmtDlv")&.text
  @switch_solo_start_date = nokogiri.at_css("Response ProfileResp SwitchSoloStartDate")&.text
  @swith_solo_issue_num = nokogiri.at_css("Response ProfileResp SwitchSoloIssueNum")&.text
  @resp_time = nokogiri.at_css("Response ProfileResp RespTime")&.text
  @mit_msg_type = nokogiri.at_css("Response ProfileResp MITMsgType")&.text
  @mit_submitted_transaction_id = nokogiri.at_css("Response ProfileResp MITSubmittedTransactionID")&.text
end

Public Instance Methods

success?() click to toggle source
# File lib/orbital/gateway/orbital_response/profile_response.rb, line 77
def success?
  profile_proc_status == '0'
  # Example of a failure
  # <ProfileProcStatus>9581</ProfileProcStatus>
  # <CustomerProfileMessage>Profile: Cannot Read profile. Profile does not exist for Cust Ref Num: [62E66156562D01C7] and MID: [351154].</CustomerProfileMessage>
end
to_s() click to toggle source
# File lib/orbital/gateway/orbital_response/profile_response.rb, line 73
def to_s
  nokogiri.to_xml
end