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

Creating objects returns instance of AdAccount #38

Closed
thierryjacoel opened this issue Mar 22, 2018 · 0 comments
Closed

Creating objects returns instance of AdAccount #38

thierryjacoel opened this issue Mar 22, 2018 · 0 comments

Comments

@thierryjacoel
Copy link

When using an AdAccount to create an object, such as a campaign, the returned object is an AdAccount where the fields are those of the created object.
eg:

const account = new AdAccount(ACCOUNT_ID);
account.createCampaign(
    ['id', 'name'],
    {
        'name': 'My Campaign',
        'status': 'ACTIVE',
    }
).then(campaign => {
    // do something with the campaign
});

Here the variable campaign is an AdAccount with its name set as My Campaign and its id being the id of the campaign created.

The returned object should be of the type of the object created.

@thierryjacoel thierryjacoel changed the title Creating objects return instance of AdAccount Creating objects returns instance of AdAccount Mar 22, 2018
@vicdus vicdus closed this as completed in bdbadf0 Apr 9, 2018
MihaelKonjevi added a commit to MihaelKonjevi/facebook-nodejs-business-sdk that referenced this issue Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant