Class: Pago::V2026_04::Models::BenefitCustomSubscriber
- 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", organization: "organization", properties: "properties" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "type", "description", "selectable", "deletable", "is_deleted", "organization_id", "organization", "properties"].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.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
- #organization ⇒ Models::BenefitSubscriberOrganization readonly
-
#organization_id ⇒ String
readonly
The ID of the organization owning the benefit.
- #properties ⇒ Models::BenefitCustomSubscriberProperties readonly
-
#selectable ⇒ Boolean
readonly
Whether the benefit is selectable when creating a product.
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, organization:, properties:) ⇒ BenefitCustomSubscriber
constructor
A new instance of BenefitCustomSubscriber.
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:, organization:, properties:) ⇒ BenefitCustomSubscriber
Returns a new instance of BenefitCustomSubscriber.
2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 |
# File 'lib/pago/v2026_04/models.rb', line 2306 def initialize( id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, organization:, properties: ) 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(:organization, organization) assign(:properties, properties) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
2271 2272 2273 |
# File 'lib/pago/v2026_04/models.rb', line 2271 def created_at @created_at end |
#deletable ⇒ Boolean (readonly)
Whether the benefit is deletable.
2290 2291 2292 |
# File 'lib/pago/v2026_04/models.rb', line 2290 def deletable @deletable end |
#description ⇒ String (readonly)
The description of the benefit.
2282 2283 2284 |
# File 'lib/pago/v2026_04/models.rb', line 2282 def description @description end |
#id ⇒ String (readonly)
The ID of the benefit.
2267 2268 2269 |
# File 'lib/pago/v2026_04/models.rb', line 2267 def id @id end |
#is_deleted ⇒ Boolean (readonly)
Whether the benefit is deleted.
2294 2295 2296 |
# File 'lib/pago/v2026_04/models.rb', line 2294 def is_deleted @is_deleted end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
2275 2276 2277 |
# File 'lib/pago/v2026_04/models.rb', line 2275 def modified_at @modified_at end |
#organization ⇒ Models::BenefitSubscriberOrganization (readonly)
2301 2302 2303 |
# File 'lib/pago/v2026_04/models.rb', line 2301 def organization @organization end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the benefit.
2298 2299 2300 |
# File 'lib/pago/v2026_04/models.rb', line 2298 def organization_id @organization_id end |
#properties ⇒ Models::BenefitCustomSubscriberProperties (readonly)
2304 2305 2306 |
# File 'lib/pago/v2026_04/models.rb', line 2304 def properties @properties end |
#selectable ⇒ Boolean (readonly)
Whether the benefit is selectable when creating a product.
2286 2287 2288 |
# File 'lib/pago/v2026_04/models.rb', line 2286 def selectable @selectable end |
#type ⇒ String (readonly)
2278 2279 2280 |
# File 'lib/pago/v2026_04/models.rb', line 2278 def type @type end |
Class Method Details
.from_json(data) ⇒ BenefitCustomSubscriber?
2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 |
# File 'lib/pago/v2026_04/models.rb', line 2335 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), organization: (data.key?("organization") ? Models::BenefitSubscriberOrganization.from_json(data["organization"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitCustomSubscriberProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |