Class: CorreiosSigep::Models::Sender

Inherits:
Object
  • Object
show all
Defined in:
lib/correios_sigep/models/sender.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Sender

Returns a new instance of Sender.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/correios_sigep/models/sender.rb', line 15

def initialize(options={})
  @area_code        = options[:area_code]
  @address          = options[:address]
  @city             = options[:city]
  @complement       = options[:complement]
  @email            = options[:email]
  @identification   = options[:identification]
  @mobile_area_code = options[:mobile_area_code]
  @mobile_phone     = options[:mobile_phone]
  @name             = options[:name]
  @neighborhood     = options[:neighborhood]
  @number           = options[:number]
  @phone            = options[:phone]
  @postal_code      = options[:postal_code]
  @reference        = options[:reference]
  @sms              = options[:sms]
  @state            = options[:state]
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def address
  @address
end

#area_codeObject

Returns the value of attribute area_code.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def area_code
  @area_code
end

#cityObject

Returns the value of attribute city.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def city
  @city
end

#complementObject

Returns the value of attribute complement.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def complement
  @complement
end

#emailObject

Returns the value of attribute email.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def email
  @email
end

#identificationObject

Returns the value of attribute identification.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def identification
  @identification
end

#mobile_area_codeObject

Returns the value of attribute mobile_area_code.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def mobile_area_code
  @mobile_area_code
end

#mobile_phoneObject

Returns the value of attribute mobile_phone.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def mobile_phone
  @mobile_phone
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def name
  @name
end

#neighborhoodObject

Returns the value of attribute neighborhood.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def neighborhood
  @neighborhood
end

#numberObject

Returns the value of attribute number.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def number
  @number
end

#phoneObject

Returns the value of attribute phone.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def phone
  @phone
end

#postal_codeObject

Returns the value of attribute postal_code.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def postal_code
  @postal_code
end

#referenceObject

Returns the value of attribute reference.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def reference
  @reference
end

#smsObject

Returns the value of attribute sms.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def sms
  @sms
end

#stateObject

Returns the value of attribute state.



4
5
6
# File 'lib/correios_sigep/models/sender.rb', line 4

def state
  @state
end

Class Method Details

.build(&block) ⇒ Object



9
10
11
12
13
# File 'lib/correios_sigep/models/sender.rb', line 9

def self.build(&block)
  builder = Builders::Person.new(self)
  builder.instance_eval(&block)
  builder.build
end