Convert GetMyPriceForSKURequest to name value pairs
501207
private function _convertGetMyPriceForSKU($request) {

        $parameters = array();
        $parameters['Action'] = 'GetMyPriceForSKU';
        if ($request->isSetSellerId()) {
            $parameters['SellerId'] =  $request->getSellerId();
        }
        if ($request->isSetMWSAuthToken()) {
            $parameters['MWSAuthToken'] =  $request->getMWSAuthToken();
        }
        if ($request->isSetMarketplaceId()) {
            $parameters['MarketplaceId'] =  $request->getMarketplaceId();
        }
        if ($request->isSetSellerSKUList()) {
            $SellerSKUListGetMyPriceForSKURequest = $request->getSellerSKUList();
            foreach  ($SellerSKUListGetMyPriceForSKURequest->getSellerSKU() as $SellerSKUSellerSKUListIndex => $SellerSKUSellerSKUList) {
                $parameters['SellerSKUList' . '.' . 'SellerSKU' . '.'  . ($SellerSKUSellerSKUListIndex + 1)] =  $SellerSKUSellerSKUList;
            }
        }

        return $parameters;
    }
6572
def to_api_repr(self):
        
        info = super(StructEntry, self).to_api_repr()
        info["jsonPayload"] = self.payload
        return info
1237830
def get_name_value(self):
        
        name, value = self.get()
        if not isinstance(name, list):
            name = [name]
        if not isinstance(value, list):
            value = [value]
        return list(zip(name, value))
674462
def get_name2value_dict(self):
        """"""
        x = {}
        for val, num in self._values:
            x[val] = num
        return x
273358
function getValueFromPayloadPiece(payloadPiece) {
  if (isObject(payloadPiece) && !payloadPiece.id && Object.keys(payloadPiece).length === 1) {
    return Object.values(payloadPiece)[0];
  }

  return payloadPiece;
}
1168917
def get_buy_price(self, **params):
        """"""
        currency_pair = params.get('currency_pair', 'BTC-USD')
        response = self._get('v2', 'prices', currency_pair, 'buy', params=params)
        return self._make_api_object(response, APIObject)
749314
def value_to_string(self, obj):
        """"""
        value = getattr(obj, self.attname)
        return self.get_prep_value(value)
864884
def makeref2namesdct(name2refdct):
    """"""
    ref2namesdct = {}
    for key, values in name2refdct.items():
        for value in values:
            ref2namesdct.setdefault(value, set()).add(key)
    return ref2namesdct
152461
def _to_api_value(self, attribute_type, value):
        """"""

        if not value:
            return None

        if isinstance(attribute_type, properties.Instance):
            return value.to_api()

        if isinstance(attribute_type, properties.List):
            return self._parse_api_value_list(value)

        return attribute_type.serialize(value)
142321
function propertyValuePairsToObject(pairs) {
  var values = {}

  pairs.forEach(function(pair) {
    values[pair[0]] = pair[1]
  })

  return values
}
372781
def parse_querystring(self, req, name, field):
        """"""
        return core.get_value(req.args, name, field)
552814
def _get_value_for_serialization(self, data, name, spec):
        
        name = self.property_name_map[name]
        return getattr(data, name, None)
246035
def parse_querystring(self, req: Request, name: str, field: Field) -> typing.Any:
        """"""
        return core.get_value(req.query, name, field)
629493
def to_array(self):
        
        array = super(ShippingOption, self).to_array()
        array['id'] = u(self.id)  # py2: type unicode, py3: type str

        array['title'] = u(self.title)  # py2: type unicode, py3: type str

        array['prices'] = self._as_array(self.prices)  # type list of LabeledPrice

        return array
551784
def MapParamNames(params, request_type):
    """"""
    return [encoding.GetCustomJsonFieldMapping(request_type, json_name=p) or p
            for p in params]
192977
def encode_request(name, values):
    
    client_message = ClientMessage(payload_size=calculate_size(name, values))
    client_message.set_message_type(REQUEST_TYPE)
    client_message.set_retryable(RETRYABLE)
    client_message.append_str(name)
    client_message.append_int(len(values))
    for values_item in values:
        client_message.append_data(values_item)
    client_message.update_frame_length()
    return client_message
885061
public QrPayResponse qrPay(QrPayRequest request, Boolean convert){

        checkPayParams(request);

        Map<String, Object> respData = doQrPay(request, TradeType.NATIVE);

        String codeUrl = String.valueOf(respData.get(WepayField.CODE_URL));
        if (convert){
            try {
                codeUrl = LIANTU_URL + URLEncoder.encode(codeUrl, "UTF-8");
            } catch (UnsupportedEncodingException e) {
                throw new WepayException(e);
            }
        }

        String prepayId = String.valueOf(respData.get(WepayField.PREPAY_ID));

        QrPayResponse resp = new QrPayResponse();
        resp.setCodeUrl(codeUrl);
        resp.setPrepayId(prepayId);

        return resp;
    }