Class: Nfe::Generated::Nfeio::ProblemDetails

Inherits:
Data
  • Object
show all
Defined in:
lib/nfe/generated/nfeio/problem_details.rb,
sig/nfe/generated/nfeio/problem_details.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProblemDetails

Returns a new instance of ProblemDetails.

Parameters:

  • detail: (String, nil)
  • instance: (String, nil)
  • status: (Integer, nil)
  • title: (String, nil)
  • type: (String, nil)


15
# File 'sig/nfe/generated/nfeio/problem_details.rbs', line 15

def initialize: (?detail: String?, ?instance: String?, ?status: Integer?, ?title: String?, ?type: String?) -> void

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail

Returns:

  • (Object)

    the current value of detail



9
10
11
# File 'lib/nfe/generated/nfeio/problem_details.rb', line 9

def detail
  @detail
end

#instanceObject (readonly)

Returns the value of attribute instance

Returns:

  • (Object)

    the current value of instance



9
10
11
# File 'lib/nfe/generated/nfeio/problem_details.rb', line 9

def instance
  @instance
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



9
10
11
# File 'lib/nfe/generated/nfeio/problem_details.rb', line 9

def status
  @status
end

#titleObject (readonly)

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



9
10
11
# File 'lib/nfe/generated/nfeio/problem_details.rb', line 9

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/nfe/generated/nfeio/problem_details.rb', line 9

def type
  @type
end

Class Method Details

.from_api(payload) ⇒ instance?

Parameters:

  • payload (Hash[String, untyped], nil)

Returns:



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/nfe/generated/nfeio/problem_details.rb', line 10

def self.from_api(payload)
  return nil if payload.nil?

  new(
    detail: payload["detail"],
    instance: payload["instance"],
    status: payload["status"],
    title: payload["title"],
    type: payload["type"],
  )
end

.newinstance

Parameters:

  • detail: (String, nil)
  • instance: (String, nil)
  • status: (Integer, nil)
  • title: (String, nil)
  • type: (String, nil)

Returns:



14
# File 'sig/nfe/generated/nfeio/problem_details.rbs', line 14

def self.new: (?detail: String?, ?instance: String?, ?status: Integer?, ?title: String?, ?type: String?) -> instance