当前位置: 首页>>代码示例>>PHP>>正文


PHP Validation\ArgumentValidator类代码示例

本文整理汇总了PHP中PayPal\Validation\ArgumentValidator的典型用法代码示例。如果您正苦于以下问题:PHP ArgumentValidator类的具体用法?PHP ArgumentValidator怎么用?PHP ArgumentValidator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ArgumentValidator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: subscribedEventTypes

 /**
  * Retrieves the list of events-types subscribed by the given Webhook.
  *
  * @param string $webhookId
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return WebhookEventTypeList
  */
 public static function subscribedEventTypes($webhookId, $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($webhookId, 'webhookId');
     $payLoad = "";
     $json = self::executeCall("/v1/notifications/webhooks/{$webhookId}/event-types", "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new WebhookEventTypeList();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:TimDorand,项目名称:leorunningclub,代码行数:17,代码来源:WebhookEventType.php

示例2: refund

 /**
  * Refund a captured payment by passing the capture_id in the request URI. In addition, include an amount object in the body of the request JSON.
  *
  * @param Refund $refund
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return Refund
  */
 public function refund($refund, $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($this->getId(), "Id");
     ArgumentValidator::validate($refund, 'refund');
     $payLoad = $refund->toJSON();
     $json = self::executeCall("/v1/payments/capture/{$this->getId()}/refund", "POST", $payLoad, null, $apiContext, $restCall);
     $ret = new Refund();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:fengyeno,项目名称:fille,代码行数:18,代码来源:Capture.php

示例3: all

 /**
  * Retrieves a list of Credit Card resources.
  *
  * @param array          $params
  * @param ApiContext     $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall   is the Rest Call Service that is used to make rest calls
  * @return CreditCardList
  */
 public static function all($params, $apiContext = null, $restCall = null)
 {
     if (is_null($params)) {
         $params = array();
     }
     ArgumentValidator::validate($params, 'params');
     $payLoad = "";
     $allowedParams = array('page_size' => 1, 'page' => 1, 'start_time' => 1, 'end_time' => 1, 'sort_order' => 1, 'sort_by' => 1, 'merchant_id' => 1, 'external_card_id' => 1, 'external_customer_id' => 1, 'total_required' => 1);
     $json = self::executeCall("/v1/vault/credit-cards" . "?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new CreditCardList();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:paypal,项目名称:rest-api-sdk-php,代码行数:21,代码来源:CreditCard.php

示例4: cancel

 /**
  * Cancels the unclaimed payment using the items id passed in the request URI. If an unclaimed item is not claimed within 30 days, the funds will be automatically returned to the sender. This call can be used to cancel the unclaimed item prior to the automatic 30-day return.
  *
  * @param string $payoutItemId
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return PayoutItemDetails
  */
 public static function cancel($payoutItemId, $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($payoutItemId, 'payoutItemId');
     $payLoad = "";
     $json = self::executeCall("/v1/payments/payouts-item/{$payoutItemId}/cancel", "POST", $payLoad, null, $apiContext, $restCall);
     $ret = new PayoutItemDetails();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:TimDorand,项目名称:leorunningclub,代码行数:17,代码来源:PayoutItem.php

示例5: update

 /**
  * Update an existing template by passing the template ID to the request URI. In addition, pass a complete template object in the request JSON. Partial updates are not supported.
  *
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return Template
  */
 public function update($apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($this->getTemplateId(), "Id");
     $payLoad = $this->toJSON();
     $json = self::executeCall("/v1/invoicing/templates/{$this->getTemplateId()}", "PUT", $payLoad, null, $apiContext, $restCall);
     $this->fromJson($json);
     return $this;
 }
开发者ID:paypal,项目名称:rest-api-sdk-php,代码行数:15,代码来源:Template.php

示例6: all

 /**
  * List payments in any state (created, approved, failed, etc.). Payments returned are the payments made to the merchant issuing the request.
  *
  * @param array          $params
  * @param ApiContext     $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall   is the Rest Call Service that is used to make rest calls
  * @return PaymentHistory
  */
 public static function all($params, $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($params, 'params');
     $payLoad = "";
     $allowedParams = array('count' => 1, 'start_id' => 1, 'start_index' => 1, 'start_time' => 1, 'end_time' => 1, 'payee_id' => 1, 'sort_by' => 1, 'sort_order' => 1);
     $json = self::executeCall("/v1/payments/payment?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new PaymentHistory();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:Roc4rdho,项目名称:app,代码行数:18,代码来源:Payment.php

示例7: authorize

 /**
  * Authorize an order by passing the order_id in the request URI. In addition, include an amount object in the body of the request JSON.
  *
  * @param Authorization $authorization Authorization Object with Amount value to be authorized
  * @param ApiContext     $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall   is the Rest Call Service that is used to make rest calls
  * @return Authorization
  */
 public function authorize($authorization, $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($this->getId(), "Id");
     ArgumentValidator::validate($authorization, 'Authorization');
     $payLoad = $authorization->toJSON();
     $json = self::executeCall("/v1/payments/orders/{$this->getId()}/authorize", "POST", $payLoad, null, $apiContext, $restCall);
     $ret = new Authorization();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:r8filipe,项目名称:LAPR,代码行数:18,代码来源:Order.php

示例8: qrCode

 /**
  * Generate a QR code for an invoice by passing the invoice ID to the request URI. The request generates a QR code that is 500 pixels in width and height. You can change the dimensions of the returned code by specifying optional query parameters.
  *
  * @param array $params
  * @param string $invoiceId
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return Image
  */
 public static function qrCode($invoiceId, $params = array(), $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($invoiceId, 'invoiceId');
     ArgumentValidator::validate($params, 'params');
     $allowedParams = array('width' => 1, 'height' => 1, 'action' => 1);
     $payLoad = "";
     $json = self::executeCall("/v1/invoicing/invoices/{$invoiceId}/qr-code?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new Image();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:bontiv,项目名称:intrateb,代码行数:20,代码来源:Invoice.php

示例9: transactions

 /**
  * List transactions for a billing agreement by passing the ID of the agreement, as well as the start and end dates of the range of transactions to list, to the request URI.
  *
  * @param string $agreementId
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return AgreementTransactions
  */
 public static function transactions($agreementId, $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($agreementId, 'agreementId');
     $payLoad = "";
     $json = self::executeCall("/v1/payments/billing-agreements/{$agreementId}/transactions", "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new AgreementTransactions();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:aliuadepoju,项目名称:hqpay,代码行数:17,代码来源:Agreement.php

示例10: reauthorize

 /**
  * Reauthorizes an expired Authorization.
  *
  * @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @return Authorization
  */
 public function reauthorize($apiContext = null)
 {
     ArgumentValidator::validate($this->getId(), "Id");
     $payLoad = $this->toJSON();
     if ($apiContext == null) {
         $apiContext = new ApiContext(self::$credential);
     }
     $call = new PayPalRestCall($apiContext);
     $json = $call->execute(array('PayPal\\Handler\\RestHandler'), "/v1/payments/authorization/{$this->getId()}/reauthorize", "POST", $payLoad);
     $this->fromJson($json);
     return $this;
 }
开发者ID:johnmicahmiguel,项目名称:yodaphp,代码行数:18,代码来源:Authorization.php

示例11: testInvalidDataValidate

 /**
  *
  * @dataProvider invalidProvider
  * @expectedException \InvalidArgumentException
  */
 public function testInvalidDataValidate($input)
 {
     $this->assertTrue(ArgumentValidator::validate($input, "Name"));
 }
开发者ID:Roc4rdho,项目名称:app,代码行数:9,代码来源:ArgumentValidatorTest.php

示例12: get

 /**
  * Look up a particular credit financing resource by passing the financing_code in the request URI.
  *
  * @param string         $financing_code
  * @param ApiContext     $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall   is the Rest Call Service that is used to make rest calls
  * @return CreditFinancing
  */
 public static function get($financing_code, $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($financing_code, 'financing_code');
     $payLoad = "";
     $json = self::executeCall("/v1/credit/credit-financing/{$financing_code}", "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new CreditFinancing();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:17,代码来源:CreditFinancing.php

示例13: refund

 /**
  * Creates (and processes) a new Refund Transaction added as a related resource.
  *
  * @param Refund $refund
  * @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @return Refund
  */
 public function refund($refund, $apiContext = null)
 {
     ArgumentValidator::validate($this->getId(), "Id");
     ArgumentValidator::validate($refund, 'refund');
     $payLoad = $refund->toJSON();
     if ($apiContext == null) {
         $apiContext = new ApiContext(self::$credential);
     }
     $call = new PayPalRestCall($apiContext);
     $json = $call->execute(array('PayPal\\Handler\\RestHandler'), "/v1/payments/capture/{$this->getId()}/refund", "POST", $payLoad);
     $ret = new Refund();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:johnmicahmiguel,项目名称:yodaphp,代码行数:21,代码来源:Capture.php

示例14: delete

 /**
  * Delete an existing web experience profile by passing the profile ID to the request URI.
  *
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return bool
  */
 public function delete($apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($this->getId(), "Id");
     $payLoad = "";
     self::executeCall("/v1/payment-experience/web-profiles/{$this->getId()}", "DELETE", $payLoad, null, $apiContext, $restCall);
     return true;
 }
开发者ID:seoduda,项目名称:Patua,代码行数:14,代码来源:WebProfile.php

示例15: searchTransactions

 /**
  * List transactions for a billing agreement by passing the ID of the agreement, as well as the start and end dates of the range of transactions to list, to the request URI.
  *
  * @param string $agreementId
  * @param array $params Parameters for search string. Options: start_date, and end_date
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return AgreementTransactions
  */
 public static function searchTransactions($agreementId, $params = array(), $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($agreementId, 'agreementId');
     ArgumentValidator::validate($params, 'params');
     $allowedParams = array('start_date' => 1, 'end_date' => 1);
     $payLoad = "";
     $json = self::executeCall("/v1/payments/billing-agreements/{$agreementId}/transactions?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new AgreementTransactions();
     $ret->fromJson($json);
     return $ret;
 }
开发者ID:omasterdesign,项目名称:omasterdefault,代码行数:20,代码来源:Agreement.php


注:本文中的PayPal\Validation\ArgumentValidator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。