Class: Pago::V2026_04::Models::BenefitSlackSharedChannelCreateProperties

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])
{
  slack_integration_id: "slack_integration_id",
  channel_name_template: "channel_name_template",
  private: "private",
  welcome_message: "welcome_message",
  archive_on_revoke: "archive_on_revoke",
  team_invitees: "team_invitees"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["slack_integration_id", "channel_name_template"].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(slack_integration_id:, channel_name_template:, private: ::Pago::UNSET, welcome_message: ::Pago::UNSET, archive_on_revoke: ::Pago::UNSET, team_invitees: ::Pago::UNSET) ⇒ BenefitSlackSharedChannelCreateProperties

Returns a new instance of BenefitSlackSharedChannelCreateProperties.

Parameters:

  • slack_integration_id: (String)
  • channel_name_template: (String)
  • private: (Boolean, nil) (defaults to: ::Pago::UNSET)
  • welcome_message: (String, nil) (defaults to: ::Pago::UNSET)
  • archive_on_revoke: (Boolean, nil) (defaults to: ::Pago::UNSET)
  • team_invitees: (Array[String], nil) (defaults to: ::Pago::UNSET)


8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
# File 'lib/pago/v2026_04/models.rb', line 8310

def initialize(
  slack_integration_id:,
  channel_name_template:,
  private: ::Pago::UNSET,
  welcome_message: ::Pago::UNSET,
  archive_on_revoke: ::Pago::UNSET,
  team_invitees: ::Pago::UNSET
)
  super()
  assign(:slack_integration_id, slack_integration_id)
  assign(:channel_name_template, channel_name_template)
  assign(:private, private)
  assign(:welcome_message, welcome_message)
  assign(:archive_on_revoke, archive_on_revoke)
  assign(:team_invitees, team_invitees)
end

Instance Attribute Details

#archive_on_revokeBoolean (readonly)

Returns:

  • (Boolean)


8305
8306
8307
# File 'lib/pago/v2026_04/models.rb', line 8305

def archive_on_revoke
  @archive_on_revoke
end

#channel_name_templateString (readonly)

Returns:

  • (String)


8296
8297
8298
# File 'lib/pago/v2026_04/models.rb', line 8296

def channel_name_template
  @channel_name_template
end

#privateBoolean (readonly)

Returns:

  • (Boolean)


8299
8300
8301
# File 'lib/pago/v2026_04/models.rb', line 8299

def private
  @private
end

#slack_integration_idString (readonly)

Pago Slack integration to use for this benefit.

Returns:

  • (String)


8293
8294
8295
# File 'lib/pago/v2026_04/models.rb', line 8293

def slack_integration_id
  @slack_integration_id
end

#team_inviteesArray<String> (readonly)

Returns:

  • (Array<String>)


8308
8309
8310
# File 'lib/pago/v2026_04/models.rb', line 8308

def team_invitees
  @team_invitees
end

#welcome_messageString? (readonly)

Returns:

  • (String, nil)


8302
8303
8304
# File 'lib/pago/v2026_04/models.rb', line 8302

def welcome_message
  @welcome_message
end

Class Method Details

.from_json(data) ⇒ BenefitSlackSharedChannelCreateProperties?

Parameters:

  • data (Hash, String, nil)

Returns:



8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
# File 'lib/pago/v2026_04/models.rb', line 8329

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(
      slack_integration_id: (data.key?("slack_integration_id") ? data["slack_integration_id"] : ::Pago::UNSET),
      channel_name_template: (data.key?("channel_name_template") ? data["channel_name_template"] : ::Pago::UNSET),
      private: (data.key?("private") ? data["private"] : ::Pago::UNSET),
      welcome_message: (data.key?("welcome_message") ? data["welcome_message"] : ::Pago::UNSET),
      archive_on_revoke: (data.key?("archive_on_revoke") ? data["archive_on_revoke"] : ::Pago::UNSET),
      team_invitees: (data.key?("team_invitees") ? data["team_invitees"] : ::Pago::UNSET)
    ),
    data
  )
end