Class: IronBank::Describe::Related
- Inherits:
-
Object
- Object
- IronBank::Describe::Related
- Defined in:
- lib/iron_bank/describe/related.rb
Overview
Describe a related object in Zuora, e.g., an account has a default payment method
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_xml(doc) ⇒ Object
11 12 13 |
# File 'lib/iron_bank/describe/related.rb', line 11 def self.from_xml(doc) new(doc) end |
Instance Method Details
#inspect ⇒ Object
27 28 29 |
# File 'lib/iron_bank/describe/related.rb', line 27 def inspect "#<#{self.class}:0x#{(object_id << 1).to_s(16)} #{name} (#{type})>" end |
#label ⇒ Object
23 24 25 |
# File 'lib/iron_bank/describe/related.rb', line 23 def label doc.at_xpath(".//label").text end |
#name ⇒ Object
19 20 21 |
# File 'lib/iron_bank/describe/related.rb', line 19 def name doc.at_xpath(".//name").text end |
#type ⇒ Object
15 16 17 |
# File 'lib/iron_bank/describe/related.rb', line 15 def type @type ||= doc.attributes["href"].value.split("/").last end |