Class: Braintree::Transaction::CustomerDetails

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/transaction/customer_details.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

Methods included from BaseModule::Methods

#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class

Constructor Details

#initialize(attributes) ⇒ CustomerDetails

Returns a new instance of CustomerDetails.



16
17
18
# File 'lib/braintree/transaction/customer_details.rb', line 16

def initialize(attributes)
  set_instance_variables_from_hash attributes unless attributes.nil?
end

Instance Attribute Details

#companyObject (readonly)

Returns the value of attribute company.



6
7
8
# File 'lib/braintree/transaction/customer_details.rb', line 6

def company
  @company
end

#emailObject (readonly)

Returns the value of attribute email.



7
8
9
# File 'lib/braintree/transaction/customer_details.rb', line 7

def email
  @email
end

#faxObject (readonly)

Returns the value of attribute fax.



8
9
10
# File 'lib/braintree/transaction/customer_details.rb', line 8

def fax
  @fax
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



9
10
11
# File 'lib/braintree/transaction/customer_details.rb', line 9

def first_name
  @first_name
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/braintree/transaction/customer_details.rb', line 10

def id
  @id
end

#international_phoneObject (readonly)

Returns the value of attribute international_phone.



11
12
13
# File 'lib/braintree/transaction/customer_details.rb', line 11

def international_phone
  @international_phone
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



12
13
14
# File 'lib/braintree/transaction/customer_details.rb', line 12

def last_name
  @last_name
end

#phoneObject (readonly)

Returns the value of attribute phone.



13
14
15
# File 'lib/braintree/transaction/customer_details.rb', line 13

def phone
  @phone
end

#websiteObject (readonly)

Returns the value of attribute website.



14
15
16
# File 'lib/braintree/transaction/customer_details.rb', line 14

def website
  @website
end

Instance Method Details

#inspectObject



20
21
22
23
24
25
26
# File 'lib/braintree/transaction/customer_details.rb', line 20

def inspect
  attr_order = [:id, :first_name, :last_name, :email, :company, :website, :phone, :international_phone, :fax]
  formatted_attrs = attr_order.map do |attr|
    "#{attr}: #{send(attr).inspect}"
  end
  "#<#{formatted_attrs.join(", ")}>"
end