Class: Pago::V2026_04::Models::BenefitFeatureFlag
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A benefit of type feature_flag.
Use it to grant feature flags with key-value metadata that can be queried via the API and webhooks.
Constant Summary collapse
- JSON_KEYS =
{ id: "id", created_at: "created_at", modified_at: "modified_at", type: "type", description: "description", selectable: "selectable", deletable: "deletable", is_deleted: "is_deleted", organization_id: "organization_id", metadata: "metadata", visibility: "visibility", properties: "properties", visibility_configurable: "visibility_configurable" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "type", "description", "selectable", "deletable", "is_deleted", "organization_id", "metadata", "visibility", "properties", "visibility_configurable"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#deletable ⇒ Boolean
readonly
Whether the benefit is deletable.
-
#description ⇒ String
readonly
The description of the benefit.
-
#id ⇒ String
readonly
The ID of the benefit.
-
#is_deleted ⇒ Boolean
readonly
Whether the benefit is deleted.
- #metadata ⇒ Hash{String => String, Integer, Float, Boolean} readonly
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#organization_id ⇒ String
readonly
The ID of the organization owning the benefit.
- #properties ⇒ Models::BenefitFeatureFlagProperties readonly
-
#selectable ⇒ Boolean
readonly
Whether the benefit is selectable when creating a product.
- #type ⇒ String readonly
- #visibility ⇒ String readonly
- #visibility_configurable ⇒ Boolean readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, metadata:, visibility:, properties:, visibility_configurable:) ⇒ BenefitFeatureFlag
constructor
A new instance of BenefitFeatureFlag.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, metadata:, visibility:, properties:, visibility_configurable:) ⇒ BenefitFeatureFlag
Returns a new instance of BenefitFeatureFlag.
3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 |
# File 'lib/pago/v2026_04/models.rb', line 3684 def initialize( id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, metadata:, visibility:, properties:, visibility_configurable: ) super() assign(:id, id) assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:type, type) assign(:description, description) assign(:selectable, selectable) assign(:deletable, deletable) assign(:is_deleted, is_deleted) assign(:organization_id, organization_id) assign(:metadata, ) assign(:visibility, visibility) assign(:properties, properties) assign(:visibility_configurable, visibility_configurable) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
3643 3644 3645 |
# File 'lib/pago/v2026_04/models.rb', line 3643 def created_at @created_at end |
#deletable ⇒ Boolean (readonly)
Whether the benefit is deletable.
3662 3663 3664 |
# File 'lib/pago/v2026_04/models.rb', line 3662 def deletable @deletable end |
#description ⇒ String (readonly)
The description of the benefit.
3654 3655 3656 |
# File 'lib/pago/v2026_04/models.rb', line 3654 def description @description end |
#id ⇒ String (readonly)
The ID of the benefit.
3639 3640 3641 |
# File 'lib/pago/v2026_04/models.rb', line 3639 def id @id end |
#is_deleted ⇒ Boolean (readonly)
Whether the benefit is deleted.
3666 3667 3668 |
# File 'lib/pago/v2026_04/models.rb', line 3666 def is_deleted @is_deleted end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
3673 3674 3675 |
# File 'lib/pago/v2026_04/models.rb', line 3673 def @metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
3647 3648 3649 |
# File 'lib/pago/v2026_04/models.rb', line 3647 def modified_at @modified_at end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the benefit.
3670 3671 3672 |
# File 'lib/pago/v2026_04/models.rb', line 3670 def organization_id @organization_id end |
#properties ⇒ Models::BenefitFeatureFlagProperties (readonly)
3679 3680 3681 |
# File 'lib/pago/v2026_04/models.rb', line 3679 def properties @properties end |
#selectable ⇒ Boolean (readonly)
Whether the benefit is selectable when creating a product.
3658 3659 3660 |
# File 'lib/pago/v2026_04/models.rb', line 3658 def selectable @selectable end |
#type ⇒ String (readonly)
3650 3651 3652 |
# File 'lib/pago/v2026_04/models.rb', line 3650 def type @type end |
#visibility ⇒ String (readonly)
3676 3677 3678 |
# File 'lib/pago/v2026_04/models.rb', line 3676 def visibility @visibility end |
#visibility_configurable ⇒ Boolean (readonly)
3682 3683 3684 |
# File 'lib/pago/v2026_04/models.rb', line 3682 def visibility_configurable @visibility_configurable end |
Class Method Details
.from_json(data) ⇒ BenefitFeatureFlag?
3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 |
# File 'lib/pago/v2026_04/models.rb', line 3717 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( id: (data.key?("id") ? data["id"] : ::Pago::UNSET), created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), description: (data.key?("description") ? data["description"] : ::Pago::UNSET), selectable: (data.key?("selectable") ? data["selectable"] : ::Pago::UNSET), deletable: (data.key?("deletable") ? data["deletable"] : ::Pago::UNSET), is_deleted: (data.key?("is_deleted") ? data["is_deleted"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET), visibility: (data.key?("visibility") ? data["visibility"] : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitFeatureFlagProperties.from_json(data["properties"]) : ::Pago::UNSET), visibility_configurable: (data.key?("visibility_configurable") ? data["visibility_configurable"] : ::Pago::UNSET) ), data ) end |