Class: Braspag::Customer

Inherits:
Object
  • Object
show all
Includes:
ActiveAttr::Model
Defined in:
lib/cbraspag/core/customer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#documentObject

Returns the value of attribute document.



5
6
7
# File 'lib/cbraspag/core/customer.rb', line 5

def document
  @document
end

#emailObject

Returns the value of attribute email.



5
6
7
# File 'lib/cbraspag/core/customer.rb', line 5

def email
  @email
end

#nameObject

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_authorizeObject



19
20
21
22
23
# File 'lib/cbraspag/core/customer.rb', line 19

def to_authorize
  {
    :customer_name => self.name.to_s
  }
end

#to_generate_billetObject



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