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


PHP Sdk\DataObject类代码示例

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


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

示例1: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'bankAccountBban')) {
         if (!is_object($object->bankAccountBban)) {
             throw new UnexpectedValueException('value \'' . print_r($object->bankAccountBban, true) . '\' is not an object');
         }
         $value = new BankAccountBban();
         $this->bankAccountBban = $value->fromObject($object->bankAccountBban);
     }
     if (property_exists($object, 'bankAccountIban')) {
         if (!is_object($object->bankAccountIban)) {
             throw new UnexpectedValueException('value \'' . print_r($object->bankAccountIban, true) . '\' is not an object');
         }
         $value = new BankAccountIban();
         $this->bankAccountIban = $value->fromObject($object->bankAccountIban);
     }
     if (property_exists($object, 'bankData')) {
         if (!is_object($object->bankData)) {
             throw new UnexpectedValueException('value \'' . print_r($object->bankData, true) . '\' is not an object');
         }
         $value = new BankData();
         $this->bankData = $value->fromObject($object->bankData);
     }
     if (property_exists($object, 'swift')) {
         if (!is_object($object->swift)) {
             throw new UnexpectedValueException('value \'' . print_r($object->swift, true) . '\' is not an object');
         }
         $value = new Swift();
         $this->swift = $value->fromObject($object->swift);
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:38,代码来源:BankDetailsResponse.php

示例2: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'creationOutput')) {
         if (!is_object($object->creationOutput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->creationOutput, true) . '\' is not an object');
         }
         $value = new PaymentCreationOutput();
         $this->creationOutput = $value->fromObject($object->creationOutput);
     }
     if (property_exists($object, 'merchantAction')) {
         if (!is_object($object->merchantAction)) {
             throw new UnexpectedValueException('value \'' . print_r($object->merchantAction, true) . '\' is not an object');
         }
         $value = new MerchantAction();
         $this->merchantAction = $value->fromObject($object->merchantAction);
     }
     if (property_exists($object, 'payment')) {
         if (!is_object($object->payment)) {
             throw new UnexpectedValueException('value \'' . print_r($object->payment, true) . '\' is not an object');
         }
         $value = new Payment();
         $this->payment = $value->fromObject($object->payment);
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:31,代码来源:CreatePaymentResult.php

示例3: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'bic')) {
         $this->bic = $object->bic;
     }
     if (property_exists($object, 'category')) {
         $this->category = $object->category;
     }
     if (property_exists($object, 'chipsUID')) {
         $this->chipsUID = $object->chipsUID;
     }
     if (property_exists($object, 'extraInfo')) {
         $this->extraInfo = $object->extraInfo;
     }
     if (property_exists($object, 'poBoxCountry')) {
         $this->poBoxCountry = $object->poBoxCountry;
     }
     if (property_exists($object, 'poBoxLocation')) {
         $this->poBoxLocation = $object->poBoxLocation;
     }
     if (property_exists($object, 'poBoxNumber')) {
         $this->poBoxNumber = $object->poBoxNumber;
     }
     if (property_exists($object, 'poBoxZip')) {
         $this->poBoxZip = $object->poBoxZip;
     }
     if (property_exists($object, 'routingBic')) {
         $this->routingBic = $object->routingBic;
     }
     if (property_exists($object, 'services')) {
         $this->services = $object->services;
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:40,代码来源:Swift.php

示例4: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'billingAddress')) {
         if (!is_object($object->billingAddress)) {
             throw new UnexpectedValueException('value \'' . print_r($object->billingAddress, true) . '\' is not an object');
         }
         $value = new Address();
         $this->billingAddress = $value->fromObject($object->billingAddress);
     }
     if (property_exists($object, 'locale')) {
         $this->locale = $object->locale;
     }
     if (property_exists($object, 'personalInformation')) {
         if (!is_object($object->personalInformation)) {
             throw new UnexpectedValueException('value \'' . print_r($object->personalInformation, true) . '\' is not an object');
         }
         $value = new PersonalInformationRiskAssessment();
         $this->personalInformation = $value->fromObject($object->personalInformation);
     }
     if (property_exists($object, 'shippingAddress')) {
         if (!is_object($object->shippingAddress)) {
             throw new UnexpectedValueException('value \'' . print_r($object->shippingAddress, true) . '\' is not an object');
         }
         $value = new AddressPersonal();
         $this->shippingAddress = $value->fromObject($object->shippingAddress);
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:34,代码来源:CustomerRiskAssessment.php

示例5: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'amount')) {
         $this->amount = $object->amount;
     }
     if (property_exists($object, 'directDebitPaymentMethodSpecificInput')) {
         if (!is_object($object->directDebitPaymentMethodSpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->directDebitPaymentMethodSpecificInput, true) . '\' is not an object');
         }
         $value = new ApprovePaymentNonSepaDirectDebitPaymentMethodSpecificInput();
         $this->directDebitPaymentMethodSpecificInput = $value->fromObject($object->directDebitPaymentMethodSpecificInput);
     }
     if (property_exists($object, 'order')) {
         if (!is_object($object->order)) {
             throw new UnexpectedValueException('value \'' . print_r($object->order, true) . '\' is not an object');
         }
         $value = new OrderApprovePayment();
         $this->order = $value->fromObject($object->order);
     }
     if (property_exists($object, 'sepaDirectDebitPaymentMethodSpecificInput')) {
         if (!is_object($object->sepaDirectDebitPaymentMethodSpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->sepaDirectDebitPaymentMethodSpecificInput, true) . '\' is not an object');
         }
         $value = new ApprovePaymentSepaDirectDebitPaymentMethodSpecificInput();
         $this->sepaDirectDebitPaymentMethodSpecificInput = $value->fromObject($object->sepaDirectDebitPaymentMethodSpecificInput);
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:34,代码来源:ApprovePaymentRequest.php

