Class: Pago::V2026_04::Models::BenefitDownloadables
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
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::BenefitDownloadablesProperties 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:) ⇒ BenefitDownloadables
constructor
A new instance of BenefitDownloadables.
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:) ⇒ BenefitDownloadables
Returns a new instance of BenefitDownloadables.
3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 |
# File 'lib/pago/v2026_04/models.rb', line 3190 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.
3149 3150 3151 |
# File 'lib/pago/v2026_04/models.rb', line 3149 def created_at @created_at end |
#deletable ⇒ Boolean (readonly)
Whether the benefit is deletable.
3168 3169 3170 |
# File 'lib/pago/v2026_04/models.rb', line 3168 def deletable @deletable end |
#description ⇒ String (readonly)
The description of the benefit.
3160 3161 3162 |
# File 'lib/pago/v2026_04/models.rb', line 3160 def description @description end |
#id ⇒ String (readonly)
The ID of the benefit.
3145 3146 3147 |
# File 'lib/pago/v2026_04/models.rb', line 3145 def id @id end |
#is_deleted ⇒ Boolean (readonly)
Whether the benefit is deleted.
3172 3173 3174 |
# File 'lib/pago/v2026_04/models.rb', line 3172 def is_deleted @is_deleted end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
3179 3180 3181 |
# File 'lib/pago/v2026_04/models.rb', line 3179 def @metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
3153 3154 3155 |
# File 'lib/pago/v2026_04/models.rb', line 3153 def modified_at @modified_at end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the benefit.
3176 3177 3178 |
# File 'lib/pago/v2026_04/models.rb', line 3176 def organization_id @organization_id end |
#properties ⇒ Models::BenefitDownloadablesProperties (readonly)
3185 3186 3187 |
# File 'lib/pago/v2026_04/models.rb', line 3185 def properties @properties end |
#selectable ⇒ Boolean (readonly)
Whether the benefit is selectable when creating a product.
3164 3165 3166 |
# File 'lib/pago/v2026_04/models.rb', line 3164 def selectable @selectable end |
#type ⇒ String (readonly)
3156 3157 3158 |
# File 'lib/pago/v2026_04/models.rb', line 3156 def type @type end |
#visibility ⇒ String (readonly)
3182 3183 3184 |
# File 'lib/pago/v2026_04/models.rb', line 3182 def visibility @visibility end |
#visibility_configurable ⇒ Boolean (readonly)
3188 3189 3190 |
# File 'lib/pago/v2026_04/models.rb', line 3188 def visibility_configurable @visibility_configurable end |
Class Method Details
.from_json(data) ⇒ BenefitDownloadables?
3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 |
# File 'lib/pago/v2026_04/models.rb', line 3223 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::BenefitDownloadablesProperties.from_json(data["properties"]) : ::Pago::UNSET), visibility_configurable: (data.key?("visibility_configurable") ? data["visibility_configurable"] : ::Pago::UNSET) ), data ) end |