class AWS::SimpleEmailService::Identity

@attr_reader [String] verification_status

@attr_reader [String,nil] verification_token

Attributes

identity[R]

@return [String] Returns the email address or domain name for

this identity.

Public Class Methods

new(email_address_or_domain, options = {}) click to toggle source

@private

# File lib/aws/simple_email_service/identity.rb, line 24
def initialize email_address_or_domain, options = {}
  @identity = email_address_or_domain
  super
end

Public Instance Methods

delete() click to toggle source

Deletes the current identity. @return [nil]

# File lib/aws/simple_email_service/identity.rb, line 67
def delete
  client.delete_identity(:identity => identity)  
  nil
end
domain?() click to toggle source

@return [Boolean] Returns true if this {Identity} represents a

domain.
# File lib/aws/simple_email_service/identity.rb, line 49
def domain?
  !email_address?
end
email_address?() click to toggle source

@return [Boolean] Returns true if this {Identity} represents an

email address.
# File lib/aws/simple_email_service/identity.rb, line 43
def email_address?
  identity =~ %r@/ ? true : false
end
exists?() click to toggle source

@return [Boolean] Returns true if the identity exists.

# File lib/aws/simple_email_service/identity.rb, line 73
def exists?
  !!get_resource[:verification_attributes][identity]
end
pending?() click to toggle source

@return [Boolean] Returns true if verification for this email

address/domain is still pending.
# File lib/aws/simple_email_service/identity.rb, line 61
def pending?
  verification_status == 'Pending'
end
verified?() click to toggle source

@return [Boolean] Returns true if this email address/domain has

been verified.
# File lib/aws/simple_email_service/identity.rb, line 55
def verified?
  verification_status == 'Success'
end

Protected Instance Methods

get_resource(attr = nil) click to toggle source
# File lib/aws/simple_email_service/identity.rb, line 83
def get_resource attr = nil
  client_opts = {}
  client_opts[:identities] = [identity]
  client.get_identity_verification_attributes(client_opts)
end
resource_identifiers() click to toggle source
# File lib/aws/simple_email_service/identity.rb, line 79
def resource_identifiers
  [[:identity, identity]]
end