Class: Pago::V2026_04::Models::CannotCreateOrganizationError

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  error: "error",
  detail: "detail"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["error", "detail"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw

Constructor Details

#initialize(error:, detail:) ⇒ CannotCreateOrganizationError

Returns a new instance of CannotCreateOrganizationError.

Parameters:

  • error: (String)
  • detail: (String)


8854
8855
8856
8857
8858
8859
8860
8861
# File 'lib/pago/v2026_04/models.rb', line 8854

def initialize(
  error:,
  detail:
)
  super()
  assign(:error, error)
  assign(:detail, detail)
end

Instance Attribute Details

#detailString (readonly)

Returns:

  • (String)


8852
8853
8854
# File 'lib/pago/v2026_04/models.rb', line 8852

def detail
  @detail
end

#errorString (readonly)

Returns:

  • (String)


8849
8850
8851
# File 'lib/pago/v2026_04/models.rb', line 8849

def error
  @error
end

Class Method Details

.from_json(data) ⇒ CannotCreateOrganizationError?

Parameters:

  • data (Hash, String, nil)

Returns:



8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
# File 'lib/pago/v2026_04/models.rb', line 8865

def self.from_json(data)
  data = ::JSON.parse(data) if data.is_a?(String)
  data = ::Pago::Serde.object(data)
  return nil if data.nil?

  wrap_raw(
    new(
      error: (data.key?("error") ? data["error"] : ::Pago::UNSET),
      detail: (data.key?("detail") ? data["detail"] : ::Pago::UNSET)
    ),
    data
  )
end