xdevplatform / twitter-ruby-ads-sdk

A Twitter supported and maintained Ads API SDK for Ruby.
https://twitterdev.github.io/twitter-ruby-ads-sdk/
MIT License
67 stars 71 forks source link

Video and Image diemensions field absent in respective class #273

Open himanshu-patel-dev opened 4 days ago

himanshu-patel-dev commented 4 days ago

Issue Type: Improvement

Description:
Both classes ImageConversationCard and VideoConversationCard have field (in API side) which have data related to dimensions/size of Video/Image (video_width and video_height in Video Conversation Card and image_display_height and image_display_width in Image Conversation Card). But these fields despite present in API are being dropped in class properties, thus consumer of this library can't assess data like 'image_display_height' on ImageConversationCard till now.

Expected Result:

image_cards = TwitterAds::Creative::ImageConversationCard.all(twitter_account)
image_card = image_cards.first
image_card.image_display_width # should return width dimensions
=> 720
image_card.image_display_height # should return width dimensions
=> 720
# similarly for VideoConversationCard as well

Actual Result:

image_cards = TwitterAds::Creative::ImageConversationCard.all(twitter_account)
image_card = image_cards.first
image_card.image_display_width # raise error
(irb):19:in `<main>': undefined method `image_display_width' for #<TwitterAds::Creative::ImageConversationCard:0x102760 id="8aeum"> (NoMethodError)
image_card.image_display_height # should return width dimensions not nil
(irb):19:in `<main>': undefined method `image_display_height' for #<TwitterAds::Creative::ImageConversationCard:0x102760 id="8aeum"> (NoMethodError)
# similarly for VideoConversationCard as well