Class: Braspag::Customer
- Inherits:
-
Object
- Object
- Braspag::Customer
- Includes:
- ActiveAttr::Model
- Defined in:
- lib/cbraspag/core/customer.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
Returns the value of attribute document.
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #convert_to(method) ⇒ Object
- #populate!(method) ⇒ Object
- #to_authorize ⇒ Object
- #to_generate_billet ⇒ Object
Instance Attribute Details
#document ⇒ Object
Returns the value of attribute document.
5 6 7 |
# File 'lib/cbraspag/core/customer.rb', line 5 def document @document end |
#email ⇒ Object
Returns the value of attribute email.
5 6 7 |
# File 'lib/cbraspag/core/customer.rb', line 5 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/cbraspag/core/customer.rb', line 5 def name @name end |
Instance Method Details
#convert_to(method) ⇒ Object
13 14 15 16 17 |
# File 'lib/cbraspag/core/customer.rb', line 13 def convert_to(method) data = {} data = self.send("to_#{method}") if self.respond_to?("to_#{method}") data end |
#populate!(method) ⇒ Object
33 34 35 |
# File 'lib/cbraspag/core/customer.rb', line 33 def populate!(method) end |
#to_authorize ⇒ Object
19 20 21 22 23 |
# File 'lib/cbraspag/core/customer.rb', line 19 def { :customer_name => self.name.to_s } end |
#to_generate_billet ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/cbraspag/core/customer.rb', line 25 def to_generate_billet { :customer_name => self.name.to_s, :customer_id => self.document.to_s, :emails => self.email.to_s } end |