Create order

REST: POST /order/email/domain/new/{duration}
@param domain [required] Domain name which will be linked to this mx account
@param offer [required] Offer for your new mx account
@param duration [required] Duration
@deprecated
517029
public OvhOrder email_domain_new_duration_POST(String duration, String domain, OvhOfferEnum offer) throws IOException {
		String qPath = "/order/email/domain/new/{duration}";
		StringBuilder sb = path(qPath, duration);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "domain", domain);
		addBody(o, "offer", offer);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, OvhOrder.class);
	}
1309552
public OvhOrder hosting_web_serviceName_cdn_duration_POST(String serviceName, String duration, OvhCdnOfferEnum offer) throws IOException {
		String qPath = "/order/hosting/web/{serviceName}/cdn/{duration}";
		StringBuilder sb = path(qPath, serviceName, duration);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "offer", offer);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, OvhOrder.class);
	}
51332
def create_domain(self, name, body):
        
        url = '{0}/domain/{1}'.format(self.server, name)
        return self.__post(url, body)
399549
function newBid(serverBid, rtbBid, bidderRequest) {
  const bid = {
    requestId: serverBid.uuid,
    cpm: 0.00,
    creativeId: rtbBid.creative_id,
    dealId: 99999999,
    currency: 'USD',
    netRevenue: true,
    ttl: 300,
    appnexus: {
      buyerMemberId: rtbBid.buyer_member_id
    }
  };

  if (rtbBid.rtb.video) {
    Object.assign(bid, {
      width: rtbBid.rtb.video.player_width,
      height: rtbBid.rtb.video.player_height,
      vastUrl: rtbBid.rtb.video.asset_url,
      vastImpUrl: rtbBid.notify_url,
      ttl: 3600
    });
    // This supports Outstream Video
    if (rtbBid.renderer_url) {
      const rendererOptions = utils.deepAccess(
        bidderRequest.bids[0],
        'renderer.options'
      );

      Object.assign(bid, {
        adResponse: serverBid,
        renderer: newRenderer(bid.adUnitCode, rtbBid, rendererOptions)
      });
      bid.adResponse.ad = bid.adResponse.ads[0];
      bid.adResponse.ad.video = bid.adResponse.ad.rtb.video;
    }
  } else if (rtbBid.rtb[NATIVE]) {
    const nativeAd = rtbBid.rtb[NATIVE];
    bid[NATIVE] = {
      title: nativeAd.title,
      body: nativeAd.desc,
      cta: nativeAd.ctatext,
      sponsoredBy: nativeAd.sponsored,
      clickUrl: nativeAd.link.url,
      clickTrackers: nativeAd.link.click_trackers,
      impressionTrackers: nativeAd.impression_trackers,
      javascriptTrackers: nativeAd.javascript_trackers,
    };
    if (nativeAd.main_img) {
      bid['native'].image = {
        url: nativeAd.main_img.url,
        height: nativeAd.main_img.height,
        width: nativeAd.main_img.width,
      };
    }
    if (nativeAd.icon) {
      bid['native'].icon = {
        url: nativeAd.icon.url,
        height: nativeAd.icon.height,
        width: nativeAd.icon.width,
      };
    }
  } else {
    Object.assign(bid, {
      width: rtbBid.rtb.banner.width,
      height: rtbBid.rtb.banner.height,
      ad: rtbBid.rtb.banner.content
    });
    try {
      const url = rtbBid.rtb.trackers[0].impression_urls[0];
      const tracker = utils.createTrackPixelHtml(url);
      bid.ad += tracker;
    } catch (error) {
      utils.logError('Error appending tracking pixel', error);
    }
  }

  return bid;
}
691434
@SuppressWarnings("unused")
    public static Query createWithTimeout(Service service, Domain domain, int timeout) {
        return new Query(service, domain, timeout);
    }
