Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FieldTypes issue related to Ad Account Delivery Estimate #13

Closed
ssankim opened this issue Aug 14, 2017 · 2 comments
Closed

FieldTypes issue related to Ad Account Delivery Estimate #13

ssankim opened this issue Aug 14, 2017 · 2 comments
Labels

Comments

@ssankim
Copy link

ssankim commented Aug 14, 2017

When I request delivery_estimate from edges of ad_account, it raised TypeError. estimate_dau and estimate_mau in Ad Account Delivery Estimate defined as object like below, but both fields returned as integer from API.

https://github.com/facebook/facebook-ruby-ads-sdk/blob/b704d31bb0a94596078e05cb08fbe4d17732c7d1/lib/facebook_ads/ad_objects/ad_account_delivery_estimate.rb#L54
https://github.com/facebook/facebook-ruby-ads-sdk/blob/b704d31bb0a94596078e05cb08fbe4d17732c7d1/lib/facebook_ads/ad_objects/ad_account_delivery_estimate.rb#L55

Other types (like string_type or list) has several ways to handling if inputted different type of value what you expected are inputted. but object type is not, it's always trying parse JSON. bid_estimate defined as object, and it occurred TypeError too. because bid_estimate already has Hash at this point, not JSON string.

I tried like below...

ad_account = FacebookAds::AdAccount.get(<AD_ACCOUNT_ID>, <SESSION>)
ad_account.delivery_estimate(<REQUIRED_PARAMS>).first

# TypeError: no implicit conversion of Hash into String
# from /Users/san/.rvm/gems/ruby-2.3.4/gems/json-1.8.6/lib/json/common.rb:155:in `initialize'
@stale
Copy link

stale bot commented Jan 14, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Jan 14, 2020
@stale
Copy link

stale bot commented Jan 21, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant