Class: Pago::V2026_04::Models::BenefitLicenseKeysUpdate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ metadata: "metadata", description: "description", visibility: "visibility", 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::BenefitLicenseKeysCreateProperties? 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, description: ::Pago::UNSET, visibility: ::Pago::UNSET, type:, properties: ::Pago::UNSET) ⇒ BenefitLicenseKeysUpdate
constructor
A new instance of BenefitLicenseKeysUpdate.
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, visibility: ::Pago::UNSET, type:, properties: ::Pago::UNSET) ⇒ BenefitLicenseKeysUpdate
Returns a new instance of BenefitLicenseKeysUpdate.
7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 |
# File 'lib/pago/v2026_04/models.rb', line 7274 def initialize( metadata: ::Pago::UNSET, description: ::Pago::UNSET, visibility: ::Pago::UNSET, type:, properties: ::Pago::UNSET ) super() assign(:metadata, ) assign(:description, description) assign(:visibility, visibility) 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.
7262 7263 7264 |
# File 'lib/pago/v2026_04/models.rb', line 7262 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.
7258 7259 7260 |
# File 'lib/pago/v2026_04/models.rb', line 7258 def @metadata end |
#properties ⇒ Models::BenefitLicenseKeysCreateProperties? (readonly)
7272 7273 7274 |
# File 'lib/pago/v2026_04/models.rb', line 7272 def properties @properties end |
#type ⇒ String (readonly)
7269 7270 7271 |
# File 'lib/pago/v2026_04/models.rb', line 7269 def type @type end |
#visibility ⇒ String? (readonly)
The visibility of the benefit in the customer portal.
7266 7267 7268 |
# File 'lib/pago/v2026_04/models.rb', line 7266 def visibility @visibility end |
Class Method Details
.from_json(data) ⇒ BenefitLicenseKeysUpdate?
7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 |
# File 'lib/pago/v2026_04/models.rb', line 7291 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), visibility: (data.key?("visibility") ? data["visibility"] : ::Pago::UNSET), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitLicenseKeysCreateProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |