Class: TryPaper::Recipient

Inherits:
Object
  • Object
show all
Defined in:
lib/TryPaper/recipient.rb

Overview

address object for recipient address

Defined Under Namespace

Classes: InvalidDataError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = "", address1 = "", address2 = "", city = "", state = "", zip = "") ⇒ Recipient

Returns a new instance of Recipient.



11
12
13
14
15
16
17
18
# File 'lib/TryPaper/recipient.rb', line 11

def initialize(name = "", address1 = "", address2 = "", city = "", state = "", zip = "")
  @name = name
  @address1 = address1
  @address2 = address2
  @city = city
  @state = state
  @zipcode = zip
end

Instance Attribute Details

#address1Object

Returns the value of attribute address1.



8
9
10
# File 'lib/TryPaper/recipient.rb', line 8

def address1
  @address1
end

#address2Object

Returns the value of attribute address2.



8
9
10
# File 'lib/TryPaper/recipient.rb', line 8

def address2
  @address2
end

#cityObject

Returns the value of attribute city.



8
9
10
# File 'lib/TryPaper/recipient.rb', line 8

def city
  @city
end

#formatted_addressObject (readonly)

Returns the value of attribute formatted_address.



9
10
11
# File 'lib/TryPaper/recipient.rb', line 9

def formatted_address
  @formatted_address
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/TryPaper/recipient.rb', line 8

def name
  @name
end

#stateObject

Returns the value of attribute state.



8
9
10
# File 'lib/TryPaper/recipient.rb', line 8

def state
  @state
end

#zipcodeObject

Returns the value of attribute zipcode.



8
9
10
# File 'lib/TryPaper/recipient.rb', line 8

def zipcode
  @zipcode
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

set up recipient configuration prior to submission

Yields:

  • (_self)

Yield Parameters:



33
34
35
# File 'lib/TryPaper/recipient.rb', line 33

def configure
  yield self
end