Class: Twocheckout::Company
- Inherits:
-
HashObject
- Object
- HashObject
- Twocheckout::Company
- Includes:
- Singleton
- Defined in:
- lib/twocheckout/company.rb
Instance Method Summary collapse
-
#contact_info ⇒ Object
Returns contact info.
-
#initialize ⇒ Company
constructor
Returns company info.
Methods inherited from HashObject
Constructor Details
#initialize ⇒ Company
Returns company info
10 11 12 13 |
# File 'lib/twocheckout/company.rb', line 10 def initialize response = Twocheckout::API.request(:get, 'acct/detail_company_info') super(response['vendor_company_info']) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Twocheckout::HashObject
Instance Method Details
#contact_info ⇒ Object
Returns contact info
18 19 20 21 22 23 24 |
# File 'lib/twocheckout/company.rb', line 18 def contact_info if @contact_info.nil? response = Twocheckout::API.request(:get, 'acct/detail_contact_info') @contact_info = HashObject.new(response['vendor_contact_info']) end @contact_info end |