Module: XmlConv::Model::PartyContainer

Included in:
Bsr, Party, Transaction
Defined in:
lib/xmlconv/model/party_container.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bill_toObject

Returns the value of attribute bill_to.



7
8
9
# File 'lib/xmlconv/model/party_container.rb', line 7

def bill_to
  @bill_to
end

#customerObject

Returns the value of attribute customer.



7
8
9
# File 'lib/xmlconv/model/party_container.rb', line 7

def customer
  @customer
end

#employeeObject

Returns the value of attribute employee.



7
8
9
# File 'lib/xmlconv/model/party_container.rb', line 7

def employee
  @employee
end

#sellerObject

Returns the value of attribute seller.



7
8
9
# File 'lib/xmlconv/model/party_container.rb', line 7

def seller
  @seller
end

#ship_toObject

Returns the value of attribute ship_to.



7
8
9
# File 'lib/xmlconv/model/party_container.rb', line 7

def ship_to
  @ship_to
end

Instance Method Details

#add_party(party) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/xmlconv/model/party_container.rb', line 8

def add_party(party)
	if((role = party.role) && !role.empty?)
		role = role.gsub(/\B[A-Z]/, '_\&')
		instance_variable_set("@#{role.downcase}", party)
		self.parties.push(party)
	end
end

#partiesObject



15
16
17
# File 'lib/xmlconv/model/party_container.rb', line 15

def parties
	@parties ||= []
end