/** * @test */ public function testNvpToMap() { $arr = $this->object->nvpToMap('requestEnvelope.detailLevel=ReturnAll&requestEnvelope.errorLanguage=en_US&invoice.merchantEmail=jb-us-seller1@paypal.com&invoice.payerEmail=jbui-us-personal1@paypal.com&invoice.items[0].name=product1&invoice.items[0].quantity=10.0&invoice.items[0].unitPrice=1.2&invoice.currencyCode=USD&invoice.paymentTerms=DueOnReceipt'); $this->assertArrayHasKey('requestEnvelope.detailLevel', $arr); $this->assertArrayHasKey('requestEnvelope.errorLanguage', $arr); $this->assertEquals(is_array($arr), true); }
/** * Service Call: CancelPermissions * @param CancelPermissionsRequest $cancelPermissionsRequest * @return CancelPermissionsResponse * @throws APIException */ public function CancelPermissions($cancelPermissionsRequest, $apiUsername = null) { $ret = new CancelPermissionsResponse(); $resp = $this->call("CancelPermissions", $cancelPermissionsRequest, $apiUsername); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }
/** * Service Call: GetUserLimits * @param GetUserLimitsRequest $getUserLimitsRequest * @return GetUserLimitsResponse * @throws APIException */ public function GetUserLimits($getUserLimitsRequest, $apiUsername = null) { $ret = new GetUserLimitsResponse(); $resp = $this->call("GetUserLimits", $getUserLimitsRequest, $apiUsername); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }
/** * Service Call: GetAdvancedPersonalData * @param GetAdvancedPersonalDataRequest $getAdvancedPersonalDataRequest * @param mixed $apiCredential - Optional API credential - can either be * a username configured in sdk_config.ini or a ICredential object * created dynamically * @return GetAdvancedPersonalDataResponse * @throws APIException */ public function GetAdvancedPersonalData($getAdvancedPersonalDataRequest, $apiCredential = NULL) { $ret = new GetAdvancedPersonalDataResponse(); $resp = $this->call('Permissions', 'GetAdvancedPersonalData', $getAdvancedPersonalDataRequest, $apiCredential); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }
/** * Service Call: SetFundingSourceConfirmed * @param SetFundingSourceConfirmedRequest $setFundingSourceConfirmedRequest * @return SetFundingSourceConfirmedResponse * @throws APIException */ public function SetFundingSourceConfirmed($setFundingSourceConfirmedRequest, $apiUsername = null) { $ret = new SetFundingSourceConfirmedResponse(); $resp = $this->call("SetFundingSourceConfirmed", $setFundingSourceConfirmedRequest, $apiUsername); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }
/** * Service Call: GetPrePaymentDisclosure * @param GetPrePaymentDisclosureRequest $getPrePaymentDisclosureRequest * @param mixed $apiCredential - Optional API credential - can either be * a username configured in sdk_config.ini or a ICredential object * created dynamically * @return GetPrePaymentDisclosureResponse * @throws APIException */ public function GetPrePaymentDisclosure($getPrePaymentDisclosureRequest, $apiCredential = NULL) { $ret = new GetPrePaymentDisclosureResponse(); $resp = $this->call('AdaptivePayments', 'GetPrePaymentDisclosure', $getPrePaymentDisclosureRequest, $apiCredential); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }
/** * Service Call: GetAdvancedPersonalData * @param GetAdvancedPersonalDataRequest $getAdvancedPersonalDataRequest * @return GetAdvancedPersonalDataResponse * @throws APIException */ public function GetAdvancedPersonalData($getAdvancedPersonalDataRequest, $apiUsername = null) { $ret = new GetAdvancedPersonalDataResponse(); $resp = $this->call("GetAdvancedPersonalData", $getAdvancedPersonalDataRequest, $apiUsername); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }
/** * Service Call: GetPrePaymentDisclosure * @param GetPrePaymentDisclosureRequest $getPrePaymentDisclosureRequest * @param mixed $apiCredential - Optional API credential - can either be * a username configured in sdk_config.ini or a ICredential object * created dynamically * @return GetPrePaymentDisclosureResponse * @throws APIException */ public function GetPrePaymentDisclosure($getPrePaymentDisclosureRequest, $apiCredential = NULL) { $apiContext = new PPApiContext($this->config); $handlers = array(new PPPlatformServiceHandler($apiCredential, self::$SDK_NAME, self::$SDK_VERSION)); $ret = new GetPrePaymentDisclosureResponse(); $resp = $this->call('AdaptivePayments', 'GetPrePaymentDisclosure', $getPrePaymentDisclosureRequest, $apiContext, $handlers); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }
/** * @test */ public function deserializeAndSerialize() { $nvpString = "list2(0).field1=somevalue1&list2(0).field2=somevalue2&list2(1).field1=another+value1&list2(1).field2=anothervalue2&list3(0).attrib1=somevalue1&list3(0).attrib2=somevalue2&list3(0)=value+field&list3(1).attrib1=another+value1&list3(2)=anothervalue2"; $newC = new SimpleContainerTestClass(); $newC->init(PPUtils::nvpToMap($nvpString)); //TODO: Mock nvpToMap $this->assertEquals($nvpString, $newC->toNVPString()); }
/** * Service Call: MarkInvoiceAsRefunded * @param MarkInvoiceAsRefundedRequest $markInvoiceAsRefundedRequest * @return MarkInvoiceAsRefundedResponse * @throws APIException */ public function MarkInvoiceAsRefunded($markInvoiceAsRefundedRequest, $apiUsername = null) { $ret = new MarkInvoiceAsRefundedResponse(); $resp = $this->call("MarkInvoiceAsRefunded", $markInvoiceAsRefundedRequest, $apiUsername); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }
/** * Service Call: UpdateComplianceStatus * @param UpdateComplianceStatusRequest $updateComplianceStatusRequest * @param mixed $apiCredential - Optional API credential - can either be * a username configured in sdk_config.ini or a ICredential object * created dynamically * @return UpdateComplianceStatusResponse * @throws APIException */ public function UpdateComplianceStatus($updateComplianceStatusRequest, $apiCredential = NULL) { $ret = new UpdateComplianceStatusResponse(); $apiContext = new PPApiContext($this->config); $handlers = array(new PPPlatformServiceHandler($apiCredential, self::$SDK_NAME, self::$SDK_VERSION)); $resp = $this->call('AdaptiveAccounts', 'UpdateComplianceStatus', $updateComplianceStatusRequest, $apiContext, $handlers); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }
/** * Service Call: GetAdvancedPersonalData * @param GetAdvancedPersonalDataRequest $getAdvancedPersonalDataRequest * @param mixed $apiCredential - Optional API credential - can either be * a username configured in sdk_config.ini or a ICredential object * created dynamically * @return GetAdvancedPersonalDataResponse * @throws APIException */ public function GetAdvancedPersonalData($getAdvancedPersonalDataRequest, $apiCredential = NULL) { $ret = new GetAdvancedPersonalDataResponse(); $apiContext = new PPApiContext($this->config); $handlers = array(new PPPlatformServiceHandler($apiCredential, self::$SDK_NAME, self::$SDK_VERSION)); $resp = $this->call('Permissions', 'GetAdvancedPersonalData', $getAdvancedPersonalDataRequest, $apiContext, $handlers); $ret->init(PPUtils::nvpToMap($resp)); return $ret; }