Class: PPE_API::LegalStatus
- Inherits:
-
Object
- Object
- PPE_API::LegalStatus
- Includes:
- HappyMapper
- Defined in:
- lib/ppe_api/legal_status.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.get_by_name(name) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/ppe_api/legal_status.rb', line 11 def self.get_by_name(name) unless name.nil? || name.empty? res, data = ::DR::Config.http.post("/api/legal_status/name", "name=#{name}") return LegalStatus.parse(data) unless data.nil? || data.empty? end return nil end |
Instance Method Details
#==(legal_status) ⇒ Object
19 20 21 22 |
# File 'lib/ppe_api/legal_status.rb', line 19 def ==(legal_status) return false if legal_status.nil? legal_status.name==self.name end |
#to_xml(options = {}) ⇒ Object
24 25 26 |
# File 'lib/ppe_api/legal_status.rb', line 24 def to_xml(={}) self.as_json.to_xml({:root => "legal-status"}.merge()) end |