Class: AmazonSES::StatObject
- Inherits:
-
Object
- Object
- AmazonSES::StatObject
- Defined in:
- lib/amazon_ses/stats.rb
Instance Attribute Summary collapse
-
#max_24_hour_send ⇒ Object
Returns the value of attribute max_24_hour_send.
-
#max_send_rate ⇒ Object
Returns the value of attribute max_send_rate.
-
#sent_last_24_hours ⇒ Object
Returns the value of attribute sent_last_24_hours.
Instance Method Summary collapse
-
#initialize(secret, key) ⇒ StatObject
constructor
A new instance of StatObject.
- #reached_quota? ⇒ Boolean
Constructor Details
#initialize(secret, key) ⇒ StatObject
Returns a new instance of StatObject.
22 23 24 25 26 27 28 |
# File 'lib/amazon_ses/stats.rb', line 22 def initialize(secret,key) resp = Stats.send_quota(secret,key) hash = XmlSimple.xml_in(resp.body) @sent_last_24_hours = hash["GetSendQuotaResult"][0]["SentLast24Hours"][0].to_i @max_send_rate = hash["GetSendQuotaResult"][0]["MaxSendRate"][0].to_i @max_24_hour_send = hash["GetSendQuotaResult"][0]["Max24HourSend"][0].to_i end |
Instance Attribute Details
#max_24_hour_send ⇒ Object
Returns the value of attribute max_24_hour_send.
20 21 22 |
# File 'lib/amazon_ses/stats.rb', line 20 def max_24_hour_send @max_24_hour_send end |
#max_send_rate ⇒ Object
Returns the value of attribute max_send_rate.
20 21 22 |
# File 'lib/amazon_ses/stats.rb', line 20 def max_send_rate @max_send_rate end |
#sent_last_24_hours ⇒ Object
Returns the value of attribute sent_last_24_hours.
20 21 22 |
# File 'lib/amazon_ses/stats.rb', line 20 def sent_last_24_hours @sent_last_24_hours end |
Instance Method Details
#reached_quota? ⇒ Boolean
29 30 31 |
# File 'lib/amazon_ses/stats.rb', line 29 def reached_quota? @sent_last_24_hours >= @max_24_hour_send end |