Class: InfusionApi::Api
- Inherits:
-
Object
- Object
- InfusionApi::Api
- Defined in:
- lib/infusion_api.rb
Instance Method Summary collapse
-
#contact_add(data) ⇒ Object
—————————————————- —————- Contact Service Calls ————- —————————————————-.
- #contact_find ⇒ Object
- #contact_load(id, return_fields) ⇒ Object
- #contact_save ⇒ Object
-
#initialize(app_name, key) ⇒ Api
constructor
A new instance of Api.
Constructor Details
#initialize(app_name, key) ⇒ Api
Returns a new instance of Api.
6 7 8 9 10 11 12 13 |
# File 'lib/infusion_api.rb', line 6 def initialize(app_name, key) @key = key @client = XMLRPC::Client.new3({'host' => app_name, 'path' => '/api/xmlrpc', 'port' => 443, 'use_ssl' => true}) self end |
Instance Method Details
#contact_add(data) ⇒ Object
—————- Contact Service Calls ————-
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/infusion_api.rb', line 20 def contact_add(data) c_id = send_call("ContactService.add", data) if data.has_key?("Email") # TODO: add email_optin end c_id end |
#contact_find ⇒ Object
35 36 37 |
# File 'lib/infusion_api.rb', line 35 def contact_find() end |
#contact_load(id, return_fields) ⇒ Object
31 32 33 |
# File 'lib/infusion_api.rb', line 31 def contact_load(id, return_fields) send_call("ContactService.load", id, return_fields) end |
#contact_save ⇒ Object
39 40 41 |
# File 'lib/infusion_api.rb', line 39 def contact_save() end |