Class: Pago::V2026_04::Models::BenefitCustomSubscriberProperties

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

Overview

Properties available to subscribers for a benefit of type custom.

Constant Summary collapse

JSON_KEYS =

Returns:

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

Returns:

  • (Array[String])
["note"].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:) ⇒ BenefitCustomSubscriberProperties

Returns a new instance of BenefitCustomSubscriberProperties.

Parameters:

  • note: (String, nil, nil)


2369
2370
2371
2372
2373
2374
# File 'lib/pago/v2026_04/models.rb', line 2369

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

Instance Attribute Details

#noteString? (readonly)

Returns:

  • (String, nil, nil)


2367
2368
2369
# File 'lib/pago/v2026_04/models.rb', line 2367

def note
  @note
end

Class Method Details

.from_json(data) ⇒ BenefitCustomSubscriberProperties?

Parameters:

  • data (Hash, String, nil)

Returns:



2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
# File 'lib/pago/v2026_04/models.rb', line 2378

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