src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
private function _convertCreateOrderReferenceForId($request) {
    
        $parameters = array();
        $parameters['Action'] = 'CreateOrderReferenceForId';
        if ($request->isSetId()) {
            $parameters['Id'] =  $request->getId();
        }
        if ($request->isSetSellerId()) {
            $parameters['SellerId'] =  $request->getSellerId();
        }
        if ($request->isSetIdType()) {
            $parameters['IdType'] =  $request->getIdType();
        }
        if ($request->isSetInheritShippingAddress()) {
            $parameters['InheritShippingAddress'] =  $request->getInheritShippingAddress() ? "true" : "false";
        }
        if ($request->isSetConfirmNow()) {
            $parameters['ConfirmNow'] =  $request->getConfirmNow() ? "true" : "false";
        }
        if ($request->isSetOrderReferenceAttributes()) {
            $orderReferenceAttributescreateOrderReferenceForIdRequest = $request->getOrderReferenceAttributes();
            if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetOrderTotal()) {
                $orderTotalorderReferenceAttributes = $orderReferenceAttributescreateOrderReferenceForIdRequest->getOrderTotal();
                if ($orderTotalorderReferenceAttributes->isSetCurrencyCode()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'CurrencyCode'] =  $orderTotalorderReferenceAttributes->getCurrencyCode();
                }
                if ($orderTotalorderReferenceAttributes->isSetAmount()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'Amount'] =  $orderTotalorderReferenceAttributes->getAmount();
                }
            }
            if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetPlatformId()) {
                $parameters['OrderReferenceAttributes' . '.' . 'PlatformId'] =  $orderReferenceAttributescreateOrderReferenceForIdRequest->getPlatformId();
            }
            if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetSellerNote()) {
                $parameters['OrderReferenceAttributes' . '.' . 'SellerNote'] =  $orderReferenceAttributescreateOrderReferenceForIdRequest->getSellerNote();
            }
            if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetSellerOrderAttributes()) {
                $sellerOrderAttributesorderReferenceAttributes = $orderReferenceAttributescreateOrderReferenceForIdRequest->getSellerOrderAttributes();
                if ($sellerOrderAttributesorderReferenceAttributes->isSetSellerOrderId()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'SellerOrderId'] =  $sellerOrderAttributesorderReferenceAttributes->getSellerOrderId();
                }
                if ($sellerOrderAttributesorderReferenceAttributes->isSetStoreName()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'StoreName'] =  $sellerOrderAttributesorderReferenceAttributes->getStoreName();
                }
                if ($sellerOrderAttributesorderReferenceAttributes->isSetOrderItemCategories()) {
                    $orderItemCategoriessellerOrderAttributes = $sellerOrderAttributesorderReferenceAttributes->getOrderItemCategories();
                    foreach  ($orderItemCategoriessellerOrderAttributes->getOrderItemCategory() as $orderItemCategoryorderItemCategoriesIndex => $orderItemCategoryorderItemCategories) {
                        $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'OrderItemCategories' . '.' . 'OrderItemCategory' . '.'  . ($orderItemCategoryorderItemCategoriesIndex + 1)] =  $orderItemCategoryorderItemCategories;
                    }
                }
                if ($sellerOrderAttributesorderReferenceAttributes->isSetCustomInformation()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'CustomInformation'] =  $sellerOrderAttributesorderReferenceAttributes->getCustomInformation();
                }
            }
        }
    
        return $parameters;
    }
private function _convertCreateOrderReferenceForId($request) {
    
        $parameters = array();
        $parameters['Action'] = 'CreateOrderReferenceForId';
        if ($request->isSetId()) {
            $parameters['Id'] =  $request->getId();
        }
        if ($request->isSetSellerId()) {
            $parameters['SellerId'] =  $request->getSellerId();
        }
        if ($request->isSetIdType()) {
            $parameters['IdType'] =  $request->getIdType();
        }
        if ($request->isSetInheritShippingAddress()) {
            $parameters['InheritShippingAddress'] =  $request->getInheritShippingAddress() ? "true" : "false";
        }
        if ($request->isSetConfirmNow()) {
            $parameters['ConfirmNow'] =  $request->getConfirmNow() ? "true" : "false";
        }
        if ($request->isSetOrderReferenceAttributes()) {
            $orderReferenceAttributescreateOrderReferenceForIdRequest = $request->getOrderReferenceAttributes();
            if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetOrderTotal()) {
                $orderTotalorderReferenceAttributes = $orderReferenceAttributescreateOrderReferenceForIdRequest->getOrderTotal();
                if ($orderTotalorderReferenceAttributes->isSetCurrencyCode()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'CurrencyCode'] =  $orderTotalorderReferenceAttributes->getCurrencyCode();
                }
                if ($orderTotalorderReferenceAttributes->isSetAmount()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'Amount'] =  $orderTotalorderReferenceAttributes->getAmount();
                }
            }
            if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetPlatformId()) {
                $parameters['OrderReferenceAttributes' . '.' . 'PlatformId'] =  $orderReferenceAttributescreateOrderReferenceForIdRequest->getPlatformId();
            }
            if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetSellerNote()) {
                $parameters['OrderReferenceAttributes' . '.' . 'SellerNote'] =  $orderReferenceAttributescreateOrderReferenceForIdRequest->getSellerNote();
            }
            if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetSellerOrderAttributes()) {
                $sellerOrderAttributesorderReferenceAttributes = $orderReferenceAttributescreateOrderReferenceForIdRequest->getSellerOrderAttributes();
                if ($sellerOrderAttributesorderReferenceAttributes->isSetSellerOrderId()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'SellerOrderId'] =  $sellerOrderAttributesorderReferenceAttributes->getSellerOrderId();
                }
                if ($sellerOrderAttributesorderReferenceAttributes->isSetStoreName()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'StoreName'] =  $sellerOrderAttributesorderReferenceAttributes->getStoreName();
                }
                if ($sellerOrderAttributesorderReferenceAttributes->isSetOrderItemCategories()) {
                    $orderItemCategoriessellerOrderAttributes = $sellerOrderAttributesorderReferenceAttributes->getOrderItemCategories();
                    foreach  ($orderItemCategoriessellerOrderAttributes->getOrderItemCategory() as $orderItemCategoryorderItemCategoriesIndex => $orderItemCategoryorderItemCategories) {
                        $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'OrderItemCategories' . '.' . 'OrderItemCategory' . '.'  . ($orderItemCategoryorderItemCategoriesIndex + 1)] =  $orderItemCategoryorderItemCategories;
                    }
                }
                if ($sellerOrderAttributesorderReferenceAttributes->isSetCustomInformation()) {
                    $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'CustomInformation'] =  $sellerOrderAttributesorderReferenceAttributes->getCustomInformation();
                }
            }
        }
    
        return $parameters;
    }
