# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. # typed: true # frozen_string_literal: true require 'sorbet-runtime' require 'faraday' module StackOne module Shared # CampaignValue - The schedule type of the campaign. class CampaignValue < T::Enum enums do IMMEDIATE = new('immediate') SCHEDULED = new('scheduled') RECURRING = new('recurring') CUSTOM = new('custom') TRIGGERED = new('triggered') end end # The schedule type class ScheduleType < StackOne::Utils::FieldAugmented extend T::Sig # The source value of the schedule type. field :source_value, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('source_value') } } # The schedule type of the campaign. field :value, Shared::CampaignValue, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::CampaignValue, false) } } sig { params(source_value: String, value: Shared::CampaignValue).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end # CampaignSchemasValue - The Status of the campaign. class CampaignSchemasValue < T::Enum enums do DRAFT = new('draft') ARCHIVED = new('archived') LIVE = new('live') end end # Status of the Campaign class Status < StackOne::Utils::FieldAugmented extend T::Sig # The source value of the Status. field :source_value, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('source_value') } } # The Status of the campaign. field :value, Shared::CampaignSchemasValue, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::CampaignSchemasValue, false) } } sig { params(source_value: String, value: Shared::CampaignSchemasValue).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end class Campaign < StackOne::Utils::FieldAugmented extend T::Sig field :name, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('name') } } field :archived, T.nilable(T::Boolean), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('archived') } } # channels of the Campaign field :channels, T.nilable(T::Array[Shared::ChannelsEnum]), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('channels') } } # The created_at date field :created_at, T.nilable(DateTime), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } } field :description, T.nilable(String), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('description') } } field :draft, T.nilable(T::Boolean), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('draft') } } # The first_sent_at date field :first_sent_at, T.nilable(DateTime), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('first_sent_at'), 'decoder': Utils.datetime_from_iso_format(true) } } field :id, T.nilable(String), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('id') } } # The last_sent_at date field :last_sent_at, T.nilable(DateTime), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('last_sent_at'), 'decoder': Utils.datetime_from_iso_format(true) } } field :messages, T.nilable(T::Array[Shared::Message]), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('messages') } } # The schedule type field :schedule_type, T.nilable(Shared::ScheduleType), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('schedule_type') } } # Status of the Campaign field :status, T.nilable(Shared::Status), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('status') } } field :tags, T.nilable(T::Array[String]), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('tags') } } # The updated_at date field :updated_at, T.nilable(DateTime), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(true) } } sig { params(name: String, archived: T.nilable(T::Boolean), channels: T.nilable(T::Array[Shared::ChannelsEnum]), created_at: T.nilable(DateTime), description: T.nilable(String), draft: T.nilable(T::Boolean), first_sent_at: T.nilable(DateTime), id: T.nilable(String), last_sent_at: T.nilable(DateTime), messages: T.nilable(T::Array[Shared::Message]), schedule_type: T.nilable(Shared::ScheduleType), status: T.nilable(Shared::Status), tags: T.nilable(T::Array[String]), updated_at: T.nilable(DateTime)).void } def initialize(name: nil, archived: nil, channels: nil, created_at: nil, description: nil, draft: nil, first_sent_at: nil, id: nil, last_sent_at: nil, messages: nil, schedule_type: nil, status: nil, tags: nil, updated_at: nil) @name = name @archived = archived @channels = channels @created_at = created_at @description = description @draft = draft @first_sent_at = first_sent_at @id = id @last_sent_at = last_sent_at @messages = messages @schedule_type = schedule_type @status = status @tags = tags @updated_at = updated_at end end end end