Class: Pago::V2026_04::Models::BenefitFeatureFlagUpdate

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])
{
  metadata: "metadata",
  description: "description",
  visibility: "visibility",
  type: "type",
  properties: "properties"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["type"].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(metadata: ::Pago::UNSET, description: ::Pago::UNSET, visibility: ::Pago::UNSET, type:, properties: ::Pago::UNSET) ⇒ BenefitFeatureFlagUpdate

Returns a new instance of BenefitFeatureFlagUpdate.

Parameters:

  • metadata: (Hash[String, untyped], nil) (defaults to: ::Pago::UNSET)
  • description: (String, nil) (defaults to: ::Pago::UNSET)
  • visibility: (String, nil) (defaults to: ::Pago::UNSET)
  • type: (String)
  • properties: (Models::BenefitFeatureFlagProperties, nil) (defaults to: ::Pago::UNSET)


4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
# File 'lib/pago/v2026_04/models.rb', line 4036

def initialize(
  metadata: ::Pago::UNSET,
  description: ::Pago::UNSET,
  visibility: ::Pago::UNSET,
  type:,
  properties: ::Pago::UNSET
)
  super()
  assign(:metadata, )
  assign(:description, description)
  assign(:visibility, visibility)
  assign(:type, type)
  assign(:properties, properties)
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the benefit. Will be displayed on products having this benefit.

Returns:

  • (String, nil)


4024
4025
4026
# File 'lib/pago/v2026_04/models.rb', line 4024

def description
  @description
end

#metadataHash{String => String, Integer, Float, Boolean} (readonly)

Key-value object allowing you to store additional information.

The key must be a string with a maximum length of 40 characters. The value must be either:

  • A string with a maximum length of 500 characters
  • An integer
  • A floating-point number
  • A boolean

You can store up to 50 key-value pairs.

Returns:

  • (Hash{String => String, Integer, Float, Boolean})


4020
4021
4022
# File 'lib/pago/v2026_04/models.rb', line 4020

def 
  @metadata
end

#propertiesModels::BenefitFeatureFlagProperties? (readonly)



4034
4035
4036
# File 'lib/pago/v2026_04/models.rb', line 4034

def properties
  @properties
end

#typeString (readonly)

Returns:

  • (String)


4031
4032
4033
# File 'lib/pago/v2026_04/models.rb', line 4031

def type
  @type
end

#visibilityString? (readonly)

The visibility of the benefit in the customer portal.

Returns:

  • (String, nil)


4028
4029
4030
# File 'lib/pago/v2026_04/models.rb', line 4028

def visibility
  @visibility
end

Class Method Details

.from_json(data) ⇒ BenefitFeatureFlagUpdate?

Parameters:

  • data (Hash, String, nil)

Returns:



4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
# File 'lib/pago/v2026_04/models.rb', line 4053

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(
      metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET),
      description: (data.key?("description") ? data["description"] : ::Pago::UNSET),
      visibility: (data.key?("visibility") ? data["visibility"] : ::Pago::UNSET),
      type: (data.key?("type") ? data["type"] : ::Pago::UNSET),
      properties: (data.key?("properties") ? Models::BenefitFeatureFlagProperties.from_json(data["properties"]) : ::Pago::UNSET)
    ),
    data
  )
end