Class: Braintree::Transaction::CustomerDetails
- Inherits:
-
Object
- Object
- Braintree::Transaction::CustomerDetails
- Includes:
- BaseModule
- Defined in:
- lib/braintree/transaction/customer_details.rb
Instance Attribute Summary collapse
-
#company ⇒ Object
readonly
Returns the value of attribute company.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#fax ⇒ Object
readonly
Returns the value of attribute fax.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#international_phone ⇒ Object
readonly
Returns the value of attribute international_phone.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#website ⇒ Object
readonly
Returns the value of attribute website.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ CustomerDetails
constructor
A new instance of CustomerDetails.
- #inspect ⇒ Object
Methods included from BaseModule
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
#company ⇒ Object (readonly)
Returns the value of attribute company.
6 7 8 |
# File 'lib/braintree/transaction/customer_details.rb', line 6 def company @company end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
7 8 9 |
# File 'lib/braintree/transaction/customer_details.rb', line 7 def email @email end |
#fax ⇒ Object (readonly)
Returns the value of attribute fax.
8 9 10 |
# File 'lib/braintree/transaction/customer_details.rb', line 8 def fax @fax end |
#first_name ⇒ Object (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 |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/braintree/transaction/customer_details.rb', line 10 def id @id end |
#international_phone ⇒ Object (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_name ⇒ Object (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 |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
13 14 15 |
# File 'lib/braintree/transaction/customer_details.rb', line 13 def phone @phone end |
#website ⇒ Object (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
#inspect ⇒ Object
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 |