Class: CandyCheck::PlayStore::VerificationFailure

Inherits:
Object
  • Object
show all
Includes:
Utils::AttributeReader
Defined in:
lib/candy_check/play_store/verification_failure.rb

Overview

Represents a failing call against the Google API server

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ VerificationFailure

Initializes a new instance which bases on a JSON result from Google API servers

Parameters:

  • attributes (Hash)


13
14
15
# File 'lib/candy_check/play_store/verification_failure.rb', line 13

def initialize(attributes)
  @attributes = attributes || {}
end

Instance Attribute Details

#attributesHash (readonly)

Returns the raw attributes returned from the server.

Returns:

  • (Hash)

    the raw attributes returned from the server



8
9
10
# File 'lib/candy_check/play_store/verification_failure.rb', line 8

def attributes
  @attributes
end

Instance Method Details

#codeFixnum

The code of the failure

Returns:

  • (Fixnum)


19
20
21
# File 'lib/candy_check/play_store/verification_failure.rb', line 19

def code
  read('code') || -1
end

#messageString

The message of the failure

Returns:

  • (String)


25
26
27
# File 'lib/candy_check/play_store/verification_failure.rb', line 25

def message
  read('message') || 'Unknown error'
end