public function createManagedPartnerBusiness()

in src/FacebookAds/Object/Business.php [1428:1498]


  public function createManagedPartnerBusiness(array $fields = array(), array $params = array(), $pending = false) {
    $this->assureId();

    $param_types = array(
      'ad_account_currency' => 'string',
      'catalog_id' => 'string',
      'child_business_external_id' => 'string',
      'credit_limit' => 'unsigned int',
      'line_of_credit_id' => 'string',
      'name' => 'string',
      'no_ad_account' => 'bool',
      'page_name' => 'string',
      'page_profile_image_url' => 'string',
      'partner_facebook_page_url' => 'string',
      'partner_registration_countries' => 'list<string>',
      'sales_rep_email' => 'string',
      'seller_external_website_url' => 'string',
      'seller_targeting_countries' => 'list<string>',
      'survey_business_type' => 'survey_business_type_enum',
      'survey_num_assets' => 'unsigned int',
      'survey_num_people' => 'unsigned int',
      'timezone_id' => 'unsigned int',
      'vertical' => 'vertical_enum',
    );
    $enums = array(
      'survey_business_type_enum' => array(
        'ADVERTISER',
        'AGENCY',
        'APP_DEVELOPER',
        'PUBLISHER',
      ),
      'vertical_enum' => array(
        'ADVERTISING',
        'AUTOMOTIVE',
        'CONSUMER_PACKAGED_GOODS',
        'ECOMMERCE',
        'EDUCATION',
        'ENERGY_AND_UTILITIES',
        'ENTERTAINMENT_AND_MEDIA',
        'FINANCIAL_SERVICES',
        'GAMING',
        'GOVERNMENT_AND_POLITICS',
        'HEALTH',
        'LUXURY',
        'MARKETING',
        'NON_PROFIT',
        'ORGANIZATIONS_AND_ASSOCIATIONS',
        'OTHER',
        'PROFESSIONAL_SERVICES',
        'RESTAURANT',
        'RETAIL',
        'TECHNOLOGY',
        'TELECOM',
        'TRAVEL',
      ),
    );

    $request = new ApiRequest(
      $this->api,
      $this->data['id'],
      RequestInterface::METHOD_POST,
      '/managed_partner_businesses',
      new AbstractCrudObject(),
      'EDGE',
      array(),
      new TypeChecker($param_types, $enums)
    );
    $request->addParams($params);
    $request->addFields($fields);
    return $pending ? $request : $request->execute();
  }