private function _convertCreateOrderReferenceForId ( $ request ) { $ parameters = array ( ) ; $ parameters [ 'Action' ] = 'CreateOrderReferenceForId' ; if ( $ request -> isSetId ( ) ) { $ parameters [ 'Id' ] = $ request -> getId ( ) ; } if ( $ request -> isSetSellerId ( ) ) { $ parameters [ 'SellerId' ] = $ request -> getSellerId ( ) ; } if ( $ request -> isSetIdType ( ) ) { $ parameters [ 'IdType' ] = $ request -> getIdType ( ) ; } if ( $ request -> isSetInheritShippingAddress ( ) ) { $ parameters [ 'InheritShippingAddress' ] = $ request -> getInheritShippingAddress ( ) ? "true" : "false" ; } if ( $ request -> isSetConfirmNow ( ) ) { $ parameters [ 'ConfirmNow' ] = $ request -> getConfirmNow ( ) ? "true" : "false" ; } if ( $ request -> isSetOrderReferenceAttributes ( ) ) { $ orderReferenceAttributescreateOrderReferenceForIdRequest = $ request -> getOrderReferenceAttributes ( ) ; if ( $ orderReferenceAttributescreateOrderReferenceForIdRequest -> isSetOrderTotal ( ) ) { $ orderTotalorderReferenceAttributes = $ orderReferenceAttributescreateOrderReferenceForIdRequest -> getOrderTotal ( ) ; if ( $ orderTotalorderReferenceAttributes -> isSetCurrencyCode ( ) ) { $ parameters [ 'OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'CurrencyCode' ] = $ orderTotalorderReferenceAttributes -> getCurrencyCode ( ) ; } if ( $ orderTotalorderReferenceAttributes -> isSetAmount ( ) ) { $ parameters [ 'OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'Amount' ] = $ orderTotalorderReferenceAttributes -> getAmount ( ) ; } } if ( $ orderReferenceAttributescreateOrderReferenceForIdRequest -> isSetPlatformId ( ) ) { $ parameters [ 'OrderReferenceAttributes' . '.' . 'PlatformId' ] = $ orderReferenceAttributescreateOrderReferenceForIdRequest -> getPlatformId ( ) ; } if ( $ orderReferenceAttributescreateOrderReferenceForIdRequest -> isSetSellerNote ( ) ) { $ parameters [ 'OrderReferenceAttributes' . '.' . 'SellerNote' ] = $ orderReferenceAttributescreateOrderReferenceForIdRequest -> getSellerNote ( ) ; } if ( $ orderReferenceAttributescreateOrderReferenceForIdRequest -> isSetSellerOrderAttributes ( ) ) { $ sellerOrderAttributesorderReferenceAttributes = $ orderReferenceAttributescreateOrderReferenceForIdRequest -> getSellerOrderAttributes ( ) ; if ( $ sellerOrderAttributesorderReferenceAttributes -> isSetSellerOrderId ( ) ) { $ parameters [ 'OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'SellerOrderId' ] = $ sellerOrderAttributesorderReferenceAttributes -> getSellerOrderId ( ) ; } if ( $ sellerOrderAttributesorderReferenceAttributes -> isSetStoreName ( ) ) { $ parameters [ 'OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'StoreName' ] = $ sellerOrderAttributesorderReferenceAttributes -> getStoreName ( ) ; } if ( $ sellerOrderAttributesorderReferenceAttributes -> isSetOrderItemCategories ( ) ) { $ orderItemCategoriessellerOrderAttributes = $ sellerOrderAttributesorderReferenceAttributes -> getOrderItemCategories ( ) ; foreach ( $ orderItemCategoriessellerOrderAttributes -> getOrderItemCategory ( ) as $ orderItemCategoryorderItemCategoriesIndex => $ orderItemCategoryorderItemCategories ) { $ parameters [ 'OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'OrderItemCategories' . '.' . 'OrderItemCategory' . '.' . ( $ orderItemCategoryorderItemCategoriesIndex + 1 ) ] = $ orderItemCategoryorderItemCategories ; } } if ( $ sellerOrderAttributesorderReferenceAttributes -> isSetCustomInformation ( ) ) { $ parameters [ 'OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'CustomInformation' ] = $ sellerOrderAttributesorderReferenceAttributes -> getCustomInformation ( ) ; } } } return $ parameters ; }
Convert CreateOrderReferenceForIdRequest to name value pairs
Convert CreateOrderReferenceForIdRequest to name value pairs