Class: Pago::V2026_04::Models::AlreadyCanceledSubscription
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::AlreadyCanceledSubscription
show all
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary
collapse
- JSON_KEYS =
{
error: "error",
detail: "detail"
}.freeze
- REQUIRED_KEYS =
["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
Returns a new instance of AlreadyCanceledSubscription.
263
264
265
266
267
268
269
270
|
# File 'lib/pago/v2026_04/models.rb', line 263
def initialize(
error:,
detail:
)
super()
assign(:error, error)
assign(:detail, detail)
end
|
Instance Attribute Details
#detail ⇒ String
261
262
263
|
# File 'lib/pago/v2026_04/models.rb', line 261
def detail
@detail
end
|
#error ⇒ String
258
259
260
|
# File 'lib/pago/v2026_04/models.rb', line 258
def error
@error
end
|
Class Method Details
274
275
276
277
278
279
280
281
282
283
284
285
286
|
# File 'lib/pago/v2026_04/models.rb', line 274
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
|