Class: Fastlane::Client::ErrorResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ErrorResponse

Returns a new instance of ErrorResponse.



6
7
8
9
10
11
12
13
# File 'lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb', line 6

def initialize(response)
  unless response[:body].nil? || response[:body].empty?
    response_body = JSON.parse(response[:body], symbolize_names: true)
    @code = response_body[:error][:code]
    @message = response_body[:error][:message]
    @status = response_body[:error][:status]
  end
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



4
5
6
# File 'lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb', line 4

def code
  @code
end

#messageObject

Returns the value of attribute message.



4
5
6
# File 'lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb', line 4

def message
  @message
end

#statusObject

Returns the value of attribute status.



4
5
6
# File 'lib/fastlane/plugin/firebase_app_distribution/client/error_response.rb', line 4

def status
  @status
end