Class: IronBank::Resources::Account

Inherits:
IronBank::Resource show all
Defined in:
lib/iron_bank/resources/account.rb

Overview

A Zuora account is used for billing purposes: it holds many subscriptions, has many contacts (but only one bill to and one sold to contact), can have a default payment method, hence auto-pay can be activated for this account or not, is billed invoices and can pay them using an electronic payment method (usually a credit card, but PayPal is also accepted by Zuora).

Instance Attribute Summary

Attributes inherited from IronBank::Resource

#remote

Instance Method Summary collapse

Methods inherited from IronBank::Resource

#==, #id, #initialize, #inspect, object_name, #reload, #remove_instance_vars, with_cache, with_local_records

Methods included from Associations::ClassMethods

#with_many, #with_one

Methods included from Metadata

#excluded_fields, #fields, #query_custom_fields, #query_fields, #reset, #schema, #single_resource_query_fields, #with_schema

Methods included from Queryable

#all, #find, #find_each, #first, #where

Methods included from Associations

#with_memoization

Constructor Details

This class inherits a constructor from IronBank::Resource

Instance Method Details

#rootObject



48
49
50
# File 'lib/iron_bank/resources/account.rb', line 48

def root
  parent ? parent.root : self
end

#ultimate_parentObject



44
45
46
# File 'lib/iron_bank/resources/account.rb', line 44

def ultimate_parent
  root if parent
end