494815
public String create(Request request, Response response, Long duration)
	{
		return createStringBuilder(request, response, duration).toString();
	}
340820
public Client createWithEmailAndDescription( String email, String description ) {
    ParameterMap<String, String> params = new ParameterMap<String, String>();
    if( StringUtils.isNotBlank( email ) )
      params.add( "email", email );
    if( StringUtils.isNotBlank( description ) )
      params.add( "description", description );

    return RestfulUtils.create( ClientService.PATH, params, Client.class, super.httpClient );
  }
129613
def create_record(self, domain, name, _type, data, params=None):
        ''' 
        '''
        params = update_params(params, {
            'domain': domain,
            'name': name,
            'type': _type,
            'data': data
        })
        return self.request('/v1/dns/create_record', params, 'POST')
1112156
func (s *OffersService) New(currency string, amount, rate float64, period int64, direction string) (Offer, error) {

	payload := map[string]interface{}{
		"currency":  currency,
		"amount":    strconv.FormatFloat(amount, 'f', -1, 32),
		"rate":      strconv.FormatFloat(rate, 'f', -1, 32),
		"period":    strconv.FormatInt(period, 10),
		"direction": direction,
	}

	req, err := s.client.newAuthenticatedRequest("POST", "offers/new", payload)

	if err != nil {
		return Offer{}, err
	}

	var offer = &Offer{}
	_, err = s.client.do(req, offer)

	if err != nil {
		return Offer{}, err
	}

	return *offer, nil

}
260929
def create(self, email, tos=1, options=None):
        
        data = {'email': email,
                'terms_of_service': str(tos)}
        if options:
            data.update(options)

        return self.post(self.base_url, body=json.dumps(data))
1226930
def create_deliveryserver(self, domainid, data):
        """"""
        return self.api_call(
            ENDPOINTS['deliveryservers']['new'],
            dict(domainid=domainid),
            body=data)
1268950
function newBid(serverBid, rtbBid, bidderRequest) {
  const bidRequest = utils.getBidRequest(serverBid.uuid, [bidderRequest]);
  const bid = {
    requestId: serverBid.uuid,
    cpm: rtbBid.cpm,
    creativeId: rtbBid.creative_id,
    dealId: rtbBid.deal_id,
    currency: 'USD',
    netRevenue: true,
    ttl: 300,
    adUnitCode: bidRequest.adUnitCode,
    appnexus: {
      buyerMemberId: rtbBid.buyer_member_id,
      dealPriority: rtbBid.deal_priority,
      dealCode: rtbBid.deal_code
    }
  };

  if (rtbBid.rtb.video) {
    Object.assign(bid, {
      width: rtbBid.rtb.video.player_width,
      height: rtbBid.rtb.video.player_height,
      vastUrl: rtbBid.rtb.video.asset_url,
      vastImpUrl: rtbBid.notify_url,
      ttl: 3600
    });

    const videoContext = utils.deepAccess(bidRequest, 'mediaTypes.video.context');
    if (videoContext === ADPOD) {
      const iabSubCatId = getIabSubCategory(bidRequest.bidder, rtbBid.brand_category_id);
      bid.meta = {
        iabSubCatId
      };

      bid.video = {
        context: ADPOD,
        durationSeconds: Math.floor(rtbBid.rtb.video.duration_ms / 1000),
      };
    }

    // This supports Outstream Video
    if (rtbBid.renderer_url) {
      const rendererOptions = utils.deepAccess(
        bidderRequest.bids[0],
        'renderer.options'
      );

      Object.assign(bid, {
        adResponse: serverBid,
        renderer: newRenderer(bid.adUnitCode, rtbBid, rendererOptions)
      });
      bid.adResponse.ad = bid.adResponse.ads[0];
      bid.adResponse.ad.video = bid.adResponse.ad.rtb.video;
    }
  } else if (rtbBid.rtb[NATIVE]) {
    const nativeAd = rtbBid.rtb[NATIVE];
    bid[NATIVE] = {
      title: nativeAd.title,
      body: nativeAd.desc,
      body2: nativeAd.desc2,
      cta: nativeAd.ctatext,
      rating: nativeAd.rating,
      sponsoredBy: nativeAd.sponsored,
      privacyLink: nativeAd.privacy_link,
      address: nativeAd.address,
      downloads: nativeAd.downloads,
      likes: nativeAd.likes,
      phone: nativeAd.phone,
      price: nativeAd.price,
      salePrice: nativeAd.saleprice,
      clickUrl: nativeAd.link.url,
      displayUrl: nativeAd.displayurl,
      clickTrackers: nativeAd.link.click_trackers,
      impressionTrackers: nativeAd.impression_trackers,
      javascriptTrackers: nativeAd.javascript_trackers
    };
    if (nativeAd.main_img) {
      bid['native'].image = {
        url: nativeAd.main_img.url,
        height: nativeAd.main_img.height,
        width: nativeAd.main_img.width,
      };
    }
    if (nativeAd.icon) {
      bid['native'].icon = {
        url: nativeAd.icon.url,
        height: nativeAd.icon.height,
        width: nativeAd.icon.width,
      };
    }
  } else {
    Object.assign(bid, {
      width: rtbBid.rtb.banner.width,
      height: rtbBid.rtb.banner.height,
      ad: rtbBid.rtb.banner.content
    });
    try {
      const url = rtbBid.rtb.trackers[0].impression_urls[0];
      const tracker = utils.createTrackPixelHtml(url);
      bid.ad += tracker;
    } catch (error) {
      utils.logError('Error appending tracking pixel', error);
    }
  }

  return bid;
}
947986
public void domain_migrateDelegationV3toV6_POST(String domain) throws IOException {
		String qPath = "/email/domain/{domain}/migrateDelegationV3toV6";
		StringBuilder sb = path(qPath, domain);
		exec(qPath, "POST", sb.toString(), null);
	}
