class IronBank::Describe::Related

Describe a related object in Zuora, e.g., an account has a default payment method

Attributes

doc[R]

Public Class Methods

from_xml(doc) click to toggle source
# File lib/iron_bank/describe/related.rb, line 11
def self.from_xml(doc)
  new(doc)
end
new(doc) click to toggle source
# File lib/iron_bank/describe/related.rb, line 35
def initialize(doc)
  @doc = doc
end

Public Instance Methods

inspect() click to toggle source
# File lib/iron_bank/describe/related.rb, line 27
def inspect
  "#<#{self.class}:0x#{(object_id << 1).to_s(16)} #{name} (#{type})>"
end
label() click to toggle source
# File lib/iron_bank/describe/related.rb, line 23
def label
  doc.at_xpath(".//label").text
end
name() click to toggle source
# File lib/iron_bank/describe/related.rb, line 19
def name
  doc.at_xpath(".//name").text
end
type() click to toggle source
# File lib/iron_bank/describe/related.rb, line 15
def type
  @type ||= doc.attributes["href"].value.split("/").last
end