Class: ExactTarget::Configuration
- Defined in:
- lib/exact_target/configuration.rb
Overview
Used to set up and modify settings for ExactTarget
Constant Summary collapse
- OPTIONS =
[:base_url, :username, :password, :readonly, :email_whitelist, :email_blacklist, :http_method, :http_open_timeout, :http_read_timeout, :http_proxy].freeze
- STANDARD_READONLY_CALLS =
[:list_add, :list_edit, :list_import, :list_delete, :subscriber_add, :subscriber_edit, :subscriber_delete, :subscriber_masterunsub, :email_add, :email_add_text, :job_send].freeze
Instance Attribute Summary collapse
-
#base_url ⇒ Object
The (optional) base URL for accessing ExactTarget (can be http or https).
-
#email_blacklist ⇒ Object
Returns the value of attribute email_blacklist.
-
#email_whitelist ⇒ Object
(optional) limiting triggeredsend email addresses.
-
#export_folder ⇒ Object
Returns the value of attribute export_folder.
-
#ftp_base_url ⇒ Object
optional params for batch.
-
#ftp_password ⇒ Object
Returns the value of attribute ftp_password.
-
#ftp_username ⇒ Object
Returns the value of attribute ftp_username.
-
#http_method ⇒ Object
The HTTP method to make the request with.
-
#http_open_timeout ⇒ Object
The (optional) HTTP open timeout in seconds (defaults to 2).
-
#http_proxy ⇒ Object
The (optional) HTTP proxy url.
-
#http_read_timeout ⇒ Object
The (optional) HTTP read timeout in seconds (defaults to 5).
-
#import_folder ⇒ Object
Returns the value of attribute import_folder.
-
#logger ⇒ Object
The (optional) logger for outputting request/resposne xml.
-
#password ⇒ Object
The (required) ExactTarget password for making requests.
-
#readonly ⇒ Object
The (optional) readonly flag (defaults to false).
-
#username ⇒ Object
The (required) ExactTarget username for making requests.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #secure? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
50 51 52 53 54 55 56 57 58 |
# File 'lib/exact_target/configuration.rb', line 50 def initialize @base_url = 'https://api.dc1.exacttarget.com/integrate.aspx' @http_open_timeout = 2 @http_read_timeout = 5 @http_method = "get" @readonly = [] @export_folder = 'Export' @import_folder = 'Import' end |
Instance Attribute Details
#base_url ⇒ Object
The (optional) base URL for accessing ExactTarget (can be http or https). Defaults to ‘api.dc1.exacttarget.com/integrate.aspx’
13 14 15 |
# File 'lib/exact_target/configuration.rb', line 13 def base_url @base_url end |
#email_blacklist ⇒ Object
Returns the value of attribute email_blacklist.
41 42 43 |
# File 'lib/exact_target/configuration.rb', line 41 def email_blacklist @email_blacklist end |
#email_whitelist ⇒ Object
(optional) limiting triggeredsend email addresses
40 41 42 |
# File 'lib/exact_target/configuration.rb', line 40 def email_whitelist @email_whitelist end |
#export_folder ⇒ Object
Returns the value of attribute export_folder.
47 48 49 |
# File 'lib/exact_target/configuration.rb', line 47 def export_folder @export_folder end |
#ftp_base_url ⇒ Object
optional params for batch
44 45 46 |
# File 'lib/exact_target/configuration.rb', line 44 def ftp_base_url @ftp_base_url end |
#ftp_password ⇒ Object
Returns the value of attribute ftp_password.
46 47 48 |
# File 'lib/exact_target/configuration.rb', line 46 def ftp_password @ftp_password end |
#ftp_username ⇒ Object
Returns the value of attribute ftp_username.
45 46 47 |
# File 'lib/exact_target/configuration.rb', line 45 def ftp_username @ftp_username end |
#http_method ⇒ Object
The HTTP method to make the request with
34 35 36 |
# File 'lib/exact_target/configuration.rb', line 34 def http_method @http_method end |
#http_open_timeout ⇒ Object
The (optional) HTTP open timeout in seconds (defaults to 2).
25 26 27 |
# File 'lib/exact_target/configuration.rb', line 25 def http_open_timeout @http_open_timeout end |
#http_proxy ⇒ Object
The (optional) HTTP proxy url
31 32 33 |
# File 'lib/exact_target/configuration.rb', line 31 def http_proxy @http_proxy end |
#http_read_timeout ⇒ Object
The (optional) HTTP read timeout in seconds (defaults to 5).
28 29 30 |
# File 'lib/exact_target/configuration.rb', line 28 def http_read_timeout @http_read_timeout end |
#import_folder ⇒ Object
Returns the value of attribute import_folder.
48 49 50 |
# File 'lib/exact_target/configuration.rb', line 48 def import_folder @import_folder end |
#logger ⇒ Object
The (optional) logger for outputting request/resposne xml
22 23 24 |
# File 'lib/exact_target/configuration.rb', line 22 def logger @logger end |
#password ⇒ Object
The (required) ExactTarget password for making requests
19 20 21 |
# File 'lib/exact_target/configuration.rb', line 19 def password @password end |
#readonly ⇒ Object
The (optional) readonly flag (defaults to false)
37 38 39 |
# File 'lib/exact_target/configuration.rb', line 37 def readonly @readonly end |
#username ⇒ Object
The (required) ExactTarget username for making requests
16 17 18 |
# File 'lib/exact_target/configuration.rb', line 16 def username @username end |
Instance Method Details
#secure? ⇒ Boolean
64 65 66 |
# File 'lib/exact_target/configuration.rb', line 64 def secure? !!(base_url =~ /^https:/i) end |
#valid? ⇒ Boolean
60 61 62 |
# File 'lib/exact_target/configuration.rb', line 60 def valid? [:base_url, :username, :password].none? { |f| send(f).nil? } end |