1083995
func (c Client) New(params *stripe.ApplePayDomainParams) (*stripe.ApplePayDomain, error) {
	domain := &stripe.ApplePayDomain{}
	err := c.B.Call(http.MethodPost, "/v1/apple_pay/domains", c.Key, params, domain)
	return domain, err
}
1321360
def create_domain_name(self,
                           domain_name,
                           certificate_name,
                           certificate_body=None,
                           certificate_private_key=None,
                           certificate_chain=None,
                           certificate_arn=None,
                           lambda_name=None,
                           stage=None,
                           base_path=None):
        

        # This is a Let's Encrypt or custom certificate
        if not certificate_arn:
            agw_response = self.apigateway_client.create_domain_name(
                domainName=domain_name,
                certificateName=certificate_name,
                certificateBody=certificate_body,
                certificatePrivateKey=certificate_private_key,
                certificateChain=certificate_chain
            )
        # This is an AWS ACM-hosted Certificate
        else:
            agw_response = self.apigateway_client.create_domain_name(
                domainName=domain_name,
                certificateName=certificate_name,
                certificateArn=certificate_arn
            )

        api_id = self.get_api_id(lambda_name)
        if not api_id:
            raise LookupError("No API URL to certify found - did you deploy?")

        self.apigateway_client.create_base_path_mapping(
            domainName=domain_name,
            basePath='' if base_path is None else base_path,
            restApiId=api_id,
            stage=stage
        )

        return agw_response['distributionDomainName']
320735
def create(domain, opts = {})
      opts = {name: domain}.merge(opts)
      Mailgun.submit :post, domain_url, opts
    end
158019
public void service_domain_domainName_PUT(String service, String domainName, OvhDomain body) throws IOException {
		String qPath = "/email/pro/{service}/domain/{domainName}";
		StringBuilder sb = path(qPath, service, domainName);
		exec(qPath, "PUT", sb.toString(), body);
	}