Class: PostForMe::Models::SocialPost

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/post_for_me/models/social_post.rb,
sig/post_for_me/models/social_post.rbs

Overview

See Also:

  • PostForMe::Resources::SocialPosts#create

Defined Under Namespace

Modules: Status

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:, account_configurations:, caption:, created_at:, external_id:, media:, platform_configurations:, scheduled_at:, social_accounts:, status:, updated_at:) ⇒ Object

Parameters:

  • id (String)

    Unique identifier of the post

  • account_configurations (Array<PostForMe::Models::AccountConfiguration>, nil)

    Account-specific configurations for the post

  • caption (String)

    Caption text for the post

  • created_at (String)

    Timestamp when the post was created

  • external_id (String, nil)

    Provided unique identifier of the post

  • media (Array<PostForMe::Models::SocialPostMedia>, nil)

    Array of media associated with the post

  • platform_configurations (PostForMe::Models::PlatformConfigurationsDto, nil)

    Platform-specific configurations for the post

  • scheduled_at (String, nil)

    Scheduled date and time for the post

  • social_accounts (Array<PostForMe::Models::SocialAccount>)

    Array of social account IDs for posting

  • status (Symbol, PostForMe::Models::SocialPost::Status)

    Current status of the post: draft, processed, scheduled, or processing

  • updated_at (String)

    Timestamp when the post was last updated



# File 'lib/post_for_me/models/social_post.rb', line 75

Instance Attribute Details

#account_configurationsArray<PostForMe::Models::AccountConfiguration>?

Account-specific configurations for the post

Parameters:

Returns:



17
18
19
# File 'lib/post_for_me/models/social_post.rb', line 17

required :account_configurations,
-> { PostForMe::Internal::Type::ArrayOf[PostForMe::AccountConfiguration] },
nil?: true

#captionString

Caption text for the post

Parameters:

  • value (String)

Returns:

  • (String)


25
# File 'lib/post_for_me/models/social_post.rb', line 25

required :caption, String

#created_atString

Timestamp when the post was created

Parameters:

  • value (String)

Returns:

  • (String)


31
# File 'lib/post_for_me/models/social_post.rb', line 31

required :created_at, String

#external_idString?

Provided unique identifier of the post

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


37
# File 'lib/post_for_me/models/social_post.rb', line 37

required :external_id, String, nil?: true

#idString

Unique identifier of the post

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/post_for_me/models/social_post.rb', line 11

required :id, String

#mediaArray<PostForMe::Models::SocialPostMedia>?

Array of media associated with the post

Parameters:

Returns:



43
# File 'lib/post_for_me/models/social_post.rb', line 43

required :media, -> { PostForMe::Internal::Type::ArrayOf[PostForMe::SocialPostMedia] }, nil?: true

#platform_configurationsPostForMe::Models::PlatformConfigurationsDto?

Platform-specific configurations for the post



49
# File 'lib/post_for_me/models/social_post.rb', line 49

required :platform_configurations, -> { PostForMe::PlatformConfigurationsDto }, nil?: true

#scheduled_atString?

Scheduled date and time for the post

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


55
# File 'lib/post_for_me/models/social_post.rb', line 55

required :scheduled_at, String, nil?: true

#social_accountsArray<PostForMe::Models::SocialAccount>

Array of social account IDs for posting

Parameters:

Returns:



61
# File 'lib/post_for_me/models/social_post.rb', line 61

required :social_accounts, -> { PostForMe::Internal::Type::ArrayOf[PostForMe::SocialAccount] }

#statusSymbol, PostForMe::Models::SocialPost::Status

Current status of the post: draft, processed, scheduled, or processing

Parameters:

  • value (PostForMe::Models::SocialPost::status)

Returns:



67
# File 'lib/post_for_me/models/social_post.rb', line 67

required :status, enum: -> { PostForMe::SocialPost::Status }

#updated_atString

Timestamp when the post was last updated

Parameters:

  • value (String)

Returns:

  • (String)


73
# File 'lib/post_for_me/models/social_post.rb', line 73

required :updated_at, String

Instance Method Details

#to_hash{

Returns:

  • ({)


55
# File 'sig/post_for_me/models/social_post.rbs', line 55

def to_hash: -> {