Class: UntitledApi::ApiV1OrgsMxtunnels400ErrorException

Inherits:
APIException
  • Object
show all
Defined in:
lib/untitled_api/exceptions/api_v1_orgs_mxtunnels400_error_exception.rb

Overview

Api V1 Orgs Mxtunnels 400 Error class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, response) ⇒ ApiV1OrgsMxtunnels400ErrorException

The constructor.

Parameters:

  • The (String)

    reason for raising an exception.

  • The (HttpResponse)

    HttpReponse of the API call.



27
28
29
30
31
# File 'lib/untitled_api/exceptions/api_v1_orgs_mxtunnels400_error_exception.rb', line 27

def initialize(reason, response)
  super(reason, response)
  hash = APIHelper.json_deserialize(@response.raw_body)
  unbox(hash)
end

Instance Attribute Details

#detailObject

TODO: Write general description for this method

Returns:

  • (Object)


14
15
16
# File 'lib/untitled_api/exceptions/api_v1_orgs_mxtunnels400_error_exception.rb', line 14

def detail
  @detail
end

#idObject

TODO: Write general description for this method

Returns:

  • (Object)


22
23
24
# File 'lib/untitled_api/exceptions/api_v1_orgs_mxtunnels400_error_exception.rb', line 22

def id
  @id
end

#typeObject

TODO: Write general description for this method

Returns:

  • (Object)


18
19
20
# File 'lib/untitled_api/exceptions/api_v1_orgs_mxtunnels400_error_exception.rb', line 18

def type
  @type
end

Instance Method Details

#unbox(hash) ⇒ Object

Populates this object by extracting properties from a hash. response body.

Parameters:

  • The (Hash)

    deserialized response sent by the server in the



36
37
38
39
40
# File 'lib/untitled_api/exceptions/api_v1_orgs_mxtunnels400_error_exception.rb', line 36

def unbox(hash)
  @detail = hash.key?('detail') ? hash['detail'] : SKIP
  @type = hash.key?('type') ? hash['type'] : SKIP
  @id = hash.key?('id') ? hash['id'] : SKIP
end