Class: Pago::V2026_04::Models::BenefitSlackSharedChannelSubscriber

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  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 =

Returns:

  • (Array[String])
["id", "created_at", "modified_at", "type", "description", "selectable", "deletable", "is_deleted", "organization_id", "organization", "properties"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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:) ⇒ BenefitSlackSharedChannelSubscriber

Returns a new instance of BenefitSlackSharedChannelSubscriber.

Parameters:



8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
# File 'lib/pago/v2026_04/models.rb', line 8478

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_atString (readonly)

Creation timestamp of the object.

Returns:

  • (String)


8443
8444
8445
# File 'lib/pago/v2026_04/models.rb', line 8443

def created_at
  @created_at
end

#deletableBoolean (readonly)

Whether the benefit is deletable.

Returns:

  • (Boolean)


8462
8463
8464
# File 'lib/pago/v2026_04/models.rb', line 8462

def deletable
  @deletable
end

#descriptionString (readonly)

The description of the benefit.

Returns:

  • (String)


8454
8455
8456
# File 'lib/pago/v2026_04/models.rb', line 8454

def description
  @description
end

#idString (readonly)

The ID of the benefit.

Returns:

  • (String)


8439
8440
8441
# File 'lib/pago/v2026_04/models.rb', line 8439

def id
  @id
end

#is_deletedBoolean (readonly)

Whether the benefit is deleted.

Returns:

  • (Boolean)


8466
8467
8468
# File 'lib/pago/v2026_04/models.rb', line 8466

def is_deleted
  @is_deleted
end

#modified_atString? (readonly)

Last modification timestamp of the object.

Returns:

  • (String, nil)


8447
8448
8449
# File 'lib/pago/v2026_04/models.rb', line 8447

def modified_at
  @modified_at
end

#organizationModels::BenefitSubscriberOrganization (readonly)



8473
8474
8475
# File 'lib/pago/v2026_04/models.rb', line 8473

def organization
  @organization
end

#organization_idString (readonly)

The ID of the organization owning the benefit.

Returns:

  • (String)


8470
8471
8472
# File 'lib/pago/v2026_04/models.rb', line 8470

def organization_id
  @organization_id
end

#propertiesModels::BenefitSlackSharedChannelSubscriberProperties (readonly)



8476
8477
8478
# File 'lib/pago/v2026_04/models.rb', line 8476

def properties
  @properties
end

#selectableBoolean (readonly)

Whether the benefit is selectable when creating a product.

Returns:

  • (Boolean)


8458
8459
8460
# File 'lib/pago/v2026_04/models.rb', line 8458

def selectable
  @selectable
end

#typeString (readonly)

Returns:

  • (String)


8450
8451
8452
# File 'lib/pago/v2026_04/models.rb', line 8450

def type
  @type
end

Class Method Details

.from_json(data) ⇒ BenefitSlackSharedChannelSubscriber?

Parameters:

  • data (Hash, String, nil)

Returns:



8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
# File 'lib/pago/v2026_04/models.rb', line 8507

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::BenefitSlackSharedChannelSubscriberProperties.from_json(data["properties"]) : ::Pago::UNSET)
    ),
    data
  )
end