Class: Pago::V2026_04::Models::BenefitSlackSharedChannelProperties
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ 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 =
["slack_integration_id", "channel_name_template"].freeze
Instance Attribute Summary collapse
-
#archive_on_revoke ⇒ Boolean
readonly
Archive the channel when the benefit is revoked.
-
#channel_name_template ⇒ String
readonly
Template for the channel name.
-
#private ⇒ Boolean
readonly
Create the channel as private (recommended).
-
#slack_integration_id ⇒ String
readonly
Pago Slack integration linked to this benefit.
-
#team_invitees ⇒ Array<String>
readonly
Slack user IDs from the merchant workspace to invite to every channel created for this benefit.
-
#welcome_message ⇒ String?
readonly
Optional message posted to the channel right after creation.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(slack_integration_id:, channel_name_template:, private: ::Pago::UNSET, welcome_message: ::Pago::UNSET, archive_on_revoke: ::Pago::UNSET, team_invitees: ::Pago::UNSET) ⇒ BenefitSlackSharedChannelProperties
constructor
A new instance of BenefitSlackSharedChannelProperties.
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) ⇒ BenefitSlackSharedChannelProperties
Returns a new instance of BenefitSlackSharedChannelProperties.
8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 |
# File 'lib/pago/v2026_04/models.rb', line 8383 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, ) assign(:archive_on_revoke, archive_on_revoke) assign(:team_invitees, team_invitees) end |
Instance Attribute Details
#archive_on_revoke ⇒ Boolean (readonly)
Archive the channel when the benefit is revoked.
8377 8378 8379 |
# File 'lib/pago/v2026_04/models.rb', line 8377 def archive_on_revoke @archive_on_revoke end |
#channel_name_template ⇒ String (readonly)
Template for the channel name. Supports placeholders: customer_name, customer_email_local, and Pago::V2026_04::Models::BenefitSlackSharedChannelProperties.metadatametadata.<key> for any value stored in customer user metadata.
8365 8366 8367 |
# File 'lib/pago/v2026_04/models.rb', line 8365 def channel_name_template @channel_name_template end |
#private ⇒ Boolean (readonly)
Create the channel as private (recommended).
8369 8370 8371 |
# File 'lib/pago/v2026_04/models.rb', line 8369 def private @private end |
#slack_integration_id ⇒ String (readonly)
Pago Slack integration linked to this benefit.
8361 8362 8363 |
# File 'lib/pago/v2026_04/models.rb', line 8361 def slack_integration_id @slack_integration_id end |
#team_invitees ⇒ Array<String> (readonly)
Slack user IDs from the merchant workspace to invite to every channel created for this benefit.
8381 8382 8383 |
# File 'lib/pago/v2026_04/models.rb', line 8381 def team_invitees @team_invitees end |
#welcome_message ⇒ String? (readonly)
Optional message posted to the channel right after creation.
8373 8374 8375 |
# File 'lib/pago/v2026_04/models.rb', line 8373 def @welcome_message end |
Class Method Details
.from_json(data) ⇒ BenefitSlackSharedChannelProperties?
8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 |
# File 'lib/pago/v2026_04/models.rb', line 8402 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 |