Class: BreadMachine::CustomerInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/breadmachine/dto/customer_info.rb

Overview

Billing details for customer. This is used by XPay and the acquiring banks to keep an audit trail for fraud prevention purposes, so it’s necessary for some kinds of auth queries (e.g. AVS checks).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CustomerInfo

XPay doesn’t require any of this info for regular transactions, but if you’ve got your XPay system set up to decline if an AVS check fails, you’d better include it.

3-D Secure card enrollment checks require :user_agent and :accept

The XPay API reference strongly recommends that all of this info is filled in, regardless of what kind of API call you’re making.



23
24
25
# File 'lib/breadmachine/dto/customer_info.rb', line 23

def initialize(attributes = {})
  attributes.each { |key, value| send("#{key}=", value) }
end

Instance Attribute Details

#acceptObject

Returns the value of attribute accept.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def accept
  @accept
end

#cityObject

Returns the value of attribute city.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def city
  @city
end

#companyObject

Returns the value of attribute company.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def company
  @company
end

#emailObject

Returns the value of attribute email.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def first_name
  @first_name
end

#iso_2_countryObject

Returns the value of attribute iso_2_country.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def iso_2_country
  @iso_2_country
end

#last_nameObject

Returns the value of attribute last_name.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def last_name
  @last_name
end

#middle_nameObject

Returns the value of attribute middle_name.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def middle_name
  @middle_name
end

#name_prefixObject

Returns the value of attribute name_prefix.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def name_prefix
  @name_prefix
end

#name_suffixObject

Returns the value of attribute name_suffix.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def name_suffix
  @name_suffix
end

#postcodeObject

Returns the value of attribute postcode.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def postcode
  @postcode
end

#stateObject

Returns the value of attribute state.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def state
  @state
end

#streetObject

Returns the value of attribute street.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def street
  @street
end

#telephoneObject

Returns the value of attribute telephone.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def telephone
  @telephone
end

#user_agentObject

Returns the value of attribute user_agent.



9
10
11
# File 'lib/breadmachine/dto/customer_info.rb', line 9

def user_agent
  @user_agent
end