Class: Pago::V2026_04::Models::CustomerOrganizationFeatureSettings

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

Overview

Feature flags exposed to the customer portal.

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  member_model_enabled: "member_model_enabled",
  checkout_localization_enabled: "checkout_localization_enabled"
}.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(member_model_enabled: ::Pago::UNSET, checkout_localization_enabled: ::Pago::UNSET) ⇒ CustomerOrganizationFeatureSettings

Returns a new instance of CustomerOrganizationFeatureSettings.

Parameters:

  • member_model_enabled: (Boolean, nil) (defaults to: ::Pago::UNSET)
  • checkout_localization_enabled: (Boolean, nil) (defaults to: ::Pago::UNSET)


18416
18417
18418
18419
18420
18421
18422
18423
# File 'lib/pago/v2026_04/models.rb', line 18416

def initialize(
  member_model_enabled: ::Pago::UNSET,
  checkout_localization_enabled: ::Pago::UNSET
)
  super()
  assign(:member_model_enabled, member_model_enabled)
  assign(:checkout_localization_enabled, checkout_localization_enabled)
end

Instance Attribute Details

#checkout_localization_enabledBoolean (readonly)

Whether localization is enabled for this organization.

Returns:

  • (Boolean)


18414
18415
18416
# File 'lib/pago/v2026_04/models.rb', line 18414

def checkout_localization_enabled
  @checkout_localization_enabled
end

#member_model_enabledBoolean (readonly)

Whether the member model is enabled for this organization.

Returns:

  • (Boolean)


18410
18411
18412
# File 'lib/pago/v2026_04/models.rb', line 18410

def member_model_enabled
  @member_model_enabled
end

Class Method Details

.from_json(data) ⇒ CustomerOrganizationFeatureSettings?

Parameters:

  • data (Hash, String, nil)

Returns:



18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
# File 'lib/pago/v2026_04/models.rb', line 18427

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