Class: Pago::V2026_04::Models::BenefitSlackSharedChannelUpdate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ metadata: "metadata", description: "description", type: "type", properties: "properties" }.freeze
- REQUIRED_KEYS =
["type"].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.
- #properties ⇒ Models::BenefitSlackSharedChannelCreateProperties? readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: ::Pago::UNSET, description: ::Pago::UNSET, type:, properties: ::Pago::UNSET) ⇒ BenefitSlackSharedChannelUpdate
constructor
A new instance of BenefitSlackSharedChannelUpdate.
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, type:, properties: ::Pago::UNSET) ⇒ BenefitSlackSharedChannelUpdate
Returns a new instance of BenefitSlackSharedChannelUpdate.
8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 |
# File 'lib/pago/v2026_04/models.rb', line 8584 def initialize( metadata: ::Pago::UNSET, description: ::Pago::UNSET, type:, properties: ::Pago::UNSET ) super() assign(:metadata, ) assign(:description, description) assign(:type, type) assign(:properties, properties) end |
Instance Attribute Details
#description ⇒ String? (readonly)
The description of the benefit. Will be displayed on products having this benefit.
8576 8577 8578 |
# File 'lib/pago/v2026_04/models.rb', line 8576 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.
8572 8573 8574 |
# File 'lib/pago/v2026_04/models.rb', line 8572 def @metadata end |
#properties ⇒ Models::BenefitSlackSharedChannelCreateProperties? (readonly)
8582 8583 8584 |
# File 'lib/pago/v2026_04/models.rb', line 8582 def properties @properties end |
#type ⇒ String (readonly)
8579 8580 8581 |
# File 'lib/pago/v2026_04/models.rb', line 8579 def type @type end |
Class Method Details
.from_json(data) ⇒ BenefitSlackSharedChannelUpdate?
8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 |
# File 'lib/pago/v2026_04/models.rb', line 8599 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), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitSlackSharedChannelCreateProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |