Class: Pago::V2026_04::Models::PaymentMethodInUseByActiveSubscription

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:) ⇒ PaymentMethodInUseByActiveSubscription

Returns a new instance of PaymentMethodInUseByActiveSubscription.

Parameters:

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


35741
35742
35743
35744
35745
35746
35747
35748
# File 'lib/pago/v2026_04/models.rb', line 35741

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

Instance Attribute Details

#detailString (readonly)

Returns:

  • (String)


35739
35740
35741
# File 'lib/pago/v2026_04/models.rb', line 35739

def detail
  @detail
end

#errorString (readonly)

Returns:

  • (String)


35736
35737
35738
# File 'lib/pago/v2026_04/models.rb', line 35736

def error
  @error
end

Class Method Details

.from_json(data) ⇒ PaymentMethodInUseByActiveSubscription?

Parameters:

  • data (Hash, String, nil)

Returns:



35752
35753
35754
35755
35756
35757
35758
35759
35760
35761
35762
35763
35764
# File 'lib/pago/v2026_04/models.rb', line 35752

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