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 18 |
# File 'lib/ppe_api/legal_status.rb', line 11 def self.get_by_name(name) unless name.nil? || name.empty? res, data = Config.http.post("/api/legal_status/name", "name=#{name}") res.value return LegalStatus.parse(data) unless data.nil? || data.empty? end return nil end |
Instance Method Details
#==(legal_status) ⇒ Object
20 21 22 23 |
# File 'lib/ppe_api/legal_status.rb', line 20 def ==(legal_status) return false if legal_status.nil? legal_status.name==self.name end |
#to_xml(options = {}) ⇒ Object
25 26 27 |
# File 'lib/ppe_api/legal_status.rb', line 25 def to_xml(={}) self.as_json.to_xml({:root => "legal-status"}.merge()) end |