Class: Pago::V2026_04::Models::BenefitSlackSharedChannelCreate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
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::BenefitSlackSharedChannelCreateProperties 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:) ⇒ BenefitSlackSharedChannelCreate
constructor
A new instance of BenefitSlackSharedChannelCreate.
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:) ⇒ BenefitSlackSharedChannelCreate
Returns a new instance of BenefitSlackSharedChannelCreate.
8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 |
# File 'lib/pago/v2026_04/models.rb', line 8242 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.
8229 8230 8231 |
# File 'lib/pago/v2026_04/models.rb', line 8229 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.
8222 8223 8224 |
# File 'lib/pago/v2026_04/models.rb', line 8222 def @metadata end |
#organization_id ⇒ String? (readonly)
The ID of the organization owning the benefit. Required unless you use an organization token.
8233 8234 8235 |
# File 'lib/pago/v2026_04/models.rb', line 8233 def organization_id @organization_id end |
#properties ⇒ Models::BenefitSlackSharedChannelCreateProperties (readonly)
8240 8241 8242 |
# File 'lib/pago/v2026_04/models.rb', line 8240 def properties @properties end |
#type ⇒ String (readonly)
8225 8226 8227 |
# File 'lib/pago/v2026_04/models.rb', line 8225 def type @type end |
#visibility ⇒ String? (readonly)
The visibility of the benefit in the customer portal.
8237 8238 8239 |
# File 'lib/pago/v2026_04/models.rb', line 8237 def visibility @visibility end |
Class Method Details
.from_json(data) ⇒ BenefitSlackSharedChannelCreate?
8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 |
# File 'lib/pago/v2026_04/models.rb', line 8261 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::BenefitSlackSharedChannelCreateProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |