Class: WhopSDK::Models::SocialAccountPost

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

Defined Under Namespace

Modules: CallToAction

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:, call_to_action:, destination_url:, media_url:, thumbnail_url:) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::SocialAccountPost for more details.

Parameters:

  • id (String)

    The platform's own identifier for the post or media. Use it to reference the pos

  • call_to_action (Symbol, WhopSDK::Models::SocialAccountPost::CallToAction, nil)

    The post's call-to-action button, for example shop_now (Facebook only; null for

  • destination_url (String, nil)

    The URL the post's call-to-action drives to (Facebook only; null for Instagram).

  • media_url (String, nil)

    The URL of the post's media — the image for image posts, the playable video file

  • thumbnail_url (String, nil)

    Poster image for video posts; null for image posts, where media_url is already t



# File 'lib/whop_sdk/models/social_account_post.rb', line 41

Instance Attribute Details

#call_to_actionSymbol, ...

The post's call-to-action button, for example shop_now (Facebook only; null for Instagram).

Parameters:

  • value (WhopSDK::Models::SocialAccountPost::call_to_action, nil)

Returns:



18
# File 'lib/whop_sdk/models/social_account_post.rb', line 18

required :call_to_action, enum: -> { WhopSDK::SocialAccountPost::CallToAction }, nil?: true

#destination_urlString?

The URL the post's call-to-action drives to (Facebook only; null for Instagram).

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


24
# File 'lib/whop_sdk/models/social_account_post.rb', line 24

required :destination_url, String, nil?: true

#idString

The platform's own identifier for the post or media. Use it to reference the post on an ad.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/social_account_post.rb', line 11

required :id, String

#media_urlString?

The URL of the post's media — the image for image posts, the playable video file for video posts. Meta signs these and they expire after roughly 24 hours, so don't store them.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


32
# File 'lib/whop_sdk/models/social_account_post.rb', line 32

required :media_url, String, nil?: true

#thumbnail_urlString?

Poster image for video posts; null for image posts, where media_url is already the image. Signed and short-lived like media_url.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


39
# File 'lib/whop_sdk/models/social_account_post.rb', line 39

required :thumbnail_url, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


31
# File 'sig/whop_sdk/models/social_account_post.rbs', line 31

def to_hash: -> {