Class: CommandTower::Messaging::RecipientReadiness::ChannelResult
- Inherits:
-
Data
- Object
- Data
- CommandTower::Messaging::RecipientReadiness::ChannelResult
- Defined in:
- app/services/command_tower/messaging/recipient_readiness/channel_result.rb
Instance Attribute Summary collapse
-
#channel_key ⇒ Object
readonly
Returns the value of attribute channel_key.
-
#eligible_endpoint_count ⇒ Object
readonly
Returns the value of attribute eligible_endpoint_count.
-
#eligible_endpoint_ids ⇒ Object
readonly
Returns the value of attribute eligible_endpoint_ids.
-
#endpoint_count ⇒ Object
readonly
Returns the value of attribute endpoint_count.
-
#evaluated_at ⇒ Object
readonly
Returns the value of attribute evaluated_at.
-
#platform_configured ⇒ Object
readonly
Returns the value of attribute platform_configured.
-
#platform_enabled ⇒ Object
readonly
Returns the value of attribute platform_enabled.
-
#ready ⇒ Object
readonly
Returns the value of attribute ready.
-
#reason_codes ⇒ Object
readonly
Returns the value of attribute reason_codes.
-
#recipient_ready ⇒ Object
readonly
Returns the value of attribute recipient_ready.
-
#resolved_endpoint_id ⇒ Object
readonly
Returns the value of attribute resolved_endpoint_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#verification_required ⇒ Object
readonly
Returns the value of attribute verification_required.
Class Method Summary collapse
Instance Attribute Details
#channel_key ⇒ Object (readonly)
Returns the value of attribute channel_key
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def channel_key @channel_key end |
#eligible_endpoint_count ⇒ Object (readonly)
Returns the value of attribute eligible_endpoint_count
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def eligible_endpoint_count @eligible_endpoint_count end |
#eligible_endpoint_ids ⇒ Object (readonly)
Returns the value of attribute eligible_endpoint_ids
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def eligible_endpoint_ids @eligible_endpoint_ids end |
#endpoint_count ⇒ Object (readonly)
Returns the value of attribute endpoint_count
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def endpoint_count @endpoint_count end |
#evaluated_at ⇒ Object (readonly)
Returns the value of attribute evaluated_at
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def evaluated_at @evaluated_at end |
#platform_configured ⇒ Object (readonly)
Returns the value of attribute platform_configured
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def platform_configured @platform_configured end |
#platform_enabled ⇒ Object (readonly)
Returns the value of attribute platform_enabled
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def platform_enabled @platform_enabled end |
#ready ⇒ Object (readonly)
Returns the value of attribute ready
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def ready @ready end |
#reason_codes ⇒ Object (readonly)
Returns the value of attribute reason_codes
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def reason_codes @reason_codes end |
#recipient_ready ⇒ Object (readonly)
Returns the value of attribute recipient_ready
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def recipient_ready @recipient_ready end |
#resolved_endpoint_id ⇒ Object (readonly)
Returns the value of attribute resolved_endpoint_id
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def resolved_endpoint_id @resolved_endpoint_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def status @status end |
#verification_required ⇒ Object (readonly)
Returns the value of attribute verification_required
6 7 8 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 6 def verification_required @verification_required end |
Class Method Details
.build(channel_key:, ready:, platform_enabled:, platform_configured:, recipient_ready:, status:, reason_codes:, endpoint_count:, eligible_endpoint_count:, eligible_endpoint_ids:, verification_required:, resolved_endpoint_id: nil, evaluated_at: Time.current) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'app/services/command_tower/messaging/recipient_readiness/channel_result.rb', line 21 def self.build( channel_key:, ready:, platform_enabled:, platform_configured:, recipient_ready:, status:, reason_codes:, endpoint_count:, eligible_endpoint_count:, eligible_endpoint_ids:, verification_required:, resolved_endpoint_id: nil, evaluated_at: Time.current ) new( channel_key: channel_key.to_s, ready: !!ready, platform_enabled: !!platform_enabled, platform_configured: !!platform_configured, recipient_ready: !!recipient_ready, status: status.to_s, reason_codes: Array(reason_codes).map(&:to_s).freeze, endpoint_count: Integer(endpoint_count), eligible_endpoint_count: Integer(eligible_endpoint_count), eligible_endpoint_ids: Array(eligible_endpoint_ids).map { |id| Integer(id) }.freeze, resolved_endpoint_id: resolved_endpoint_id.nil? ? nil : Integer(resolved_endpoint_id), verification_required: !!verification_required, evaluated_at:, ).freeze end |