Class: Pago::V2026_04::Models::BenefitFeatureFlagCreate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema to create a benefit of type feature_flag.
Constant Summary collapse
- JSON_KEYS =
{ metadata: "metadata", type: "type", description: "description", organization_id: "organization_id", visibility: "visibility", properties: "properties" }.freeze
- REQUIRED_KEYS =
["type", "description", "properties"].freeze
Instance Attribute Summary collapse
-
#description ⇒ String
readonly
The description of the benefit.
-
#metadata ⇒ Hash{String => String, Integer, Float, Boolean}
readonly
Key-value object allowing you to store additional information.
-
#organization_id ⇒ String?
readonly
The ID of the organization owning the benefit.
- #properties ⇒ Models::BenefitFeatureFlagCreateProperties readonly
- #type ⇒ String readonly
-
#visibility ⇒ String?
readonly
The visibility of the benefit in the customer portal.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: ::Pago::UNSET, type:, description:, organization_id: ::Pago::UNSET, visibility: ::Pago::UNSET, properties:) ⇒ BenefitFeatureFlagCreate
constructor
A new instance of BenefitFeatureFlagCreate.
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, type:, description:, organization_id: ::Pago::UNSET, visibility: ::Pago::UNSET, properties:) ⇒ BenefitFeatureFlagCreate
Returns a new instance of BenefitFeatureFlagCreate.
3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 |
# File 'lib/pago/v2026_04/models.rb', line 3787 def initialize( metadata: ::Pago::UNSET, type:, description:, organization_id: ::Pago::UNSET, visibility: ::Pago::UNSET, properties: ) super() assign(:metadata, ) assign(:type, type) assign(:description, description) assign(:organization_id, organization_id) assign(:visibility, visibility) assign(:properties, properties) end |
Instance Attribute Details
#description ⇒ String (readonly)
The description of the benefit. Will be displayed on products having this benefit.
3774 3775 3776 |
# File 'lib/pago/v2026_04/models.rb', line 3774 def description @description end |
#metadata ⇒ Hash{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.
3767 3768 3769 |
# File 'lib/pago/v2026_04/models.rb', line 3767 def @metadata end |
#organization_id ⇒ String? (readonly)
The ID of the organization owning the benefit. Required unless you use an organization token.
3778 3779 3780 |
# File 'lib/pago/v2026_04/models.rb', line 3778 def organization_id @organization_id end |
#properties ⇒ Models::BenefitFeatureFlagCreateProperties (readonly)
3785 3786 3787 |
# File 'lib/pago/v2026_04/models.rb', line 3785 def properties @properties end |
#type ⇒ String (readonly)
3770 3771 3772 |
# File 'lib/pago/v2026_04/models.rb', line 3770 def type @type end |
#visibility ⇒ String? (readonly)
The visibility of the benefit in the customer portal.
3782 3783 3784 |
# File 'lib/pago/v2026_04/models.rb', line 3782 def visibility @visibility end |
Class Method Details
.from_json(data) ⇒ BenefitFeatureFlagCreate?
3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 |
# File 'lib/pago/v2026_04/models.rb', line 3806 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), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), description: (data.key?("description") ? data["description"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), visibility: (data.key?("visibility") ? data["visibility"] : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitFeatureFlagCreateProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |