Class: Pago::V2026_04::Models::BenefitCustomCreateProperties

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

Overview

Properties for creating a benefit of type custom.

Constant Summary collapse

JSON_KEYS =

Returns:

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

Returns:

  • (Array[String])
[].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(note: ::Pago::UNSET) ⇒ BenefitCustomCreateProperties

Returns a new instance of BenefitCustomCreateProperties.

Parameters:

  • note: (String, nil, nil) (defaults to: ::Pago::UNSET)


2193
2194
2195
2196
2197
2198
# File 'lib/pago/v2026_04/models.rb', line 2193

def initialize(
  note: ::Pago::UNSET
)
  super()
  assign(:note, note)
end

Instance Attribute Details

#noteString? (readonly)

Returns:

  • (String, nil, nil)


2191
2192
2193
# File 'lib/pago/v2026_04/models.rb', line 2191

def note
  @note
end

Class Method Details

.from_json(data) ⇒ BenefitCustomCreateProperties?

Parameters:

  • data (Hash, String, nil)

Returns:



2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
# File 'lib/pago/v2026_04/models.rb', line 2202

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(
      note: (data.key?("note") ? data["note"] : ::Pago::UNSET)
    ),
    data
  )
end