Class: Sentdm::Models::Profiles::CampaignUseCase

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/sentdm/models/profiles/campaign_use_case.rb,
sig/sentdm/models/profiles/campaign_use_case.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: nil, campaign_id: nil, created_at: nil, customer_id: nil, messaging_use_case_us: nil, sample_messages: nil, updated_at: nil) ⇒ Object

Customer-facing use-case representation for the public v3 campaign contract. Exists for the same reason as BrandCampaignV3Response: nesting the TcrCampaignUseCase database entity in a public response means any column added to that table silently becomes part of the customer-facing contract. This DTO is an explicit allowlist, so a new column stays invisible until it is added here on purpose. This mirrors exactly the fields the entity already serialized, so it removes nothing from the current response shape. It only closes the future-leak path.

Parameters:

  • id (String) (defaults to: nil)
  • campaign_id (String) (defaults to: nil)
  • created_at (Time) (defaults to: nil)
  • customer_id (String) (defaults to: nil)
  • messaging_use_case_us (Symbol, Sentdm::Models::Profiles::MessagingUseCaseUs) (defaults to: nil)
  • sample_messages (Array<String>) (defaults to: nil)

    Sample messages submitted to the registry for this use case.

  • updated_at (Time, nil) (defaults to: nil)


# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 45

Instance Attribute Details

#campaign_idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


15
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 15

optional :campaign_id, String, api_name: :campaignId

#created_atTime?

Parameters:

  • (Time)

Returns:

  • (Time, nil)


20
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 20

optional :created_at, Time, api_name: :createdAt

#customer_idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


25
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 25

optional :customer_id, String, api_name: :customerId

#idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


10
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 10

optional :id, String

#messaging_use_case_usSymbol, ...



30
31
32
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 30

optional :messaging_use_case_us,
enum: -> { Sentdm::Profiles::MessagingUseCaseUs },
api_name: :messagingUseCaseUs

#sample_messagesArray<String>?

Sample messages submitted to the registry for this use case.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


38
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 38

optional :sample_messages, Sentdm::Internal::Type::ArrayOf[String], api_name: :sampleMessages

#updated_atTime?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


43
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 43

optional :updated_at, Time, api_name: :updatedAt, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


54
# File 'sig/sentdm/models/profiles/campaign_use_case.rbs', line 54

def to_hash: -> {