Module: XmlConv::Model::PartyContainer
- Included in:
- Bsr, Party, Transaction
- Defined in:
- lib/xmlconv/model/party_container.rb
Instance Attribute Summary collapse
-
#bill_to ⇒ Object
Returns the value of attribute bill_to.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#employee ⇒ Object
Returns the value of attribute employee.
-
#seller ⇒ Object
Returns the value of attribute seller.
-
#ship_to ⇒ Object
Returns the value of attribute ship_to.
Instance Method Summary collapse
Instance Attribute Details
#bill_to ⇒ Object
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 |
#customer ⇒ Object
Returns the value of attribute customer.
7 8 9 |
# File 'lib/xmlconv/model/party_container.rb', line 7 def customer @customer end |
#employee ⇒ Object
Returns the value of attribute employee.
7 8 9 |
# File 'lib/xmlconv/model/party_container.rb', line 7 def employee @employee end |
#seller ⇒ Object
Returns the value of attribute seller.
7 8 9 |
# File 'lib/xmlconv/model/party_container.rb', line 7 def seller @seller end |
#ship_to ⇒ Object
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 |
#parties ⇒ Object
15 16 17 |
# File 'lib/xmlconv/model/party_container.rb', line 15 def parties @parties ||= [] end |