示例6: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'actionType')) {
         $this->actionType = $object->actionType;
     }
     if (property_exists($object, 'redirectData')) {
         if (!is_object($object->redirectData)) {
             throw new UnexpectedValueException('value \'' . print_r($object->redirectData, true) . '\' is not an object');
         }
         $value = new RedirectData();
         $this->redirectData = $value->fromObject($object->redirectData);
     }
     if (property_exists($object, 'renderingData')) {
         $this->renderingData = $object->renderingData;
     }
     if (property_exists($object, 'showData')) {
         if (!is_array($object->showData) && !is_object($object->showData)) {
             throw new UnexpectedValueException('value \'' . print_r($object->showData, true) . '\' is not an array or object');
         }
         $this->showData = [];
         foreach ($object->showData as $showDataElementObject) {
             $showDataElement = new KeyValuePair();
             $this->showData[] = $showDataElement->fromObject($showDataElementObject);
         }
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:33,代码来源:MerchantAction.php

示例7: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'bankAccountIban')) {
         if (!is_object($object->bankAccountIban)) {
             throw new UnexpectedValueException('value \'' . print_r($object->bankAccountIban, true) . '\' is not an object');
         }
         $value = new BankAccountIban();
         $this->bankAccountIban = $value->fromObject($object->bankAccountIban);
     }
     if (property_exists($object, 'customerContractIdentifier')) {
         $this->customerContractIdentifier = $object->customerContractIdentifier;
     }
     if (property_exists($object, 'debtor')) {
         if (!is_object($object->debtor)) {
             throw new UnexpectedValueException('value \'' . print_r($object->debtor, true) . '\' is not an object');
         }
         $value = new Debtor();
         $this->debtor = $value->fromObject($object->debtor);
     }
     if (property_exists($object, 'isRecurring')) {
         $this->isRecurring = $object->isRecurring;
     }
     if (property_exists($object, 'mandateApproval')) {
         if (!is_object($object->mandateApproval)) {
             throw new UnexpectedValueException('value \'' . print_r($object->mandateApproval, true) . '\' is not an object');
         }
         $value = new MandateApproval();
         $this->mandateApproval = $value->fromObject($object->mandateApproval);
     }
     if (property_exists($object, 'preNotification')) {
         $this->preNotification = $object->preNotification;
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:40,代码来源:MandateSepaDirectDebitWithoutCreditor.php

示例8: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'displayedData')) {
         if (!is_object($object->displayedData)) {
             throw new UnexpectedValueException('value \'' . print_r($object->displayedData, true) . '\' is not an object');
         }
         $value = new DisplayedData();
         $this->displayedData = $value->fromObject($object->displayedData);
     }
     if (property_exists($object, 'payment')) {
         if (!is_object($object->payment)) {
             throw new UnexpectedValueException('value \'' . print_r($object->payment, true) . '\' is not an object');
         }
         $value = new Payment();
         $this->payment = $value->fromObject($object->payment);
     }
     if (property_exists($object, 'paymentCreationReferences')) {
         if (!is_object($object->paymentCreationReferences)) {
             throw new UnexpectedValueException('value \'' . print_r($object->paymentCreationReferences, true) . '\' is not an object');
         }
         $value = new PaymentCreationReferences();
         $this->paymentCreationReferences = $value->fromObject($object->paymentCreationReferences);
     }
     if (property_exists($object, 'paymentStatusCategory')) {
         $this->paymentStatusCategory = $object->paymentStatusCategory;
     }
     if (property_exists($object, 'tokens')) {
         $this->tokens = $object->tokens;
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:37,代码来源:CreatedPaymentOutput.php

示例9: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'attributes')) {
         if (!is_array($object->attributes) && !is_object($object->attributes)) {
             throw new UnexpectedValueException('value \'' . print_r($object->attributes, true) . '\' is not an array or object');
         }
         $this->attributes = [];
         foreach ($object->attributes as $attributesElementObject) {
             $attributesElement = new AccountOnFileAttribute();
             $this->attributes[] = $attributesElement->fromObject($attributesElementObject);
         }
     }
     if (property_exists($object, 'displayHints')) {
         if (!is_object($object->displayHints)) {
             throw new UnexpectedValueException('value \'' . print_r($object->displayHints, true) . '\' is not an object');
         }
         $value = new AccountOnFileDisplayHints();
         $this->displayHints = $value->fromObject($object->displayHints);
     }
     if (property_exists($object, 'id')) {
         $this->id = $object->id;
     }
     if (property_exists($object, 'paymentProductId')) {
         $this->paymentProductId = $object->paymentProductId;
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:33,代码来源:AccountOnFile.php

示例10: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'isRecurring')) {
         $this->isRecurring = $object->isRecurring;
     }
     if (property_exists($object, 'locale')) {
         $this->locale = $object->locale;
     }
     if (property_exists($object, 'paymentProductFilters')) {
         if (!is_object($object->paymentProductFilters)) {
             throw new UnexpectedValueException('value \'' . print_r($object->paymentProductFilters, true) . '\' is not an object');
         }
         $value = new PaymentProductFiltersHostedCheckout();
         $this->paymentProductFilters = $value->fromObject($object->paymentProductFilters);
     }
     if (property_exists($object, 'returnUrl')) {
         $this->returnUrl = $object->returnUrl;
     }
     if (property_exists($object, 'showResultPage')) {
         $this->showResultPage = $object->showResultPage;
     }
     if (property_exists($object, 'tokens')) {
         $this->tokens = $object->tokens;
     }
     if (property_exists($object, 'variant')) {
         $this->variant = $object->variant;
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:35,代码来源:HostedCheckoutSpecificInput.php

示例11: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'category')) {
         $this->category = $object->category;
     }
     if (property_exists($object, 'result')) {
         $this->result = $object->result;
     }
     if (property_exists($object, 'retaildecisionsCCFraudCheckOutput')) {
         if (!is_object($object->retaildecisionsCCFraudCheckOutput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->retaildecisionsCCFraudCheckOutput, true) . '\' is not an object');
         }
         $value = new RetailDecisionsCCFraudCheckOutput();
         $this->retaildecisionsCCFraudCheckOutput = $value->fromObject($object->retaildecisionsCCFraudCheckOutput);
     }
     if (property_exists($object, 'validationBankAccountOutput')) {
         if (!is_object($object->validationBankAccountOutput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->validationBankAccountOutput, true) . '\' is not an object');
         }
         $value = new ValidationBankAccountOutput();
         $this->validationBankAccountOutput = $value->fromObject($object->validationBankAccountOutput);
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:30,代码来源:ResultDoRiskAssessment.php

