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
-
#error ⇒ Hash
readonly
The raw attributes returned from the server.
Instance Method Summary collapse
-
#code ⇒ Integer
The code of the failure.
-
#initialize(error) ⇒ 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(error) ⇒ 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(error) @error = error end |
Instance Attribute Details
#error ⇒ 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 error @error end |
Instance Method Details
#code ⇒ Integer
The code of the failure
19 20 21 22 23 |
# File 'lib/candy_check/play_store/verification_failure.rb', line 19 def code Integer(error.status_code) rescue StandardError -1 end |
#message ⇒ String
The message of the failure
27 28 29 |
# File 'lib/candy_check/play_store/verification_failure.rb', line 27 def error. || "Unknown error" end |