Class: AppleID::EventToken::Event

Inherits:
OpenIDConnect::ConnectObject
  • Object
show all
Defined in:
lib/apple_id/event_token/event.rb

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.decode(json_string) ⇒ Object



39
40
41
# File 'lib/apple_id/event_token/event.rb', line 39

def decode(json_string)
  new JSON.parse(json_string).with_indifferent_access
end

Instance Method Details

#account_deleted?Boolean Also known as: account_delete?

Returns:

  • (Boolean)


25
26
27
# File 'lib/apple_id/event_token/event.rb', line 25

def 
  type == Type::ACCOUNT_DELETED
end

Returns:

  • (Boolean)


21
22
23
# File 'lib/apple_id/event_token/event.rb', line 21

def consent_revoked?
  type == Type::CONSENT_REVOKED
end

#email_disabled?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/apple_id/event_token/event.rb', line 17

def email_disabled?
  type == Type::EMAIL_DISABLED
end

#email_enabled?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/apple_id/event_token/event.rb', line 13

def email_enabled?
  type == Type::EMAIL_ENABLED
end

#is_private_email?Boolean

Returns:

  • (Boolean)


30
31
32
33
34
35
36
# File 'lib/apple_id/event_token/event.rb', line 30

def is_private_email?
  if is_private_email.is_a? String
    is_private_email == 'true'
  else
    !!is_private_email
  end
end