Class: Dyn::Messaging::Accounts
- Inherits:
-
Object
- Object
- Dyn::Messaging::Accounts
- Defined in:
- lib/dyn/messaging/accounts.rb
Instance Method Summary collapse
- #create(username, password, companyname, phone, address, city, state, zipcode, country, timezone, bounceurl, spamurl, unsubscribeurl, tracelinks, trackunsubscribes, generatenewapikey) ⇒ Object
- #destroy(username) ⇒ Object
-
#initialize(dyn) ⇒ Accounts
constructor
A new instance of Accounts.
- #list(startindex = "0") ⇒ Object
- #list_xheaders ⇒ Object
- #update_xheaders(xh1, xh2, xh3, xh4) ⇒ Object
Constructor Details
#initialize(dyn) ⇒ Accounts
Returns a new instance of Accounts.
22 23 24 |
# File 'lib/dyn/messaging/accounts.rb', line 22 def initialize(dyn) @dyn = dyn end |
Instance Method Details
#create(username, password, companyname, phone, address, city, state, zipcode, country, timezone, bounceurl, spamurl, unsubscribeurl, tracelinks, trackunsubscribes, generatenewapikey) ⇒ Object
30 31 32 |
# File 'lib/dyn/messaging/accounts.rb', line 30 def create(username, password, companyname, phone, address, city, state, zipcode, country, timezone, bounceurl, spamurl, unsubscribeurl, tracelinks, trackunsubscribes, generatenewapikey) @dyn.post("#{resource_path}", {username:username, password:password, companyname:companyname, phone:phone, address:address, city:city, state:state, zipcode:zipcode, country:country, timezone:timezone, bounceurl:bounceurl, spamurl:spamurl, unsubscribeurl:unsubscribeurl, tracelinks:tracelinks, trackunsubscribes:trackunsubscribes, generatenewapikey:generatenewapikey}) end |
#destroy(username) ⇒ Object
34 35 36 |
# File 'lib/dyn/messaging/accounts.rb', line 34 def destroy(username) @dyn.post("#{resource_path}/delete", {username:username}) end |
#list(startindex = "0") ⇒ Object
26 27 28 |
# File 'lib/dyn/messaging/accounts.rb', line 26 def list(startindex="0") @dyn.get("#{resource_path}", {startindex:startindex}) end |
#list_xheaders ⇒ Object
38 39 40 |
# File 'lib/dyn/messaging/accounts.rb', line 38 def list_xheaders @dyn.get("#{resource_path}/xheaders") end |
#update_xheaders(xh1, xh2, xh3, xh4) ⇒ Object
42 43 44 |
# File 'lib/dyn/messaging/accounts.rb', line 42 def update_xheaders(xh1, xh2, xh3, xh4) @dyn.post("#{resource_path}/xheaders", {xheader1:xh1,xheader2:xh2,xheader3:xh3,xheader4:xh4}) end |