Class: GetResponse::DomainProxy
- Inherits:
-
Object
- Object
- GetResponse::DomainProxy
- Defined in:
- lib/get_response/domain_proxy.rb
Overview
Proxy class for domain operations.
Instance Method Summary collapse
-
#all ⇒ Object
Get all domains connected with account.
-
#initialize(connection) ⇒ DomainProxy
constructor
A new instance of DomainProxy.
Constructor Details
#initialize(connection) ⇒ DomainProxy
Returns a new instance of DomainProxy.
6 7 8 |
# File 'lib/get_response/domain_proxy.rb', line 6 def initialize(connection) @connection = connection end |
Instance Method Details
#all ⇒ Object
Get all domains connected with account.
- returns
- GetResponse::Domain
14 15 16 17 18 19 |
# File 'lib/get_response/domain_proxy.rb', line 14 def all domains_attrs = @connection.send_request("get_account_domains")["result"] domains_attrs.map do |id, attrs| GetResponse::Domain.new(attrs.merge("id" => id)) end end |