示例12: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'errors')) {
         if (!is_array($object->errors) && !is_object($object->errors)) {
             throw new UnexpectedValueException('value \'' . print_r($object->errors, true) . '\' is not an array or object');
         }
         $this->errors = [];
         foreach ($object->errors as $errorsElementObject) {
             $errorsElement = new APIError();
             $this->errors[] = $errorsElement->fromObject($errorsElementObject);
         }
     }
     if (property_exists($object, 'isCancellable')) {
         $this->isCancellable = $object->isCancellable;
     }
     if (property_exists($object, 'statusCategory')) {
         $this->statusCategory = $object->statusCategory;
     }
     if (property_exists($object, 'statusCode')) {
         $this->statusCode = $object->statusCode;
     }
     if (property_exists($object, 'statusCodeChangeDateTime')) {
         $this->statusCodeChangeDateTime = $object->statusCodeChangeDateTime;
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:32,代码来源:OrderStatusOutput.php

示例13: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'discountAmount')) {
         $this->discountAmount = $object->discountAmount;
     }
     if (property_exists($object, 'lineAmountTotal')) {
         $this->lineAmountTotal = $object->lineAmountTotal;
     }
     if (property_exists($object, 'productCode')) {
         $this->productCode = $object->productCode;
     }
     if (property_exists($object, 'productPrice')) {
         $this->productPrice = $object->productPrice;
     }
     if (property_exists($object, 'productType')) {
         $this->productType = $object->productType;
     }
     if (property_exists($object, 'quantity')) {
         $this->quantity = $object->quantity;
     }
     if (property_exists($object, 'taxAmount')) {
         $this->taxAmount = $object->taxAmount;
     }
     if (property_exists($object, 'unit')) {
         $this->unit = $object->unit;
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:34,代码来源:LineItemLevel3InterchangeInformation.php

示例14: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'dataRestrictions')) {
         if (!is_object($object->dataRestrictions)) {
             throw new UnexpectedValueException('value \'' . print_r($object->dataRestrictions, true) . '\' is not an object');
         }
         $value = new PaymentProductFieldDataRestrictions();
         $this->dataRestrictions = $value->fromObject($object->dataRestrictions);
     }
     if (property_exists($object, 'displayHints')) {
         if (!is_object($object->displayHints)) {
             throw new UnexpectedValueException('value \'' . print_r($object->displayHints, true) . '\' is not an object');
         }
         $value = new PaymentProductFieldDisplayHints();
         $this->displayHints = $value->fromObject($object->displayHints);
     }
     if (property_exists($object, 'id')) {
         $this->id = $object->id;
     }
     if (property_exists($object, 'type')) {
         $this->type = $object->type;
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:30,代码来源:PaymentProductField.php

示例15: fromObject

 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'checks')) {
         if (!is_array($object->checks) && !is_object($object->checks)) {
             throw new UnexpectedValueException('value \'' . print_r($object->checks, true) . '\' is not an array or object');
         }
         $this->checks = [];
         foreach ($object->checks as $checksElementObject) {
             $checksElement = new ValidationBankAccountCheck();
             $this->checks[] = $checksElement->fromObject($checksElementObject);
         }
     }
     if (property_exists($object, 'newBankName')) {
         $this->newBankName = $object->newBankName;
     }
     if (property_exists($object, 'reformattedAccountNumber')) {
         $this->reformattedAccountNumber = $object->reformattedAccountNumber;
     }
     if (property_exists($object, 'reformattedBankCode')) {
         $this->reformattedBankCode = $object->reformattedBankCode;
     }
     if (property_exists($object, 'reformattedBranchCode')) {
         $this->reformattedBranchCode = $object->reformattedBranchCode;
     }
     return $this;
 }
开发者ID:Ingenico-ePayments,项目名称:connect-sdk-php,代码行数:32,代码来源:ValidationBankAccountOutput.php


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