Class: Sentdm::Models::Profiles::CampaignUseCase
Instance Attribute Summary collapse
Instance Method Summary
collapse
==, #==, #[], 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
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
#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.
|
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 45
|
Instance Attribute Details
#campaign_id ⇒ String?
15
|
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 15
optional :campaign_id, String, api_name: :campaignId
|
#created_at ⇒ Time?
20
|
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 20
optional :created_at, Time, api_name: :createdAt
|
#customer_id ⇒ String?
25
|
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 25
optional :customer_id, String, api_name: :customerId
|
#id ⇒ String?
10
|
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 10
optional :id, String
|
#messaging_use_case_us ⇒ Symbol, ...
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_messages ⇒ Array<String>?
Sample messages submitted to the registry for this use case.
38
|
# File 'lib/sentdm/models/profiles/campaign_use_case.rb', line 38
optional :sample_messages, Sentdm::Internal::Type::ArrayOf[String], api_name: :sampleMessages
|
#updated_at ⇒ Time?
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 ⇒ {
54
|
# File 'sig/sentdm/models/profiles/campaign_use_case.rbs', line 54
def to_hash: -> {
|