Class: CandyCheck::PlayStore::VerificationFailure
- Inherits:
-
Object
- Object
- CandyCheck::PlayStore::VerificationFailure
- 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
-
#attributes ⇒ Hash
readonly
The raw attributes returned from the server.
Instance Method Summary collapse
-
#code ⇒ Fixnum
The code of the failure.
-
#initialize(attributes) ⇒ VerificationFailure
constructor
Initializes a new instance which bases on a JSON result from Google API servers.
-
#message ⇒ String
The message of the failure.
Constructor Details
#initialize(attributes) ⇒ VerificationFailure
Initializes a new instance which bases on a JSON result from Google API servers
13 14 15 |
# File 'lib/candy_check/play_store/verification_failure.rb', line 13 def initialize(attributes) @attributes = attributes || {} end |
Instance Attribute Details
#attributes ⇒ Hash (readonly)
Returns 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
#code ⇒ Fixnum
The code of the failure
19 20 21 |
# File 'lib/candy_check/play_store/verification_failure.rb', line 19 def code read('code') || -1 end |
#message ⇒ String
The message of the failure
25 26 27 |
# File 'lib/candy_check/play_store/verification_failure.rb', line 25 def read('message') || 'Unknown error' end |